@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.
@@ -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.37" : "0.0.0-dev";
9443
+ KERNEL_VERSION = true ? "1.196.38" : "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.37" : "0.0.0-dev";
9442
+ KERNEL_VERSION = true ? "1.196.38" : "0.0.0-dev";
9443
9443
  OS_RELEASE = "6.0.0-slicc";
9444
9444
  }
9445
9445
  });
package/dist/node.js CHANGED
@@ -7819,7 +7819,7 @@ function satisfies(version, range2) {
7819
7819
  }
7820
7820
 
7821
7821
  // src/version.ts
7822
- var KERNEL_VERSION = true ? "1.196.37" : "0.0.0-dev";
7822
+ var KERNEL_VERSION = true ? "1.196.38" : "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
@@ -7968,12 +7968,22 @@ async function withPackagePaths(fs, pkg, command, provenance) {
7968
7968
  if (!command.env) return command;
7969
7969
  const env = {};
7970
7970
  const envPaths = /* @__PURE__ */ new Set();
7971
+ const missingEnv = {};
7971
7972
  for (const [key, value2] of Object.entries(command.env)) {
7972
7973
  const path = !value2.startsWith("/") && value2.includes("/") && inside(pkg, value2);
7973
- if (path && provenance) envPaths.add(path);
7974
- env[key] = path && await fs.exists(path) ? path : value2;
7974
+ const present4 = path && await fs.exists(path);
7975
+ if (path && provenance) {
7976
+ envPaths.add(path);
7977
+ if (!present4) missingEnv[key] = { pkg, value: value2 };
7978
+ }
7979
+ env[key] = present4 ? path : value2;
7975
7980
  }
7976
- return { ...command, env, ...envPaths.size ? { envPaths: [...envPaths] } : {} };
7981
+ return {
7982
+ ...command,
7983
+ env,
7984
+ ...envPaths.size ? { envPaths: [...envPaths] } : {},
7985
+ ...Object.keys(missingEnv).length ? { missingEnv } : {}
7986
+ };
7977
7987
  }
7978
7988
  async function packages(fs, modules) {
7979
7989
  const names2 = await fs.readdir(modules).catch(() => []);
@@ -39310,14 +39320,16 @@ function interpreter(head) {
39310
39320
  }
39311
39321
  function expandDefaults(defaults2, env) {
39312
39322
  const out = {};
39313
- for (const [key, value2] of Object.entries(defaults2 ?? {})) {
39323
+ for (const [key, entry] of Object.entries(defaults2 ?? {})) {
39314
39324
  let missing7 = false;
39325
+ const value2 = typeof entry === "string" ? entry : entry.value;
39315
39326
  const expanded = value2.replace(ENV_REFERENCE, (_, name2) => {
39316
39327
  const set3 = Object.hasOwn(env, name2) ? env[name2] : void 0;
39317
39328
  if (set3 === void 0) missing7 = true;
39318
39329
  return set3 ?? "";
39319
39330
  });
39320
- if (!missing7) out[key] = expanded;
39331
+ if (missing7) continue;
39332
+ out[key] = typeof entry !== "string" && !expanded.startsWith("/") ? `${entry.pkg}/${expanded.replace(/^\.\//, "")}` : expanded;
39321
39333
  }
39322
39334
  return out;
39323
39335
  }
@@ -39331,7 +39343,7 @@ function targetOf(command, reads) {
39331
39343
  argv0: command.argv0,
39332
39344
  ...command.argv0Fixed ? { fixed: true } : {},
39333
39345
  ...command.args ? { prefix: command.args } : {},
39334
- ...command.env ? { env: command.env } : {},
39346
+ ...command.env ? { env: { ...command.env, ...command.missingEnv } } : {},
39335
39347
  ...command.unset ? { unset: command.unset } : {},
39336
39348
  ...command.imports ? { imports: command.imports } : {},
39337
39349
  ...command.preopenRoot ? { preopenRoot: true } : {},
@@ -39359,7 +39371,7 @@ function withScriptEnv(target, command) {
39359
39371
  if (!command) return target;
39360
39372
  return {
39361
39373
  ...target,
39362
- env: { ...target.env, ...command.env },
39374
+ env: { ...target.env, ...command.env, ...command.missingEnv },
39363
39375
  unset: [
39364
39376
  ...(target.unset ?? []).filter((key) => !Object.hasOwn(command.env ?? {}, key)),
39365
39377
  ...command.unset ?? []