@markw65/monkeyc-optimizer 1.1.14 → 1.1.16
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/README.md +32 -0
- package/build/api.cjs +86 -14496
- package/build/chunk-IAUHYWVN.cjs +5717 -0
- package/build/chunk-K32K3YD4.cjs +145 -0
- package/build/chunk-TQHOJQYY.cjs +4660 -0
- package/build/chunk-VVIZ2ADY.cjs +23697 -0
- package/build/chunk-WIPYYCBN.cjs +54 -0
- package/build/optimizer.cjs +56 -16995
- package/build/sdk-util.cjs +49 -10567
- package/build/src/api.d.ts +1 -1
- package/build/src/logger.d.ts +2 -0
- package/build/src/optimizer-types.d.ts +1 -0
- package/build/src/optimizer.d.ts +2 -2
- package/build/src/readprg/array-init.d.ts +2 -0
- package/build/src/readprg/bytecode.d.ts +14 -0
- package/build/src/readprg/dce.d.ts +2 -2
- package/build/src/readprg/emit.d.ts +2 -0
- package/build/src/readprg/exceptions.d.ts +2 -1
- package/build/src/readprg/opcodes.d.ts +3 -0
- package/build/src/readprg/sharing.d.ts +2 -0
- package/build/src/type-flow/dead-store.d.ts +1 -1
- package/build/src/util.d.ts +2 -2
- package/build/util.cjs +66 -8006
- package/package.json +9 -10
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var chunk_WIPYYCBN_exports = {};
|
|
20
|
+
__export(chunk_WIPYYCBN_exports, {
|
|
21
|
+
init_worker_task: () => init_worker_task,
|
|
22
|
+
performTask: () => performTask
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(chunk_WIPYYCBN_exports);
|
|
25
|
+
var import_chunk_TQHOJQYY = require("./chunk-TQHOJQYY.cjs");
|
|
26
|
+
var import_chunk_IAUHYWVN = require("./chunk-IAUHYWVN.cjs");
|
|
27
|
+
async function performTask(task) {
|
|
28
|
+
const type = task.type;
|
|
29
|
+
const handler = Object.prototype.hasOwnProperty.call(workerTaskHandlers, type) && workerTaskHandlers[type];
|
|
30
|
+
if (!handler) {
|
|
31
|
+
throw new Error(`Invalid task type ${type}`);
|
|
32
|
+
}
|
|
33
|
+
return handler(task.data);
|
|
34
|
+
}
|
|
35
|
+
var workerTaskHandlers;
|
|
36
|
+
var init_worker_task = (0, import_chunk_IAUHYWVN.__esm)({
|
|
37
|
+
"src/worker-task.ts"() {
|
|
38
|
+
"use strict";
|
|
39
|
+
(0, import_chunk_TQHOJQYY.init_optimizer)();
|
|
40
|
+
workerTaskHandlers = {
|
|
41
|
+
buildOptimizedProject(data) {
|
|
42
|
+
return (0, import_chunk_TQHOJQYY.buildOptimizedProject)(data.product, data.options);
|
|
43
|
+
},
|
|
44
|
+
generateOptimizedProject(data) {
|
|
45
|
+
return (0, import_chunk_TQHOJQYY.generateOptimizedProject)(data.options);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
init_worker_task,
|
|
53
|
+
performTask
|
|
54
|
+
});
|