@markw65/monkeyc-optimizer 1.1.37 → 1.1.38
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 +5 -0
- package/build/api.cjs +36 -32
- package/build/{chunk-E67DP34P.cjs → chunk-IMIM4BE2.cjs} +56 -39
- package/build/optimizer.cjs +16 -16
- package/build/sdk-util.cjs +14 -14
- package/build/src/api.d.ts +2 -0
- package/build/src/type-flow/types.d.ts +1 -3
- package/build/worker-thread.cjs +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "monkeyc-optimizer" package will be documented in this file.
|
|
4
4
|
|
|
5
|
+
### 1.1.38
|
|
6
|
+
|
|
7
|
+
- Fix a bug introduced in 1.1.37 that could lead to duplicate diagnostics, and diagnostics with strange contents.
|
|
8
|
+
- Give `{ :foo => null }` the type `{ :foo => Object? }`, so that subsequent assignments to `:foo` aren't reported as type errors.
|
|
9
|
+
|
|
5
10
|
### 1.1.37
|
|
6
11
|
|
|
7
12
|
- Update to [@markw65/prettier-plugin-monkeyc@1.0.53](https://github.com/markw65/prettier-plugin-monkeyc/blob/main/CHANGELOG.md#1053)
|
package/build/api.cjs
CHANGED
|
@@ -18,45 +18,47 @@ 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
|
-
collectNamespaces: () =>
|
|
23
|
-
createDocumentationMap: () =>
|
|
24
|
-
diagnostic: () =>
|
|
25
|
-
diagnosticHelper: () =>
|
|
26
|
-
findNamesInScope: () =>
|
|
27
|
-
findUsingForNode: () =>
|
|
28
|
-
formatAst: () =>
|
|
29
|
-
formatAstLongLines: () =>
|
|
30
|
-
formatScopedName: () =>
|
|
31
|
-
getApiFunctionInfo: () =>
|
|
32
|
-
getApiMapping: () =>
|
|
33
|
-
getSuperClasses: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_IMIM4BE2.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_IMIM4BE2.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_IMIM4BE2.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_IMIM4BE2.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_IMIM4BE2.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_IMIM4BE2.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_IMIM4BE2.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_IMIM4BE2.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_IMIM4BE2.formatAstLongLines,
|
|
30
|
+
formatScopedName: () => import_chunk_IMIM4BE2.formatScopedName,
|
|
31
|
+
getApiFunctionInfo: () => import_chunk_IMIM4BE2.getApiFunctionInfo,
|
|
32
|
+
getApiMapping: () => import_chunk_IMIM4BE2.getApiMapping,
|
|
33
|
+
getSuperClasses: () => import_chunk_IMIM4BE2.getSuperClasses,
|
|
34
34
|
hasProperty: () => import_chunk_MBTLUWXR.hasProperty,
|
|
35
|
-
isClassVariable: () =>
|
|
36
|
-
isLocal: () =>
|
|
37
|
-
isLookupCandidate: () =>
|
|
38
|
-
isStateNode: () =>
|
|
39
|
-
lookupByFullName: () =>
|
|
40
|
-
lookupNext: () =>
|
|
41
|
-
lookupResultContains: () =>
|
|
42
|
-
lookupWithType: () =>
|
|
43
|
-
makeToyboxLink: () =>
|
|
44
|
-
mapVarDeclsByType: () =>
|
|
45
|
-
markInvokeClassMethod: () =>
|
|
46
|
-
parseSdkVersion: () =>
|
|
47
|
-
|
|
35
|
+
isClassVariable: () => import_chunk_IMIM4BE2.isClassVariable,
|
|
36
|
+
isLocal: () => import_chunk_IMIM4BE2.isLocal,
|
|
37
|
+
isLookupCandidate: () => import_chunk_IMIM4BE2.isLookupCandidate,
|
|
38
|
+
isStateNode: () => import_chunk_IMIM4BE2.isStateNode,
|
|
39
|
+
lookupByFullName: () => import_chunk_IMIM4BE2.lookupByFullName,
|
|
40
|
+
lookupNext: () => import_chunk_IMIM4BE2.lookupNext,
|
|
41
|
+
lookupResultContains: () => import_chunk_IMIM4BE2.lookupResultContains,
|
|
42
|
+
lookupWithType: () => import_chunk_IMIM4BE2.lookupWithType,
|
|
43
|
+
makeToyboxLink: () => import_chunk_IMIM4BE2.makeToyboxLink,
|
|
44
|
+
mapVarDeclsByType: () => import_chunk_IMIM4BE2.mapVarDeclsByType,
|
|
45
|
+
markInvokeClassMethod: () => import_chunk_IMIM4BE2.markInvokeClassMethod,
|
|
46
|
+
parseSdkVersion: () => import_chunk_IMIM4BE2.parseSdkVersion,
|
|
47
|
+
resolveDiagnostics: () => import_chunk_IMIM4BE2.resolveDiagnostics,
|
|
48
|
+
resolveDiagnosticsMap: () => import_chunk_IMIM4BE2.resolveDiagnosticsMap,
|
|
49
|
+
sameLookupResult: () => import_chunk_IMIM4BE2.sameLookupResult,
|
|
48
50
|
traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
|
|
49
|
-
variableDeclarationName: () =>
|
|
50
|
-
visitReferences: () =>
|
|
51
|
-
visit_resources: () =>
|
|
52
|
-
visitorNode: () =>
|
|
51
|
+
variableDeclarationName: () => import_chunk_IMIM4BE2.variableDeclarationName,
|
|
52
|
+
visitReferences: () => import_chunk_IMIM4BE2.visitReferences,
|
|
53
|
+
visit_resources: () => import_chunk_IMIM4BE2.visit_resources,
|
|
54
|
+
visitorNode: () => import_chunk_IMIM4BE2.visitorNode
|
|
53
55
|
});
|
|
54
56
|
module.exports = __toCommonJS(api_exports);
|
|
55
|
-
var
|
|
57
|
+
var import_chunk_IMIM4BE2 = require("./chunk-IMIM4BE2.cjs");
|
|
56
58
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
57
59
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
58
60
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
59
|
-
(0,
|
|
61
|
+
(0, import_chunk_IMIM4BE2.init_api)();
|
|
60
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
61
63
|
0 && (module.exports = {
|
|
62
64
|
checkCompilerVersion,
|
|
@@ -85,6 +87,8 @@ var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
|
85
87
|
mapVarDeclsByType,
|
|
86
88
|
markInvokeClassMethod,
|
|
87
89
|
parseSdkVersion,
|
|
90
|
+
resolveDiagnostics,
|
|
91
|
+
resolveDiagnosticsMap,
|
|
88
92
|
sameLookupResult,
|
|
89
93
|
traverseAst,
|
|
90
94
|
variableDeclarationName,
|
|
@@ -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_IMIM4BE2_exports = {};
|
|
30
|
+
__export(chunk_IMIM4BE2_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -113,6 +113,8 @@ __export(chunk_E67DP34P_exports, {
|
|
|
113
113
|
performTask: () => performTask,
|
|
114
114
|
readPrg: () => readPrg,
|
|
115
115
|
readPrgWithOffsets: () => readPrgWithOffsets,
|
|
116
|
+
resolveDiagnostics: () => resolveDiagnostics,
|
|
117
|
+
resolveDiagnosticsMap: () => resolveDiagnosticsMap,
|
|
116
118
|
restrictByEquality: () => restrictByEquality,
|
|
117
119
|
runTaskInPool: () => runTaskInPool,
|
|
118
120
|
sameLookupResult: () => sameLookupResult,
|
|
@@ -128,7 +130,7 @@ __export(chunk_E67DP34P_exports, {
|
|
|
128
130
|
visitorNode: () => visitorNode,
|
|
129
131
|
xml_util_exports: () => xml_util_exports
|
|
130
132
|
});
|
|
131
|
-
module.exports = __toCommonJS(
|
|
133
|
+
module.exports = __toCommonJS(chunk_IMIM4BE2_exports);
|
|
132
134
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
133
135
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
134
136
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
@@ -10778,6 +10780,12 @@ function cloneType(t) {
|
|
|
10778
10780
|
return { ...t };
|
|
10779
10781
|
}
|
|
10780
10782
|
function relaxType(type) {
|
|
10783
|
+
if (type.type === 1) {
|
|
10784
|
+
return {
|
|
10785
|
+
type: 1 | 32768
|
|
10786
|
+
/* Object */
|
|
10787
|
+
};
|
|
10788
|
+
}
|
|
10781
10789
|
const valTypes = type.type & ValueTypeTagsConst;
|
|
10782
10790
|
if ((!valTypes || hasNoData(type, valTypes)) && (!(type.type & 6) || (type.type & 6) === 6)) {
|
|
10783
10791
|
return type;
|
|
@@ -16796,40 +16804,6 @@ async function optimizeMonkeyCHelper(fnMap, resourcesMap, manifestXML, config) {
|
|
|
16796
16804
|
}
|
|
16797
16805
|
delete state.inlineDiagnostics;
|
|
16798
16806
|
}
|
|
16799
|
-
const resolveDiagnostics = (diagnostics2) => diagnostics2 ? Promise.all(
|
|
16800
|
-
diagnostics2?.filter((diagnostic2) => typeof diagnostic2.message !== "string").map((diagnostic2) => diagnostic2.message)
|
|
16801
|
-
).then(() => {
|
|
16802
|
-
const groups = /* @__PURE__ */ new Map();
|
|
16803
|
-
diagnostics2.forEach((d) => {
|
|
16804
|
-
let key = `${d.loc.start.offset}:${d.loc.end.offset}`;
|
|
16805
|
-
if (d.related) {
|
|
16806
|
-
key += ":" + d.related.map((r) => `${r.loc.start.offset}:${r.loc.end.offset}`).join(":");
|
|
16807
|
-
}
|
|
16808
|
-
if (!d.message) {
|
|
16809
|
-
groups.delete(key);
|
|
16810
|
-
} else {
|
|
16811
|
-
const group = groups.get(key);
|
|
16812
|
-
if (!group) {
|
|
16813
|
-
groups.set(key, [d]);
|
|
16814
|
-
} else {
|
|
16815
|
-
const index = group.findIndex((g) => g.message === d.message);
|
|
16816
|
-
if (index < 0) {
|
|
16817
|
-
group.push(d);
|
|
16818
|
-
} else {
|
|
16819
|
-
group[index] = d;
|
|
16820
|
-
}
|
|
16821
|
-
}
|
|
16822
|
-
}
|
|
16823
|
-
});
|
|
16824
|
-
diagnostics2.splice(0);
|
|
16825
|
-
diagnostics2.push(...Array.from(groups.values()).flat());
|
|
16826
|
-
return diagnostics2;
|
|
16827
|
-
}) : diagnostics2;
|
|
16828
|
-
const resolveDiagnosticsMap = (diagnosticsMap) => Promise.all(
|
|
16829
|
-
Object.values(diagnosticsMap).map(
|
|
16830
|
-
(diagnostics2) => resolveDiagnostics(diagnostics2)
|
|
16831
|
-
)
|
|
16832
|
-
).then(() => diagnosticsMap);
|
|
16833
16807
|
if (state.config?.checkBuildPragmas) {
|
|
16834
16808
|
await Object.entries(fnMap).reduce((promise, [name, f]) => {
|
|
16835
16809
|
return Promise.all([
|
|
@@ -18903,6 +18877,44 @@ function isLocal(v) {
|
|
|
18903
18877
|
function isClassVariable(v) {
|
|
18904
18878
|
return v.stack[v.stack.length - 1]?.sn.type === "ClassDeclaration";
|
|
18905
18879
|
}
|
|
18880
|
+
function resolveDiagnostics(diagnostics) {
|
|
18881
|
+
return diagnostics ? Promise.all(
|
|
18882
|
+
diagnostics?.filter((diagnostic2) => typeof diagnostic2.message !== "string").map((diagnostic2) => diagnostic2.message)
|
|
18883
|
+
).then(() => {
|
|
18884
|
+
const groups = /* @__PURE__ */ new Map();
|
|
18885
|
+
diagnostics.forEach((d) => {
|
|
18886
|
+
let key = `${d.loc.start.offset}:${d.loc.end.offset}`;
|
|
18887
|
+
if (d.related) {
|
|
18888
|
+
key += ":" + d.related.map((r) => `${r.loc.start.offset}:${r.loc.end.offset}`).join(":");
|
|
18889
|
+
}
|
|
18890
|
+
if (!d.message) {
|
|
18891
|
+
groups.delete(key);
|
|
18892
|
+
} else {
|
|
18893
|
+
const group = groups.get(key);
|
|
18894
|
+
if (!group) {
|
|
18895
|
+
groups.set(key, [d]);
|
|
18896
|
+
} else {
|
|
18897
|
+
const index = group.findIndex((g) => g.message === d.message);
|
|
18898
|
+
if (index < 0) {
|
|
18899
|
+
group.push(d);
|
|
18900
|
+
} else {
|
|
18901
|
+
group[index] = d;
|
|
18902
|
+
}
|
|
18903
|
+
}
|
|
18904
|
+
}
|
|
18905
|
+
});
|
|
18906
|
+
diagnostics.splice(0);
|
|
18907
|
+
diagnostics.push(...Array.from(groups.values()).flat());
|
|
18908
|
+
return diagnostics;
|
|
18909
|
+
}) : diagnostics;
|
|
18910
|
+
}
|
|
18911
|
+
function resolveDiagnosticsMap(diagnosticsMap) {
|
|
18912
|
+
return Promise.all(
|
|
18913
|
+
Object.values(diagnosticsMap).map(
|
|
18914
|
+
(diagnostics) => resolveDiagnostics(diagnostics)
|
|
18915
|
+
)
|
|
18916
|
+
).then(() => diagnosticsMap);
|
|
18917
|
+
}
|
|
18906
18918
|
function diagnostic(state, node, message, type = "INFO", extra) {
|
|
18907
18919
|
if (!state.diagnostics)
|
|
18908
18920
|
state.diagnostics = {};
|
|
@@ -28081,7 +28093,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
28081
28093
|
const opt_time = await (0, import_chunk_SG7ODKRM.first_modified)(
|
|
28082
28094
|
Object.values(fnMap).map((v) => v.output)
|
|
28083
28095
|
);
|
|
28084
|
-
if (source_time < opt_time &&
|
|
28096
|
+
if (source_time < opt_time && 1695857383506 < opt_time) {
|
|
28085
28097
|
return {
|
|
28086
28098
|
hasTests,
|
|
28087
28099
|
diagnostics: prevDiagnostics,
|
|
@@ -28120,7 +28132,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
28120
28132
|
hasTests: hasTests2,
|
|
28121
28133
|
diagnostics,
|
|
28122
28134
|
sdkVersion,
|
|
28123
|
-
optimizerVersion: "1.1.
|
|
28135
|
+
optimizerVersion: "1.1.38",
|
|
28124
28136
|
...Object.fromEntries(
|
|
28125
28137
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
28126
28138
|
)
|
|
@@ -28261,6 +28273,9 @@ async function getProjectAnalysisHelper(targets, analysis, manifestXML, options)
|
|
|
28261
28273
|
});
|
|
28262
28274
|
delete state.pre;
|
|
28263
28275
|
}
|
|
28276
|
+
if (state.diagnostics) {
|
|
28277
|
+
await resolveDiagnosticsMap(state.diagnostics);
|
|
28278
|
+
}
|
|
28264
28279
|
return { fnMap, paths, state, typeMap };
|
|
28265
28280
|
}
|
|
28266
28281
|
var defaultConfig, configOptionsToCheck;
|
|
@@ -29031,6 +29046,8 @@ var init_sdk_util = (0, import_chunk_ABYVSU2C.__esm)({
|
|
|
29031
29046
|
performTask,
|
|
29032
29047
|
readPrg,
|
|
29033
29048
|
readPrgWithOffsets,
|
|
29049
|
+
resolveDiagnostics,
|
|
29050
|
+
resolveDiagnosticsMap,
|
|
29034
29051
|
restrictByEquality,
|
|
29035
29052
|
runTaskInPool,
|
|
29036
29053
|
sameLookupResult,
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,28 +18,28 @@ 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
|
-
buildOptimizedProject: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_IMIM4BE2.StateNodeAttributes,
|
|
22
|
+
buildOptimizedProject: () => import_chunk_IMIM4BE2.buildOptimizedProject,
|
|
23
23
|
copyRecursiveAsNeeded: () => import_chunk_SG7ODKRM.copyRecursiveAsNeeded,
|
|
24
|
-
defaultConfig: () =>
|
|
25
|
-
display: () =>
|
|
26
|
-
generateOneConfig: () =>
|
|
27
|
-
generateOptimizedProject: () =>
|
|
28
|
-
getConfig: () =>
|
|
29
|
-
getProjectAnalysis: () =>
|
|
30
|
-
get_jungle: () =>
|
|
31
|
-
isErrorWithLocation: () =>
|
|
32
|
-
launchSimulator: () =>
|
|
33
|
-
manifestProducts: () =>
|
|
34
|
-
mctree: () =>
|
|
35
|
-
simulateProgram: () =>
|
|
24
|
+
defaultConfig: () => import_chunk_IMIM4BE2.defaultConfig,
|
|
25
|
+
display: () => import_chunk_IMIM4BE2.display,
|
|
26
|
+
generateOneConfig: () => import_chunk_IMIM4BE2.generateOneConfig,
|
|
27
|
+
generateOptimizedProject: () => import_chunk_IMIM4BE2.generateOptimizedProject,
|
|
28
|
+
getConfig: () => import_chunk_IMIM4BE2.getConfig,
|
|
29
|
+
getProjectAnalysis: () => import_chunk_IMIM4BE2.getProjectAnalysis,
|
|
30
|
+
get_jungle: () => import_chunk_IMIM4BE2.get_jungle,
|
|
31
|
+
isErrorWithLocation: () => import_chunk_IMIM4BE2.isErrorWithLocation,
|
|
32
|
+
launchSimulator: () => import_chunk_IMIM4BE2.launchSimulator,
|
|
33
|
+
manifestProducts: () => import_chunk_IMIM4BE2.manifestProducts,
|
|
34
|
+
mctree: () => import_chunk_IMIM4BE2.mctree,
|
|
35
|
+
simulateProgram: () => import_chunk_IMIM4BE2.simulateProgram
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(optimizer_exports);
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_IMIM4BE2 = require("./chunk-IMIM4BE2.cjs");
|
|
39
39
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
40
40
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
41
41
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
42
|
-
(0,
|
|
42
|
+
(0, import_chunk_IMIM4BE2.init_optimizer)();
|
|
43
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
44
|
0 && (module.exports = {
|
|
45
45
|
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_IMIM4BE2.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_IMIM4BE2.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_IMIM4BE2.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_IMIM4BE2.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_IMIM4BE2.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_IMIM4BE2.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_IMIM4BE2.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_IMIM4BE2.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_IMIM4BE2.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_IMIM4BE2.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_IMIM4BE2.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_IMIM4BE2.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_IMIM4BE2 = require("./chunk-IMIM4BE2.cjs");
|
|
36
36
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
37
37
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
38
38
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
39
|
-
(0,
|
|
39
|
+
(0, import_chunk_IMIM4BE2.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/api.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export declare function getApiFunctionInfo(state: ProgramState, func: FunctionSt
|
|
|
47
47
|
export declare function markInvokeClassMethod(state: ProgramStateAnalysis, func: FunctionStateNode): void;
|
|
48
48
|
export declare function isLocal(v: VariableStateNode): boolean;
|
|
49
49
|
export declare function isClassVariable(v: VariableStateNode): boolean;
|
|
50
|
+
export declare function resolveDiagnostics(diagnostics?: PreDiagnostic[]): Promise<Diagnostic[]> | undefined;
|
|
51
|
+
export declare function resolveDiagnosticsMap(diagnosticsMap: Record<string, PreDiagnostic[]>): Promise<Record<string, Diagnostic[]>>;
|
|
50
52
|
export declare function diagnostic(state: ProgramState, node: mctree.Node, message: string | Promise<string> | null, type?: DiagnosticType, extra?: Diagnostic["extra"]): void;
|
|
51
53
|
export declare function diagnosticHelper(diagnostics: Record<string, PreDiagnostic[]>, node: mctree.Node, message: string | Promise<string> | null, type: DiagnosticType | undefined, extra: Diagnostic["extra"] | undefined): void;
|
|
52
54
|
export declare function getSuperClasses(klass: ClassStateNode): Set<StateNode> | null;
|
|
@@ -187,9 +187,7 @@ export declare function isSingleton(v: AbstractValue): v is SingletonType;
|
|
|
187
187
|
export declare function hasValue(v: AbstractValue): v is WithValue<ExactTypes>;
|
|
188
188
|
export declare function hasNoData(v: AbstractValue, t: TypeTag): boolean;
|
|
189
189
|
export declare function cloneType<T extends ExactOrUnion>(t: T): T;
|
|
190
|
-
export declare function relaxType(type: ExactOrUnion):
|
|
191
|
-
type: number;
|
|
192
|
-
};
|
|
190
|
+
export declare function relaxType(type: ExactOrUnion): ExactOrUnion;
|
|
193
191
|
export declare function typeFromTypeStateNode(state: ProgramStateAnalysis, sn: StateNodeDecl, classVsObj?: boolean): ExactOrUnion;
|
|
194
192
|
export declare function typeFromTypeStateNodes(state: ProgramStateAnalysis, sns: StateNodeDecl[], classVsObj?: boolean): ExactOrUnion;
|
|
195
193
|
export declare function objectLiteralKeyFromExpr(key: mctree.Expression): string | null;
|
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_IMIM4BE2 = require("./chunk-IMIM4BE2.cjs");
|
|
25
25
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
26
26
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.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_IMIM4BE2.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_IMIM4BE2.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED