@ai-ecoverse/slicc-kernel 1.124.10 → 1.124.11
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/dist/kernel-worker.js +1 -1
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +27 -6
- package/dist/node-process-worker.js.map +2 -2
- package/dist/node.js +1 -1
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +27 -6
- package/dist/process-worker.js.map +2 -2
- package/dist/types/realm/sync-fs-wire.d.ts +1 -0
- package/package.json +1 -1
package/dist/process-worker.js
CHANGED
|
@@ -1174,6 +1174,7 @@ function errnoError(code2, path) {
|
|
|
1174
1174
|
function createSyncFsSabBridge(transport, opts = {}) {
|
|
1175
1175
|
const timeoutMs2 = opts.timeoutMs ?? SYNC_FS_REQUEST_TIMEOUT_MS;
|
|
1176
1176
|
let identity = {};
|
|
1177
|
+
let once = false;
|
|
1177
1178
|
let last = null;
|
|
1178
1179
|
function run(req, path, transfer) {
|
|
1179
1180
|
last = null;
|
|
@@ -1192,7 +1193,9 @@ function createSyncFsSabBridge(transport, opts = {}) {
|
|
|
1192
1193
|
throw errnoError("EIO", path);
|
|
1193
1194
|
}
|
|
1194
1195
|
const changing = (req, path, transfer) => {
|
|
1195
|
-
const
|
|
1196
|
+
const ask = once ? { identity: true } : identity;
|
|
1197
|
+
once = false;
|
|
1198
|
+
const r = run({ ...req, ...ask }, path, transfer);
|
|
1196
1199
|
if (r.ok && r.kind === "json") last = parseSyncFsStat(r.json);
|
|
1197
1200
|
};
|
|
1198
1201
|
const io = (id) => ({
|
|
@@ -1289,7 +1292,14 @@ function createSyncFsSabBridge(transport, opts = {}) {
|
|
|
1289
1292
|
identify: () => {
|
|
1290
1293
|
identity = { identity: true };
|
|
1291
1294
|
},
|
|
1292
|
-
|
|
1295
|
+
identifyNext: () => {
|
|
1296
|
+
once = true;
|
|
1297
|
+
last = null;
|
|
1298
|
+
},
|
|
1299
|
+
identified: () => {
|
|
1300
|
+
once = false;
|
|
1301
|
+
return last;
|
|
1302
|
+
},
|
|
1293
1303
|
lutimes: (path, atimeMs, mtimeMs, now) => {
|
|
1294
1304
|
run({ op: "lutimes", path, atimeMs, mtimeMs, ...now ? { now } : {} }, path);
|
|
1295
1305
|
},
|
|
@@ -2624,7 +2634,7 @@ var KERNEL_VERSION, OS_RELEASE;
|
|
|
2624
2634
|
var init_version = __esm({
|
|
2625
2635
|
"src/version.ts"() {
|
|
2626
2636
|
"use strict";
|
|
2627
|
-
KERNEL_VERSION = true ? "1.124.
|
|
2637
|
+
KERNEL_VERSION = true ? "1.124.11" : "0.0.0-dev";
|
|
2628
2638
|
OS_RELEASE = "6.0.0-slicc";
|
|
2629
2639
|
}
|
|
2630
2640
|
});
|
|
@@ -6650,6 +6660,17 @@ function cachingBridge(bridge, now = () => performance.now(), shared) {
|
|
|
6650
6660
|
else cache.mutated([]);
|
|
6651
6661
|
}
|
|
6652
6662
|
};
|
|
6663
|
+
const relabeling = (p, op) => {
|
|
6664
|
+
if (exact || !bridge.identifyNext) return rewriting(p, op);
|
|
6665
|
+
bridge.identifyNext();
|
|
6666
|
+
try {
|
|
6667
|
+
return op();
|
|
6668
|
+
} finally {
|
|
6669
|
+
const st = bridge.identified?.() ?? null;
|
|
6670
|
+
if (st) cache.mutated([p], st.ino);
|
|
6671
|
+
else cache.mutated([]);
|
|
6672
|
+
}
|
|
6673
|
+
};
|
|
6653
6674
|
const rewriting = (p, op, ...also) => {
|
|
6654
6675
|
if (exact) return identified(p, op, also);
|
|
6655
6676
|
const ino = cache.inoOf(p, () => bridge.stat(p));
|
|
@@ -6706,8 +6727,8 @@ function cachingBridge(bridge, now = () => performance.now(), shared) {
|
|
|
6706
6727
|
unlink: (p) => mutating(() => bridge.unlink(p)),
|
|
6707
6728
|
rmdir: (p) => mutating(() => bridge.rmdir(p)),
|
|
6708
6729
|
symlink: (target, link) => mutating(() => bridge.symlink(target, link), ...entry(link)),
|
|
6709
|
-
chmod: (p, mode) =>
|
|
6710
|
-
utimes: (p, a, m, now2) =>
|
|
6730
|
+
chmod: (p, mode) => relabeling(p, () => bridge.chmod(p, mode)),
|
|
6731
|
+
utimes: (p, a, m, now2) => relabeling(p, () => bridge.utimes(p, a, m, now2)),
|
|
6711
6732
|
lutimes: (p, a, m, now2) => mutating(() => bridge.lutimes(p, a, m, now2)),
|
|
6712
6733
|
...bridge.hold ? { hold: bridge.hold.bind(bridge) } : {},
|
|
6713
6734
|
...bridge.access ? { access: bridge.access.bind(bridge) } : {},
|
|
@@ -6721,7 +6742,7 @@ function cachingBridge(bridge, now = () => performance.now(), shared) {
|
|
|
6721
6742
|
mkfifo: (p, mode) => mutating(() => bridge.mkfifo?.(p, mode), ...entry(p))
|
|
6722
6743
|
} : {},
|
|
6723
6744
|
...chown ? {
|
|
6724
|
-
chown: (p, ...rest2) =>
|
|
6745
|
+
chown: (p, ...rest2) => relabeling(p, () => chown.call(bridge, p, ...rest2))
|
|
6725
6746
|
} : {},
|
|
6726
6747
|
...bridge.pread && bridge.pwrite && bridge.truncate ? {
|
|
6727
6748
|
pread: bridge.pread.bind(bridge),
|