@ai-ecoverse/slicc-kernel 1.196.36 → 1.196.37
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 -3
- package/dist/async-process.js +1 -1
- package/dist/cloudflare-sources.js +1 -1
- package/dist/cloudflare.js +78 -72
- package/dist/cloudflare.js.map +3 -3
- package/dist/kernel-worker.js +69 -63
- package/dist/kernel-worker.js.map +3 -3
- package/dist/node-process-worker.cjs +1 -1
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +92 -86
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +1 -1
- package/package.json +2 -2
|
@@ -9440,7 +9440,7 @@ var init_version = __esm({
|
|
|
9440
9440
|
"src/version.ts"() {
|
|
9441
9441
|
"use strict";
|
|
9442
9442
|
init_captured_globals();
|
|
9443
|
-
KERNEL_VERSION = true ? "1.196.
|
|
9443
|
+
KERNEL_VERSION = true ? "1.196.37" : "0.0.0-dev";
|
|
9444
9444
|
OS_RELEASE = "6.0.0-slicc";
|
|
9445
9445
|
}
|
|
9446
9446
|
});
|
|
@@ -9439,7 +9439,7 @@ var init_version = __esm({
|
|
|
9439
9439
|
"src/version.ts"() {
|
|
9440
9440
|
"use strict";
|
|
9441
9441
|
init_captured_globals();
|
|
9442
|
-
KERNEL_VERSION = true ? "1.196.
|
|
9442
|
+
KERNEL_VERSION = true ? "1.196.37" : "0.0.0-dev";
|
|
9443
9443
|
OS_RELEASE = "6.0.0-slicc";
|
|
9444
9444
|
}
|
|
9445
9445
|
});
|
package/dist/node.js
CHANGED
|
@@ -4396,23 +4396,23 @@ var KernelSide = class {
|
|
|
4396
4396
|
...cwds ? { cwds } : {}
|
|
4397
4397
|
};
|
|
4398
4398
|
}
|
|
4399
|
-
applyWords(
|
|
4400
|
-
if (!
|
|
4401
|
-
this.words =
|
|
4402
|
-
while (this.history.length > 0 && (this.history[0]?.seq ?? 0) <=
|
|
4399
|
+
applyWords(words2) {
|
|
4400
|
+
if (!words2 || typeof words2.n !== "number" || words2.n <= this.words) return;
|
|
4401
|
+
this.words = words2.n;
|
|
4402
|
+
while (this.history.length > 0 && (this.history[0]?.seq ?? 0) <= words2.seen) {
|
|
4403
4403
|
this.history.shift();
|
|
4404
4404
|
}
|
|
4405
|
-
let signals =
|
|
4406
|
-
let timers =
|
|
4405
|
+
let signals = words2.signals | this.raised.signals;
|
|
4406
|
+
let timers = words2.timers | this.raised.timers;
|
|
4407
4407
|
for (const entry of this.history) {
|
|
4408
4408
|
signals |= entry.signals;
|
|
4409
4409
|
timers |= entry.timers;
|
|
4410
4410
|
}
|
|
4411
4411
|
Atomics.store(this.header, SAB_I_SIGNALS, signals);
|
|
4412
4412
|
Atomics.store(this.header, SAB_I_TIMERS, timers);
|
|
4413
|
-
storeBlocked(this.header,
|
|
4414
|
-
Atomics.store(this.header, SAB_I_MEMORY,
|
|
4415
|
-
Atomics.store(this.clock, CLOCK_IDLE, BigInt(
|
|
4413
|
+
storeBlocked(this.header, words2.blocked);
|
|
4414
|
+
Atomics.store(this.header, SAB_I_MEMORY, words2.memory);
|
|
4415
|
+
Atomics.store(this.clock, CLOCK_IDLE, BigInt(words2.idle));
|
|
4416
4416
|
}
|
|
4417
4417
|
keep(bytes) {
|
|
4418
4418
|
const id2 = ++this.nextPart;
|
|
@@ -7819,7 +7819,7 @@ function satisfies(version, range2) {
|
|
|
7819
7819
|
}
|
|
7820
7820
|
|
|
7821
7821
|
// src/version.ts
|
|
7822
|
-
var KERNEL_VERSION = true ? "1.196.
|
|
7822
|
+
var KERNEL_VERSION = true ? "1.196.37" : "0.0.0-dev";
|
|
7823
7823
|
var OS_RELEASE = "6.0.0-slicc";
|
|
7824
7824
|
function procVersion() {
|
|
7825
7825
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -8754,27 +8754,27 @@ function hashId(text) {
|
|
|
8754
8754
|
return hex4(a) + hex4(b);
|
|
8755
8755
|
}
|
|
8756
8756
|
function split(text, count3) {
|
|
8757
|
-
const
|
|
8757
|
+
const words2 = [];
|
|
8758
8758
|
let rest2 = text;
|
|
8759
8759
|
for (let i = 0; i < count3; i++) {
|
|
8760
8760
|
const match = /^(\S+)\s+/.exec(rest2);
|
|
8761
8761
|
if (!match) return void 0;
|
|
8762
|
-
|
|
8762
|
+
words2.push(match[1]);
|
|
8763
8763
|
rest2 = rest2.slice(match[0].length);
|
|
8764
8764
|
}
|
|
8765
|
-
return [
|
|
8765
|
+
return [words2, rest2.trim()];
|
|
8766
8766
|
}
|
|
8767
8767
|
function jobOf(content, pending, ctx, env) {
|
|
8768
8768
|
const fields2 = content.startsWith("@") ? 1 : 5;
|
|
8769
8769
|
const parts2 = split(content, fields2 + (ctx.system ? 1 : 0));
|
|
8770
8770
|
if (!parts2 || parts2[1] === "") throw new Error("no command");
|
|
8771
|
-
const [
|
|
8772
|
-
const schedule =
|
|
8771
|
+
const [words2, command] = parts2;
|
|
8772
|
+
const schedule = words2.slice(0, fields2).join(" ");
|
|
8773
8773
|
const when = parseWhen(schedule);
|
|
8774
8774
|
const zone = env.CRON_TZ;
|
|
8775
8775
|
if (zone && !when.reboot && canonicalZone(zone) === void 0)
|
|
8776
8776
|
throw new Error(`CRON_TZ: unknown time zone "${zone}"`);
|
|
8777
|
-
const user = ctx.system ?
|
|
8777
|
+
const user = ctx.system ? words2[fields2] : void 0;
|
|
8778
8778
|
if (user !== void 0 && !USER_NAME.test(user)) throw new Error(`bad user name ${user}`);
|
|
8779
8779
|
if (pending !== void 0 && !JOB_NAME.test(pending))
|
|
8780
8780
|
throw new Error(`bad job name "${pending}"`);
|
|
@@ -19537,21 +19537,21 @@ function unescaped2(double) {
|
|
|
19537
19537
|
}
|
|
19538
19538
|
function splitWords(text) {
|
|
19539
19539
|
const piece = /'([^']*)'|"((?:[^"\\]|\\[\s\S])*)"|\\([\s\S])|([^\s'"\\]+)|(\s+)/y;
|
|
19540
|
-
const
|
|
19540
|
+
const words2 = [];
|
|
19541
19541
|
let word;
|
|
19542
19542
|
while (piece.lastIndex < text.length) {
|
|
19543
19543
|
const m = piece.exec(text);
|
|
19544
19544
|
if (!m) return void 0;
|
|
19545
19545
|
const [, single, double, escaped, plain3, space] = m;
|
|
19546
19546
|
if (space !== void 0) {
|
|
19547
|
-
if (word !== void 0)
|
|
19547
|
+
if (word !== void 0) words2.push(word);
|
|
19548
19548
|
word = void 0;
|
|
19549
19549
|
continue;
|
|
19550
19550
|
}
|
|
19551
19551
|
word = (word ?? "") + (single ?? (double !== void 0 ? unescaped2(double) : escaped ?? plain3));
|
|
19552
19552
|
}
|
|
19553
|
-
if (word !== void 0)
|
|
19554
|
-
return
|
|
19553
|
+
if (word !== void 0) words2.push(word);
|
|
19554
|
+
return words2;
|
|
19555
19555
|
}
|
|
19556
19556
|
function shellQuote(word) {
|
|
19557
19557
|
return PLAIN.test(word) ? word : `'${word.replaceAll("'", `'\\''`)}'`;
|
|
@@ -19574,14 +19574,14 @@ function addPlain(word, plain3) {
|
|
|
19574
19574
|
}
|
|
19575
19575
|
function splitPatterns(text) {
|
|
19576
19576
|
const piece = /'([^']*)'|"((?:[^"\\]|\\[\s\S])*)"|\\([\s\S])|([^\s'"\\]+)|(\s+)/y;
|
|
19577
|
-
const
|
|
19577
|
+
const words2 = [];
|
|
19578
19578
|
let word;
|
|
19579
19579
|
while (piece.lastIndex < text.length) {
|
|
19580
19580
|
const m = piece.exec(text);
|
|
19581
19581
|
if (!m) return void 0;
|
|
19582
19582
|
const [, single, double, escaped, plain3, space] = m;
|
|
19583
19583
|
if (space !== void 0) {
|
|
19584
|
-
if (word !== void 0)
|
|
19584
|
+
if (word !== void 0) words2.push(word);
|
|
19585
19585
|
word = void 0;
|
|
19586
19586
|
continue;
|
|
19587
19587
|
}
|
|
@@ -19589,8 +19589,8 @@ function splitPatterns(text) {
|
|
|
19589
19589
|
if (plain3 !== void 0) addPlain(word, plain3);
|
|
19590
19590
|
else addPart(word, single ?? (double !== void 0 ? unescaped2(double) : escaped));
|
|
19591
19591
|
}
|
|
19592
|
-
if (word !== void 0)
|
|
19593
|
-
return
|
|
19592
|
+
if (word !== void 0) words2.push(word);
|
|
19593
|
+
return words2;
|
|
19594
19594
|
}
|
|
19595
19595
|
var literal = (pattern) => pattern.map((p) => p ?? "*").join("");
|
|
19596
19596
|
var isAny = (pattern) => pattern?.length === 1 && pattern[0] === null;
|
|
@@ -19666,14 +19666,14 @@ function whoError(who) {
|
|
|
19666
19666
|
return `expected a user name, %group or ALL first, not ${shown(who)}`;
|
|
19667
19667
|
}
|
|
19668
19668
|
function cwdOf(word) {
|
|
19669
|
-
const
|
|
19670
|
-
const path =
|
|
19669
|
+
const words2 = splitWords(word);
|
|
19670
|
+
const path = words2?.length === 1 ? words2[0] : "";
|
|
19671
19671
|
return path.startsWith("/") ? normalizePath(path) : "";
|
|
19672
19672
|
}
|
|
19673
19673
|
function commandOf2(text, after) {
|
|
19674
|
-
const
|
|
19675
|
-
if (
|
|
19676
|
-
const [first, ...args] =
|
|
19674
|
+
const words2 = splitPatterns(text);
|
|
19675
|
+
if (words2 === void 0) return "a quote in the command is not closed, or it ends in a \\";
|
|
19676
|
+
const [first, ...args] = words2;
|
|
19677
19677
|
const path = first ? literal(first) : "";
|
|
19678
19678
|
if (path === "") return `expected a command after ${after}`;
|
|
19679
19679
|
if (!path.startsWith("/")) return `expected an absolute command path, not ${shown(path)}`;
|
|
@@ -19856,14 +19856,14 @@ function legacyApproval(line, file, rule2) {
|
|
|
19856
19856
|
const stdin = rule2.stdin === void 0 ? "" : "Stdin none ";
|
|
19857
19857
|
const prefix = `NOPASSWD ${rule2.who} (${rule2.target}) ${cwd}${stdin}Cmnd `;
|
|
19858
19858
|
if (!line.startsWith(prefix)) return rule2;
|
|
19859
|
-
const
|
|
19859
|
+
const words2 = line.slice(prefix.length).trimEnd();
|
|
19860
19860
|
if (cmnd.args === void 0) {
|
|
19861
|
-
if (
|
|
19861
|
+
if (words2 !== quote(cmnd.path)) return rule2;
|
|
19862
19862
|
return { ...rule2, cmnd: { ...cmnd, args: [] }, ...stdin ? {} : { sha256: {} } };
|
|
19863
19863
|
}
|
|
19864
19864
|
if (cmnd.args.some((arg) => arg.includes(null))) return rule2;
|
|
19865
|
-
const current = rule2.cwd !== void 0 &&
|
|
19866
|
-
const earliest = !stdin &&
|
|
19865
|
+
const current = rule2.cwd !== void 0 && words2 === formatCommand(cmnd, quote);
|
|
19866
|
+
const earliest = !stdin && words2 === [cmnd.path, ...cmnd.args.map(literal)].map(quote).join(" ");
|
|
19867
19867
|
return current || earliest ? { ...rule2, sha256: {} } : rule2;
|
|
19868
19868
|
}
|
|
19869
19869
|
function kernelLine(m, line, file) {
|
|
@@ -21391,8 +21391,8 @@ ${lines3}
|
|
|
21391
21391
|
const st = await fs.lstat(path).catch(() => void 0);
|
|
21392
21392
|
if (st && !await this.trusted(path)) return false;
|
|
21393
21393
|
const old = st ? await fs.readFile(path) : "";
|
|
21394
|
-
const
|
|
21395
|
-
const line = `NOPASSWD ${self.name} (${target.name}) Cwd ${quoteWord(cwd)} Stdin none ${sha256Text(bound3, routeSha256, chainSha256)}Cmnd ${
|
|
21394
|
+
const words2 = recordedCommand(argv);
|
|
21395
|
+
const line = `NOPASSWD ${self.name} (${target.name}) Cwd ${quoteWord(cwd)} Stdin none ${sha256Text(bound3, routeSha256, chainSha256)}Cmnd ${words2}
|
|
21396
21396
|
`;
|
|
21397
21397
|
const text = old === "" || old.endsWith("\n") ? `${old}${line}` : `${old}
|
|
21398
21398
|
${line}`;
|
|
@@ -22699,8 +22699,8 @@ function ipv6(host) {
|
|
|
22699
22699
|
const head = groups(halves[0]);
|
|
22700
22700
|
const back = halves.length === 2 ? groups(halves[1]) : [];
|
|
22701
22701
|
if (![...head, ...back].every((g) => /^[0-9A-Fa-f]{1,4}$/.test(g))) return void 0;
|
|
22702
|
-
const
|
|
22703
|
-
const missing7 = 8 -
|
|
22702
|
+
const words2 = [...head, ...back].map((g) => Number.parseInt(g, 16));
|
|
22703
|
+
const missing7 = 8 - words2.length - tail2.length;
|
|
22704
22704
|
if (halves.length === 2 ? missing7 < 1 : missing7 !== 0) return void 0;
|
|
22705
22705
|
const all = [
|
|
22706
22706
|
...head.map((g) => Number.parseInt(g, 16)),
|
|
@@ -28871,21 +28871,26 @@ var PATH_FLAGS = PATH_ONLY | 65536 | 131072;
|
|
|
28871
28871
|
var KEYBOARD = /* @__PURE__ */ new Set([SIG.INT, SIG.QUIT, SIG.TSTP]);
|
|
28872
28872
|
var STUCK_ESCAPES = /* @__PURE__ */ new Set([SIG.INT, SIG.TERM, SIG.QUIT, SIG.HUP]);
|
|
28873
28873
|
var DEFAULT_UMASK2 = 18;
|
|
28874
|
-
|
|
28875
|
-
|
|
28876
|
-
|
|
28877
|
-
|
|
28878
|
-
return
|
|
28879
|
-
|
|
28880
|
-
|
|
28881
|
-
|
|
28882
|
-
|
|
28874
|
+
var SUDO_VECTOR_MAX = 4096;
|
|
28875
|
+
var SUDO_INPUT_BYTES = 1024 * 1024;
|
|
28876
|
+
function budgetAfterArgs(args) {
|
|
28877
|
+
if (!Array.isArray(args)) throw new KernelError("EINVAL");
|
|
28878
|
+
if (args.length > SUDO_VECTOR_MAX) return -1;
|
|
28879
|
+
let remaining = SUDO_INPUT_BYTES;
|
|
28880
|
+
for (const word of args) {
|
|
28881
|
+
if (typeof word !== "string") throw new KernelError("EINVAL");
|
|
28882
|
+
if (word.length + 1 > remaining) return -1;
|
|
28883
|
+
remaining -= storedSize(word) + 1;
|
|
28884
|
+
if (remaining < 0) return -1;
|
|
28885
|
+
}
|
|
28886
|
+
return remaining;
|
|
28887
|
+
}
|
|
28888
|
+
function sudoVariables(value2, term, budget) {
|
|
28883
28889
|
const input = typeof value2 === "object" && value2 !== null ? value2 : {};
|
|
28884
28890
|
const env = /* @__PURE__ */ Object.create(null);
|
|
28885
28891
|
let count3 = 0;
|
|
28886
|
-
let budget = SUDO_ENV_BYTES;
|
|
28887
28892
|
const fits = (name2, text) => {
|
|
28888
|
-
if (++count3 >
|
|
28893
|
+
if (++count3 > SUDO_VECTOR_MAX || name2.length + text.length + 2 > budget) return false;
|
|
28889
28894
|
budget -= storedSize(name2) + storedSize(text) + 2;
|
|
28890
28895
|
return budget >= 0;
|
|
28891
28896
|
};
|
|
@@ -30934,14 +30939,15 @@ var WasmProcess = class _WasmProcess {
|
|
|
30934
30939
|
async sudo(req, cancelled) {
|
|
30935
30940
|
const { sudo } = this.options;
|
|
30936
30941
|
if (!sudo) throw new KernelError("ENOSYS");
|
|
30937
|
-
const
|
|
30942
|
+
const budget = budgetAfterArgs(req.args);
|
|
30943
|
+
if (budget < 0) return { errno: "E2BIG", error: "sudo: the submitted arguments are too large" };
|
|
30938
30944
|
const term = typeof req.term === "string" ? req.term : void 0;
|
|
30939
|
-
const submitted = sudoVariables(req.env, term);
|
|
30945
|
+
const submitted = sudoVariables(req.env, term, budget);
|
|
30940
30946
|
if (submitted === void 0)
|
|
30941
30947
|
return { errno: "E2BIG", error: "sudo: the submitted environment is too large" };
|
|
30942
30948
|
const call = {
|
|
30943
30949
|
op: "proc-sudo",
|
|
30944
|
-
args,
|
|
30950
|
+
args: [...req.args],
|
|
30945
30951
|
cwd: typeof req.cwd === "string" && req.cwd.startsWith("/") ? req.cwd : "/",
|
|
30946
30952
|
...term !== void 0 ? { term } : {},
|
|
30947
30953
|
env: submitted
|
|
@@ -39280,27 +39286,27 @@ function appendedRoots(given) {
|
|
|
39280
39286
|
}
|
|
39281
39287
|
return [...roots];
|
|
39282
39288
|
}
|
|
39283
|
-
function plainEnv(
|
|
39284
|
-
const next3 =
|
|
39285
|
-
if (baseName3(
|
|
39289
|
+
function plainEnv(words2) {
|
|
39290
|
+
const next3 = words2[1];
|
|
39291
|
+
if (baseName3(words2[0] ?? "") !== "env" || next3 === void 0) return false;
|
|
39286
39292
|
return next3 === "-S" || !next3.startsWith("-") && !next3.includes("=");
|
|
39287
39293
|
}
|
|
39288
|
-
function shebangCommand(
|
|
39289
|
-
if (!plainEnv(
|
|
39290
|
-
const arg2 =
|
|
39291
|
-
return { interp:
|
|
39294
|
+
function shebangCommand(words2) {
|
|
39295
|
+
if (!plainEnv(words2)) {
|
|
39296
|
+
const arg2 = words2.slice(1).join(" ");
|
|
39297
|
+
return { interp: words2[0], args: arg2 ? [arg2] : [] };
|
|
39292
39298
|
}
|
|
39293
|
-
const split3 =
|
|
39294
|
-
const [interp, ...rest2] =
|
|
39299
|
+
const split3 = words2[1] === "-S";
|
|
39300
|
+
const [interp, ...rest2] = words2.slice(split3 ? 2 : 1);
|
|
39295
39301
|
const arg = rest2.join(" ");
|
|
39296
39302
|
return { interp, args: split3 ? rest2 : arg ? [arg] : [] };
|
|
39297
39303
|
}
|
|
39298
39304
|
function interpreter(head) {
|
|
39299
|
-
const
|
|
39300
|
-
if (!
|
|
39301
|
-
if (baseName3(
|
|
39302
|
-
if (
|
|
39303
|
-
return baseName3(
|
|
39305
|
+
const words2 = shebang(head);
|
|
39306
|
+
if (!words2) return "node";
|
|
39307
|
+
if (baseName3(words2[0]) === "env") words2.shift();
|
|
39308
|
+
if (words2[0] === "-S") words2.shift();
|
|
39309
|
+
return baseName3(words2[0] ?? "");
|
|
39304
39310
|
}
|
|
39305
39311
|
function expandDefaults(defaults2, env) {
|
|
39306
39312
|
const out = {};
|
|
@@ -40238,13 +40244,13 @@ var Launcher = class {
|
|
|
40238
40244
|
const named = byPath ? { [script]: this.fs.resolvePath(cwd, file) } : {};
|
|
40239
40245
|
const head = await this.head(script, who.reads);
|
|
40240
40246
|
if (!head) return void 0;
|
|
40241
|
-
const
|
|
40242
|
-
if (!
|
|
40243
|
-
const { interp, args } = shebangCommand(
|
|
40244
|
-
const passed = [...args, command ? script : file, ...
|
|
40247
|
+
const words2 = await this.interpreterWords(head, script, { ...who, argv: [...argv, file] });
|
|
40248
|
+
if (!words2) return void 0;
|
|
40249
|
+
const { interp, args } = shebangCommand(words2.words);
|
|
40250
|
+
const passed = [...args, command ? script : file, ...words2.kept, ...argv.slice(1)];
|
|
40245
40251
|
if (!interp) return void 0;
|
|
40246
40252
|
who.reads?.operandsFromEnd.set(passed.length - args.length, script);
|
|
40247
|
-
who.reads?.interpreters.push([script, ...
|
|
40253
|
+
who.reads?.interpreters.push([script, ...words2.words, String(words2.kept.length)]);
|
|
40248
40254
|
const entry = await this.interpreterFile(interp, cwd, reader, who.pid, who.relative);
|
|
40249
40255
|
if (!entry) return void 0;
|
|
40250
40256
|
const { file: walked2, parentHops } = entry;
|
|
@@ -40263,7 +40269,7 @@ var Launcher = class {
|
|
|
40263
40269
|
const via = [interp, ...inner?.via ?? []];
|
|
40264
40270
|
const sources = [script, ...inner?.sources ?? []];
|
|
40265
40271
|
const bins = [...command?.bin ? [script] : [], ...inner?.bins ?? []];
|
|
40266
|
-
const chain2 = [...
|
|
40272
|
+
const chain2 = [...words2.binfmts, ...inner?.binfmts ?? []];
|
|
40267
40273
|
return inner && {
|
|
40268
40274
|
...inner,
|
|
40269
40275
|
target: withScriptEnv(inner.target, command),
|
|
@@ -40283,7 +40289,7 @@ var Launcher = class {
|
|
|
40283
40289
|
walkedVia: [walked2],
|
|
40284
40290
|
sources: [script],
|
|
40285
40291
|
...command?.bin ? { bins: [script] } : {},
|
|
40286
|
-
...
|
|
40292
|
+
...words2.binfmts.length > 0 ? { binfmts: words2.binfmts } : {},
|
|
40287
40293
|
asked: named
|
|
40288
40294
|
};
|
|
40289
40295
|
}
|
|
@@ -44124,16 +44130,16 @@ function placeOf(address2) {
|
|
|
44124
44130
|
const kind = isIP3(plain3);
|
|
44125
44131
|
if (kind === 4) return ipv4Place(plain3);
|
|
44126
44132
|
if (kind !== 6) return void 0;
|
|
44127
|
-
const
|
|
44128
|
-
const embedded2 =
|
|
44129
|
-
if (embedded2 && (
|
|
44130
|
-
if (
|
|
44131
|
-
if (((
|
|
44132
|
-
if (
|
|
44133
|
+
const words2 = hextets2(plain3);
|
|
44134
|
+
const embedded2 = words2.slice(0, 5).every((w) => w === 0) && (words2[5] === 65535 || words2[5] === 0);
|
|
44135
|
+
if (embedded2 && (words2[5] === 65535 || words2[6] !== 0)) return ipv4Place(ipv4Of(words2));
|
|
44136
|
+
if (words2.slice(0, 7).every((w) => w === 0) && (words2[7] ?? 0) <= 1) return "loopback";
|
|
44137
|
+
if (((words2[0] ?? 0) & 65472) === 65152) return "link-local";
|
|
44138
|
+
if (words2.join(":") === METADATA_V6) return "link-local";
|
|
44133
44139
|
return void 0;
|
|
44134
44140
|
}
|
|
44135
|
-
function ipv4Of(
|
|
44136
|
-
const [high = 0, low = 0] =
|
|
44141
|
+
function ipv4Of(words2) {
|
|
44142
|
+
const [high = 0, low = 0] = words2.slice(6);
|
|
44137
44143
|
return [high >> 8, high & 255, low >> 8, low & 255].join(".");
|
|
44138
44144
|
}
|
|
44139
44145
|
function hextets2(address2) {
|
|
@@ -45015,11 +45021,11 @@ function createAsyncTransport(link2, options = {}) {
|
|
|
45015
45021
|
const mirrors = new Mirrors();
|
|
45016
45022
|
const caller = new Caller(link2, options.maxMessageBytes ?? Number.POSITIVE_INFINITY);
|
|
45017
45023
|
const started = Promise.withResolvers();
|
|
45018
|
-
let
|
|
45024
|
+
let words2 = 0;
|
|
45019
45025
|
let lastCall = 0;
|
|
45020
45026
|
let initialised = false;
|
|
45021
45027
|
let closedBy;
|
|
45022
|
-
const current = () => mirrors.words(++
|
|
45028
|
+
const current = () => mirrors.words(++words2, options.memory?.());
|
|
45023
45029
|
const begin = async (init) => {
|
|
45024
45030
|
mirrors.start(init.mirror);
|
|
45025
45031
|
if (options.maxMessageBytes === void 0 && init.maxMessageBytes !== void 0) {
|
|
@@ -45078,15 +45084,15 @@ function createAsyncTransport(link2, options = {}) {
|
|
|
45078
45084
|
});
|
|
45079
45085
|
};
|
|
45080
45086
|
const issue = async (asked, given, ms, label) => {
|
|
45081
|
-
const
|
|
45082
|
-
lastCall =
|
|
45087
|
+
const words3 = current();
|
|
45088
|
+
lastCall = words3.n;
|
|
45083
45089
|
const body = caller.staging(asked);
|
|
45084
45090
|
if (!body) {
|
|
45085
45091
|
const { req: req2, transfer } = caller.exact(asked, given);
|
|
45086
|
-
return send2({ type: ASYNC_SYSCALL, req: req2, words:
|
|
45092
|
+
return send2({ type: ASYNC_SYSCALL, req: req2, words: words3 }, transfer, ms, label);
|
|
45087
45093
|
}
|
|
45088
45094
|
const { req, staged: staged2 } = await caller.staged(asked, body, ms, label);
|
|
45089
|
-
return send2({ type: ASYNC_SYSCALL, req, words:
|
|
45095
|
+
return send2({ type: ASYNC_SYSCALL, req, words: words3, staged: staged2 }, [], ms, label);
|
|
45090
45096
|
};
|
|
45091
45097
|
return {
|
|
45092
45098
|
init: started.promise,
|