@markw65/monkeyc-optimizer 1.1.62 → 1.1.63
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/README.md +83 -1
- package/build/api.cjs +34 -34
- package/build/{chunk-WVEFLPTH.cjs → chunk-Y2ZRISYL.cjs} +11 -11
- package/build/optimizer.cjs +16 -16
- package/build/sdk-util.cjs +14 -14
- 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.63
|
|
6
|
+
|
|
7
|
+
- Fixes #31 again, after the fix for #35 broke it
|
|
8
|
+
- Adds some example code in the README, describing how to use the project without `@markw65/prettier-extension-monkeyc`, or `VSCode`
|
|
9
|
+
|
|
5
10
|
### 1.1.62
|
|
6
11
|
|
|
7
12
|
- Update to [@markw65/prettier-plugin-monkeyc@1.0.58](https://github.com/markw65/prettier-plugin-monkeyc/blob/main/CHANGELOG.md#1058)
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This package provides a set of utilities for working with Garmin Monkey-C projec
|
|
|
4
4
|
|
|
5
5
|
#### Optimization and analysis
|
|
6
6
|
|
|
7
|
-
Its primary purpose is to serve as the optimization and analysis engine behind [prettier-extension-monkeyc](https://marketplace.visualstudio.com/items?itemName=markw65.prettier-extension-monkeyc)
|
|
7
|
+
Its primary purpose is to serve as the optimization and analysis engine behind [prettier-extension-monkeyc](https://marketplace.visualstudio.com/items?itemName=markw65.prettier-extension-monkeyc), but it's [API](#api) can also be used to optimize code directly.
|
|
8
8
|
|
|
9
9
|
#### Font analysis
|
|
10
10
|
|
|
@@ -13,3 +13,85 @@ It also provides a tool to report information about the builtin fonts on a devic
|
|
|
13
13
|
## Release Notes
|
|
14
14
|
|
|
15
15
|
See [Change Log](CHANGELOG.md)
|
|
16
|
+
|
|
17
|
+
## API
|
|
18
|
+
|
|
19
|
+
First you will need to [install nodejs/npm](https://nodejs.org/en/download).
|
|
20
|
+
|
|
21
|
+
Then you can install the package. From the directory where you want to use it:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
npm install -D @markw65/monkeyc-optimizer
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then you need some javascript (or typescript) to invoke it. Here's a sample
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
import { buildOptimizedProject, getConfig } from "@markw65/monkeyc-optimizer";
|
|
31
|
+
import { optimizeProgram } from "@markw65/monkeyc-optimizer/sdk-util.js";
|
|
32
|
+
import * as path from "node:path";
|
|
33
|
+
|
|
34
|
+
const jungleFiles = process.argv[2];
|
|
35
|
+
const workspace = path.dirname(jungleFiles);
|
|
36
|
+
|
|
37
|
+
getConfig({
|
|
38
|
+
// These are largely the same options that can be passed to tasks in
|
|
39
|
+
// @markw65/prettier-extension-monkeyc (see the descriptions there)
|
|
40
|
+
// getConfig will read a number of options (such as developerKeyPath)
|
|
41
|
+
// from the vscode user settings, and the project settings, but anything
|
|
42
|
+
// passed in here will override those values.
|
|
43
|
+
//
|
|
44
|
+
// The root that output paths are relative to
|
|
45
|
+
// Defaults to the current directory
|
|
46
|
+
workspace,
|
|
47
|
+
// Where to put the files built by MonkeyC.
|
|
48
|
+
// Defaults to bin. Relative paths are relative to workspace
|
|
49
|
+
buildDir: "bin",
|
|
50
|
+
// Where to put the files generated by the source-to-source optimizer
|
|
51
|
+
// Defaults to bin/optimized. Relative paths are relative to workspace
|
|
52
|
+
outputPath: "bin/optimized",
|
|
53
|
+
// Semi-colon separated list of jungle files
|
|
54
|
+
jungleFiles,
|
|
55
|
+
// If true, don't actually run the MonkeyC compiler, just return the
|
|
56
|
+
// command to do so.
|
|
57
|
+
returnCommand: false,
|
|
58
|
+
}).then((options) =>
|
|
59
|
+
// Passing null instead of a device id will build an .iq file
|
|
60
|
+
buildOptimizedProject("fr955", options)
|
|
61
|
+
.then((result) => {
|
|
62
|
+
// The return value includes:
|
|
63
|
+
//
|
|
64
|
+
// exe - the executable to run to build the generated code ('java')
|
|
65
|
+
// args - the arguments to pass to exe
|
|
66
|
+
// diagnostics - collection of diagnostics raised by monkeyc-optimizer
|
|
67
|
+
// program - the program that was generated by monkeyc (or that would
|
|
68
|
+
// be generated, if returnCommand is true)
|
|
69
|
+
// product - the device that was targeted.
|
|
70
|
+
// hasTests - true if any functions marked by (:test) were found
|
|
71
|
+
|
|
72
|
+
// If you passed `returnCommand: true` above, you would want
|
|
73
|
+
// to execute (exe, args) here
|
|
74
|
+
console.log(`Built: ${result.program}`);
|
|
75
|
+
return result;
|
|
76
|
+
})
|
|
77
|
+
.then((result) =>
|
|
78
|
+
optimizeProgram(
|
|
79
|
+
// program to optimize
|
|
80
|
+
result.program,
|
|
81
|
+
options.developerKeyPath,
|
|
82
|
+
// output program. default will insert ".opt" before the input's extension
|
|
83
|
+
// so foo.prg => foo.opt.prg, and foo.iq => foo.opt.iq
|
|
84
|
+
undefined,
|
|
85
|
+
// A few of the BuildConfig options apply to the post build optimizer
|
|
86
|
+
options
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
.then(({ output }) => console.log(`Optimized: ${output}`))
|
|
90
|
+
);
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If you save the above as `optimize.mjs`, you can then optimize a project via:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
node optimize.mjs path-to-my-project-monkey.jungle
|
|
97
|
+
```
|
package/build/api.cjs
CHANGED
|
@@ -18,47 +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_Y2ZRISYL.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_Y2ZRISYL.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_Y2ZRISYL.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_Y2ZRISYL.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_Y2ZRISYL.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_Y2ZRISYL.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_Y2ZRISYL.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_Y2ZRISYL.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_Y2ZRISYL.formatAstLongLines,
|
|
30
|
+
formatScopedName: () => import_chunk_Y2ZRISYL.formatScopedName,
|
|
31
|
+
getApiFunctionInfo: () => import_chunk_Y2ZRISYL.getApiFunctionInfo,
|
|
32
|
+
getApiMapping: () => import_chunk_Y2ZRISYL.getApiMapping,
|
|
33
|
+
getSuperClasses: () => import_chunk_Y2ZRISYL.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
|
-
resolveDiagnostics: () =>
|
|
48
|
-
resolveDiagnosticsMap: () =>
|
|
49
|
-
sameLookupResult: () =>
|
|
35
|
+
isClassVariable: () => import_chunk_Y2ZRISYL.isClassVariable,
|
|
36
|
+
isLocal: () => import_chunk_Y2ZRISYL.isLocal,
|
|
37
|
+
isLookupCandidate: () => import_chunk_Y2ZRISYL.isLookupCandidate,
|
|
38
|
+
isStateNode: () => import_chunk_Y2ZRISYL.isStateNode,
|
|
39
|
+
lookupByFullName: () => import_chunk_Y2ZRISYL.lookupByFullName,
|
|
40
|
+
lookupNext: () => import_chunk_Y2ZRISYL.lookupNext,
|
|
41
|
+
lookupResultContains: () => import_chunk_Y2ZRISYL.lookupResultContains,
|
|
42
|
+
lookupWithType: () => import_chunk_Y2ZRISYL.lookupWithType,
|
|
43
|
+
makeToyboxLink: () => import_chunk_Y2ZRISYL.makeToyboxLink,
|
|
44
|
+
mapVarDeclsByType: () => import_chunk_Y2ZRISYL.mapVarDeclsByType,
|
|
45
|
+
markInvokeClassMethod: () => import_chunk_Y2ZRISYL.markInvokeClassMethod,
|
|
46
|
+
parseSdkVersion: () => import_chunk_Y2ZRISYL.parseSdkVersion,
|
|
47
|
+
resolveDiagnostics: () => import_chunk_Y2ZRISYL.resolveDiagnostics,
|
|
48
|
+
resolveDiagnosticsMap: () => import_chunk_Y2ZRISYL.resolveDiagnosticsMap,
|
|
49
|
+
sameLookupResult: () => import_chunk_Y2ZRISYL.sameLookupResult,
|
|
50
50
|
traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
|
|
51
|
-
variableDeclarationName: () =>
|
|
52
|
-
visitReferences: () =>
|
|
53
|
-
visit_resources: () =>
|
|
54
|
-
visitorNode: () =>
|
|
51
|
+
variableDeclarationName: () => import_chunk_Y2ZRISYL.variableDeclarationName,
|
|
52
|
+
visitReferences: () => import_chunk_Y2ZRISYL.visitReferences,
|
|
53
|
+
visit_resources: () => import_chunk_Y2ZRISYL.visit_resources,
|
|
54
|
+
visitorNode: () => import_chunk_Y2ZRISYL.visitorNode
|
|
55
55
|
});
|
|
56
56
|
module.exports = __toCommonJS(api_exports);
|
|
57
|
-
var
|
|
57
|
+
var import_chunk_Y2ZRISYL = require("./chunk-Y2ZRISYL.cjs");
|
|
58
58
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
59
59
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
60
60
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
61
|
-
(0,
|
|
61
|
+
(0, import_chunk_Y2ZRISYL.init_api)();
|
|
62
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
63
63
|
0 && (module.exports = {
|
|
64
64
|
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_Y2ZRISYL_exports = {};
|
|
30
|
+
__export(chunk_Y2ZRISYL_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -133,7 +133,7 @@ __export(chunk_WVEFLPTH_exports, {
|
|
|
133
133
|
visitorNode: () => visitorNode,
|
|
134
134
|
xml_util_exports: () => xml_util_exports
|
|
135
135
|
});
|
|
136
|
-
module.exports = __toCommonJS(
|
|
136
|
+
module.exports = __toCommonJS(chunk_Y2ZRISYL_exports);
|
|
137
137
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
138
138
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
139
139
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
@@ -13627,12 +13627,6 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13627
13627
|
break;
|
|
13628
13628
|
}
|
|
13629
13629
|
case "def": {
|
|
13630
|
-
if (uninitClassDecls?.size) {
|
|
13631
|
-
(0, import_chunk_SG7ODKRM.forEach)(
|
|
13632
|
-
event.decl,
|
|
13633
|
-
(decl) => uninitClassDecls.has(decl) && curState.inited?.add(decl)
|
|
13634
|
-
);
|
|
13635
|
-
}
|
|
13636
13630
|
const lval = event.node.type === "UpdateExpression" ? event.node.argument : event.node.type === "AssignmentExpression" ? event.node.left : null;
|
|
13637
13631
|
if (lval) {
|
|
13638
13632
|
if (nodeCopyProp.size && lval.type === "MemberExpression") {
|
|
@@ -13799,6 +13793,12 @@ function propagateTypes(state, func, graph, optimizeEquivalencies, copyPropStore
|
|
|
13799
13793
|
locals.add(event.decl);
|
|
13800
13794
|
}
|
|
13801
13795
|
}
|
|
13796
|
+
if (uninitClassDecls?.size) {
|
|
13797
|
+
(0, import_chunk_SG7ODKRM.forEach)(
|
|
13798
|
+
event.decl,
|
|
13799
|
+
(decl) => uninitClassDecls.has(decl) && curState.inited?.add(decl)
|
|
13800
|
+
);
|
|
13801
|
+
}
|
|
13802
13802
|
if (logThisRun) {
|
|
13803
13803
|
(0, import_chunk_SG7ODKRM.log)(
|
|
13804
13804
|
describeEvent(event).then(
|
|
@@ -29218,7 +29218,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
29218
29218
|
const opt_time = await (0, import_chunk_SG7ODKRM.first_modified)(
|
|
29219
29219
|
Object.values(fnMap).map((v) => v.output)
|
|
29220
29220
|
);
|
|
29221
|
-
if (source_time < opt_time &&
|
|
29221
|
+
if (source_time < opt_time && 1716827034287 < opt_time) {
|
|
29222
29222
|
return {
|
|
29223
29223
|
hasTests,
|
|
29224
29224
|
diagnostics: prevDiagnostics,
|
|
@@ -29257,7 +29257,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
29257
29257
|
hasTests: hasTests2,
|
|
29258
29258
|
diagnostics,
|
|
29259
29259
|
sdkVersion,
|
|
29260
|
-
optimizerVersion: "1.1.
|
|
29260
|
+
optimizerVersion: "1.1.63",
|
|
29261
29261
|
...Object.fromEntries(
|
|
29262
29262
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
29263
29263
|
)
|
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_Y2ZRISYL.StateNodeAttributes,
|
|
22
|
+
buildOptimizedProject: () => import_chunk_Y2ZRISYL.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_Y2ZRISYL.defaultConfig,
|
|
25
|
+
display: () => import_chunk_Y2ZRISYL.display,
|
|
26
|
+
generateOneConfig: () => import_chunk_Y2ZRISYL.generateOneConfig,
|
|
27
|
+
generateOptimizedProject: () => import_chunk_Y2ZRISYL.generateOptimizedProject,
|
|
28
|
+
getConfig: () => import_chunk_Y2ZRISYL.getConfig,
|
|
29
|
+
getProjectAnalysis: () => import_chunk_Y2ZRISYL.getProjectAnalysis,
|
|
30
|
+
get_jungle: () => import_chunk_Y2ZRISYL.get_jungle,
|
|
31
|
+
isErrorWithLocation: () => import_chunk_Y2ZRISYL.isErrorWithLocation,
|
|
32
|
+
launchSimulator: () => import_chunk_Y2ZRISYL.launchSimulator,
|
|
33
|
+
manifestProducts: () => import_chunk_Y2ZRISYL.manifestProducts,
|
|
34
|
+
mctree: () => import_chunk_Y2ZRISYL.mctree,
|
|
35
|
+
simulateProgram: () => import_chunk_Y2ZRISYL.simulateProgram
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(optimizer_exports);
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_Y2ZRISYL = require("./chunk-Y2ZRISYL.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_Y2ZRISYL.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_Y2ZRISYL.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_Y2ZRISYL.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_Y2ZRISYL.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_Y2ZRISYL.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_Y2ZRISYL.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_Y2ZRISYL.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_Y2ZRISYL.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_Y2ZRISYL.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_Y2ZRISYL.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_Y2ZRISYL.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_Y2ZRISYL.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_Y2ZRISYL.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_Y2ZRISYL = require("./chunk-Y2ZRISYL.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_Y2ZRISYL.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/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_Y2ZRISYL = require("./chunk-Y2ZRISYL.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_Y2ZRISYL.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_Y2ZRISYL.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED