Skip to content

Commit fbdacb2

Browse files
committed
💥 ♻️ base for v5 (#413)
* ⬆️ update file-type * ♻️ migrate to ES modules (node18) * ⚰️ remove support for obsolete/unused products: * API builder (no longer maintained, use v2) * ⚰️ remove support for unused products available in v2: * nutrition facts * business card * US healthcare cards * bill of lading * ⚰️ remove support for unused products: * delivery note * ♻️ use undici for HTTP requests and mocking * ✨ add ability for a user to specify their own undici `Dispatcher` instance * ✨ add basic V2 CLI * ♻️ rework of directory structure
1 parent a61360e commit fbdacb2

478 files changed

Lines changed: 3980 additions & 6939 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/_static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Node.js
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: 18
21+
node-version: 22
2222
cache: "npm"
2323

2424
- name: Install Node.js dependencies

.mocharc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://json.schemastore.org/mocharc",
33
"extension": ["ts"],
4-
"require": "ts-node/register",
4+
"node-option": ["import=tsx"],
55
"spec": ["tests"]
66
}

bin/mindee.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

bin/mindeeV1.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env node
2+
3+
import { cli } from "@/v1/cli.js";
4+
5+
cli();

bin/mindeeV2.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env node
2+
3+
import { cli } from "@/v2/cli.js";
4+
5+
cli();

docs/code_samples/bank_account_details_v1.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ const mindee = require("mindee");
33
// import * as mindee from "mindee";
44

55
// Init a new client
6-
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
6+
const mindeeClient = new mindee.v1.Client(
7+
{ apiKey: "my-api-key" }
8+
);
79

810
// Load a file from disk
911
const inputSource = new mindee.PathInput(
@@ -12,7 +14,7 @@ const inputSource = new mindee.PathInput(
1214

1315
// Parse the file
1416
const apiResponse = mindeeClient.parse(
15-
mindee.product.fr.BankAccountDetailsV1,
17+
mindee.v1.product.fr.BankAccountDetailsV1,
1618
inputSource
1719
);
1820

docs/code_samples/bank_account_details_v2.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ const mindee = require("mindee");
33
// import * as mindee from "mindee";
44

55
// Init a new client
6-
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
6+
const mindeeClient = new mindee.v1.Client(
7+
{ apiKey: "my-api-key" }
8+
);
79

810
// Load a file from disk
911
const inputSource = new mindee.PathInput(
@@ -12,7 +14,7 @@ const inputSource = new mindee.PathInput(
1214

1315
// Parse the file
1416
const apiResponse = mindeeClient.parse(
15-
mindee.product.fr.BankAccountDetailsV2,
17+
mindee.v1.product.fr.BankAccountDetailsV2,
1618
inputSource
1719
);
1820

docs/code_samples/bank_check_v1.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ const mindee = require("mindee");
33
// import * as mindee from "mindee";
44

55
// Init a new client
6-
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
6+
const mindeeClient = new mindee.v1.Client(
7+
{ apiKey: "my-api-key" }
8+
);
79

810
// Load a file from disk
911
const inputSource = new mindee.PathInput(
@@ -12,7 +14,7 @@ const inputSource = new mindee.PathInput(
1214

1315
// Parse the file
1416
const apiResponse = mindeeClient.parse(
15-
mindee.product.us.BankCheckV1,
17+
mindee.v1.product.us.BankCheckV1,
1618
inputSource
1719
);
1820

docs/code_samples/barcode_reader_v1.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ const mindee = require("mindee");
33
// import * as mindee from "mindee";
44

55
// Init a new client
6-
const mindeeClient = new mindee.Client({ apiKey: "my-api-key" });
6+
const mindeeClient = new mindee.v1.Client(
7+
{ apiKey: "my-api-key" }
8+
);
79

810
// Load a file from disk
911
const inputSource = new mindee.PathInput(
@@ -12,7 +14,7 @@ const inputSource = new mindee.PathInput(
1214

1315
// Parse the file
1416
const apiResponse = mindeeClient.parse(
15-
mindee.product.BarcodeReaderV1,
17+
mindee.v1.product.BarcodeReaderV1,
1618
inputSource
1719
);
1820

docs/code_samples/bill_of_lading_v1_async.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)