@ai-ecoverse/slicc-kernel 1.75.0 → 1.76.0
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 +3 -3
- package/dist/kernel-worker.js +74 -15
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +10 -0
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +74 -15
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +10 -0
- package/dist/process-worker.js.map +2 -2
- package/package.json +1 -1
package/dist/process-worker.js
CHANGED
|
@@ -4959,6 +4959,7 @@ var init_process_runtime = __esm({
|
|
|
4959
4959
|
PLACED = /* @__PURE__ */ new Set(["stream", "file", "socket", "clipboard"]);
|
|
4960
4960
|
GLUE_TRAILER = [
|
|
4961
4961
|
"if (typeof ENV !== 'undefined') Object.assign(ENV, Module.sliccEnv);",
|
|
4962
|
+
"if (typeof thisProgram !== 'undefined' && Module.thisProgram === '') thisProgram = '';",
|
|
4962
4963
|
"const __sliccTake = (name, value) => {",
|
|
4963
4964
|
" const own = Object.getOwnPropertyDescriptor(Module, name);",
|
|
4964
4965
|
" if (own && 'value' in own && own.value != null) return;",
|
|
@@ -11279,6 +11280,7 @@ function childOps(kernel, io, defaults) {
|
|
|
11279
11280
|
const [file] = o.argv;
|
|
11280
11281
|
if (file === void 0) throw new JsCallError("EINVAL", "spawn");
|
|
11281
11282
|
const group = groupOf(o, "spawn");
|
|
11283
|
+
const named = argv0Of(o.argv0, "spawn");
|
|
11282
11284
|
const mine = [];
|
|
11283
11285
|
const theirs = [];
|
|
11284
11286
|
try {
|
|
@@ -11287,6 +11289,7 @@ function childOps(kernel, io, defaults) {
|
|
|
11287
11289
|
op: "proc-spawn",
|
|
11288
11290
|
file,
|
|
11289
11291
|
argv: [...o.argv],
|
|
11292
|
+
...named,
|
|
11290
11293
|
env: { ...o.env ?? defaults.env },
|
|
11291
11294
|
cwd: o.cwd ?? defaults.cwd,
|
|
11292
11295
|
stdio,
|
|
@@ -11311,6 +11314,11 @@ function groupOf(o, call2) {
|
|
|
11311
11314
|
if (session && pgid !== void 0) throw new JsCallError("EINVAL", call2);
|
|
11312
11315
|
return session ? { session: true } : pgid !== void 0 ? { pgid } : {};
|
|
11313
11316
|
}
|
|
11317
|
+
function argv0Of(argv0, call2) {
|
|
11318
|
+
if (argv0 === void 0) return {};
|
|
11319
|
+
if (typeof argv0 !== "string") throw new JsCallError("EINVAL", call2);
|
|
11320
|
+
return { argv0 };
|
|
11321
|
+
}
|
|
11314
11322
|
async function closeAll(io, fds) {
|
|
11315
11323
|
for (const fd of fds) if (fd !== void 0) await io.close(fd).catch(() => void 0);
|
|
11316
11324
|
}
|
|
@@ -12377,6 +12385,7 @@ function runSync(kernel, d, o) {
|
|
|
12377
12385
|
const [file] = o.argv;
|
|
12378
12386
|
if (file === void 0) throw new JsCallError("EINVAL", "run");
|
|
12379
12387
|
const group = groupOf(o, "run");
|
|
12388
|
+
const named = argv0Of(o.argv0, "run");
|
|
12380
12389
|
const stdout = stdioOf(o.stdout);
|
|
12381
12390
|
const stderr = stderrOf(o.stderr);
|
|
12382
12391
|
const input = typeof o.input === "string" ? encoder2.encode(o.input) : o.input;
|
|
@@ -12386,6 +12395,7 @@ function runSync(kernel, d, o) {
|
|
|
12386
12395
|
op: "proc-run",
|
|
12387
12396
|
file,
|
|
12388
12397
|
argv: [...o.argv],
|
|
12398
|
+
...named,
|
|
12389
12399
|
env: { ...o.env ?? d.env },
|
|
12390
12400
|
cwd: o.cwd === void 0 ? d.cwd : d.resolve(o.cwd),
|
|
12391
12401
|
...group,
|