@ai-ecoverse/slicc-kernel 1.124.0 → 1.124.1
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/kernel-worker.js +21 -12
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +21 -12
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +1 -1
- package/dist/types/fs/unlinked.d.ts +2 -1
- package/package.json +1 -1
|
@@ -5434,7 +5434,7 @@ var KERNEL_VERSION, OS_RELEASE;
|
|
|
5434
5434
|
var init_version = __esm({
|
|
5435
5435
|
"src/version.ts"() {
|
|
5436
5436
|
"use strict";
|
|
5437
|
-
KERNEL_VERSION = true ? "1.124.
|
|
5437
|
+
KERNEL_VERSION = true ? "1.124.1" : "0.0.0-dev";
|
|
5438
5438
|
OS_RELEASE = "6.0.0-slicc";
|
|
5439
5439
|
}
|
|
5440
5440
|
});
|
package/dist/node.js
CHANGED
|
@@ -5779,18 +5779,19 @@ var UnlinkedKeeper = class {
|
|
|
5779
5779
|
const keeper = this;
|
|
5780
5780
|
const { replacing } = this;
|
|
5781
5781
|
const replace = async (target, op) => {
|
|
5782
|
-
const before = replacing.get(target);
|
|
5783
5782
|
const { promise, resolve: resolve2 } = Promise.withResolvers();
|
|
5784
|
-
|
|
5785
|
-
|
|
5783
|
+
let mine;
|
|
5784
|
+
const gated = () => {
|
|
5785
|
+
const before = replacing.get(target);
|
|
5786
|
+
mine = { done: Promise.all([before?.done, promise]).then(() => void 0) };
|
|
5787
|
+
replacing.set(target, mine);
|
|
5786
5788
|
};
|
|
5787
|
-
replacing.set(target, mine);
|
|
5788
5789
|
try {
|
|
5789
|
-
await op();
|
|
5790
|
+
await op(gated);
|
|
5790
5791
|
} finally {
|
|
5791
5792
|
keeper.replaced += 1;
|
|
5792
5793
|
resolve2();
|
|
5793
|
-
if (replacing.get(target) === mine) replacing.delete(target);
|
|
5794
|
+
if (mine && replacing.get(target) === mine) replacing.delete(target);
|
|
5794
5795
|
}
|
|
5795
5796
|
};
|
|
5796
5797
|
const unreplaced = async (path, op) => {
|
|
@@ -5835,8 +5836,8 @@ var UnlinkedKeeper = class {
|
|
|
5835
5836
|
async rename(from, to) {
|
|
5836
5837
|
const target = fs.resolvePath("/", to);
|
|
5837
5838
|
if (target === fs.resolvePath("/", from)) return fs.rename(from, to);
|
|
5838
|
-
await replace(target, async () => {
|
|
5839
|
-
const pinned = await keeper.pin(target);
|
|
5839
|
+
await replace(target, async (gated) => {
|
|
5840
|
+
const pinned = await keeper.pin(target, gated);
|
|
5840
5841
|
await keeper.settle(pinned, () => fs.rename(from, to));
|
|
5841
5842
|
});
|
|
5842
5843
|
},
|
|
@@ -5853,7 +5854,7 @@ var UnlinkedKeeper = class {
|
|
|
5853
5854
|
}
|
|
5854
5855
|
pinned.commit();
|
|
5855
5856
|
}
|
|
5856
|
-
|
|
5857
|
+
heldWithin(target) {
|
|
5857
5858
|
const held = /* @__PURE__ */ new Map();
|
|
5858
5859
|
for (const holder of this.holders) {
|
|
5859
5860
|
if (holder.owns(target)) continue;
|
|
@@ -5862,11 +5863,19 @@ var UnlinkedKeeper = class {
|
|
|
5862
5863
|
held.set(path, [...held.get(path) ?? [], holder]);
|
|
5863
5864
|
}
|
|
5864
5865
|
}
|
|
5865
|
-
|
|
5866
|
+
return held;
|
|
5867
|
+
}
|
|
5868
|
+
async pin(target, gated = () => void 0) {
|
|
5869
|
+
const paths = [...this.heldWithin(target).keys()].sort();
|
|
5866
5870
|
const releases = [];
|
|
5867
5871
|
for (const path of paths) releases.push(await this.gate.acquire(path));
|
|
5872
|
+
gated();
|
|
5873
|
+
const now = this.heldWithin(target);
|
|
5874
|
+
const held = new Map(
|
|
5875
|
+
paths.flatMap((path) => now.has(path) ? [[path, now.get(path)]] : [])
|
|
5876
|
+
);
|
|
5868
5877
|
const hidden = /* @__PURE__ */ new Map();
|
|
5869
|
-
for (const path of
|
|
5878
|
+
for (const path of held.keys()) {
|
|
5870
5879
|
const at = await this.hide(path);
|
|
5871
5880
|
if (at !== void 0) hidden.set(path, at);
|
|
5872
5881
|
}
|
|
@@ -6935,7 +6944,7 @@ function satisfies(version, range2) {
|
|
|
6935
6944
|
}
|
|
6936
6945
|
|
|
6937
6946
|
// src/version.ts
|
|
6938
|
-
var KERNEL_VERSION = true ? "1.124.
|
|
6947
|
+
var KERNEL_VERSION = true ? "1.124.1" : "0.0.0-dev";
|
|
6939
6948
|
var OS_RELEASE = "6.0.0-slicc";
|
|
6940
6949
|
function procVersion() {
|
|
6941
6950
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|