@ai-ecoverse/slicc-kernel 1.196.37 → 1.196.38
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 +20 -8
- package/dist/cloudflare.js.map +3 -3
- package/dist/kernel-worker.js +20 -8
- 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 +20 -8
- package/dist/node.js.map +3 -3
- package/dist/process-worker.js +1 -1
- package/dist/types/commands.d.ts +5 -0
- package/dist/types/launcher.d.ts +3 -3
- package/package.json +1 -1
package/dist/kernel-worker.js
CHANGED
|
@@ -10254,7 +10254,7 @@ function satisfies(version, range2) {
|
|
|
10254
10254
|
}
|
|
10255
10255
|
|
|
10256
10256
|
// src/version.ts
|
|
10257
|
-
var KERNEL_VERSION = true ? "1.196.
|
|
10257
|
+
var KERNEL_VERSION = true ? "1.196.38" : "0.0.0-dev";
|
|
10258
10258
|
var OS_RELEASE = "6.0.0-slicc";
|
|
10259
10259
|
function procVersion() {
|
|
10260
10260
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -10403,12 +10403,22 @@ async function withPackagePaths(fs, pkg, command, provenance) {
|
|
|
10403
10403
|
if (!command.env) return command;
|
|
10404
10404
|
const env = {};
|
|
10405
10405
|
const envPaths = /* @__PURE__ */ new Set();
|
|
10406
|
+
const missingEnv = {};
|
|
10406
10407
|
for (const [key, value2] of Object.entries(command.env)) {
|
|
10407
10408
|
const path = !value2.startsWith("/") && value2.includes("/") && inside(pkg, value2);
|
|
10408
|
-
|
|
10409
|
-
|
|
10409
|
+
const present4 = path && await fs.exists(path);
|
|
10410
|
+
if (path && provenance) {
|
|
10411
|
+
envPaths.add(path);
|
|
10412
|
+
if (!present4) missingEnv[key] = { pkg, value: value2 };
|
|
10413
|
+
}
|
|
10414
|
+
env[key] = present4 ? path : value2;
|
|
10410
10415
|
}
|
|
10411
|
-
return {
|
|
10416
|
+
return {
|
|
10417
|
+
...command,
|
|
10418
|
+
env,
|
|
10419
|
+
...envPaths.size ? { envPaths: [...envPaths] } : {},
|
|
10420
|
+
...Object.keys(missingEnv).length ? { missingEnv } : {}
|
|
10421
|
+
};
|
|
10412
10422
|
}
|
|
10413
10423
|
async function packages(fs, modules) {
|
|
10414
10424
|
const names2 = await fs.readdir(modules).catch(() => []);
|
|
@@ -39361,14 +39371,16 @@ function interpreter(head) {
|
|
|
39361
39371
|
}
|
|
39362
39372
|
function expandDefaults(defaults2, env) {
|
|
39363
39373
|
const out = {};
|
|
39364
|
-
for (const [key,
|
|
39374
|
+
for (const [key, entry] of Object.entries(defaults2 ?? {})) {
|
|
39365
39375
|
let missing7 = false;
|
|
39376
|
+
const value2 = typeof entry === "string" ? entry : entry.value;
|
|
39366
39377
|
const expanded = value2.replace(ENV_REFERENCE, (_, name2) => {
|
|
39367
39378
|
const set3 = Object.hasOwn(env, name2) ? env[name2] : void 0;
|
|
39368
39379
|
if (set3 === void 0) missing7 = true;
|
|
39369
39380
|
return set3 ?? "";
|
|
39370
39381
|
});
|
|
39371
|
-
if (
|
|
39382
|
+
if (missing7) continue;
|
|
39383
|
+
out[key] = typeof entry !== "string" && !expanded.startsWith("/") ? `${entry.pkg}/${expanded.replace(/^\.\//, "")}` : expanded;
|
|
39372
39384
|
}
|
|
39373
39385
|
return out;
|
|
39374
39386
|
}
|
|
@@ -39382,7 +39394,7 @@ function targetOf(command, reads) {
|
|
|
39382
39394
|
argv0: command.argv0,
|
|
39383
39395
|
...command.argv0Fixed ? { fixed: true } : {},
|
|
39384
39396
|
...command.args ? { prefix: command.args } : {},
|
|
39385
|
-
...command.env ? { env: command.env } : {},
|
|
39397
|
+
...command.env ? { env: { ...command.env, ...command.missingEnv } } : {},
|
|
39386
39398
|
...command.unset ? { unset: command.unset } : {},
|
|
39387
39399
|
...command.imports ? { imports: command.imports } : {},
|
|
39388
39400
|
...command.preopenRoot ? { preopenRoot: true } : {},
|
|
@@ -39410,7 +39422,7 @@ function withScriptEnv(target, command) {
|
|
|
39410
39422
|
if (!command) return target;
|
|
39411
39423
|
return {
|
|
39412
39424
|
...target,
|
|
39413
|
-
env: { ...target.env, ...command.env },
|
|
39425
|
+
env: { ...target.env, ...command.env, ...command.missingEnv },
|
|
39414
39426
|
unset: [
|
|
39415
39427
|
...(target.unset ?? []).filter((key) => !Object.hasOwn(command.env ?? {}, key)),
|
|
39416
39428
|
...command.unset ?? []
|