@markw65/monkeyc-optimizer 1.1.85 → 1.1.87
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/CHANGELOG.md +8 -0
- package/build/api.cjs +39 -39
- package/build/{chunk-OFOOTSQM.cjs → chunk-N2N7HF67.cjs} +46 -13
- package/build/optimizer.cjs +18 -18
- package/build/sdk-util.cjs +14 -14
- package/build/src/sdk-util.d.ts +10 -0
- package/build/worker-thread.cjs +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "monkeyc-optimizer" package will be documented in this file.
|
|
4
4
|
|
|
5
|
+
### 1.1.87
|
|
6
|
+
|
|
7
|
+
- Update post build optimizer to work with sdk-7.4.3. The manifest file was changed a little with this release, so I had to update the optimizer to match.
|
|
8
|
+
|
|
9
|
+
### 1.1.86
|
|
10
|
+
|
|
11
|
+
- Leaving stashed type lists on ArrayExpression and ObjectExpression could confuse the prettier printer, and result in errors when outputing the optimized files. Remove all of them after optimization is done.
|
|
12
|
+
|
|
5
13
|
### 1.1.85
|
|
6
14
|
|
|
7
15
|
- Update to [@markw65/prettier-plugin-monkeyc@1.0.60](https://github.com/markw65/prettier-plugin-monkeyc/blob/main/CHANGELOG.md#1060)
|
package/build/api.cjs
CHANGED
|
@@ -18,52 +18,52 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var api_exports = {};
|
|
20
20
|
__export(api_exports, {
|
|
21
|
-
checkCompilerVersion: () =>
|
|
22
|
-
clearDiagnostics: () =>
|
|
23
|
-
collectNamespaces: () =>
|
|
24
|
-
createDocumentationMap: () =>
|
|
25
|
-
declKey: () =>
|
|
26
|
-
diagnostic: () =>
|
|
27
|
-
diagnosticHelper: () =>
|
|
28
|
-
findNamesInScope: () =>
|
|
29
|
-
findUsingForNode: () =>
|
|
30
|
-
formatAst: () =>
|
|
31
|
-
formatAstLongLines: () =>
|
|
32
|
-
formatScopedName: () =>
|
|
33
|
-
getApiFunctionInfo: () =>
|
|
34
|
-
getApiMapping: () =>
|
|
35
|
-
getSuperClasses: () =>
|
|
36
|
-
handleImportUsing: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_N2N7HF67.checkCompilerVersion,
|
|
22
|
+
clearDiagnostics: () => import_chunk_N2N7HF67.clearDiagnostics,
|
|
23
|
+
collectNamespaces: () => import_chunk_N2N7HF67.collectNamespaces,
|
|
24
|
+
createDocumentationMap: () => import_chunk_N2N7HF67.createDocumentationMap,
|
|
25
|
+
declKey: () => import_chunk_N2N7HF67.declKey,
|
|
26
|
+
diagnostic: () => import_chunk_N2N7HF67.diagnostic,
|
|
27
|
+
diagnosticHelper: () => import_chunk_N2N7HF67.diagnosticHelper,
|
|
28
|
+
findNamesInScope: () => import_chunk_N2N7HF67.findNamesInScope,
|
|
29
|
+
findUsingForNode: () => import_chunk_N2N7HF67.findUsingForNode,
|
|
30
|
+
formatAst: () => import_chunk_N2N7HF67.formatAst,
|
|
31
|
+
formatAstLongLines: () => import_chunk_N2N7HF67.formatAstLongLines,
|
|
32
|
+
formatScopedName: () => import_chunk_N2N7HF67.formatScopedName,
|
|
33
|
+
getApiFunctionInfo: () => import_chunk_N2N7HF67.getApiFunctionInfo,
|
|
34
|
+
getApiMapping: () => import_chunk_N2N7HF67.getApiMapping,
|
|
35
|
+
getSuperClasses: () => import_chunk_N2N7HF67.getSuperClasses,
|
|
36
|
+
handleImportUsing: () => import_chunk_N2N7HF67.handleImportUsing,
|
|
37
37
|
hasProperty: () => import_chunk_JDC43A3I.hasProperty,
|
|
38
|
-
isClassVariable: () =>
|
|
39
|
-
isLocal: () =>
|
|
40
|
-
isLookupCandidate: () =>
|
|
41
|
-
isStateNode: () =>
|
|
42
|
-
lookupByFullName: () =>
|
|
43
|
-
lookupNext: () =>
|
|
44
|
-
lookupResultContains: () =>
|
|
45
|
-
lookupWithType: () =>
|
|
46
|
-
makeToyboxLink: () =>
|
|
47
|
-
mapVarDeclsByType: () =>
|
|
48
|
-
markInvokeClassMethod: () =>
|
|
49
|
-
parseSdkVersion: () =>
|
|
50
|
-
popRootNode: () =>
|
|
51
|
-
pushRootNode: () =>
|
|
52
|
-
resolveDiagnostics: () =>
|
|
53
|
-
resolveDiagnosticsMap: () =>
|
|
54
|
-
sameLookupResult: () =>
|
|
38
|
+
isClassVariable: () => import_chunk_N2N7HF67.isClassVariable,
|
|
39
|
+
isLocal: () => import_chunk_N2N7HF67.isLocal,
|
|
40
|
+
isLookupCandidate: () => import_chunk_N2N7HF67.isLookupCandidate,
|
|
41
|
+
isStateNode: () => import_chunk_N2N7HF67.isStateNode,
|
|
42
|
+
lookupByFullName: () => import_chunk_N2N7HF67.lookupByFullName,
|
|
43
|
+
lookupNext: () => import_chunk_N2N7HF67.lookupNext,
|
|
44
|
+
lookupResultContains: () => import_chunk_N2N7HF67.lookupResultContains,
|
|
45
|
+
lookupWithType: () => import_chunk_N2N7HF67.lookupWithType,
|
|
46
|
+
makeToyboxLink: () => import_chunk_N2N7HF67.makeToyboxLink,
|
|
47
|
+
mapVarDeclsByType: () => import_chunk_N2N7HF67.mapVarDeclsByType,
|
|
48
|
+
markInvokeClassMethod: () => import_chunk_N2N7HF67.markInvokeClassMethod,
|
|
49
|
+
parseSdkVersion: () => import_chunk_N2N7HF67.parseSdkVersion,
|
|
50
|
+
popRootNode: () => import_chunk_N2N7HF67.popRootNode,
|
|
51
|
+
pushRootNode: () => import_chunk_N2N7HF67.pushRootNode,
|
|
52
|
+
resolveDiagnostics: () => import_chunk_N2N7HF67.resolveDiagnostics,
|
|
53
|
+
resolveDiagnosticsMap: () => import_chunk_N2N7HF67.resolveDiagnosticsMap,
|
|
54
|
+
sameLookupResult: () => import_chunk_N2N7HF67.sameLookupResult,
|
|
55
55
|
traverseAst: () => import_chunk_JDC43A3I.traverseAst,
|
|
56
|
-
variableDeclarationName: () =>
|
|
57
|
-
visitReferences: () =>
|
|
58
|
-
visit_resources: () =>
|
|
59
|
-
visitorNode: () =>
|
|
56
|
+
variableDeclarationName: () => import_chunk_N2N7HF67.variableDeclarationName,
|
|
57
|
+
visitReferences: () => import_chunk_N2N7HF67.visitReferences,
|
|
58
|
+
visit_resources: () => import_chunk_N2N7HF67.visit_resources,
|
|
59
|
+
visitorNode: () => import_chunk_N2N7HF67.visitorNode
|
|
60
60
|
});
|
|
61
61
|
module.exports = __toCommonJS(api_exports);
|
|
62
|
-
var
|
|
62
|
+
var import_chunk_N2N7HF67 = require("./chunk-N2N7HF67.cjs");
|
|
63
63
|
var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
|
|
64
64
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
65
65
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
66
|
-
(0,
|
|
66
|
+
(0, import_chunk_N2N7HF67.init_api)();
|
|
67
67
|
// Annotate the CommonJS export names for ESM import in node:
|
|
68
68
|
0 && (module.exports = {
|
|
69
69
|
checkCompilerVersion,
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_N2N7HF67_exports = {};
|
|
30
|
+
__export(chunk_N2N7HF67_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -140,7 +140,7 @@ __export(chunk_OFOOTSQM_exports, {
|
|
|
140
140
|
visitorNode: () => visitorNode,
|
|
141
141
|
xml_util_exports: () => xml_util_exports
|
|
142
142
|
});
|
|
143
|
-
module.exports = __toCommonJS(
|
|
143
|
+
module.exports = __toCommonJS(chunk_N2N7HF67_exports);
|
|
144
144
|
var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
|
|
145
145
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
146
146
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
@@ -18234,6 +18234,16 @@ async function optimizeMonkeyCHelper(fnMap, resourcesMap, manifestXML, config) {
|
|
|
18234
18234
|
pragmaChecker(state, f.ast, diagnostics?.[f.name]);
|
|
18235
18235
|
});
|
|
18236
18236
|
}
|
|
18237
|
+
Object.values(fnMap).forEach((f) => {
|
|
18238
|
+
(0, import_chunk_JDC43A3I.traverseAst)(f.ast, (node) => {
|
|
18239
|
+
if (node.type === "ObjectExpression" || node.type === "ArrayExpression") {
|
|
18240
|
+
const n = node;
|
|
18241
|
+
if (n.originalTypes) {
|
|
18242
|
+
delete n.originalTypes;
|
|
18243
|
+
}
|
|
18244
|
+
}
|
|
18245
|
+
});
|
|
18246
|
+
});
|
|
18237
18247
|
return {
|
|
18238
18248
|
diagnostics,
|
|
18239
18249
|
sdkVersion: state.sdkVersion
|
|
@@ -30707,7 +30717,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
30707
30717
|
const opt_time = await (0, import_chunk_X7QCZR3F.first_modified)(
|
|
30708
30718
|
Object.values(fnMap).map((v) => v.output)
|
|
30709
30719
|
);
|
|
30710
|
-
if (source_time < opt_time &&
|
|
30720
|
+
if (source_time < opt_time && 1734629819655 < opt_time) {
|
|
30711
30721
|
return {
|
|
30712
30722
|
hasTests,
|
|
30713
30723
|
diagnostics: prevDiagnostics,
|
|
@@ -30745,7 +30755,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
30745
30755
|
hasTests: hasTests2,
|
|
30746
30756
|
diagnostics,
|
|
30747
30757
|
sdkVersion,
|
|
30748
|
-
optimizerVersion: "1.1.
|
|
30758
|
+
optimizerVersion: "1.1.87",
|
|
30749
30759
|
...Object.fromEntries(
|
|
30750
30760
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
30751
30761
|
)
|
|
@@ -31252,8 +31262,17 @@ function optimizePackage(filepath, devKey, output, config) {
|
|
|
31252
31262
|
const outName = path5.basename(output, ".iq") + ".prg";
|
|
31253
31263
|
const rename = (name) => path5.basename(name) === inName ? path5.join(path5.dirname(name), outName) : name;
|
|
31254
31264
|
const poolStarted = startPool();
|
|
31255
|
-
return
|
|
31256
|
-
(
|
|
31265
|
+
return Promise.all([
|
|
31266
|
+
getDevKey(devKey),
|
|
31267
|
+
getDeviceInfo().then(
|
|
31268
|
+
(deviceInfo) => Object.fromEntries(
|
|
31269
|
+
Object.entries(deviceInfo).flatMap(
|
|
31270
|
+
([id, info]) => info.partNumbers.map((part) => [part.number, id])
|
|
31271
|
+
)
|
|
31272
|
+
)
|
|
31273
|
+
)
|
|
31274
|
+
]).then(
|
|
31275
|
+
([key, deviceInfo]) => new Promise((resolve5, reject) => {
|
|
31257
31276
|
let manifest = null;
|
|
31258
31277
|
const sigs = /* @__PURE__ */ new Map();
|
|
31259
31278
|
const zipfile = new yazl.ZipFile();
|
|
@@ -31319,7 +31338,7 @@ function optimizePackage(filepath, devKey, output, config) {
|
|
|
31319
31338
|
if (/\/$/.test(entry.fileName)) {
|
|
31320
31339
|
unzip.readEntry();
|
|
31321
31340
|
} else {
|
|
31322
|
-
if (entry.fileName
|
|
31341
|
+
if (entry.fileName.startsWith("manifest.sig")) {
|
|
31323
31342
|
unzip.readEntry();
|
|
31324
31343
|
return;
|
|
31325
31344
|
}
|
|
@@ -31372,7 +31391,7 @@ function optimizePackage(filepath, devKey, output, config) {
|
|
|
31372
31391
|
});
|
|
31373
31392
|
}
|
|
31374
31393
|
});
|
|
31375
|
-
unzip.on("end", () => {
|
|
31394
|
+
unzip.on("end", async () => {
|
|
31376
31395
|
try {
|
|
31377
31396
|
if (!manifest) {
|
|
31378
31397
|
throw new Error("No manifest file found");
|
|
@@ -31382,12 +31401,18 @@ function optimizePackage(filepath, devKey, output, config) {
|
|
|
31382
31401
|
if (body instanceof Error) {
|
|
31383
31402
|
throw body;
|
|
31384
31403
|
}
|
|
31385
|
-
Promise.all(promises).then(() => {
|
|
31404
|
+
await Promise.all(promises).then(() => {
|
|
31386
31405
|
body.children("iq:application").children("iq:products").children("iq:product").attrs().forEach((attr) => {
|
|
31387
|
-
const
|
|
31406
|
+
const part = attr.partNumber?.value.value;
|
|
31407
|
+
if (!part) {
|
|
31408
|
+
throw new Error(
|
|
31409
|
+
`Missing partNumber for product in manifest`
|
|
31410
|
+
);
|
|
31411
|
+
}
|
|
31412
|
+
const id = deviceInfo[part];
|
|
31388
31413
|
if (!id) {
|
|
31389
31414
|
throw new Error(
|
|
31390
|
-
`
|
|
31415
|
+
`No id found for partNumber '${part}' in manifest`
|
|
31391
31416
|
);
|
|
31392
31417
|
}
|
|
31393
31418
|
const filename = attr.filename?.value.value;
|
|
@@ -31410,6 +31435,7 @@ function optimizePackage(filepath, devKey, output, config) {
|
|
|
31410
31435
|
}
|
|
31411
31436
|
attr.filename.value.value = newName;
|
|
31412
31437
|
attr.sig.value.value = sig2.toString("hex").toUpperCase();
|
|
31438
|
+
delete attr.sig2;
|
|
31413
31439
|
});
|
|
31414
31440
|
const contents = Buffer.from(xml_util_exports.writeXml(xml));
|
|
31415
31441
|
zipfile.addBuffer(contents, "manifest.xml");
|
|
@@ -31502,7 +31528,14 @@ async function getDeviceInfo() {
|
|
|
31502
31528
|
const ciqVersions = partNumbers.map((part) => part.connectIQVersion);
|
|
31503
31529
|
return [
|
|
31504
31530
|
deviceId,
|
|
31505
|
-
{
|
|
31531
|
+
{
|
|
31532
|
+
appTypes,
|
|
31533
|
+
deviceFamily,
|
|
31534
|
+
displayName,
|
|
31535
|
+
languages,
|
|
31536
|
+
ciqVersions,
|
|
31537
|
+
partNumbers
|
|
31538
|
+
}
|
|
31506
31539
|
];
|
|
31507
31540
|
});
|
|
31508
31541
|
})
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,30 +18,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var optimizer_exports = {};
|
|
20
20
|
__export(optimizer_exports, {
|
|
21
|
-
StateNodeAttributes: () =>
|
|
22
|
-
buildConfigDescription: () =>
|
|
23
|
-
buildOptimizedProject: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_N2N7HF67.StateNodeAttributes,
|
|
22
|
+
buildConfigDescription: () => import_chunk_N2N7HF67.buildConfigDescription,
|
|
23
|
+
buildOptimizedProject: () => import_chunk_N2N7HF67.buildOptimizedProject,
|
|
24
24
|
copyRecursiveAsNeeded: () => import_chunk_X7QCZR3F.copyRecursiveAsNeeded,
|
|
25
|
-
defaultConfig: () =>
|
|
26
|
-
display: () =>
|
|
27
|
-
generateOneConfig: () =>
|
|
28
|
-
generateOptimizedProject: () =>
|
|
29
|
-
getConfig: () =>
|
|
30
|
-
getFnMapAnalysis: () =>
|
|
31
|
-
getProjectAnalysis: () =>
|
|
32
|
-
get_jungle: () =>
|
|
33
|
-
isErrorWithLocation: () =>
|
|
34
|
-
launchSimulator: () =>
|
|
35
|
-
manifestProducts: () =>
|
|
36
|
-
mctree: () =>
|
|
37
|
-
simulateProgram: () =>
|
|
25
|
+
defaultConfig: () => import_chunk_N2N7HF67.defaultConfig,
|
|
26
|
+
display: () => import_chunk_N2N7HF67.display,
|
|
27
|
+
generateOneConfig: () => import_chunk_N2N7HF67.generateOneConfig,
|
|
28
|
+
generateOptimizedProject: () => import_chunk_N2N7HF67.generateOptimizedProject,
|
|
29
|
+
getConfig: () => import_chunk_N2N7HF67.getConfig,
|
|
30
|
+
getFnMapAnalysis: () => import_chunk_N2N7HF67.getFnMapAnalysis,
|
|
31
|
+
getProjectAnalysis: () => import_chunk_N2N7HF67.getProjectAnalysis,
|
|
32
|
+
get_jungle: () => import_chunk_N2N7HF67.get_jungle,
|
|
33
|
+
isErrorWithLocation: () => import_chunk_N2N7HF67.isErrorWithLocation,
|
|
34
|
+
launchSimulator: () => import_chunk_N2N7HF67.launchSimulator,
|
|
35
|
+
manifestProducts: () => import_chunk_N2N7HF67.manifestProducts,
|
|
36
|
+
mctree: () => import_chunk_N2N7HF67.mctree,
|
|
37
|
+
simulateProgram: () => import_chunk_N2N7HF67.simulateProgram
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(optimizer_exports);
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_N2N7HF67 = require("./chunk-N2N7HF67.cjs");
|
|
41
41
|
var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
|
|
42
42
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
43
43
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
44
|
-
(0,
|
|
44
|
+
(0, import_chunk_N2N7HF67.init_optimizer)();
|
|
45
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
46
|
0 && (module.exports = {
|
|
47
47
|
StateNodeAttributes,
|
package/build/sdk-util.cjs
CHANGED
|
@@ -18,25 +18,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var sdk_util_exports = {};
|
|
20
20
|
__export(sdk_util_exports, {
|
|
21
|
-
SectionKinds: () =>
|
|
22
|
-
appSupport: () =>
|
|
23
|
-
connectiq: () =>
|
|
24
|
-
getDeviceInfo: () =>
|
|
25
|
-
getFunctionDocumentation: () =>
|
|
26
|
-
getLanguages: () =>
|
|
27
|
-
getSdkPath: () =>
|
|
28
|
-
isWin: () =>
|
|
29
|
-
optimizeProgram: () =>
|
|
30
|
-
readPrg: () =>
|
|
31
|
-
readPrgWithOffsets: () =>
|
|
32
|
-
xmlUtil: () =>
|
|
21
|
+
SectionKinds: () => import_chunk_N2N7HF67.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_N2N7HF67.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_N2N7HF67.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_N2N7HF67.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_N2N7HF67.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_N2N7HF67.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_N2N7HF67.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_N2N7HF67.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_N2N7HF67.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_N2N7HF67.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_N2N7HF67.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_N2N7HF67.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_N2N7HF67 = require("./chunk-N2N7HF67.cjs");
|
|
36
36
|
var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
|
|
37
37
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
38
38
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
39
|
-
(0,
|
|
39
|
+
(0, import_chunk_N2N7HF67.init_sdk_util)();
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
41
|
0 && (module.exports = {
|
|
42
42
|
SectionKinds,
|
package/build/src/sdk-util.d.ts
CHANGED
|
@@ -5,6 +5,15 @@ export declare const isWin: boolean;
|
|
|
5
5
|
export declare const appSupport: string;
|
|
6
6
|
export declare const connectiq: string;
|
|
7
7
|
export declare function getSdkPath(): Promise<string>;
|
|
8
|
+
export type PartNumber = {
|
|
9
|
+
connectIQVersion: string;
|
|
10
|
+
firmwareVersion: string;
|
|
11
|
+
languages: Array<{
|
|
12
|
+
code: string;
|
|
13
|
+
fontSet: string;
|
|
14
|
+
}>;
|
|
15
|
+
number: string;
|
|
16
|
+
};
|
|
8
17
|
export type DeviceInfo = {
|
|
9
18
|
[key: string]: {
|
|
10
19
|
appTypes: {
|
|
@@ -15,6 +24,7 @@ export type DeviceInfo = {
|
|
|
15
24
|
displayName: string;
|
|
16
25
|
languages: Record<string, true>;
|
|
17
26
|
ciqVersions: Array<string>;
|
|
27
|
+
partNumbers: PartNumber[];
|
|
18
28
|
};
|
|
19
29
|
};
|
|
20
30
|
export declare function getDeviceInfo(): Promise<DeviceInfo>;
|
package/build/worker-thread.cjs
CHANGED
|
@@ -21,17 +21,17 @@ __export(worker_thread_exports, {
|
|
|
21
21
|
default: () => worker_thread_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(worker_thread_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_N2N7HF67 = require("./chunk-N2N7HF67.cjs");
|
|
25
25
|
var import_chunk_X7QCZR3F = require("./chunk-X7QCZR3F.cjs");
|
|
26
26
|
var import_chunk_JDC43A3I = require("./chunk-JDC43A3I.cjs");
|
|
27
27
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
28
28
|
var import_node_worker_threads = require("node:worker_threads");
|
|
29
29
|
var require_worker_thread = (0, import_chunk_ABYVSU2C.__commonJS)({
|
|
30
30
|
"src/worker-thread.ts"() {
|
|
31
|
-
(0,
|
|
31
|
+
(0, import_chunk_N2N7HF67.init_worker_task)();
|
|
32
32
|
if (import_node_worker_threads.parentPort) {
|
|
33
33
|
import_node_worker_threads.parentPort.on("message", async (task) => {
|
|
34
|
-
return import_node_worker_threads.parentPort.postMessage(await (0,
|
|
34
|
+
return import_node_worker_threads.parentPort.postMessage(await (0, import_chunk_N2N7HF67.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED