@ai-ecoverse/slicc-kernel 1.196.39 → 1.196.40
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/async-process.js +1 -1
- package/dist/cloudflare-sources.js +1 -1
- package/dist/cloudflare.js +23 -12
- package/dist/cloudflare.js.map +2 -2
- package/dist/kernel-worker.js +23 -12
- package/dist/kernel-worker.js.map +2 -2
- package/dist/meta.js.map +2 -2
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +23 -12
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +1 -1
- package/dist/types/fs/meta.d.ts +5 -0
- package/package.json +1 -1
package/dist/kernel-worker.js
CHANGED
|
@@ -1957,6 +1957,9 @@ var SOURCE_RETRY_MS = 250;
|
|
|
1957
1957
|
var SOURCE_BACKOFF_MS = 1e3;
|
|
1958
1958
|
var Copies = class extends Map {
|
|
1959
1959
|
remaining = [];
|
|
1960
|
+
marker(intent, to) {
|
|
1961
|
+
return intent && this.remaining.length ? { intent, to, entries: this.remaining } : void 0;
|
|
1962
|
+
}
|
|
1960
1963
|
};
|
|
1961
1964
|
function needsCopy(handle, swap) {
|
|
1962
1965
|
return swap || handle.kind === "directory" && !movable(handle);
|
|
@@ -2017,14 +2020,19 @@ function sidecar(meta) {
|
|
|
2017
2020
|
}
|
|
2018
2021
|
function occupied(entry) {
|
|
2019
2022
|
if (!entry?.vacated) return entry ?? {};
|
|
2020
|
-
const { vacated: _, ...kept } = entry;
|
|
2023
|
+
const { vacated: _, copyCommit: _copy, ...kept } = entry;
|
|
2021
2024
|
return kept;
|
|
2022
2025
|
}
|
|
2023
2026
|
function directoryTime(path, entry, ms) {
|
|
2024
2027
|
return (entry?.timesAt ?? -1) >= ms ? entry : { ...entry, path, mtimeMs: ms, mtimeFor: 0, ctimeMs: ms, timesAt: ms };
|
|
2025
2028
|
}
|
|
2026
|
-
function vacatedAt(path) {
|
|
2027
|
-
return {
|
|
2029
|
+
function vacatedAt(path, copyCommit) {
|
|
2030
|
+
return {
|
|
2031
|
+
path,
|
|
2032
|
+
ino: inodeOf(`${path}\0${crypto.randomUUID()}`),
|
|
2033
|
+
vacated: true,
|
|
2034
|
+
...copyCommit && { copyCommit }
|
|
2035
|
+
};
|
|
2028
2036
|
}
|
|
2029
2037
|
function missing2(err) {
|
|
2030
2038
|
const code = err?.code;
|
|
@@ -3737,6 +3745,7 @@ var OpfsFs = class {
|
|
|
3737
3745
|
});
|
|
3738
3746
|
if (swap) await PLAIN.rm.call(this, destination);
|
|
3739
3747
|
if (second) await this.intend({ from: staged2, to: destination, root, ...owned4 }, second);
|
|
3748
|
+
left.copyCommit = copies.marker(first, destination);
|
|
3740
3749
|
await this.meta.move(source.path, destination, carry, left);
|
|
3741
3750
|
this.movePending(source.path, destination);
|
|
3742
3751
|
if (!moved2 && first)
|
|
@@ -3747,7 +3756,7 @@ var OpfsFs = class {
|
|
|
3747
3756
|
copies.remaining = [];
|
|
3748
3757
|
const placed = await this.place(hidden, dir, name2, copies, copying);
|
|
3749
3758
|
if (!placed && second) {
|
|
3750
|
-
const mark = vacatedAt(staged2);
|
|
3759
|
+
const mark = vacatedAt(staged2, copies.marker(second, destination));
|
|
3751
3760
|
await this.meta.update(staged2, () => mark);
|
|
3752
3761
|
await this.releaseSource(second, staged2, destination, mark.ino, lock, copies.remaining);
|
|
3753
3762
|
} else if (second) await this.meta.update(second, () => void 0);
|
|
@@ -4187,7 +4196,7 @@ var OpfsFs = class {
|
|
|
4187
4196
|
const entries = await this.meta.get([from, to]);
|
|
4188
4197
|
let mark = entries[0];
|
|
4189
4198
|
if (!mark?.vacated || entries[1]?.ino !== ino) {
|
|
4190
|
-
mark = vacatedAt(from);
|
|
4199
|
+
mark = vacatedAt(from, copies.marker(intent, to));
|
|
4191
4200
|
await this.meta.move(
|
|
4192
4201
|
from,
|
|
4193
4202
|
to,
|
|
@@ -4413,12 +4422,14 @@ var OpfsFs = class {
|
|
|
4413
4422
|
}
|
|
4414
4423
|
async resumeCopiedTree(intent, rename) {
|
|
4415
4424
|
const { from, to, root } = rename;
|
|
4416
|
-
const
|
|
4417
|
-
if (
|
|
4418
|
-
const
|
|
4419
|
-
|
|
4420
|
-
return this.releaseSource(intent, from, to, mark.ino, rename.lock);
|
|
4425
|
+
const [mark, placed] = await this.meta.get([from, to]);
|
|
4426
|
+
if (mark?.vacated && mark.ino !== void 0 && mark.copyCommit?.intent === intent) {
|
|
4427
|
+
const commit = mark.copyCommit;
|
|
4428
|
+
return this.releaseSource(intent, from, commit.to, mark.ino, rename.lock, commit.entries);
|
|
4421
4429
|
}
|
|
4430
|
+
const left = await this.real(from);
|
|
4431
|
+
if (left && root && mark?.vacated && mark.ino !== void 0 && placed?.ino === root.ino)
|
|
4432
|
+
return this.releaseSource(intent, from, to, mark.ino, rename.lock);
|
|
4422
4433
|
if (rename.privateCopy) {
|
|
4423
4434
|
if (left) {
|
|
4424
4435
|
const src = await this.locate(from, false);
|
|
@@ -4454,7 +4465,7 @@ var OpfsFs = class {
|
|
|
4454
4465
|
this.forget(from);
|
|
4455
4466
|
this.forget(to);
|
|
4456
4467
|
}
|
|
4457
|
-
const mark = left ? vacatedAt(from) : void 0;
|
|
4468
|
+
const mark = left ? vacatedAt(from, copies.marker(intent, to)) : void 0;
|
|
4458
4469
|
if ((await this.meta.under(from)).some((entry) => !entry.vacated)) {
|
|
4459
4470
|
await this.meta.move(
|
|
4460
4471
|
from,
|
|
@@ -10273,7 +10284,7 @@ function satisfies(version, range2) {
|
|
|
10273
10284
|
}
|
|
10274
10285
|
|
|
10275
10286
|
// src/version.ts
|
|
10276
|
-
var KERNEL_VERSION = true ? "1.196.
|
|
10287
|
+
var KERNEL_VERSION = true ? "1.196.40" : "0.0.0-dev";
|
|
10277
10288
|
var OS_RELEASE = "6.0.0-slicc";
|
|
10278
10289
|
function procVersion() {
|
|
10279
10290
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|