@ai-ecoverse/slicc-kernel 1.134.1 → 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 +2 -2
- package/dist/kernel-worker.js +25 -24
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +26 -24
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +1 -1
- 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/package.json +2 -2
|
@@ -6600,7 +6600,7 @@ var KERNEL_VERSION, OS_RELEASE;
|
|
|
6600
6600
|
var init_version = __esm({
|
|
6601
6601
|
"src/version.ts"() {
|
|
6602
6602
|
"use strict";
|
|
6603
|
-
KERNEL_VERSION = true ? "1.134.
|
|
6603
|
+
KERNEL_VERSION = true ? "1.134.3" : "0.0.0-dev";
|
|
6604
6604
|
OS_RELEASE = "6.0.0-slicc";
|
|
6605
6605
|
}
|
|
6606
6606
|
});
|
package/dist/node.js
CHANGED
|
@@ -5635,14 +5635,14 @@ var OpfsFs = class {
|
|
|
5635
5635
|
const staged = resolvePath(parent.path, staging);
|
|
5636
5636
|
const place = async () => {
|
|
5637
5637
|
this.forget(destination);
|
|
5638
|
-
const
|
|
5638
|
+
const copies = /* @__PURE__ */ new Map();
|
|
5639
5639
|
const root = { ino: inodeOf(source.path), ...moving };
|
|
5640
5640
|
const owned4 = lock ? { lock } : {};
|
|
5641
5641
|
const first = copying ? await this.intend({ from: source.path, to: staged, root, ...owned4 }) : void 0;
|
|
5642
5642
|
const second = copying && swap ? await this.intend({ from: staged, to: destination, replace: true, root, ...owned4 }) : void 0;
|
|
5643
5643
|
const moved2 = await this.replacingTarget(
|
|
5644
5644
|
targetStat !== null,
|
|
5645
|
-
() => this.place(source.handle, dir, staging)
|
|
5645
|
+
() => this.place(source.handle, dir, staging, copies)
|
|
5646
5646
|
).catch(async (err) => {
|
|
5647
5647
|
if (first) await this.rollBack(staged, source.path, [first, second]);
|
|
5648
5648
|
throw err;
|
|
@@ -5656,15 +5656,13 @@ var OpfsFs = class {
|
|
|
5656
5656
|
await this.meta.update(source.path, () => left);
|
|
5657
5657
|
}
|
|
5658
5658
|
if (first) await this.meta.update(first, () => void 0);
|
|
5659
|
-
let copied = !moved2;
|
|
5660
5659
|
if (swap) {
|
|
5661
5660
|
const hidden = await dir.getDirectoryHandle(staging);
|
|
5662
|
-
const placed = await this.place(hidden, dir, name2);
|
|
5661
|
+
const placed = await this.place(hidden, dir, name2, copies);
|
|
5663
5662
|
if (!placed) await dir.removeEntry(staging, { recursive: true });
|
|
5664
|
-
copied ||= !placed;
|
|
5665
5663
|
}
|
|
5666
5664
|
if (second) await this.meta.update(second, () => void 0);
|
|
5667
|
-
|
|
5665
|
+
await this.restamp(destination, copies);
|
|
5668
5666
|
this.changed(source.path, destination);
|
|
5669
5667
|
this.touch(Date.now(), parentOf4(source.path), parent.path);
|
|
5670
5668
|
};
|
|
@@ -5881,22 +5879,17 @@ var OpfsFs = class {
|
|
|
5881
5879
|
const handle = await this.handle(path);
|
|
5882
5880
|
return handle.kind === "file" ? (await this.snapshot(handle)).lastModified : 0;
|
|
5883
5881
|
}
|
|
5884
|
-
async
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
if (
|
|
5890
|
-
|
|
5891
|
-
return timed2;
|
|
5892
|
-
}
|
|
5893
|
-
async restamp(path, timed2) {
|
|
5894
|
-
for (const rest2 of timed2) {
|
|
5895
|
-
const mtimeFor = await this.modified(path + rest2);
|
|
5882
|
+
async restamp(path, copies) {
|
|
5883
|
+
if (copies.size === 0) return;
|
|
5884
|
+
const copied = [...copies];
|
|
5885
|
+
const entries = await this.meta.get(copied.map(([rest2]) => path + rest2));
|
|
5886
|
+
for (const [i, [rest2, { before, made: made2 }]] of copied.entries()) {
|
|
5887
|
+
if (entries[i]?.mtimeFor !== before) continue;
|
|
5888
|
+
const mtimeFor = (await this.io(made2.getFile())).lastModified;
|
|
5896
5889
|
await this.meta.update(path + rest2, (entry) => entry && { ...entry, mtimeFor });
|
|
5897
5890
|
}
|
|
5898
5891
|
}
|
|
5899
|
-
async place(handle, dir, name2) {
|
|
5892
|
+
async place(handle, dir, name2, copies) {
|
|
5900
5893
|
const move = handle.move;
|
|
5901
5894
|
if (move) this.others++;
|
|
5902
5895
|
const moved2 = await move?.call(handle, dir, name2).then(
|
|
@@ -5906,7 +5899,7 @@ var OpfsFs = class {
|
|
|
5906
5899
|
if (moved2) return true;
|
|
5907
5900
|
const before = this.fileMoves;
|
|
5908
5901
|
try {
|
|
5909
|
-
await this.copy(handle, dir, name2);
|
|
5902
|
+
await this.copy(handle, dir, name2, copies);
|
|
5910
5903
|
} catch (err) {
|
|
5911
5904
|
if (handle.kind === "directory" && this.fileMoves === before) {
|
|
5912
5905
|
await this.io(dir.removeEntry(name2, { recursive: true }));
|
|
@@ -5916,7 +5909,7 @@ var OpfsFs = class {
|
|
|
5916
5909
|
return false;
|
|
5917
5910
|
}
|
|
5918
5911
|
fileMoves = 0;
|
|
5919
|
-
async copy(handle, dir, name2) {
|
|
5912
|
+
async copy(handle, dir, name2, copies, rest2 = "") {
|
|
5920
5913
|
if (handle.kind === "file" && movable(handle)) {
|
|
5921
5914
|
this.others++;
|
|
5922
5915
|
const moved2 = await handle.move?.(dir, name2).then(
|
|
@@ -5931,13 +5924,17 @@ var OpfsFs = class {
|
|
|
5931
5924
|
if (handle.kind === "file") {
|
|
5932
5925
|
const made2 = await this.io(dir.getFileHandle(name2, { create: true }));
|
|
5933
5926
|
const writable2 = await this.io(made2.createWritable());
|
|
5934
|
-
|
|
5927
|
+
const file = await this.io(handle.getFile());
|
|
5928
|
+
await writable2.write(file);
|
|
5935
5929
|
await writable2.close();
|
|
5930
|
+
copies?.set(rest2, { before: copies.get(rest2)?.before ?? file.lastModified, made: made2 });
|
|
5936
5931
|
return;
|
|
5937
5932
|
}
|
|
5938
5933
|
const target = await this.io(dir.getDirectoryHandle(name2, { create: true }));
|
|
5939
5934
|
this.others++;
|
|
5940
|
-
for await (const child of handle.values())
|
|
5935
|
+
for await (const child of handle.values()) {
|
|
5936
|
+
await this.copy(child, target, child.name, copies, `${rest2}/${child.name}`);
|
|
5937
|
+
}
|
|
5941
5938
|
}
|
|
5942
5939
|
async symlink(target, path, owner) {
|
|
5943
5940
|
const parent = await this.locate(parentOf4(path), true);
|
|
@@ -7470,7 +7467,7 @@ function satisfies(version, range2) {
|
|
|
7470
7467
|
}
|
|
7471
7468
|
|
|
7472
7469
|
// src/version.ts
|
|
7473
|
-
var KERNEL_VERSION = true ? "1.134.
|
|
7470
|
+
var KERNEL_VERSION = true ? "1.134.3" : "0.0.0-dev";
|
|
7474
7471
|
var OS_RELEASE = "6.0.0-slicc";
|
|
7475
7472
|
function procVersion() {
|
|
7476
7473
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -24624,6 +24621,9 @@ var WasmMemories = class {
|
|
|
24624
24621
|
const source = this.learned ? "learned" : ceiling === void 0 ? "none" : "default";
|
|
24625
24622
|
return { live: this.live, ceiling: ceiling ?? 0, source };
|
|
24626
24623
|
}
|
|
24624
|
+
started() {
|
|
24625
|
+
this.progress();
|
|
24626
|
+
}
|
|
24627
24627
|
ended() {
|
|
24628
24628
|
this.live = Math.max(0, this.live - 1);
|
|
24629
24629
|
this.progress();
|
|
@@ -28008,6 +28008,7 @@ var Launcher = class {
|
|
|
28008
28008
|
});
|
|
28009
28009
|
const counted3 = (handle2) => {
|
|
28010
28010
|
void handle2.exited.finally(() => this.memories.ended());
|
|
28011
|
+
void Promise.resolve(handle2.ready).then(() => this.memories.started());
|
|
28011
28012
|
return handle2;
|
|
28012
28013
|
};
|
|
28013
28014
|
if (!this.memories.near()) {
|
|
@@ -30659,6 +30660,7 @@ async function createNodeKernel(options = {}) {
|
|
|
30659
30660
|
...options.sealed ? { sealed: options.sealed } : {},
|
|
30660
30661
|
...options.clipboard ? { clipboard: options.clipboard } : {},
|
|
30661
30662
|
...options.approve ? { approve: options.approve } : {},
|
|
30663
|
+
...options.wasmMemories ? { wasmMemories: options.wasmMemories } : {},
|
|
30662
30664
|
cron: { lock: cronLock(root), ...options.cron?.clock ? { clock: options.cron.clock } : {} }
|
|
30663
30665
|
});
|
|
30664
30666
|
await launcher.prepare();
|