simple-dynamsoft-mcp 6.2.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +18 -0
- package/README.md +98 -19
- package/data/metadata/data-manifest.json +140 -0
- package/data/metadata/dynamsoft_sdks.json +203 -3
- package/package.json +11 -2
- package/scripts/prebuild-rag-index.mjs +24 -3
- package/scripts/run-gemini-tests.mjs +25 -0
- package/scripts/update-sdk-versions.mjs +342 -0
- package/scripts/verify-doc-resources.mjs +79 -0
- package/src/gemini-retry.js +148 -0
- package/src/index.js +293 -25
- package/src/normalizers.js +67 -8
- package/src/rag.js +649 -63
- package/src/resource-index/builders.js +294 -0
- package/src/resource-index/config.js +57 -0
- package/src/resource-index/paths.js +15 -0
- package/src/resource-index/samples.js +244 -2
- package/src/resource-index/uri.js +10 -0
- package/src/resource-index/version-policy.js +11 -1
- package/src/resource-index.js +188 -7
|
@@ -10,6 +10,48 @@ function mapDocTitlesWithOptionalPlatform(articles, includePlatform = false) {
|
|
|
10
10
|
}));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
function getDcvScenarioTags(sampleName) {
|
|
14
|
+
const normalized = String(sampleName || "").toLowerCase();
|
|
15
|
+
const tags = [];
|
|
16
|
+
if (normalized.includes("mrz")) {
|
|
17
|
+
tags.push("mrz", "passport", "id-card", "machine-readable-zone");
|
|
18
|
+
}
|
|
19
|
+
if (normalized.includes("vin")) {
|
|
20
|
+
tags.push("vin", "vehicle-identification-number", "vehicle", "automotive");
|
|
21
|
+
}
|
|
22
|
+
if (normalized.includes("driver") || normalized.includes("license")) {
|
|
23
|
+
tags.push("driver-license", "id-card", "dl", "aamva");
|
|
24
|
+
}
|
|
25
|
+
if (normalized.includes("document")) {
|
|
26
|
+
tags.push("document-scan", "document-normalization", "auto-capture", "cropping", "deskew");
|
|
27
|
+
}
|
|
28
|
+
if (normalized.includes("gs1")) {
|
|
29
|
+
tags.push("gs1", "application-identifiers", "ai");
|
|
30
|
+
}
|
|
31
|
+
return Array.from(new Set(tags));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function buildProductSelectionGuidanceText() {
|
|
35
|
+
return [
|
|
36
|
+
"# Product Selection Guidance",
|
|
37
|
+
"",
|
|
38
|
+
"## DBR vs DCV",
|
|
39
|
+
"",
|
|
40
|
+
"Dynamsoft Capture Vision (DCV) is a superset architecture that aggregates DBR, DLR, DDN, DCP, and DCE.",
|
|
41
|
+
"",
|
|
42
|
+
"Use DBR when you only need barcode reading and do not need DCV workflows.",
|
|
43
|
+
"",
|
|
44
|
+
"Use DCV when your scenario includes:",
|
|
45
|
+
"- VIN scanning",
|
|
46
|
+
"- MRZ/passport/ID scanning",
|
|
47
|
+
"- Driver license parsing",
|
|
48
|
+
"- Document detection/normalization/auto-capture/cropping",
|
|
49
|
+
"- Multi-task image processing and parsing workflows",
|
|
50
|
+
"",
|
|
51
|
+
"If a query includes MRZ, VIN, driver license, or document-normalization intents, prefer DCV samples/docs."
|
|
52
|
+
].join("\n");
|
|
53
|
+
}
|
|
54
|
+
|
|
13
55
|
function addMarkdownDocResources({
|
|
14
56
|
addResourceToIndex,
|
|
15
57
|
docs,
|
|
@@ -65,11 +107,21 @@ function addMarkdownDocResources({
|
|
|
65
107
|
function buildIndexData({
|
|
66
108
|
LATEST_VERSIONS,
|
|
67
109
|
LATEST_MAJOR,
|
|
110
|
+
dcvCoreDocs,
|
|
111
|
+
dcvWebDocs,
|
|
112
|
+
dcvMobileDocs,
|
|
113
|
+
dcvServerDocs,
|
|
68
114
|
dbrWebDocs,
|
|
69
115
|
dbrMobileDocs,
|
|
70
116
|
dbrServerDocs,
|
|
71
117
|
dwtDocs,
|
|
72
118
|
ddvDocs,
|
|
119
|
+
discoverDcvWebSamples,
|
|
120
|
+
getDcvWebFrameworkPlatforms,
|
|
121
|
+
getDcvMobilePlatforms,
|
|
122
|
+
getDcvServerPlatforms,
|
|
123
|
+
discoverDcvMobileSamples,
|
|
124
|
+
discoverDcvServerSamples,
|
|
73
125
|
discoverWebSamples,
|
|
74
126
|
getDbrWebFrameworkPlatforms,
|
|
75
127
|
getDbrMobilePlatforms,
|
|
@@ -80,12 +132,20 @@ function buildIndexData({
|
|
|
80
132
|
discoverDdvSamples,
|
|
81
133
|
getDdvWebFrameworkPlatforms
|
|
82
134
|
}) {
|
|
135
|
+
const dcvCoreVersion = LATEST_VERSIONS.dcv.core;
|
|
136
|
+
const dcvWebVersion = LATEST_VERSIONS.dcv.web;
|
|
137
|
+
const dcvMobileVersion = LATEST_VERSIONS.dcv.mobile;
|
|
138
|
+
const dcvServerVersion = LATEST_VERSIONS.dcv.server;
|
|
83
139
|
const dbrMobileVersion = LATEST_VERSIONS.dbr.mobile;
|
|
84
140
|
const dbrWebVersion = LATEST_VERSIONS.dbr.web;
|
|
85
141
|
const dbrServerVersion = LATEST_VERSIONS.dbr.server;
|
|
86
142
|
const dwtVersion = LATEST_VERSIONS.dwt.web;
|
|
87
143
|
const ddvVersion = LATEST_VERSIONS.ddv.web;
|
|
88
144
|
|
|
145
|
+
const dcvWebSamples = discoverDcvWebSamples();
|
|
146
|
+
const dcvWebFrameworks = getDcvWebFrameworkPlatforms();
|
|
147
|
+
const dcvMobilePlatforms = getDcvMobilePlatforms();
|
|
148
|
+
const dcvServerPlatforms = getDcvServerPlatforms();
|
|
89
149
|
const dbrWebSamples = discoverWebSamples();
|
|
90
150
|
const dbrWebFrameworks = getDbrWebFrameworkPlatforms();
|
|
91
151
|
const dbrMobilePlatforms = getDbrMobilePlatforms();
|
|
@@ -94,7 +154,56 @@ function buildIndexData({
|
|
|
94
154
|
const ddvWebFrameworks = getDdvWebFrameworkPlatforms();
|
|
95
155
|
|
|
96
156
|
return {
|
|
157
|
+
productSelection: {
|
|
158
|
+
dcvSupersetSummary: "DCV aggregates DBR, DLR, DDN, DCP, and DCE into one pipeline.",
|
|
159
|
+
useDbrWhen: [
|
|
160
|
+
"Barcode-only workflows where DCV-specific workflows are not required."
|
|
161
|
+
],
|
|
162
|
+
useDcvWhen: [
|
|
163
|
+
"VIN scanning",
|
|
164
|
+
"MRZ/passport/ID scanning",
|
|
165
|
+
"Driver license parsing",
|
|
166
|
+
"Document normalization/auto-capture/cropping",
|
|
167
|
+
"Multi-task capture vision workflows"
|
|
168
|
+
]
|
|
169
|
+
},
|
|
97
170
|
products: {
|
|
171
|
+
dcv: {
|
|
172
|
+
latestMajor: LATEST_MAJOR.dcv,
|
|
173
|
+
editions: {
|
|
174
|
+
core: {
|
|
175
|
+
version: dcvCoreVersion,
|
|
176
|
+
platforms: ["core"],
|
|
177
|
+
docCount: dcvCoreDocs.length,
|
|
178
|
+
docTitles: mapDocTitlesWithOptionalPlatform(dcvCoreDocs)
|
|
179
|
+
},
|
|
180
|
+
web: {
|
|
181
|
+
version: dcvWebVersion,
|
|
182
|
+
platforms: ["js", ...dcvWebFrameworks],
|
|
183
|
+
samples: dcvWebSamples,
|
|
184
|
+
docCount: dcvWebDocs.length,
|
|
185
|
+
docTitles: mapDocTitlesWithOptionalPlatform(dcvWebDocs)
|
|
186
|
+
},
|
|
187
|
+
mobile: {
|
|
188
|
+
version: dcvMobileVersion,
|
|
189
|
+
platforms: dcvMobilePlatforms,
|
|
190
|
+
samples: Object.fromEntries(
|
|
191
|
+
dcvMobilePlatforms.map((platform) => [platform, discoverDcvMobileSamples(platform)])
|
|
192
|
+
),
|
|
193
|
+
docCount: dcvMobileDocs.length,
|
|
194
|
+
docTitles: mapDocTitlesWithOptionalPlatform(dcvMobileDocs, true)
|
|
195
|
+
},
|
|
196
|
+
server: {
|
|
197
|
+
version: dcvServerVersion,
|
|
198
|
+
platforms: dcvServerPlatforms,
|
|
199
|
+
samples: Object.fromEntries(
|
|
200
|
+
dcvServerPlatforms.map((platform) => [platform, discoverDcvServerSamples(platform)])
|
|
201
|
+
),
|
|
202
|
+
docCount: dcvServerDocs.length,
|
|
203
|
+
docTitles: mapDocTitlesWithOptionalPlatform(dcvServerDocs, true)
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
98
207
|
dbr: {
|
|
99
208
|
latestMajor: LATEST_MAJOR.dbr,
|
|
100
209
|
editions: {
|
|
@@ -165,11 +274,23 @@ function buildResourceIndex({
|
|
|
165
274
|
buildVersionPolicyText,
|
|
166
275
|
LATEST_VERSIONS,
|
|
167
276
|
LATEST_MAJOR,
|
|
277
|
+
dcvCoreDocs,
|
|
278
|
+
dcvWebDocs,
|
|
279
|
+
dcvMobileDocs,
|
|
280
|
+
dcvServerDocs,
|
|
168
281
|
dbrWebDocs,
|
|
169
282
|
dbrMobileDocs,
|
|
170
283
|
dbrServerDocs,
|
|
171
284
|
dwtDocs,
|
|
172
285
|
ddvDocs,
|
|
286
|
+
discoverDcvMobileSamples,
|
|
287
|
+
getDcvMobilePlatforms,
|
|
288
|
+
getDcvMobileSamplePath,
|
|
289
|
+
getDcvServerPlatforms,
|
|
290
|
+
discoverDcvServerSamples,
|
|
291
|
+
getDcvServerSampleContent,
|
|
292
|
+
discoverDcvWebSamples,
|
|
293
|
+
getDcvWebSamplePath,
|
|
173
294
|
discoverMobileSamples,
|
|
174
295
|
getDbrMobilePlatforms,
|
|
175
296
|
getMobileSamplePath,
|
|
@@ -217,12 +338,185 @@ function buildResourceIndex({
|
|
|
217
338
|
})
|
|
218
339
|
});
|
|
219
340
|
|
|
341
|
+
addResourceToIndex({
|
|
342
|
+
id: "product-selection",
|
|
343
|
+
uri: "doc://product-selection",
|
|
344
|
+
type: "policy",
|
|
345
|
+
title: "Product Selection Guidance",
|
|
346
|
+
summary: "When to use DCV vs DBR (and when DWT/DDV are better fits).",
|
|
347
|
+
mimeType: "text/markdown",
|
|
348
|
+
tags: ["guidance", "product-selection", "dcv", "dbr", "dwt", "ddv"],
|
|
349
|
+
pinned: true,
|
|
350
|
+
loadContent: async () => ({
|
|
351
|
+
text: buildProductSelectionGuidanceText(),
|
|
352
|
+
mimeType: "text/markdown"
|
|
353
|
+
})
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
const dcvCoreVersion = LATEST_VERSIONS.dcv.core;
|
|
357
|
+
const dcvWebVersion = LATEST_VERSIONS.dcv.web;
|
|
358
|
+
const dcvMobileVersion = LATEST_VERSIONS.dcv.mobile;
|
|
359
|
+
const dcvServerVersion = LATEST_VERSIONS.dcv.server;
|
|
220
360
|
const dbrMobileVersion = LATEST_VERSIONS.dbr.mobile;
|
|
221
361
|
const dbrWebVersion = LATEST_VERSIONS.dbr.web;
|
|
222
362
|
const dbrServerVersion = LATEST_VERSIONS.dbr.server;
|
|
223
363
|
const dwtVersion = LATEST_VERSIONS.dwt.web;
|
|
224
364
|
const ddvVersion = LATEST_VERSIONS.ddv.web;
|
|
225
365
|
|
|
366
|
+
addMarkdownDocResources({
|
|
367
|
+
addResourceToIndex,
|
|
368
|
+
docs: dcvCoreDocs,
|
|
369
|
+
idPrefix: "dcv-core-doc",
|
|
370
|
+
uriPrefix: "doc://dcv/core",
|
|
371
|
+
product: "dcv",
|
|
372
|
+
edition: "core",
|
|
373
|
+
version: dcvCoreVersion,
|
|
374
|
+
majorVersion: LATEST_MAJOR.dcv,
|
|
375
|
+
defaultPlatform: "core",
|
|
376
|
+
defaultSummary: "Dynamsoft Capture Vision Core documentation",
|
|
377
|
+
baseTags: ["doc", "dcv", "core"]
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
addMarkdownDocResources({
|
|
381
|
+
addResourceToIndex,
|
|
382
|
+
docs: dcvWebDocs,
|
|
383
|
+
idPrefix: "dcv-web-doc",
|
|
384
|
+
uriPrefix: "doc://dcv/web",
|
|
385
|
+
product: "dcv",
|
|
386
|
+
edition: "web",
|
|
387
|
+
version: dcvWebVersion,
|
|
388
|
+
majorVersion: LATEST_MAJOR.dcv,
|
|
389
|
+
defaultPlatform: "web",
|
|
390
|
+
defaultSummary: "Dynamsoft Capture Vision Web documentation",
|
|
391
|
+
baseTags: ["doc", "dcv", "web"]
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
addMarkdownDocResources({
|
|
395
|
+
addResourceToIndex,
|
|
396
|
+
docs: dcvMobileDocs,
|
|
397
|
+
idPrefix: "dcv-mobile-doc",
|
|
398
|
+
uriPrefix: "doc://dcv/mobile",
|
|
399
|
+
product: "dcv",
|
|
400
|
+
edition: "mobile",
|
|
401
|
+
version: dcvMobileVersion,
|
|
402
|
+
majorVersion: LATEST_MAJOR.dcv,
|
|
403
|
+
defaultPlatform: "mobile",
|
|
404
|
+
defaultSummary: "Dynamsoft Capture Vision Mobile documentation",
|
|
405
|
+
baseTags: ["doc", "dcv", "mobile"]
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
addMarkdownDocResources({
|
|
409
|
+
addResourceToIndex,
|
|
410
|
+
docs: dcvServerDocs,
|
|
411
|
+
idPrefix: "dcv-server-doc",
|
|
412
|
+
uriPrefix: "doc://dcv/server",
|
|
413
|
+
product: "dcv",
|
|
414
|
+
edition: "server",
|
|
415
|
+
version: dcvServerVersion,
|
|
416
|
+
majorVersion: LATEST_MAJOR.dcv,
|
|
417
|
+
defaultPlatform: "server",
|
|
418
|
+
defaultSummary: "Dynamsoft Capture Vision Server/Desktop documentation",
|
|
419
|
+
baseTags: ["doc", "dcv", "server"]
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
for (const sampleName of discoverDcvWebSamples()) {
|
|
423
|
+
const scenarioTags = getDcvScenarioTags(sampleName);
|
|
424
|
+
addResourceToIndex({
|
|
425
|
+
id: `dcv-web-${sampleName}`,
|
|
426
|
+
uri: `sample://dcv/web/web/${dcvWebVersion}/${sampleName}`,
|
|
427
|
+
type: "sample",
|
|
428
|
+
product: "dcv",
|
|
429
|
+
edition: "web",
|
|
430
|
+
platform: "web",
|
|
431
|
+
version: dcvWebVersion,
|
|
432
|
+
majorVersion: LATEST_MAJOR.dcv,
|
|
433
|
+
title: `DCV web sample: ${sampleName}`,
|
|
434
|
+
summary: `DCV web sample ${sampleName}.`,
|
|
435
|
+
mimeType: "text/plain",
|
|
436
|
+
tags: ["sample", "dcv", "web", sampleName, ...scenarioTags],
|
|
437
|
+
loadContent: async () => {
|
|
438
|
+
const samplePath = getDcvWebSamplePath(sampleName);
|
|
439
|
+
if (!samplePath || !existsSync(samplePath)) return { text: "Sample not found", mimeType: "text/plain" };
|
|
440
|
+
|
|
441
|
+
const stat = statSync(samplePath);
|
|
442
|
+
if (stat.isDirectory()) {
|
|
443
|
+
const readmePath = join(samplePath, "README.md");
|
|
444
|
+
if (existsSync(readmePath)) return { text: readCodeFile(readmePath), mimeType: "text/markdown" };
|
|
445
|
+
const codeFiles = findCodeFilesInSample(samplePath);
|
|
446
|
+
if (codeFiles.length > 0) {
|
|
447
|
+
const preferred = codeFiles.find((file) => file.filename === "index.html") || codeFiles[0];
|
|
448
|
+
return { text: readCodeFile(preferred.path), mimeType: getMimeTypeForExtension(preferred.extension) };
|
|
449
|
+
}
|
|
450
|
+
return { text: "Sample found, but no code files detected.", mimeType: "text/plain" };
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
const ext = extname(samplePath).replace(".", "");
|
|
454
|
+
return { text: readCodeFile(samplePath), mimeType: getMimeTypeForExtension(ext) };
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
for (const platform of getDcvMobilePlatforms()) {
|
|
460
|
+
for (const sampleName of discoverDcvMobileSamples(platform)) {
|
|
461
|
+
const scenarioTags = getDcvScenarioTags(sampleName);
|
|
462
|
+
addResourceToIndex({
|
|
463
|
+
id: `dcv-mobile-${platform}-${sampleName}`,
|
|
464
|
+
uri: `sample://dcv/mobile/${platform}/${dcvMobileVersion}/${sampleName}`,
|
|
465
|
+
type: "sample",
|
|
466
|
+
product: "dcv",
|
|
467
|
+
edition: "mobile",
|
|
468
|
+
platform,
|
|
469
|
+
version: dcvMobileVersion,
|
|
470
|
+
majorVersion: LATEST_MAJOR.dcv,
|
|
471
|
+
title: `DCV mobile sample: ${sampleName} (${platform})`,
|
|
472
|
+
summary: `DCV mobile ${platform} sample ${sampleName}.`,
|
|
473
|
+
mimeType: "text/plain",
|
|
474
|
+
tags: ["sample", "dcv", "mobile", platform, sampleName, ...scenarioTags],
|
|
475
|
+
loadContent: async () => {
|
|
476
|
+
const samplePath = getDcvMobileSamplePath(platform, sampleName);
|
|
477
|
+
if (!samplePath || !existsSync(samplePath)) return { text: "Sample not found", mimeType: "text/plain" };
|
|
478
|
+
|
|
479
|
+
const stat = statSync(samplePath);
|
|
480
|
+
if (stat.isFile()) {
|
|
481
|
+
const ext = extname(samplePath).replace(".", "");
|
|
482
|
+
return { text: readCodeFile(samplePath), mimeType: getMimeTypeForExtension(ext) };
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
const mainFile = getMainCodeFile(platform, samplePath);
|
|
486
|
+
if (mainFile) {
|
|
487
|
+
const ext = mainFile.filename.split(".").pop() || "";
|
|
488
|
+
return { text: readCodeFile(mainFile.path), mimeType: getMimeTypeForExtension(ext) };
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
const readmePath = join(samplePath, "README.md");
|
|
492
|
+
if (existsSync(readmePath)) return { text: readCodeFile(readmePath), mimeType: "text/markdown" };
|
|
493
|
+
return { text: "Sample found, but no code files detected.", mimeType: "text/plain" };
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
for (const platform of getDcvServerPlatforms()) {
|
|
500
|
+
for (const sampleName of discoverDcvServerSamples(platform)) {
|
|
501
|
+
const scenarioTags = getDcvScenarioTags(sampleName);
|
|
502
|
+
addResourceToIndex({
|
|
503
|
+
id: `dcv-${platform}-${sampleName}`,
|
|
504
|
+
uri: `sample://dcv/server/${platform}/${dcvServerVersion}/${sampleName}`,
|
|
505
|
+
type: "sample",
|
|
506
|
+
product: "dcv",
|
|
507
|
+
edition: "server",
|
|
508
|
+
platform,
|
|
509
|
+
version: dcvServerVersion,
|
|
510
|
+
majorVersion: LATEST_MAJOR.dcv,
|
|
511
|
+
title: `DCV ${platform.toUpperCase()} sample: ${sampleName}`,
|
|
512
|
+
summary: `DCV ${platform} sample ${sampleName}.`,
|
|
513
|
+
mimeType: platform === "python" ? "text/x-python" : (platform === "nodejs" ? "text/javascript" : "text/plain"),
|
|
514
|
+
tags: ["sample", "dcv", "server", platform, sampleName, ...scenarioTags],
|
|
515
|
+
loadContent: async () => getDcvServerSampleContent(platform, sampleName)
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
226
520
|
addMarkdownDocResources({
|
|
227
521
|
addResourceToIndex,
|
|
228
522
|
docs: dbrWebDocs,
|
|
@@ -9,6 +9,17 @@ const SAMPLE_DIRS = {
|
|
|
9
9
|
dbrReactNative: "dynamsoft-barcode-reader-react-native",
|
|
10
10
|
dbrFlutter: "dynamsoft-barcode-reader-flutter",
|
|
11
11
|
dbrNodejs: "dynamsoft-capture-vision-nodejs",
|
|
12
|
+
dcvWeb: "dynamsoft-capture-vision-javascript",
|
|
13
|
+
dcvMobile: "dynamsoft-capture-vision-mobile",
|
|
14
|
+
dcvPython: "dynamsoft-capture-vision-python",
|
|
15
|
+
dcvDotnet: "dynamsoft-capture-vision-dotnet",
|
|
16
|
+
dcvJava: "dynamsoft-capture-vision-java",
|
|
17
|
+
dcvCpp: "dynamsoft-capture-vision-c-cpp",
|
|
18
|
+
dcvMaui: "dynamsoft-capture-vision-maui",
|
|
19
|
+
dcvReactNative: "dynamsoft-capture-vision-react-native",
|
|
20
|
+
dcvFlutter: "dynamsoft-capture-vision-flutter",
|
|
21
|
+
dcvNodejs: "dynamsoft-capture-vision-nodejs",
|
|
22
|
+
dcvSpm: "dynamsoft-capture-vision-spm",
|
|
12
23
|
dwt: "dynamic-web-twain",
|
|
13
24
|
ddv: "dynamsoft-document-viewer"
|
|
14
25
|
};
|
|
@@ -17,6 +28,10 @@ const DOC_DIRS = {
|
|
|
17
28
|
dbrWeb: "barcode-reader-docs-js",
|
|
18
29
|
dbrMobile: "barcode-reader-docs-mobile",
|
|
19
30
|
dbrServer: "barcode-reader-docs-server",
|
|
31
|
+
dcvWeb: "capture-vision-docs-js",
|
|
32
|
+
dcvMobile: "capture-vision-docs-mobile",
|
|
33
|
+
dcvServer: "capture-vision-docs-server",
|
|
34
|
+
dcvCore: "capture-vision-docs",
|
|
20
35
|
dwt: "web-twain-docs",
|
|
21
36
|
ddv: "document-viewer-docs"
|
|
22
37
|
};
|
|
@@ -37,6 +52,26 @@ const DOCS_CONFIG = {
|
|
|
37
52
|
excludeDirs: [".git", ".github", ".vscode", ".vs", "_data", "_includes", "_layouts", "assets"],
|
|
38
53
|
excludeFiles: ["README.md", "search.md", "error.md"]
|
|
39
54
|
},
|
|
55
|
+
dcvWeb: {
|
|
56
|
+
urlBase: "https://www.dynamsoft.com/capture-vision/docs/web/",
|
|
57
|
+
excludeDirs: [".git", ".github", ".vscode", ".vs", "_data", "_includes", "_layouts", "assets"],
|
|
58
|
+
excludeFiles: ["README.md", "search.md", "error.md"]
|
|
59
|
+
},
|
|
60
|
+
dcvMobile: {
|
|
61
|
+
urlBase: "https://www.dynamsoft.com/capture-vision/docs/mobile/",
|
|
62
|
+
excludeDirs: [".git", ".github", ".vscode", ".vs", "_data", "_includes", "_layouts", "assets"],
|
|
63
|
+
excludeFiles: ["README.md", "search.md", "error.md"]
|
|
64
|
+
},
|
|
65
|
+
dcvServer: {
|
|
66
|
+
urlBase: "https://www.dynamsoft.com/capture-vision/docs/server/",
|
|
67
|
+
excludeDirs: [".git", ".github", ".vscode", ".vs", "_data", "_includes", "_layouts", "assets"],
|
|
68
|
+
excludeFiles: ["README.md", "search.md", "error.md"]
|
|
69
|
+
},
|
|
70
|
+
dcvCore: {
|
|
71
|
+
urlBase: "https://www.dynamsoft.com/capture-vision/docs/core/",
|
|
72
|
+
excludeDirs: [".git", ".github", ".vscode", ".vs", "_data", "_includes", "_layouts", "assets"],
|
|
73
|
+
excludeFiles: ["README.md", "search.md", "error.md"]
|
|
74
|
+
},
|
|
40
75
|
dwt: {
|
|
41
76
|
urlBase: "https://www.dynamsoft.com/web-twain/docs/",
|
|
42
77
|
includeDirNames: ["_articles"]
|
|
@@ -63,6 +98,8 @@ const DOCS_CONFIG = {
|
|
|
63
98
|
|
|
64
99
|
const DBR_MOBILE_PLATFORM_CANDIDATES = ["android", "ios", "maui", "react-native", "flutter"];
|
|
65
100
|
const DBR_SERVER_PLATFORM_CANDIDATES = ["python", "cpp", "java", "dotnet", "nodejs"];
|
|
101
|
+
const DCV_MOBILE_PLATFORM_CANDIDATES = ["android", "ios", "maui", "react-native", "flutter", "spm"];
|
|
102
|
+
const DCV_SERVER_PLATFORM_CANDIDATES = ["python", "cpp", "java", "dotnet", "nodejs"];
|
|
66
103
|
|
|
67
104
|
const CODE_FILE_EXTENSIONS = [
|
|
68
105
|
".java",
|
|
@@ -115,6 +152,22 @@ const DBR_SERVER_PREFERRED_EXTS = {
|
|
|
115
152
|
nodejs: [".js", ".mjs", ".cjs", ".ts"]
|
|
116
153
|
};
|
|
117
154
|
|
|
155
|
+
const DCV_SERVER_PREFERRED_FILES = {
|
|
156
|
+
dotnet: ["Program.cs", "MainPage.xaml.cs", "MainPage.cs"],
|
|
157
|
+
java: ["Main.java", "App.java"],
|
|
158
|
+
cpp: ["main.cpp", "Main.cpp"],
|
|
159
|
+
nodejs: ["index.js", "index.mjs", "app.js", "app.mjs", "server.js", "server.mjs"],
|
|
160
|
+
python: ["document_scanner.py", "mrz_scanner.py", "vin_scanner.py", "driver_license_scanner.py", "gs1_ai_scanner.py"]
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const DCV_SERVER_PREFERRED_EXTS = {
|
|
164
|
+
dotnet: [".cs"],
|
|
165
|
+
java: [".java"],
|
|
166
|
+
cpp: [".cpp", ".cc", ".cxx", ".h", ".hpp"],
|
|
167
|
+
nodejs: [".js", ".mjs", ".cjs", ".ts"],
|
|
168
|
+
python: [".py"]
|
|
169
|
+
};
|
|
170
|
+
|
|
118
171
|
const LEGACY_DBR_LINKS = {
|
|
119
172
|
"10": {
|
|
120
173
|
web: { web: "https://www.dynamsoft.com/barcode-reader/docs/v10/web/programming/javascript/" },
|
|
@@ -160,10 +213,14 @@ export {
|
|
|
160
213
|
DOCS_CONFIG,
|
|
161
214
|
DBR_MOBILE_PLATFORM_CANDIDATES,
|
|
162
215
|
DBR_SERVER_PLATFORM_CANDIDATES,
|
|
216
|
+
DCV_MOBILE_PLATFORM_CANDIDATES,
|
|
217
|
+
DCV_SERVER_PLATFORM_CANDIDATES,
|
|
163
218
|
CODE_FILE_EXTENSIONS,
|
|
164
219
|
DDV_PREFERRED_ENTRY_FILES,
|
|
165
220
|
DBR_SERVER_PREFERRED_FILES,
|
|
166
221
|
DBR_SERVER_PREFERRED_EXTS,
|
|
222
|
+
DCV_SERVER_PREFERRED_FILES,
|
|
223
|
+
DCV_SERVER_PREFERRED_EXTS,
|
|
167
224
|
LEGACY_DBR_LINKS,
|
|
168
225
|
LEGACY_DWT_LINKS
|
|
169
226
|
};
|
|
@@ -25,6 +25,17 @@ const SAMPLE_ROOTS = {
|
|
|
25
25
|
dbrReactNative: join(samplesRoot, SAMPLE_DIRS.dbrReactNative),
|
|
26
26
|
dbrFlutter: join(samplesRoot, SAMPLE_DIRS.dbrFlutter),
|
|
27
27
|
dbrNodejs: join(samplesRoot, SAMPLE_DIRS.dbrNodejs),
|
|
28
|
+
dcvWeb: join(samplesRoot, SAMPLE_DIRS.dcvWeb),
|
|
29
|
+
dcvMobile: join(samplesRoot, SAMPLE_DIRS.dcvMobile),
|
|
30
|
+
dcvPython: join(samplesRoot, SAMPLE_DIRS.dcvPython),
|
|
31
|
+
dcvDotnet: join(samplesRoot, SAMPLE_DIRS.dcvDotnet),
|
|
32
|
+
dcvJava: join(samplesRoot, SAMPLE_DIRS.dcvJava),
|
|
33
|
+
dcvCpp: join(samplesRoot, SAMPLE_DIRS.dcvCpp),
|
|
34
|
+
dcvMaui: join(samplesRoot, SAMPLE_DIRS.dcvMaui),
|
|
35
|
+
dcvReactNative: join(samplesRoot, SAMPLE_DIRS.dcvReactNative),
|
|
36
|
+
dcvFlutter: join(samplesRoot, SAMPLE_DIRS.dcvFlutter),
|
|
37
|
+
dcvNodejs: join(samplesRoot, SAMPLE_DIRS.dcvNodejs),
|
|
38
|
+
dcvSpm: join(samplesRoot, SAMPLE_DIRS.dcvSpm),
|
|
28
39
|
dwt: join(samplesRoot, SAMPLE_DIRS.dwt),
|
|
29
40
|
ddv: join(samplesRoot, SAMPLE_DIRS.ddv)
|
|
30
41
|
};
|
|
@@ -33,6 +44,10 @@ const DOC_ROOTS = {
|
|
|
33
44
|
dbrWeb: join(docsRoot, DOC_DIRS.dbrWeb),
|
|
34
45
|
dbrMobile: join(docsRoot, DOC_DIRS.dbrMobile),
|
|
35
46
|
dbrServer: join(docsRoot, DOC_DIRS.dbrServer),
|
|
47
|
+
dcvWeb: join(docsRoot, DOC_DIRS.dcvWeb),
|
|
48
|
+
dcvMobile: join(docsRoot, DOC_DIRS.dcvMobile),
|
|
49
|
+
dcvServer: join(docsRoot, DOC_DIRS.dcvServer),
|
|
50
|
+
dcvCore: join(docsRoot, DOC_DIRS.dcvCore),
|
|
36
51
|
dwt: join(docsRoot, DOC_DIRS.dwt),
|
|
37
52
|
dwtArticles: join(docsRoot, DOC_DIRS.dwt, "_articles"),
|
|
38
53
|
ddv: join(docsRoot, DOC_DIRS.ddv)
|