@ai-ecoverse/slicc-kernel 1.112.0 → 1.113.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 -2
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +24 -3
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +17 -1
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +24 -3
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +17 -1
- package/dist/process-worker.js.map +3 -3
- package/dist/types/fs/opfs.d.ts +3 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/process/js/js-net.d.ts +5 -0
- package/package.json +3 -3
package/dist/kernel-worker.js
CHANGED
|
@@ -993,6 +993,8 @@ var S_ISGID2 = 1024;
|
|
|
993
993
|
var READ_ATTEMPTS = 3;
|
|
994
994
|
var MAX_LINKS2 = 40;
|
|
995
995
|
var CHECK_MS = 1e3;
|
|
996
|
+
var ABSENT_MS = 2;
|
|
997
|
+
var ABSENT_NAMES = 4096;
|
|
996
998
|
var FILE_HANDLES = 4096;
|
|
997
999
|
var STALE = /* @__PURE__ */ new Set(["NotFoundError", "TypeMismatchError"]);
|
|
998
1000
|
var EXECUTABLE = /\/node_modules\/(?:@[^/]+\/)?[^/]+\/bin\//;
|
|
@@ -1127,6 +1129,8 @@ var OpfsFs = class {
|
|
|
1127
1129
|
meta;
|
|
1128
1130
|
dirs = new PathMap();
|
|
1129
1131
|
files = new PathMap();
|
|
1132
|
+
absent = new PathMap();
|
|
1133
|
+
changes = 0;
|
|
1130
1134
|
snapshots = /* @__PURE__ */ new WeakMap();
|
|
1131
1135
|
found = /* @__PURE__ */ new WeakMap();
|
|
1132
1136
|
checked = /* @__PURE__ */ new WeakMap();
|
|
@@ -1365,8 +1369,14 @@ var OpfsFs = class {
|
|
|
1365
1369
|
return true;
|
|
1366
1370
|
}
|
|
1367
1371
|
forget(path) {
|
|
1372
|
+
this.changes++;
|
|
1368
1373
|
this.dirs.deleteTree(path);
|
|
1369
1374
|
this.files.deleteTree(path);
|
|
1375
|
+
this.absent.deleteTree(path);
|
|
1376
|
+
}
|
|
1377
|
+
missed(path) {
|
|
1378
|
+
if (this.absent.size >= ABSENT_NAMES) this.absent.clear();
|
|
1379
|
+
this.absent.set(path, performance.now());
|
|
1370
1380
|
}
|
|
1371
1381
|
remember(path, handle, looked = false) {
|
|
1372
1382
|
if (handle.kind !== "file") return handle;
|
|
@@ -1416,8 +1426,15 @@ var OpfsFs = class {
|
|
|
1416
1426
|
this.snapshots.delete(cached);
|
|
1417
1427
|
}
|
|
1418
1428
|
}
|
|
1429
|
+
const kept = this.dirs.get(path);
|
|
1430
|
+
if (kept && await this.current(path, kept)) return kept;
|
|
1431
|
+
const gone = this.absent.get(path);
|
|
1432
|
+
if (gone !== void 0 && performance.now() - gone < ABSENT_MS) {
|
|
1433
|
+
throw translate({ name: "NotFoundError" }, path);
|
|
1434
|
+
}
|
|
1435
|
+
const seen = this.changes;
|
|
1419
1436
|
const [dir, name2] = await this.parent(path);
|
|
1420
|
-
const known =
|
|
1437
|
+
const known = kept !== void 0;
|
|
1421
1438
|
return this.inDir(dir, async (parent) => {
|
|
1422
1439
|
const [first, second] = known ? ["directory", "file"] : ["file", "directory"];
|
|
1423
1440
|
try {
|
|
@@ -1427,7 +1444,9 @@ var OpfsFs = class {
|
|
|
1427
1444
|
}
|
|
1428
1445
|
return this.remember(path, await this.child(parent, name2, second), true);
|
|
1429
1446
|
}).catch((err) => {
|
|
1430
|
-
|
|
1447
|
+
const error = translate(err, path);
|
|
1448
|
+
if (error.code === "ENOENT" && seen === this.changes) this.missed(path);
|
|
1449
|
+
throw error;
|
|
1431
1450
|
});
|
|
1432
1451
|
}
|
|
1433
1452
|
real(path) {
|
|
@@ -1554,7 +1573,9 @@ var OpfsFs = class {
|
|
|
1554
1573
|
}
|
|
1555
1574
|
flushing = {};
|
|
1556
1575
|
touch(now, ...dirs) {
|
|
1576
|
+
this.changes++;
|
|
1557
1577
|
for (const dir of dirs) {
|
|
1578
|
+
this.absent.deleteTree(dir);
|
|
1558
1579
|
this.dirTimes.set(dir, now);
|
|
1559
1580
|
this.dirDirty.add(dir);
|
|
1560
1581
|
}
|
|
@@ -6192,7 +6213,7 @@ function satisfies(version, range2) {
|
|
|
6192
6213
|
}
|
|
6193
6214
|
|
|
6194
6215
|
// src/version.ts
|
|
6195
|
-
var KERNEL_VERSION = true ? "1.
|
|
6216
|
+
var KERNEL_VERSION = true ? "1.113.0" : "0.0.0-dev";
|
|
6196
6217
|
var OS_RELEASE = "6.0.0-slicc";
|
|
6197
6218
|
function procVersion() {
|
|
6198
6219
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|