@moldea.ai/cli 13.0.4 → 14.0.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/README.md +5 -9
- package/dist/chunks/{composition-DfXcSF44.js → composition-D1OYuZ5d.js} +1 -1
- package/dist/chunks/{composition-DxVb23Ru.js → composition-_3bygS_a.js} +21 -23
- package/dist/chunks/composition-_3bygS_a.js.map +1 -0
- package/dist/chunks/{core-composition-D3haS6M3.js → core-composition-BKcJ--NX.js} +2 -2
- package/dist/chunks/{core-composition-D3haS6M3.js.map → core-composition-BKcJ--NX.js.map} +1 -1
- package/dist/moldea.js +7 -12
- package/dist/moldea.js.map +1 -1
- package/dist/portable/LICENSES.md +506 -0
- package/dist/portable/SHA256SUMS +17 -0
- package/dist/portable/analysis-worker.mjs +170 -0
- package/dist/portable/chunk-1306b995.mjs +2 -0
- package/dist/portable/chunk-24ea7c23.mjs +328 -0
- package/dist/portable/chunk-2cc3bf5c.mjs +399 -0
- package/dist/portable/chunk-2e9d4c63.mjs +95 -0
- package/dist/portable/chunk-43b8574a.mjs +1837 -0
- package/dist/portable/chunk-517c6bfb.mjs +2 -0
- package/dist/portable/chunk-8f198616.mjs +4414 -0
- package/dist/portable/chunk-936e5d09.mjs +112519 -0
- package/dist/portable/chunk-98d84174.mjs +422 -0
- package/dist/portable/chunk-9e42770a.mjs +3114 -0
- package/dist/portable/chunk-cea1378f.mjs +50 -0
- package/dist/portable/chunk-d6656fa6.mjs +14 -0
- package/dist/portable/chunk-d9e49acd.mjs +302 -0
- package/dist/portable/moldea.mjs +2656 -0
- package/dist/portable/node-runner.mjs +117 -0
- package/package.json +3 -3
- package/dist/chunks/composition-DxVb23Ru.js.map +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { n as e } from "./chunk-2cc3bf5c.mjs";
|
|
2
|
+
import { a as t, c as n, l as r, n as i, o as a } from "./chunk-24ea7c23.mjs";
|
|
3
|
+
import { n as o } from "./chunk-cea1378f.mjs";
|
|
4
|
+
import s from "node:process";
|
|
5
|
+
import { Worker as c } from "node:worker_threads";
|
|
6
|
+
//#region ../core/dist/node-runner.js
|
|
7
|
+
var l, u, d, f, p = !1, m = !1, h = new Set(), g = o((e, n) => {
|
|
8
|
+
if (s.send === void 0 || !s.connected) throw t();
|
|
9
|
+
s.send(e, n);
|
|
10
|
+
}), _ = async (e) => {
|
|
11
|
+
if (p) return;
|
|
12
|
+
p = !0, clearTimeout(f);
|
|
13
|
+
let t = l?.terminate();
|
|
14
|
+
if (e !== void 0 && u !== void 0 && s.connected) try {
|
|
15
|
+
await g({
|
|
16
|
+
attemptId: u,
|
|
17
|
+
kind: "failure",
|
|
18
|
+
failure: r(e)
|
|
19
|
+
});
|
|
20
|
+
} catch {}
|
|
21
|
+
await t, h.clear(), s.removeListener("message", x), s.removeListener("disconnect", v), s.connected && s.disconnect();
|
|
22
|
+
}, v = () => {
|
|
23
|
+
_();
|
|
24
|
+
}, y = (e) => {
|
|
25
|
+
try {
|
|
26
|
+
let n = a(e);
|
|
27
|
+
if (p) return;
|
|
28
|
+
if (n.attemptId !== u) throw t();
|
|
29
|
+
if (n.kind === "ready") {
|
|
30
|
+
if (d !== void 0 || m) throw t();
|
|
31
|
+
d = n.maxAnalysisHeapBytes;
|
|
32
|
+
} else if (n.kind === "reader-request") {
|
|
33
|
+
if (!m || h.has(n.requestId) || h.size >= 4) throw t();
|
|
34
|
+
h.add(n.requestId);
|
|
35
|
+
} else if (n.kind === "failure" && n.failure.options.limit === "maxAnalysisHeapBytes") throw t();
|
|
36
|
+
else if (![
|
|
37
|
+
"prepared",
|
|
38
|
+
"page",
|
|
39
|
+
"failure"
|
|
40
|
+
].includes(n.kind)) throw t();
|
|
41
|
+
g(n).catch((e) => _(e));
|
|
42
|
+
} catch (e) {
|
|
43
|
+
_(e);
|
|
44
|
+
}
|
|
45
|
+
}, b = (r) => {
|
|
46
|
+
if (u !== void 0 || p) throw t();
|
|
47
|
+
u = r.attemptId, clearTimeout(f);
|
|
48
|
+
let a = Math.min(i, r.deadline - Date.now());
|
|
49
|
+
if (a <= 0) {
|
|
50
|
+
_(new e({
|
|
51
|
+
code: "INSPECTION_TIMEOUT",
|
|
52
|
+
operation: "create-project-inspection"
|
|
53
|
+
}));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
f = setTimeout(() => {
|
|
57
|
+
_(new e({
|
|
58
|
+
code: "INSPECTION_TIMEOUT",
|
|
59
|
+
operation: "create-project-inspection"
|
|
60
|
+
}));
|
|
61
|
+
}, a), l = new c(new URL(new URL("./analysis-worker.mjs", import.meta.url).href), {
|
|
62
|
+
execArgv: [],
|
|
63
|
+
env: s.env,
|
|
64
|
+
stdout: !0,
|
|
65
|
+
stderr: !0,
|
|
66
|
+
resourceLimits: {
|
|
67
|
+
maxOldGenerationSizeMb: 512,
|
|
68
|
+
maxYoungGenerationSizeMb: 24
|
|
69
|
+
},
|
|
70
|
+
workerData: n(r)
|
|
71
|
+
});
|
|
72
|
+
let o = 0, m = (e) => {
|
|
73
|
+
o += e.byteLength, o > 32768 && _(t());
|
|
74
|
+
};
|
|
75
|
+
l.stdout.on("data", m), l.stderr.on("data", m), l.on("message", y), l.on("messageerror", (e) => {
|
|
76
|
+
_(t(e));
|
|
77
|
+
}), l.once("error", (n) => {
|
|
78
|
+
_(n.code === "ERR_WORKER_OUT_OF_MEMORY" && d !== void 0 ? new e({
|
|
79
|
+
code: "RESOURCE_LIMIT_EXCEEDED",
|
|
80
|
+
operation: "create-project-inspection",
|
|
81
|
+
limit: "maxAnalysisHeapBytes",
|
|
82
|
+
limitMaximum: d,
|
|
83
|
+
observedUsage: null,
|
|
84
|
+
nextAction: "review-inspection-capacity"
|
|
85
|
+
}) : t(n));
|
|
86
|
+
}), l.once("exit", () => {
|
|
87
|
+
p || _(t());
|
|
88
|
+
});
|
|
89
|
+
}, x = (e) => {
|
|
90
|
+
try {
|
|
91
|
+
let r = a(e);
|
|
92
|
+
if (p) return;
|
|
93
|
+
if (r.kind === "start") {
|
|
94
|
+
b(r);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
if (r.attemptId !== u || l === void 0) throw t();
|
|
98
|
+
if (r.kind === "dispose") {
|
|
99
|
+
_();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (r.kind === "run") {
|
|
103
|
+
if (d === void 0 || m) throw t();
|
|
104
|
+
m = !0;
|
|
105
|
+
} else if (r.kind === "reader-response" || r.kind === "reader-failure") {
|
|
106
|
+
if (!h.delete(r.requestId)) throw t();
|
|
107
|
+
} else if (r.kind !== "read-page" || !m) throw t();
|
|
108
|
+
l.postMessage(n(r));
|
|
109
|
+
} catch (e) {
|
|
110
|
+
_(e);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
s.on("disconnect", v), s.on("message", x), f = setTimeout(() => {
|
|
114
|
+
_();
|
|
115
|
+
}, i), (s.send === void 0 || !s.connected) && _();
|
|
116
|
+
//#endregion
|
|
117
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldea.ai/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "The canonical read-only local command-line composition for moldea repositories.",
|
|
5
5
|
"homepage": "https://github.com/moldea-ai/packages/tree/main/projects/cli#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"node": ">=22.17.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@moldea.ai/core": "^
|
|
32
|
+
"@moldea.ai/core": "^10.0.0",
|
|
33
33
|
"@moldea.ai/repository": "^4.0.0",
|
|
34
34
|
"@moldea.ai/repository-fs": "^4.0.0",
|
|
35
35
|
"jg-crypto": "0.3.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
|
-
"build": "vite build --emptyOutDir",
|
|
53
|
+
"build": "vite build --emptyOutDir && vite build --config portable.config.ts",
|
|
54
54
|
"dev": "vite build --watch",
|
|
55
55
|
"lint": "eslint .",
|
|
56
56
|
"test": "pnpm run test:unit && pnpm run test:integration && pnpm run test:e2e",
|