node-hp-scan-to 1.4.0 → 1.4.1
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/dist/ScanCaps.d.ts +8 -8
- package/dist/ScanCaps.js +18 -10
- package/dist/ScanCaps.js.map +1 -1
- package/dist/readDeviceCapabilities.js +4 -4
- package/dist/readDeviceCapabilities.js.map +1 -1
- package/dist/scanProcessing.d.ts +3 -2
- package/dist/scanProcessing.js +4 -4
- package/dist/scanProcessing.js.map +1 -1
- package/dist/test/DiscoveryTree.test.d.ts +1 -0
- package/dist/test/DiscoveryTree.test.js +68 -0
- package/dist/test/DiscoveryTree.test.js.map +1 -0
- package/dist/test/EtagEventTable.test.d.ts +1 -0
- package/dist/test/EtagEventTable.test.js +93 -0
- package/dist/test/EtagEventTable.test.js.map +1 -0
- package/dist/test/Job.test.d.ts +1 -0
- package/dist/test/Job.test.js +104 -0
- package/dist/test/Job.test.js.map +1 -0
- package/dist/test/JpegUtil.test.d.ts +1 -0
- package/dist/test/JpegUtil.test.js +53 -0
- package/dist/test/JpegUtil.test.js.map +1 -0
- package/dist/test/PathHelper.test.d.ts +1 -0
- package/dist/test/PathHelper.test.js +98 -0
- package/dist/test/PathHelper.test.js.map +1 -0
- package/dist/test/ScanCaps.test.d.ts +1 -0
- package/dist/test/ScanCaps.test.js +76 -0
- package/dist/test/ScanCaps.test.js.map +1 -0
- package/dist/test/ScanJobManifest.test.d.ts +1 -0
- package/dist/test/ScanJobManifest.test.js +56 -0
- package/dist/test/ScanJobManifest.test.js.map +1 -0
- package/dist/test/ScanJobSettings.test.d.ts +1 -0
- package/dist/test/ScanJobSettings.test.js +59 -0
- package/dist/test/ScanJobSettings.test.js.map +1 -0
- package/dist/test/ScanStatus.test.d.ts +1 -0
- package/dist/test/ScanStatus.test.js +75 -0
- package/dist/test/ScanStatus.test.js.map +1 -0
- package/dist/test/WalkupScanDestination.test.d.ts +1 -0
- package/dist/test/WalkupScanDestination.test.js +80 -0
- package/dist/test/WalkupScanDestination.test.js.map +1 -0
- package/dist/test/WalkupScanDestinations.test.d.ts +1 -0
- package/dist/test/WalkupScanDestinations.test.js +68 -0
- package/dist/test/WalkupScanDestinations.test.js.map +1 -0
- package/dist/test/WalkupScanManifest.test.d.ts +1 -0
- package/dist/test/WalkupScanManifest.test.js +46 -0
- package/dist/test/WalkupScanManifest.test.js.map +1 -0
- package/dist/test/WalkupScanToCompCaps.test.d.ts +1 -0
- package/dist/test/WalkupScanToCompCaps.test.js +56 -0
- package/dist/test/WalkupScanToCompCaps.test.js.map +1 -0
- package/dist/test/WalkupScanToCompDestination.test.d.ts +1 -0
- package/dist/test/WalkupScanToCompDestination.test.js +58 -0
- package/dist/test/WalkupScanToCompDestination.test.js.map +1 -0
- package/dist/test/WalkupScanToCompDestinations.test.d.ts +1 -0
- package/dist/test/WalkupScanToCompDestinations.test.js +58 -0
- package/dist/test/WalkupScanToCompDestinations.test.js.map +1 -0
- package/dist/test/WalkupScanToCompEvent.test.d.ts +1 -0
- package/dist/test/WalkupScanToCompEvent.test.js +46 -0
- package/dist/test/WalkupScanToCompEvent.test.js.map +1 -0
- package/dist/test/WalkupScanToCompManifest.test.d.ts +1 -0
- package/dist/test/WalkupScanToCompManifest.test.js +46 -0
- package/dist/test/WalkupScanToCompManifest.test.js.map +1 -0
- package/dist/test/clean.d.ts +1 -0
- package/dist/test/clean.js +21 -0
- package/dist/test/clean.js.map +1 -0
- package/dist/test/scanProcessing.test.d.ts +1 -0
- package/dist/test/scanProcessing.test.js +103 -0
- package/dist/test/scanProcessing.test.js.map +1 -0
- package/package.json +1 -1
- package/src/ScanCaps.ts +30 -20
- package/src/readDeviceCapabilities.ts +4 -4
- package/src/scanProcessing.ts +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanDestination.test.js","sourceRoot":"","sources":["../../test/WalkupScanDestination.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA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AAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;YAC1B,IAAA,aAAM,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { expect } from \"chai\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport WalkupScanDestination from \"../src/WalkupScanDestination\";\n\ndescribe(\"WalkupScanDestination\", () => {\n describe(\"Parsing walkupScanToCompDestination_with_ScanPlexMode.xml\", async () => {\n let destination: WalkupScanDestination;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanDestination_with_ScanPlexMode.xml\"\n ),\n { encoding: \"utf8\" }\n );\n destination = await WalkupScanDestination.createWalkupScanDestination(content);\n });\n\n it(\"Parse scanPlexMode\", async () => {\n expect(destination.scanPlexMode).to.be.eq(\"Simplex\");\n });\n\n it(\"Parse shortcut\", async () => {\n expect(destination.shortcut).to.be.eq(\"SavePDF\");\n });\n\n it(\"Parse resourceURI\", async () => {\n expect(destination.resourceURI).to.be.eq(\n \"http://192.168.1.7:8080/WalkupScan/WalkupScanDestinations/1cb3125d-7bde-1f09-8da2-2c768ab21113\"\n );\n });\n\n it(\"Parse hostname\", async () => {\n expect(destination.hostname).to.be.eq(\"LAPTOP-BSHRTBV8\");\n });\n\n it(\"Parse name\", async () => {\n expect(destination.name).to.be.eq(\"LAPTOP-BSHRTBV8\");\n });\n });\n describe(\"Parsing walkupScanDestination_with_shortcut_SaveDocument1.xml\", async () => {\n let destination: WalkupScanDestination;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanDestination_with_shortcut_SaveDocument1.xml\"\n ),\n { encoding: \"utf8\" }\n );\n destination = await WalkupScanDestination.createWalkupScanDestination(content);\n });\n\n it(\"Parse scanPlexMode\", async () => {\n expect(destination.scanPlexMode).to.be.eq(\"Simplex\");\n });\n\n it(\"Parse shortcut\", async () => {\n expect(destination.shortcut).to.be.eq(\"SaveDocument1\");\n });\n\n it(\"Parse resourceURI\", async () => {\n expect(destination.resourceURI).to.be.eq(\n \"http://192.168.5.221:80/WalkupScan/WalkupScanDestinations/1c8530e5-b81c-1f08-8d61-984be142325d\"\n );\n });\n\n it(\"Parse hostname\", async () => {\n expect(destination.hostname).to.be.eq(\"scan\");\n });\n\n it(\"Parse name\", async () => {\n expect(destination.name).to.be.eq(\"scan\");\n });\n });\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const mocha_1 = require("mocha");
|
|
30
|
+
const chai_1 = require("chai");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const fs = __importStar(require("fs/promises"));
|
|
33
|
+
const WalkupScanDestinations_1 = __importDefault(require("../src/WalkupScanDestinations"));
|
|
34
|
+
(0, mocha_1.describe)("WalkupScanDestinations", () => {
|
|
35
|
+
(0, mocha_1.describe)("Parsing walkupScanDestinations.xml", async () => {
|
|
36
|
+
let destinations;
|
|
37
|
+
before(async () => {
|
|
38
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanDestinations.xml"), { encoding: "utf8" });
|
|
39
|
+
destinations = await WalkupScanDestinations_1.default.createWalkupScanDestinations(content);
|
|
40
|
+
});
|
|
41
|
+
it("Parse scanPlexMode", async () => {
|
|
42
|
+
(0, chai_1.expect)(destinations.destinations[0].scanPlexMode).to.be.eq(null);
|
|
43
|
+
});
|
|
44
|
+
it("Parse shortcut", async () => {
|
|
45
|
+
(0, chai_1.expect)(destinations.destinations[0].shortcut).to.be.eq(null);
|
|
46
|
+
});
|
|
47
|
+
it("Parse resourceURI", async () => {
|
|
48
|
+
(0, chai_1.expect)(destinations.destinations[0].resourceURI).to.be.eq("http://192.168.1.30:80/WalkupScan/WalkupScanDestinations/1c856ba3-b916-1f08-be4e-2c768ab21113");
|
|
49
|
+
});
|
|
50
|
+
it("Parse hostname", async () => {
|
|
51
|
+
(0, chai_1.expect)(destinations.destinations[0].hostname).to.be.eq("manu-sve1511b1ew");
|
|
52
|
+
});
|
|
53
|
+
it("Parse name", async () => {
|
|
54
|
+
(0, chai_1.expect)(destinations.destinations[0].name).to.be.eq("manu-sve1511b1ew");
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
(0, mocha_1.describe)("Parsing walkupScanDestinations2.xml", async () => {
|
|
58
|
+
let destinations;
|
|
59
|
+
before(async () => {
|
|
60
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanDestinations2.xml"), { encoding: "utf8" });
|
|
61
|
+
destinations = await WalkupScanDestinations_1.default.createWalkupScanDestinations(content);
|
|
62
|
+
});
|
|
63
|
+
it("Parse destinations", async () => {
|
|
64
|
+
(0, chai_1.expect)(destinations.destinations).to.be.empty;
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=WalkupScanDestinations.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanDestinations.test.js","sourceRoot":"","sources":["../../test/WalkupScanDestinations.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,+BAA8B;AAC9B,gDAAwB;AACxB,gDAAkC;AAClC,2FAAmE;AAEnE,IAAA,gBAAQ,EAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAA,gBAAQ,EAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QACxD,IAAI,YAAoC,CAAC;QAEzC,MAAM,CAAC,KAAK,IAAI,EAAE;YAChB,MAAM,OAAO,GAAW,MAAM,EAAE,CAAC,QAAQ,CACvC,cAAI,CAAC,OAAO,CACV,SAAS,EACT,oCAAoC,CACrC,EACD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;YACF,YAAY,GAAG,MAAM,gCAAsB,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;QACpF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAA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I,CAAC,OAAO,CACV,SAAS,EACT,qCAAqC,CACtC,EACD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;YACF,YAAY,GAAG,MAAM,gCAAsB,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;QACpF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;YAClC,IAAA,aAAM,EAAC,YAAY,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { expect } from \"chai\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport WalkupScanDestinations from \"../src/WalkupScanDestinations\";\n\ndescribe(\"WalkupScanDestinations\", () => {\n describe(\"Parsing walkupScanDestinations.xml\", async () => {\n let destinations: WalkupScanDestinations;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanDestinations.xml\"\n ),\n { encoding: \"utf8\" }\n );\n destinations = await WalkupScanDestinations.createWalkupScanDestinations(content);\n });\n\n it(\"Parse scanPlexMode\", async () => {\n expect(destinations.destinations[0].scanPlexMode).to.be.eq(null);\n });\n\n it(\"Parse shortcut\", async () => {\n expect(destinations.destinations[0].shortcut).to.be.eq(null);\n });\n\n it(\"Parse resourceURI\", async () => {\n expect(destinations.destinations[0].resourceURI).to.be.eq(\n \"http://192.168.1.30:80/WalkupScan/WalkupScanDestinations/1c856ba3-b916-1f08-be4e-2c768ab21113\"\n );\n });\n\n it(\"Parse hostname\", async () => {\n expect(destinations.destinations[0].hostname).to.be.eq(\"manu-sve1511b1ew\");\n });\n\n it(\"Parse name\", async () => {\n expect(destinations.destinations[0].name).to.be.eq(\"manu-sve1511b1ew\");\n });\n });\n describe(\"Parsing walkupScanDestinations2.xml\", async () => {\n let destinations: WalkupScanDestinations;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanDestinations2.xml\"\n ),\n { encoding: \"utf8\" }\n );\n destinations = await WalkupScanDestinations.createWalkupScanDestinations(content);\n });\n\n it(\"Parse destinations\", async () => {\n expect(destinations.destinations).to.be.empty;\n });\n });\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const mocha_1 = require("mocha");
|
|
30
|
+
const chai_1 = require("chai");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const fs = __importStar(require("fs/promises"));
|
|
33
|
+
const WalkupScanManifest_1 = __importDefault(require("../src/WalkupScanManifest"));
|
|
34
|
+
(0, mocha_1.describe)("WalkupScanManifest", () => {
|
|
35
|
+
(0, mocha_1.describe)("Parsing walkupScanManifest.xml", async () => {
|
|
36
|
+
let walkupScanManifest;
|
|
37
|
+
before(async () => {
|
|
38
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanManifest.xml"), { encoding: "utf8" });
|
|
39
|
+
walkupScanManifest = await WalkupScanManifest_1.default.createWalkupScanManifest(content);
|
|
40
|
+
});
|
|
41
|
+
it("Parse walkupScanDestinationsURI uri", async () => {
|
|
42
|
+
(0, chai_1.expect)(walkupScanManifest.walkupScanDestinationsURI).to.be.eq("/WalkupScan/WalkupScanDestinations");
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=WalkupScanManifest.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanManifest.test.js","sourceRoot":"","sources":["../../test/WalkupScanManifest.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,+BAA8B;AAC9B,gDAAwB;AACxB,gDAAkC;AAClC,mFAA2D;AAE3D,IAAA,gBAAQ,EAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAA,gBAAQ,EAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;QACpD,IAAI,kBAAsC,CAAC;QAE3C,MAAM,CAAC,KAAK,IAAI,EAAE;YAChB,MAAM,OAAO,GAAW,MAAM,EAAE,CAAC,QAAQ,CACvC,cAAI,CAAC,OAAO,CACV,SAAS,EACT,gCAAgC,CACjC,EACD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;YACF,kBAAkB,GAAG,MAAM,4BAAkB,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QAClF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;YACnD,IAAA,aAAM,EAAC,kBAAkB,CAAC,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,oCAAoC,CAAC,CAAC;QACtG,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { expect } from \"chai\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport WalkupScanManifest from \"../src/WalkupScanManifest\";\n\ndescribe(\"WalkupScanManifest\", () => {\n describe(\"Parsing walkupScanManifest.xml\", async () => {\n let walkupScanManifest: WalkupScanManifest;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanManifest.xml\"\n ),\n { encoding: \"utf8\" }\n );\n walkupScanManifest = await WalkupScanManifest.createWalkupScanManifest(content);\n });\n\n it(\"Parse walkupScanDestinationsURI uri\", async () => {\n expect(walkupScanManifest.walkupScanDestinationsURI).to.be.eq(\"/WalkupScan/WalkupScanDestinations\");\n });\n });\n\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const mocha_1 = require("mocha");
|
|
30
|
+
const chai_1 = require("chai");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const fs = __importStar(require("fs/promises"));
|
|
33
|
+
const WalkupScanToCompCaps_1 = __importDefault(require("../src/WalkupScanToCompCaps"));
|
|
34
|
+
(0, mocha_1.describe)("WalkupScanToCompCaps", () => {
|
|
35
|
+
(0, mocha_1.describe)("Parsing walkupScanToCompCaps.xml", async () => {
|
|
36
|
+
let walkupScanToCompCaps;
|
|
37
|
+
before(async () => {
|
|
38
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanToCompCaps.xml"), { encoding: "utf8" });
|
|
39
|
+
walkupScanToCompCaps = await WalkupScanToCompCaps_1.default.createWalkupScanToCompCaps(content);
|
|
40
|
+
});
|
|
41
|
+
it("Parse supportsMultiItemScanFromPlaten", async () => {
|
|
42
|
+
(0, chai_1.expect)(walkupScanToCompCaps.supportsMultiItemScanFromPlaten).to.be.eq(true);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
(0, mocha_1.describe)("Parsing walkupScanToCompCaps2.xml", async () => {
|
|
46
|
+
let walkupScanToCompCaps;
|
|
47
|
+
before(async () => {
|
|
48
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanToCompCaps2.xml"), { encoding: "utf8" });
|
|
49
|
+
walkupScanToCompCaps = await WalkupScanToCompCaps_1.default.createWalkupScanToCompCaps(content);
|
|
50
|
+
});
|
|
51
|
+
it("Parse supportsMultiItemScanFromPlaten", async () => {
|
|
52
|
+
(0, chai_1.expect)(walkupScanToCompCaps.supportsMultiItemScanFromPlaten).to.be.eq(false);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=WalkupScanToCompCaps.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanToCompCaps.test.js","sourceRoot":"","sources":["../../test/WalkupScanToCompCaps.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,+BAA8B;AAC9B,gDAAwB;AACxB,gDAAkC;AAClC,uFAA+D;AAE/D,IAAA,gBAAQ,EAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAA,gBAAQ,EAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QACtD,IAAI,oBAA0C,CAAC;QAE/C,MAAM,CAAC,KAAK,IAAI,EAAE;YAChB,MAAM,OAAO,GAAW,MAAM,EAAE,CAAC,QAAQ,CACvC,cAAI,CAAC,OAAO,CACV,SAAS,EACT,kCAAkC,CACnC,EACD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;YACF,oBAAoB,GAAG,MAAM,8BAAoB,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QACxF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;YACrD,IAAA,aAAM,EAAC,oBAAoB,CAAC,+BAA+B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,IAAA,gBAAQ,EAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QACvD,IAAI,oBAA0C,CAAC;QAE/C,MAAM,CAAC,KAAK,IAAI,EAAE;YAChB,MAAM,OAAO,GAAW,MAAM,EAAE,CAAC,QAAQ,CACvC,cAAI,CAAC,OAAO,CACV,SAAS,EACT,mCAAmC,CACpC,EACD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;YACF,oBAAoB,GAAG,MAAM,8BAAoB,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QACxF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;YACrD,IAAA,aAAM,EAAC,oBAAoB,CAAC,+BAA+B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { expect } from \"chai\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport WalkupScanToCompCaps from \"../src/WalkupScanToCompCaps\";\n\ndescribe(\"WalkupScanToCompCaps\", () => {\n describe(\"Parsing walkupScanToCompCaps.xml\", async () => {\n let walkupScanToCompCaps: WalkupScanToCompCaps;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanToCompCaps.xml\"\n ),\n { encoding: \"utf8\" }\n );\n walkupScanToCompCaps = await WalkupScanToCompCaps.createWalkupScanToCompCaps(content);\n });\n\n it(\"Parse supportsMultiItemScanFromPlaten\", async () => {\n expect(walkupScanToCompCaps.supportsMultiItemScanFromPlaten).to.be.eq(true);\n });\n });\n describe(\"Parsing walkupScanToCompCaps2.xml\", async () => {\n let walkupScanToCompCaps: WalkupScanToCompCaps;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanToCompCaps2.xml\"\n ),\n { encoding: \"utf8\" }\n );\n walkupScanToCompCaps = await WalkupScanToCompCaps.createWalkupScanToCompCaps(content);\n });\n\n it(\"Parse supportsMultiItemScanFromPlaten\", async () => {\n expect(walkupScanToCompCaps.supportsMultiItemScanFromPlaten).to.be.eq(false);\n });\n });\n\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const mocha_1 = require("mocha");
|
|
30
|
+
const chai_1 = require("chai");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const fs = __importStar(require("fs/promises"));
|
|
33
|
+
const WalkupScanToCompDestination_1 = __importDefault(require("../src/WalkupScanToCompDestination"));
|
|
34
|
+
(0, mocha_1.describe)("WalkupScanToCompDestination", () => {
|
|
35
|
+
(0, mocha_1.describe)("Parsing walkupScanToCompDestination_with_ScanPlexMode.xml", async () => {
|
|
36
|
+
let destination;
|
|
37
|
+
before(async () => {
|
|
38
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanToCompDestination_with_ScanPlexMode.xml"), { encoding: "utf8" });
|
|
39
|
+
destination = await WalkupScanToCompDestination_1.default.createWalkupScanToCompDestination(content);
|
|
40
|
+
});
|
|
41
|
+
it("Parse scanPlexMode", async () => {
|
|
42
|
+
(0, chai_1.expect)(destination.scanPlexMode).to.be.eq("Simplex");
|
|
43
|
+
});
|
|
44
|
+
it("Parse shortcut", async () => {
|
|
45
|
+
(0, chai_1.expect)(destination.shortcut).to.be.eq("SavePDF");
|
|
46
|
+
});
|
|
47
|
+
it("Parse resourceURI", async () => {
|
|
48
|
+
(0, chai_1.expect)(destination.resourceURI).to.be.eq("/WalkupScanToComp/WalkupScanToCompDestinations/1c881fde-c4a0-1f08-822f-a01d48c5c091");
|
|
49
|
+
});
|
|
50
|
+
it("Parse hostname", async () => {
|
|
51
|
+
(0, chai_1.expect)(destination.hostname).to.be.eq("FIXE");
|
|
52
|
+
});
|
|
53
|
+
it("Parse name", async () => {
|
|
54
|
+
(0, chai_1.expect)(destination.name).to.be.eq("FIXE");
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=WalkupScanToCompDestination.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanToCompDestination.test.js","sourceRoot":"","sources":["../../test/WalkupScanToCompDestination.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,+BAA8B;AAC9B,gDAAwB;AACxB,gDAAkC;AAClC,qGAA6E;AAE7E,IAAA,gBAAQ,EAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,IAAA,gBAAQ,EAAC,2DAA2D,EAAE,KAAK,IAAI,EAAE;QAC/E,IAAI,WAAwC,CAAC;QAE7C,MAAM,CAAC,KAAK,IAAI,EAAE;YAChB,MAAM,OAAO,GAAW,MAAM,EAAE,CAAC,QAAQ,CACvC,cAAI,CAAC,OAAO,CACV,SAAS,EACT,2DAA2D,CAC5D,EACD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;YACF,WAAW,GAAG,MAAM,qCAA2B,CAAC,iCAAiC,CAAC,OAAO,CAAC,CAAC;QAC7F,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oBAAoB,EAAE,KAAK,IAAI,EAAE;YAClC,IAAA,aAAM,EAAC,WAAW,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;YAC9B,IAAA,aAAM,EAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mBAAmB,EAAE,KAAK,IAAI,EAAE;YACjC,IAAA,aAAM,EAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CACtC,qFAAqF,CACtF,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;YAC9B,IAAA,aAAM,EAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;YAC1B,IAAA,aAAM,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { expect } from \"chai\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport WalkupScanToCompDestination from \"../src/WalkupScanToCompDestination\";\n\ndescribe(\"WalkupScanToCompDestination\", () => {\n describe(\"Parsing walkupScanToCompDestination_with_ScanPlexMode.xml\", async () => {\n let destination: WalkupScanToCompDestination;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanToCompDestination_with_ScanPlexMode.xml\"\n ),\n { encoding: \"utf8\" }\n );\n destination = await WalkupScanToCompDestination.createWalkupScanToCompDestination(content);\n });\n\n it(\"Parse scanPlexMode\", async () => {\n expect(destination.scanPlexMode).to.be.eq(\"Simplex\");\n });\n\n it(\"Parse shortcut\", async () => {\n expect(destination.shortcut).to.be.eq(\"SavePDF\");\n });\n\n it(\"Parse resourceURI\", async () => {\n expect(destination.resourceURI).to.be.eq(\n \"/WalkupScanToComp/WalkupScanToCompDestinations/1c881fde-c4a0-1f08-822f-a01d48c5c091\"\n );\n });\n\n it(\"Parse hostname\", async () => {\n expect(destination.hostname).to.be.eq(\"FIXE\");\n });\n\n it(\"Parse name\", async () => {\n expect(destination.name).to.be.eq(\"FIXE\");\n });\n });\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const mocha_1 = require("mocha");
|
|
30
|
+
const chai_1 = require("chai");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const fs = __importStar(require("fs/promises"));
|
|
33
|
+
const WalkupScanToCompDestinations_1 = __importDefault(require("../src/WalkupScanToCompDestinations"));
|
|
34
|
+
(0, mocha_1.describe)("WalkupScanToCompDestinations", () => {
|
|
35
|
+
(0, mocha_1.describe)("Parsing walkupScanToCompDestination_with_ScanPlexMode.xml", async () => {
|
|
36
|
+
let destinations;
|
|
37
|
+
before(async () => {
|
|
38
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanToCompDestinations.xml"), { encoding: "utf8" });
|
|
39
|
+
destinations = await WalkupScanToCompDestinations_1.default.createWalkupScanToCompDestinations(content);
|
|
40
|
+
});
|
|
41
|
+
it("Parse scanPlexMode", async () => {
|
|
42
|
+
(0, chai_1.expect)(destinations.destinations[0].scanPlexMode).to.be.eq(null);
|
|
43
|
+
});
|
|
44
|
+
it("Parse shortcut", async () => {
|
|
45
|
+
(0, chai_1.expect)(destinations.destinations[0].shortcut).to.be.eq(null);
|
|
46
|
+
});
|
|
47
|
+
it("Parse resourceURI", async () => {
|
|
48
|
+
(0, chai_1.expect)(destinations.destinations[0].resourceURI).to.be.eq("/WalkupScanToComp/WalkupScanToCompDestinations/4ad05d8e-20e8-4b8c-bdaa-5e6eca0dd3d8");
|
|
49
|
+
});
|
|
50
|
+
it("Parse hostname", async () => {
|
|
51
|
+
(0, chai_1.expect)(destinations.destinations[0].hostname).to.be.eq("8d170beb5887");
|
|
52
|
+
});
|
|
53
|
+
it("Parse name", async () => {
|
|
54
|
+
(0, chai_1.expect)(destinations.destinations[0].name).to.be.eq("8d170beb5887");
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=WalkupScanToCompDestinations.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanToCompDestinations.test.js","sourceRoot":"","sources":["../../test/WalkupScanToCompDestinations.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,+BAA8B;AAC9B,gDAAwB;AACxB,gDAAkC;AAClC,uGAA+E;AAE/E,IA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,cAAc,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;YAC1B,IAAA,aAAM,EAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { expect } from \"chai\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport WalkupScanToCompDestinations from \"../src/WalkupScanToCompDestinations\";\n\ndescribe(\"WalkupScanToCompDestinations\", () => {\n describe(\"Parsing walkupScanToCompDestination_with_ScanPlexMode.xml\", async () => {\n let destinations: WalkupScanToCompDestinations;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanToCompDestinations.xml\"\n ),\n { encoding: \"utf8\" }\n );\n destinations = await WalkupScanToCompDestinations.createWalkupScanToCompDestinations(content);\n });\n\n it(\"Parse scanPlexMode\", async () => {\n expect(destinations.destinations[0].scanPlexMode).to.be.eq(null);\n });\n\n it(\"Parse shortcut\", async () => {\n expect(destinations.destinations[0].shortcut).to.be.eq(null);\n });\n\n it(\"Parse resourceURI\", async () => {\n expect(destinations.destinations[0].resourceURI).to.be.eq(\n \"/WalkupScanToComp/WalkupScanToCompDestinations/4ad05d8e-20e8-4b8c-bdaa-5e6eca0dd3d8\"\n );\n });\n\n it(\"Parse hostname\", async () => {\n expect(destinations.destinations[0].hostname).to.be.eq(\"8d170beb5887\");\n });\n\n it(\"Parse name\", async () => {\n expect(destinations.destinations[0].name).to.be.eq(\"8d170beb5887\");\n });\n });\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const mocha_1 = require("mocha");
|
|
30
|
+
const chai_1 = require("chai");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const fs = __importStar(require("fs/promises"));
|
|
33
|
+
const WalkupScanToCompEvent_1 = __importDefault(require("../src/WalkupScanToCompEvent"));
|
|
34
|
+
(0, mocha_1.describe)("WalkupScanToCompEvent", () => {
|
|
35
|
+
(0, mocha_1.describe)("Parsing walkupScanToCompEvent.xml", async () => {
|
|
36
|
+
let compEvent;
|
|
37
|
+
before(async () => {
|
|
38
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanToCompEvent.xml"), { encoding: "utf8" });
|
|
39
|
+
compEvent = await WalkupScanToCompEvent_1.default.createWalkupScanToCompEvent(content);
|
|
40
|
+
});
|
|
41
|
+
it("Parse eventType", async () => {
|
|
42
|
+
(0, chai_1.expect)(compEvent.eventType).to.be.eq("HostSelected");
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=WalkupScanToCompEvent.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanToCompEvent.test.js","sourceRoot":"","sources":["../../test/WalkupScanToCompEvent.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,+BAA8B;AAC9B,gDAAwB;AACxB,gDAAkC;AAClC,yFAAiE;AAEjE,IAAA,gBAAQ,EAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,IAAA,gBAAQ,EAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QACvD,IAAI,SAAgC,CAAC;QAErC,MAAM,CAAC,KAAK,IAAI,EAAE;YAChB,MAAM,OAAO,GAAW,MAAM,EAAE,CAAC,QAAQ,CACvC,cAAI,CAAC,OAAO,CACV,SAAS,EACT,mCAAmC,CACpC,EACD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;YACF,SAAS,GAAG,MAAM,+BAAqB,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE;YAC/B,IAAA,aAAM,EAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;QACvD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { expect } from \"chai\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport WalkupScanToCompEvent from \"../src/WalkupScanToCompEvent\";\n\ndescribe(\"WalkupScanToCompEvent\", () => {\n describe(\"Parsing walkupScanToCompEvent.xml\", async () => {\n let compEvent: WalkupScanToCompEvent;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanToCompEvent.xml\"\n ),\n { encoding: \"utf8\" }\n );\n compEvent = await WalkupScanToCompEvent.createWalkupScanToCompEvent(content);\n });\n\n it(\"Parse eventType\", async () => {\n expect(compEvent.eventType).to.be.eq(\"HostSelected\");\n });\n });\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const mocha_1 = require("mocha");
|
|
30
|
+
const chai_1 = require("chai");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const fs = __importStar(require("fs/promises"));
|
|
33
|
+
const WalkupScanToCompManifest_1 = __importDefault(require("../src/WalkupScanToCompManifest"));
|
|
34
|
+
(0, mocha_1.describe)("WalkupScanToCompManifest", () => {
|
|
35
|
+
(0, mocha_1.describe)("Parsing walkupScanToCompManifest.xml", async () => {
|
|
36
|
+
let walkupScanToCompManifest;
|
|
37
|
+
before(async () => {
|
|
38
|
+
const content = await fs.readFile(path_1.default.resolve(__dirname, "./asset/walkupScanToCompManifest.xml"), { encoding: "utf8" });
|
|
39
|
+
walkupScanToCompManifest = await WalkupScanToCompManifest_1.default.createWalkupScanToCompManifest(content);
|
|
40
|
+
});
|
|
41
|
+
it("Parse WalkupScanToCompCaps uri", async () => {
|
|
42
|
+
(0, chai_1.expect)(walkupScanToCompManifest.WalkupScanToCompCapsURI).to.be.eq("/WalkupScanToComp/WalkupScanToCompCaps");
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=WalkupScanToCompManifest.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalkupScanToCompManifest.test.js","sourceRoot":"","sources":["../../test/WalkupScanToCompManifest.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAiC;AACjC,+BAA8B;AAC9B,gDAAwB;AACxB,gDAAkC;AAClC,+FAAuE;AAEvE,IAAA,gBAAQ,EAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,IAAA,gBAAQ,EAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QAC1D,IAAI,wBAAkD,CAAC;QAEvD,MAAM,CAAC,KAAK,IAAI,EAAE;YAChB,MAAM,OAAO,GAAW,MAAM,EAAE,CAAC,QAAQ,CACvC,cAAI,CAAC,OAAO,CACV,SAAS,EACT,sCAAsC,CACvC,EACD,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;YACF,wBAAwB,GAAG,MAAM,kCAAwB,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACpG,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;YAC9C,IAAA,aAAM,EAAC,wBAAwB,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,wCAAwC,CAAC,CAAC;QAC9G,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AAEL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { expect } from \"chai\";\nimport path from \"path\";\nimport * as fs from \"fs/promises\";\nimport WalkupScanToCompManifest from \"../src/WalkupScanToCompManifest\";\n\ndescribe(\"WalkupScanToCompManifest\", () => {\n describe(\"Parsing walkupScanToCompManifest.xml\", async () => {\n let walkupScanToCompManifest: WalkupScanToCompManifest;\n\n before(async () => {\n const content: string = await fs.readFile(\n path.resolve(\n __dirname,\n \"./asset/walkupScanToCompManifest.xml\"\n ),\n { encoding: \"utf8\" }\n );\n walkupScanToCompManifest = await WalkupScanToCompManifest.createWalkupScanToCompManifest(content);\n });\n\n it(\"Parse WalkupScanToCompCaps uri\", async () => {\n expect(walkupScanToCompManifest.WalkupScanToCompCapsURI).to.be.eq(\"/WalkupScanToComp/WalkupScanToCompCaps\");\n });\n });\n\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mocha_1 = require("mocha");
|
|
7
|
+
const HPApi_1 = __importDefault(require("../src/HPApi"));
|
|
8
|
+
(0, mocha_1.describe)("EtagEventTable", () => {
|
|
9
|
+
(0, mocha_1.describe)("Parsing eventTable.xml", async () => {
|
|
10
|
+
before(async () => {
|
|
11
|
+
HPApi_1.default.setDeviceIP("192.168.1.53");
|
|
12
|
+
});
|
|
13
|
+
it("Clean all destinations", async () => {
|
|
14
|
+
const dests = await HPApi_1.default.getWalkupScanToCompDestinations();
|
|
15
|
+
for (let i = 0; i < dests.destinations.length; i++) {
|
|
16
|
+
await HPApi_1.default.removeDestination(dests.destinations[i]);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=clean.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../test/clean.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AAEjC,yDAAiC;AAEjC,IAAA,gBAAQ,EAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,IAAA,gBAAQ,EAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,CAAC,KAAK,IAAI,EAAE;YAChB,eAAK,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;YACtC,MAAM,KAAK,GAAG,MAAM,eAAK,CAAC,+BAA+B,EAAE,CAAC;YAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAClD,MAAM,eAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;aACtD;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe } from \"mocha\";\nimport { EtagEventTable } from \"../src/EventTable\";\nimport HPApi from \"../src/HPApi\";\n\ndescribe(\"EtagEventTable\", () => {\n describe(\"Parsing eventTable.xml\", async () => {\n before(async () => {\n HPApi.setDeviceIP(\"192.168.1.53\");\n });\n\n it(\"Clean all destinations\", async () => {\n const dests = await HPApi.getWalkupScanToCompDestinations();\n for (let i = 0; i < dests.destinations.length; i++) {\n await HPApi.removeDestination(dests.destinations[i]);\n }\n });\n });\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mocha_1 = require("mocha");
|
|
4
|
+
const chai_1 = require("chai");
|
|
5
|
+
const scanProcessing_1 = require("../src/scanProcessing");
|
|
6
|
+
const InputSource_1 = require("../src/InputSource");
|
|
7
|
+
(0, mocha_1.describe)("scanProcessing", () => {
|
|
8
|
+
let scanConfig;
|
|
9
|
+
let deviceCapabilities;
|
|
10
|
+
beforeEach(async () => {
|
|
11
|
+
scanConfig = {
|
|
12
|
+
resolution: 200,
|
|
13
|
+
width: null,
|
|
14
|
+
height: null,
|
|
15
|
+
directoryConfig: {
|
|
16
|
+
directory: undefined,
|
|
17
|
+
tempDirectory: undefined,
|
|
18
|
+
filePattern: undefined,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
deviceCapabilities = {
|
|
22
|
+
supportsMultiItemScanFromPlaten: false,
|
|
23
|
+
useWalkupScanToComp: false,
|
|
24
|
+
platenMaxWidth: null,
|
|
25
|
+
platenMaxHeight: null,
|
|
26
|
+
adfMaxWidth: null,
|
|
27
|
+
adfMaxHeight: null,
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
(0, mocha_1.describe)("getScanWidth", async () => {
|
|
31
|
+
const inputSource = InputSource_1.InputSource.Adf;
|
|
32
|
+
(0, mocha_1.describe)("Adf", async () => {
|
|
33
|
+
it("Does not define a value if nothing provided", async () => {
|
|
34
|
+
const width = (0, scanProcessing_1.getScanWidth)(scanConfig, inputSource, deviceCapabilities);
|
|
35
|
+
(0, chai_1.expect)(width).to.be.eq(null);
|
|
36
|
+
});
|
|
37
|
+
it("Does not define a value if negative provided", async () => {
|
|
38
|
+
scanConfig.width = -1;
|
|
39
|
+
const width = (0, scanProcessing_1.getScanWidth)(scanConfig, inputSource, deviceCapabilities);
|
|
40
|
+
(0, chai_1.expect)(width).to.be.eq(null);
|
|
41
|
+
});
|
|
42
|
+
it("Define the value if no max available from device", async () => {
|
|
43
|
+
scanConfig.width = 2583;
|
|
44
|
+
const width = (0, scanProcessing_1.getScanWidth)(scanConfig, inputSource, deviceCapabilities);
|
|
45
|
+
(0, chai_1.expect)(width).to.be.eq(2583);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
(0, mocha_1.describe)("Platen", async () => {
|
|
49
|
+
const inputSource = InputSource_1.InputSource.Platen;
|
|
50
|
+
it("Does not define a value if nothing provided", async () => {
|
|
51
|
+
const width = (0, scanProcessing_1.getScanWidth)(scanConfig, inputSource, deviceCapabilities);
|
|
52
|
+
(0, chai_1.expect)(width).to.be.eq(null);
|
|
53
|
+
});
|
|
54
|
+
it("Does not define a value if negative provided", async () => {
|
|
55
|
+
scanConfig.width = -1;
|
|
56
|
+
const width = (0, scanProcessing_1.getScanWidth)(scanConfig, inputSource, deviceCapabilities);
|
|
57
|
+
(0, chai_1.expect)(width).to.be.eq(null);
|
|
58
|
+
});
|
|
59
|
+
it("Define the value if no max available from device", async () => {
|
|
60
|
+
scanConfig.width = 2583;
|
|
61
|
+
const width = (0, scanProcessing_1.getScanWidth)(scanConfig, inputSource, deviceCapabilities);
|
|
62
|
+
(0, chai_1.expect)(width).to.be.eq(2583);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
(0, mocha_1.describe)("getScanHeight", async () => {
|
|
67
|
+
const inputSource = InputSource_1.InputSource.Adf;
|
|
68
|
+
(0, mocha_1.describe)("Adf", async () => {
|
|
69
|
+
it("Does not define a value if nothing provided", async () => {
|
|
70
|
+
const height = (0, scanProcessing_1.getScanHeight)(scanConfig, inputSource, deviceCapabilities);
|
|
71
|
+
(0, chai_1.expect)(height).to.be.eq(null);
|
|
72
|
+
});
|
|
73
|
+
it("Does not define a value if negative provided", async () => {
|
|
74
|
+
scanConfig.height = -1;
|
|
75
|
+
const height = (0, scanProcessing_1.getScanHeight)(scanConfig, inputSource, deviceCapabilities);
|
|
76
|
+
(0, chai_1.expect)(height).to.be.eq(null);
|
|
77
|
+
});
|
|
78
|
+
it("Define the value if no max available from device", async () => {
|
|
79
|
+
scanConfig.height = 1269;
|
|
80
|
+
const width = (0, scanProcessing_1.getScanHeight)(scanConfig, inputSource, deviceCapabilities);
|
|
81
|
+
(0, chai_1.expect)(width).to.be.eq(1269);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
(0, mocha_1.describe)("Platen", async () => {
|
|
85
|
+
const inputSource = InputSource_1.InputSource.Platen;
|
|
86
|
+
it("Does not define a value if nothing provided", async () => {
|
|
87
|
+
const height = (0, scanProcessing_1.getScanHeight)(scanConfig, inputSource, deviceCapabilities);
|
|
88
|
+
(0, chai_1.expect)(height).to.be.eq(null);
|
|
89
|
+
});
|
|
90
|
+
it("Does not define a value if negative provided", async () => {
|
|
91
|
+
scanConfig.height = -1;
|
|
92
|
+
const height = (0, scanProcessing_1.getScanHeight)(scanConfig, inputSource, deviceCapabilities);
|
|
93
|
+
(0, chai_1.expect)(height).to.be.eq(null);
|
|
94
|
+
});
|
|
95
|
+
it("Define the value if no max available from device", async () => {
|
|
96
|
+
scanConfig.height = 1269;
|
|
97
|
+
const height = (0, scanProcessing_1.getScanHeight)(scanConfig, inputSource, deviceCapabilities);
|
|
98
|
+
(0, chai_1.expect)(height).to.be.eq(1269);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=scanProcessing.test.js.map
|