@ai-ecoverse/slicc-kernel 1.134.0 → 1.134.3
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 +39 -32
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.js +9 -4
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +40 -32
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +9 -4
- package/dist/process-worker.js.map +3 -3
- package/dist/types/fs/opfs.d.ts +0 -1
- package/dist/types/kernel/wasm-memories.d.ts +1 -0
- package/dist/types/node.d.ts +4 -0
- package/dist/types/process/js/js-context.d.ts +1 -0
- package/package.json +2 -2
package/dist/process-worker.js
CHANGED
|
@@ -2693,7 +2693,7 @@ var KERNEL_VERSION, OS_RELEASE;
|
|
|
2693
2693
|
var init_version = __esm({
|
|
2694
2694
|
"src/version.ts"() {
|
|
2695
2695
|
"use strict";
|
|
2696
|
-
KERNEL_VERSION = true ? "1.134.
|
|
2696
|
+
KERNEL_VERSION = true ? "1.134.3" : "0.0.0-dev";
|
|
2697
2697
|
OS_RELEASE = "6.0.0-slicc";
|
|
2698
2698
|
}
|
|
2699
2699
|
});
|
|
@@ -17647,8 +17647,10 @@ function pendingReads(kernel, info, random) {
|
|
|
17647
17647
|
};
|
|
17648
17648
|
return { read: read2, closing };
|
|
17649
17649
|
}
|
|
17650
|
-
function tracked2(pending, writeAll, writeSome) {
|
|
17650
|
+
function tracked2(pending, writeAll, writeSome, failed5) {
|
|
17651
17651
|
return (fd, data, options) => {
|
|
17652
|
+
const status2 = failed5?.();
|
|
17653
|
+
if (status2 !== void 0) return Promise.reject(new JsExit(status2));
|
|
17652
17654
|
const bytes = typeof data === "string" ? encoder4.encode(data) : data;
|
|
17653
17655
|
let settle;
|
|
17654
17656
|
const settled2 = new Promise((resolve) => settle = resolve);
|
|
@@ -17692,7 +17694,7 @@ function createContext(o) {
|
|
|
17692
17694
|
};
|
|
17693
17695
|
const { read: read2, closing } = pendingReads(kernel, info, random);
|
|
17694
17696
|
const { writes, writeAll, writeSome } = writer(kernel, info, o.pid);
|
|
17695
|
-
const write2 = tracked2(pending, writeAll, writeSome);
|
|
17697
|
+
const write2 = tracked2(pending, writeAll, writeSome, o.failed);
|
|
17696
17698
|
const writable2 = (fd) => new WritableStream({
|
|
17697
17699
|
write: async (chunk) => {
|
|
17698
17700
|
await write2(fd, chunk);
|
|
@@ -18178,9 +18180,11 @@ async function runJs(init, port2, deps, thread) {
|
|
|
18178
18180
|
resolveExit(status3);
|
|
18179
18181
|
};
|
|
18180
18182
|
let failing;
|
|
18183
|
+
let failedWith;
|
|
18181
18184
|
const fail = (err) => {
|
|
18182
18185
|
if (err instanceof JsExit) return;
|
|
18183
18186
|
failing ??= (thread ? Promise.resolve() : say(message(err))).then(() => exited(failed5(err)));
|
|
18187
|
+
failedWith ??= failed5(err);
|
|
18184
18188
|
};
|
|
18185
18189
|
const kernel = new JsKernel({
|
|
18186
18190
|
sab: init.sab,
|
|
@@ -18204,7 +18208,8 @@ async function runJs(init, port2, deps, thread) {
|
|
|
18204
18208
|
fs: { owners: init.owners === true, links: init.links === true },
|
|
18205
18209
|
strays,
|
|
18206
18210
|
thread: threadContext(port2, thread),
|
|
18207
|
-
...thread?.owned ? { owned: thread.owned } : {}
|
|
18211
|
+
...thread?.owned ? { owned: thread.owned } : {},
|
|
18212
|
+
failed: () => failedWith
|
|
18208
18213
|
});
|
|
18209
18214
|
const say = (text) => ctx.write(2, `${init.argv0}: ${text}
|
|
18210
18215
|
`).catch(() => void 0);
|