@ai-ecoverse/slicc-kernel 1.147.9 → 1.147.10
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 +5 -5
- package/dist/kernel-worker.js +14 -7
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +1 -1
- package/dist/node-process-worker.js.map +1 -1
- package/dist/node.js +14 -7
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +1 -1
- package/dist/process-worker.js.map +1 -1
- package/dist/types/fs/opfs.d.ts +2 -0
- package/package.json +3 -3
package/dist/node.js
CHANGED
|
@@ -3305,7 +3305,7 @@ function satisfies(version, range2) {
|
|
|
3305
3305
|
}
|
|
3306
3306
|
|
|
3307
3307
|
// src/version.ts
|
|
3308
|
-
var KERNEL_VERSION = true ? "1.147.
|
|
3308
|
+
var KERNEL_VERSION = true ? "1.147.10" : "0.0.0-dev";
|
|
3309
3309
|
var OS_RELEASE = "6.0.0-slicc";
|
|
3310
3310
|
function procVersion() {
|
|
3311
3311
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -23305,8 +23305,9 @@ async function swapped2(op) {
|
|
|
23305
23305
|
}
|
|
23306
23306
|
var MAX_LINKS6 = 40;
|
|
23307
23307
|
var CHECK_MS = 1e3;
|
|
23308
|
-
var
|
|
23309
|
-
var
|
|
23308
|
+
var ABSENT_LOOKUPS = 256;
|
|
23309
|
+
var GLANCE_LOOKUPS = 64;
|
|
23310
|
+
var GLANCE_CAP_MS = 100;
|
|
23310
23311
|
var ABSENT_NAMES = 4096;
|
|
23311
23312
|
var FILE_HANDLES = 4096;
|
|
23312
23313
|
var STALE = /* @__PURE__ */ new Set(["NotFoundError", "TypeMismatchError"]);
|
|
@@ -23517,6 +23518,7 @@ var OpfsFs = class {
|
|
|
23517
23518
|
dirs = new PathMap();
|
|
23518
23519
|
files = new PathMap();
|
|
23519
23520
|
absent = new PathMap();
|
|
23521
|
+
lookups = 0;
|
|
23520
23522
|
changes = 0;
|
|
23521
23523
|
replacing = Promise.resolve();
|
|
23522
23524
|
replacements = 0;
|
|
@@ -23875,7 +23877,7 @@ var OpfsFs = class {
|
|
|
23875
23877
|
}
|
|
23876
23878
|
missed(path) {
|
|
23877
23879
|
if (this.absent.size >= ABSENT_NAMES) this.absent.clear();
|
|
23878
|
-
this.absent.set(path, performance.now());
|
|
23880
|
+
this.absent.set(path, { at: performance.now(), op: this.lookups });
|
|
23879
23881
|
}
|
|
23880
23882
|
remember(path, handle, looked = false) {
|
|
23881
23883
|
if (handle.kind !== "file") {
|
|
@@ -23916,7 +23918,11 @@ var OpfsFs = class {
|
|
|
23916
23918
|
if (name2 === void 0) throw fsError("EBUSY", path);
|
|
23917
23919
|
return [`/${parts2.join("/")}`, name2];
|
|
23918
23920
|
}
|
|
23921
|
+
recent(seen, lookups) {
|
|
23922
|
+
return this.lookups - seen.op < lookups && performance.now() - seen.at < GLANCE_CAP_MS;
|
|
23923
|
+
}
|
|
23919
23924
|
async handle(path) {
|
|
23925
|
+
this.lookups++;
|
|
23920
23926
|
if (split2(path).length === 0) return this.root;
|
|
23921
23927
|
const cached = this.files.get(path);
|
|
23922
23928
|
const fresh2 = cached && performance.now() - (this.found.get(cached) ?? -CHECK_MS) < CHECK_MS;
|
|
@@ -23936,7 +23942,7 @@ var OpfsFs = class {
|
|
|
23936
23942
|
const kept = this.dirs.get(path);
|
|
23937
23943
|
if (kept && await this.current(path, kept)) return kept;
|
|
23938
23944
|
const gone = this.absent.get(path);
|
|
23939
|
-
if (gone !== void 0 && this.exact === 0 &&
|
|
23945
|
+
if (gone !== void 0 && this.exact === 0 && this.recent(gone, ABSENT_LOOKUPS)) {
|
|
23940
23946
|
throw translate({ name: "NotFoundError" }, path);
|
|
23941
23947
|
}
|
|
23942
23948
|
const seen = this.changes;
|
|
@@ -24139,15 +24145,16 @@ var OpfsFs = class {
|
|
|
24139
24145
|
glanced(handle) {
|
|
24140
24146
|
if (this.exact > 0) return void 0;
|
|
24141
24147
|
const seen = this.glances.get(handle);
|
|
24142
|
-
const fresh2 = seen && seen.changes === this.changes &&
|
|
24148
|
+
const fresh2 = seen && seen.changes === this.changes && this.recent(seen, GLANCE_LOOKUPS);
|
|
24143
24149
|
return fresh2 ? seen.file : void 0;
|
|
24144
24150
|
}
|
|
24145
24151
|
async glance(handle) {
|
|
24146
24152
|
const at = performance.now();
|
|
24153
|
+
const op = this.lookups;
|
|
24147
24154
|
const before = this.changes;
|
|
24148
24155
|
this.calls++;
|
|
24149
24156
|
const file = await handle.getFile();
|
|
24150
|
-
if (before === this.changes) this.glances.set(handle, { at, file, changes: before });
|
|
24157
|
+
if (before === this.changes) this.glances.set(handle, { at, op, file, changes: before });
|
|
24151
24158
|
else this.glances.delete(handle);
|
|
24152
24159
|
return file;
|
|
24153
24160
|
}
|