@ai-ecoverse/slicc-kernel 1.154.1 → 1.154.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 +1 -1
- package/dist/driver-worker.js +5 -2
- package/dist/driver-worker.js.map +2 -2
- package/dist/index.js +5 -2
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +165 -13
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-driver-worker.js +5 -2
- package/dist/node-driver-worker.js.map +2 -2
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +170 -15
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +1 -1
- package/dist/types/embedder-relay.d.ts +3 -0
- package/dist/types/fs/opfs.d.ts +3 -0
- package/dist/types/kernel/vfs-file.d.ts +5 -0
- package/package.json +1 -1
|
@@ -78,7 +78,8 @@ function bodyStream(id, state, post) {
|
|
|
78
78
|
const next = state.body.shift();
|
|
79
79
|
if (next) controller.enqueue(next);
|
|
80
80
|
else controller.close();
|
|
81
|
-
}
|
|
81
|
+
},
|
|
82
|
+
cancel: () => post({ id, bodyCancel: true })
|
|
82
83
|
},
|
|
83
84
|
{ highWaterMark: 0 }
|
|
84
85
|
);
|
|
@@ -99,14 +100,16 @@ function embedderAnswerer(port, hookFor) {
|
|
|
99
100
|
throw Object.assign(new Error(`this page does not answer ${ask.kind}`), {
|
|
100
101
|
name: "NotSupportedError"
|
|
101
102
|
});
|
|
103
|
+
const body = bodyStream(ask.id, state, post);
|
|
102
104
|
const reply = await hook.handle({
|
|
103
105
|
kind: ask.kind,
|
|
104
106
|
options: ask.options,
|
|
105
|
-
body
|
|
107
|
+
body,
|
|
106
108
|
stamp: ask.stamp,
|
|
107
109
|
signal: state.abort.signal,
|
|
108
110
|
progress: (line) => post({ id: ask.id, progress: String(line) })
|
|
109
111
|
});
|
|
112
|
+
if (!(reply instanceof ReadableStream)) post({ id: ask.id, bodyCancel: true });
|
|
110
113
|
state.reader = bytesOf(reply).getReader();
|
|
111
114
|
post({ id: ask.id, ready: true });
|
|
112
115
|
} catch (err) {
|