@stll/oxlint-config 1.9.0 → 2.1.0

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.
Files changed (74) hide show
  1. package/README.md +110 -63
  2. package/dist/cloud-setup-cli.cjs +1 -2
  3. package/dist/cloud-setup-cli.cjs.map +1 -1
  4. package/dist/cloud-setup-cli.mjs +1 -2
  5. package/dist/cloud-setup-cli.mjs.map +1 -1
  6. package/dist/consumer-node-support.cjs +2 -2
  7. package/dist/consumer-node-support.mjs +1 -1
  8. package/dist/dependabot.d.cts +8 -19
  9. package/dist/dependabot.d.mts +8 -19
  10. package/dist/publish-artifact-syntax.cjs +1 -1
  11. package/dist/publish-artifact-syntax.mjs +1 -1
  12. package/dist/publish-contract-cli.cjs +1 -1
  13. package/dist/publish-contract-cli.mjs +1 -1
  14. package/dist/quarantine-cli.cjs +2 -1
  15. package/dist/quarantine-cli.cjs.map +1 -1
  16. package/dist/quarantine-cli.mjs +3 -2
  17. package/dist/quarantine-cli.mjs.map +1 -1
  18. package/dist/quarantine-policy.d.cts +25 -2
  19. package/dist/quarantine-policy.d.mts +25 -2
  20. package/dist/quarantine-policy2.cjs +177 -5
  21. package/dist/quarantine-policy2.cjs.map +1 -1
  22. package/dist/quarantine-policy2.mjs +166 -6
  23. package/dist/quarantine-policy2.mjs.map +1 -1
  24. package/dist/rust-policy-cli.cjs +481 -0
  25. package/dist/rust-policy-cli.cjs.map +1 -0
  26. package/dist/rust-policy-cli.mjs +479 -0
  27. package/dist/rust-policy-cli.mjs.map +1 -0
  28. package/dist/toolchain-changed-cli.cjs +1477 -2
  29. package/dist/toolchain-changed-cli.cjs.map +1 -1
  30. package/dist/toolchain-changed-cli.mjs +1474 -1
  31. package/dist/toolchain-changed-cli.mjs.map +1 -1
  32. package/dist/toolchain-check-cli.cjs +2 -0
  33. package/dist/toolchain-check-cli.cjs.map +1 -1
  34. package/dist/toolchain-check-cli.mjs +2 -0
  35. package/dist/toolchain-check-cli.mjs.map +1 -1
  36. package/dist/toolchain-dependabot.cjs +1 -1
  37. package/dist/toolchain-dependabot.mjs +2 -2
  38. package/dist/toolchain-dependabot.mjs.map +1 -1
  39. package/dist/toolchain-guard.cjs +353 -244
  40. package/dist/toolchain-guard.cjs.map +1 -1
  41. package/dist/toolchain-guard.mjs +348 -245
  42. package/dist/toolchain-guard.mjs.map +1 -1
  43. package/dist/toolchain-inputs.cjs +108 -56
  44. package/dist/toolchain-inputs.cjs.map +1 -1
  45. package/dist/toolchain-inputs.mjs +102 -56
  46. package/dist/toolchain-inputs.mjs.map +1 -1
  47. package/dist/toolchain-schema.cjs +8 -46
  48. package/dist/toolchain-schema.cjs.map +1 -1
  49. package/dist/toolchain-schema.mjs +8 -46
  50. package/dist/toolchain-schema.mjs.map +1 -1
  51. package/dist/typecheck-probe-cli.cjs +40 -2
  52. package/dist/typecheck-probe-cli.cjs.map +1 -1
  53. package/dist/typecheck-probe-cli.mjs +39 -1
  54. package/dist/typecheck-probe-cli.mjs.map +1 -1
  55. package/package.json +4 -4
  56. package/toolchain.json +13 -27
  57. package/dist/toolchain-bun.cjs +0 -34
  58. package/dist/toolchain-bun.cjs.map +0 -1
  59. package/dist/toolchain-bun.mjs +0 -23
  60. package/dist/toolchain-bun.mjs.map +0 -1
  61. package/dist/toolchain-changed.cjs +0 -1484
  62. package/dist/toolchain-changed.cjs.map +0 -1
  63. package/dist/toolchain-changed.mjs +0 -1477
  64. package/dist/toolchain-changed.mjs.map +0 -1
  65. package/dist/typecheck-parity-cli.cjs +0 -71
  66. package/dist/typecheck-parity-cli.cjs.map +0 -1
  67. package/dist/typecheck-parity-cli.mjs +0 -71
  68. package/dist/typecheck-parity-cli.mjs.map +0 -1
  69. package/dist/typecheck-parity.cjs +0 -908
  70. package/dist/typecheck-parity.cjs.map +0 -1
  71. package/dist/typecheck-parity.mjs +0 -897
  72. package/dist/typecheck-parity.mjs.map +0 -1
  73. /package/dist/{typecheck-parity-cli.d.cts → rust-policy-cli.d.cts} +0 -0
  74. /package/dist/{typecheck-parity-cli.d.mts → rust-policy-cli.d.mts} +0 -0
@@ -2,12 +2,12 @@ const require_rolldown_runtime = require("./rolldown-runtime.cjs");
2
2
  let node_path = require("node:path");
3
3
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
4
4
  let smol_toml = require("smol-toml");
5
+ let picomatch = require("picomatch");
6
+ picomatch = require_rolldown_runtime.__toESM(picomatch, 1);
5
7
  let node_crypto = require("node:crypto");
6
8
  let semver = require("semver");
7
9
  let node_util = require("node:util");
8
10
  let yaml = require("yaml");
9
- let picomatch = require("picomatch");
10
- picomatch = require_rolldown_runtime.__toESM(picomatch, 1);
11
11
  //#region src/cloud-setup-install.ts
12
12
  const packageInstall = String.raw`
13
13
  # Prevent package maintainer scripts from starting unmanaged system services.
@@ -42,20 +42,20 @@ apt_install() (
42
42
  policy_state=installed
43
43
  printf '%s\n' '#!/bin/sh' 'exit 101' > /usr/sbin/policy-rc.d
44
44
  chmod 755 /usr/sbin/policy-rc.d
45
- local package
45
+ # The network deadline covers downloads only; unpacking and maintainer scripts
46
+ # (for example locale generation or cluster creation) run offline afterwards.
47
+ DEBIAN_FRONTEND=noninteractive apt_network install -y --no-install-recommends --download-only "$@"
48
+ local package pending
46
49
  for package in "$@"; do
47
50
  if [[ "$package" == */* ]]; then
48
- # apt cannot fetch local archives with --download-only, so their installs
49
- # stay one call. Package triggers can be slow on cloud filesystems; the
50
- # longer whole-call deadline covers them while Acquire timeouts still
51
- # bound each network request.
52
- APT_DEADLINE=600 DEBIAN_FRONTEND=noninteractive apt_network install -y --no-install-recommends "$@"
51
+ # apt rejects --no-download for local archives, so prove instead that
52
+ # only local file: archives remain; --print-uris reads local state only.
53
+ pending="$(set -o pipefail; DEBIAN_FRONTEND=noninteractive apt-get --print-uris -qq -y --no-install-recommends install "$@" | awk '$1 !~ /^\047file:/')"
54
+ [[ -z "$pending" ]] || fail "Package downloads remain after the bounded download step: $pending"
55
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends "$@"
53
56
  return
54
57
  fi
55
58
  done
56
- # The network deadline covers downloads only; unpacking and maintainer scripts
57
- # (for example locale generation or cluster creation) run offline afterwards.
58
- DEBIAN_FRONTEND=noninteractive apt_network install -y --no-install-recommends --download-only "$@"
59
59
  DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-download "$@"
60
60
  )
61
61
 
@@ -337,6 +337,28 @@ apt_refresh_for() {
337
337
  }
338
338
  `;
339
339
  //#endregion
340
+ //#region src/archive-pins.ts
341
+ const record$3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
342
+ /** Parse a map from exact releases to their amd64 and arm64 archive SHA256 values. */
343
+ const parseArchiveSha256 = (input, label) => {
344
+ if (input === void 0) return {};
345
+ if (!record$3(input)) throw new Error(`${label} must be a version map`);
346
+ const releases = {};
347
+ for (const [version, value] of Object.entries(input)) {
348
+ if ((0, semver.valid)(version) !== version || !record$3(value)) throw new Error(`${label} requires exact release keys`);
349
+ const keys = Object.keys(value);
350
+ if (keys.length !== 2 || !keys.includes("amd64") || !keys.includes("arm64")) throw new Error(`${label} ${version} requires amd64 and arm64 pins`);
351
+ const amd64 = value["amd64"];
352
+ const arm64 = value["arm64"];
353
+ if (typeof amd64 !== "string" || typeof arm64 !== "string" || !/^[a-f0-9]{64}$/.test(amd64) || !/^[a-f0-9]{64}$/.test(arm64)) throw new Error(`${label} ${version} requires lowercase SHA256 pins`);
354
+ releases[version] = {
355
+ amd64,
356
+ arm64
357
+ };
358
+ }
359
+ return releases;
360
+ };
361
+ //#endregion
340
362
  //#region src/cloud-setup-artifacts.ts
341
363
  const wasmBindgen0126 = {
342
364
  version: "0.2.126",
@@ -550,6 +572,20 @@ const parseTools = (input) => {
550
572
  }
551
573
  return result;
552
574
  };
575
+ const cloudRuntimes = ["node", "bun"];
576
+ const parseRuntimeArchives = (input) => {
577
+ if (input === void 0) return void 0;
578
+ if (!object(input) || Object.keys(input).some((key) => !cloudRuntimes.some((runtime) => runtime === key))) throw new Error("cloud.runtimeArchiveSha256 accepts only node and bun");
579
+ const result = {};
580
+ for (const runtime of cloudRuntimes) {
581
+ if (!Object.hasOwn(input, runtime)) continue;
582
+ const label = `cloud.runtimeArchiveSha256.${runtime}`;
583
+ const pins = parseArchiveSha256(input[runtime], label);
584
+ if (Object.keys(pins).length !== 1) throw new Error(`${label} pins exactly one release`);
585
+ result[runtime] = pins;
586
+ }
587
+ return result;
588
+ };
553
589
  const cloudInstallCommand = "bun install --frozen-lockfile";
554
590
  const cloudInstallCommands = [cloudInstallCommand, `${cloudInstallCommand} --ignore-scripts`];
555
591
  const cloudInstall = (value) => cloudInstallCommands.some((command) => value === command);
@@ -578,14 +614,18 @@ const parsePrepare = (input) => {
578
614
  const parseCloudSetup = (input) => {
579
615
  if (input === void 0) return void 0;
580
616
  if (typeof input !== "object" || input === null || Array.isArray(input)) throw new Error("cloud must be an object");
581
- for (const key of Object.keys(input)) if (key !== "services" && key !== "install" && key !== "envFile" && key !== "rust" && key !== "tools" && key !== "prepare") throw new Error(`unsupported cloud key: ${key}`);
617
+ for (const key of Object.keys(input)) if (key !== "services" && key !== "install" && key !== "envFile" && key !== "rust" && key !== "tools" && key !== "prepare" && key !== "submodules" && key !== "runtimeArchiveSha256") throw new Error(`unsupported cloud key: ${key}`);
582
618
  const rust = parseRust("rust" in input ? input.rust : void 0);
583
619
  const tools = parseTools("tools" in input ? input.tools : void 0);
584
620
  const prepare = parsePrepare("prepare" in input ? input.prepare : void 0);
621
+ const runtimeArchiveSha256 = parseRuntimeArchives("runtimeArchiveSha256" in input ? input.runtimeArchiveSha256 : void 0);
622
+ const submodules = "submodules" in input ? input.submodules : false;
623
+ if (typeof submodules !== "boolean") throw new Error("cloud.submodules must be a boolean when provided");
585
624
  const extensions = {
586
625
  ...rust === void 0 ? {} : { rust },
587
626
  ...tools === void 0 ? {} : { tools },
588
- ...prepare === void 0 ? {} : { prepare }
627
+ ...prepare === void 0 ? {} : { prepare },
628
+ ...runtimeArchiveSha256 === void 0 ? {} : { runtimeArchiveSha256 }
589
629
  };
590
630
  const selected = "services" in input ? input.services : [];
591
631
  if (!Array.isArray(selected)) throw new Error("cloud.services must be an array when provided");
@@ -602,6 +642,7 @@ const parseCloudSetup = (input) => {
602
642
  return {
603
643
  services,
604
644
  install,
645
+ ...submodules ? { submodules } : {},
605
646
  ...extensions,
606
647
  ...services.length === 0 ? {} : { envFile: parseEnvFile(input) }
607
648
  };
@@ -1147,15 +1188,13 @@ NODE_DIR="/opt/stll-cloud/node/$NODE_VERSION"
1147
1188
  BUN_DIR="/opt/stll-cloud/bun/$BUN_VERSION"
1148
1189
  export PATH="$NODE_DIR/bin:$BUN_DIR:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
1149
1190
  BUN_CACHE="/var/cache/stll-cloud/bun/$OUTPUT_UID"
1150
- DEPENDENCY_STATE_ROOT=/var/lib/stll-cloud
1151
- DEPENDENCY_STAMP="$DEPENDENCY_STATE_ROOT/dependencies-$(printf '%s' "$REPO_ROOT" | sha256sum | cut -d' ' -f1).sha256"
1152
1191
  @ENV_ASSIGNMENTS@
1153
1192
  [[ -f "$REPO_ROOT/.node-version" && ! -L "$REPO_ROOT/.node-version" ]] || fail 'A regular root .node-version is required'
1154
1193
  [[ "$(awk 'NF { if (++count > 1 || NF != 1) exit 1; value=$1 } END { if (count != 1) exit 1; print value }' "$REPO_ROOT/.node-version")" == "$NODE_VERSION" ]] || fail 'Node selector changed; regenerate cloud-setup.sh'
1155
1194
  cd -- "$REPO_ROOT"
1156
1195
  case "$(uname -m)" in
1157
- x86_64) ARCH=amd64; NODE_ARCH=x64; BUN_ARCH=x64 ;;
1158
- aarch64|arm64) ARCH=arm64; NODE_ARCH=arm64; BUN_ARCH=aarch64 ;;
1196
+ x86_64) ARCH=amd64; NODE_ARCH=x64; BUN_ARCH=x64; NODE_SHA256='@NODE_AMD64_SHA@'; BUN_SHA256='@BUN_AMD64_SHA@' ;;
1197
+ aarch64|arm64) ARCH=arm64; NODE_ARCH=arm64; BUN_ARCH=aarch64; NODE_SHA256='@NODE_ARM64_SHA@'; BUN_SHA256='@BUN_ARM64_SHA@' ;;
1159
1198
  *) fail 'Only amd64 and arm64 are supported' ;;
1160
1199
  esac
1161
1200
 
@@ -1249,6 +1288,7 @@ install_runtimes() (
1249
1288
  if ! node_ready; then
1250
1289
  node_archive="node-v$NODE_VERSION-linux-$NODE_ARCH.tar.xz"
1251
1290
  download_file "https://nodejs.org/dist/v$NODE_VERSION/$node_archive" "$scratch/$node_archive" 120
1291
+ (cd "$scratch"; printf '%s %s\n' "$NODE_SHA256" "$node_archive" | sha256sum --strict -c -)
1252
1292
  download_file "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt" "$scratch/node-sums" 45
1253
1293
  (cd "$scratch"; awk -v name="$node_archive" '$2 == name { print; count++ } END { if (count != 1) exit 1 }' node-sums | sha256sum --strict -c -)
1254
1294
  install -d -m 755 "$NODE_DIR"
@@ -1258,6 +1298,7 @@ install_runtimes() (
1258
1298
  bun_folder="bun-linux-$BUN_ARCH"
1259
1299
  bun_archive="$bun_folder.zip"
1260
1300
  download_file "https://github.com/oven-sh/bun/releases/download/bun-v$BUN_VERSION/$bun_archive" "$scratch/$bun_archive" 120
1301
+ (cd "$scratch"; printf '%s %s\n' "$BUN_SHA256" "$bun_archive" | sha256sum --strict -c -)
1261
1302
  download_file "https://github.com/oven-sh/bun/releases/download/bun-v$BUN_VERSION/SHASUMS256.txt" "$scratch/bun-sums" 45
1262
1303
  (cd "$scratch"; awk -v name="$bun_archive" '$2 == name || $2 == "*" name { print $1 " " name; count++ } END { if (count != 1) exit 1 }' bun-sums | sha256sum --strict -c -)
1263
1304
  unzip -q "$scratch/$bun_archive" -d "$scratch/bun"
@@ -1308,49 +1349,16 @@ process.stdout.write([...hosts].sort().join(","));
1308
1349
  network_run "$download_hosts" 240 runuser -u "$OUTPUT_USER" -- env HOME="$OUTPUT_HOME" BUN_INSTALL_CACHE_DIR="$BUN_CACHE" PATH="$PATH" BUN_CONFIG_HTTP_IDLE_TIMEOUT=20 "$BUN_DIR/bun" @INSTALL_ARGS@
1309
1350
  }
1310
1351
 
1311
- dependency_hash() {
1312
- [[ -f bun.lock && ! -L bun.lock ]] || fail 'A regular root bun.lock is required'
1313
- sha256sum -- bun.lock | cut -d ' ' -f1
1314
- }
1315
- prepare_dependency_state() {
1316
- [[ ! -L "$DEPENDENCY_STATE_ROOT" ]] || fail 'Dependency state root must not be a symlink'
1317
- if [[ -e "$DEPENDENCY_STATE_ROOT" ]]; then
1318
- [[ -d "$DEPENDENCY_STATE_ROOT" && "$(stat -c '%u:%a' "$DEPENDENCY_STATE_ROOT")" == 0:755 ]] || fail 'Invalid dependency state root'
1319
- else
1320
- install -d -m 755 -o root -g root "$DEPENDENCY_STATE_ROOT"
1321
- fi
1322
- [[ ! -L "$DEPENDENCY_STAMP" ]] || fail 'Dependency stamp must not be a symlink'
1323
- if [[ -e "$DEPENDENCY_STAMP" ]]; then
1324
- [[ -f "$DEPENDENCY_STAMP" && "$(stat -c '%u:%a' "$DEPENDENCY_STAMP")" == 0:644 ]] || fail 'Invalid dependency stamp'
1325
- fi
1326
- }
1327
- write_dependency_stamp() {
1328
- local temporary
1329
- prepare_dependency_state
1330
- temporary="$(mktemp "$DEPENDENCY_STATE_ROOT/.dependencies.XXXXXX")"
1331
- chmod 644 "$temporary"
1332
- dependency_hash > "$temporary"
1333
- mv -f -- "$temporary" "$DEPENDENCY_STAMP"
1334
- }
1352
+ # The frozen install is the check: it reads every input the package manager
1353
+ # uses and changes nothing on a current tree, so no stamp stands in for it.
1335
1354
  install_dependencies() {
1336
- prepare_dependency_state
1337
- rm -f -- "$DEPENDENCY_STAMP"
1338
1355
  dependency_install
1339
- write_dependency_stamp
1340
1356
  }
1341
1357
  sync_dependencies() {
1342
- local expected installed=''
1343
- prepare_dependency_state
1344
- expected="$(dependency_hash)"
1345
- if [[ -f "$DEPENDENCY_STAMP" ]]; then IFS= read -r installed < "$DEPENDENCY_STAMP" || true; fi
1346
- # The stamp describes an installation; without node_modules there is none.
1347
- [[ "$installed" == "$expected" && -d "$REPO_ROOT/node_modules" ]] && return
1348
- rm -f -- "$DEPENDENCY_STAMP"
1349
1358
  dependency_install || fail 'bun.lock mismatch; dependency installation failed'
1350
- write_dependency_stamp
1351
1359
  }
1352
1360
 
1353
- @SERVICE_INSTALL@
1361
+ @SUBMODULE_FUNCTION@@SERVICE_INSTALL@
1354
1362
  @SERVICE_START@
1355
1363
 
1356
1364
  @TOOL_INSTALL@
@@ -1370,7 +1378,7 @@ if [[ "$MODE" == install ]]; then
1370
1378
  step shell install_shell_environment
1371
1379
  # Login routes read the installed profile, so they are checked after it.
1372
1380
  step routes verify_bun_routes
1373
- step dependencies install_dependencies
1381
+ @SUBMODULE_STEP@ step dependencies install_dependencies
1374
1382
  @PREPARE_STEP@
1375
1383
  exit 0
1376
1384
  fi
@@ -1494,11 +1502,40 @@ const renderPrepare = (prepare, files) => {
1494
1502
  "}"
1495
1503
  ].join("\n");
1496
1504
  };
1505
+ const runtimeArchiveManifests = {
1506
+ node: (version) => `https://nodejs.org/dist/v${version}/SHASUMS256.txt`,
1507
+ bun: (version) => `https://github.com/oven-sh/bun/releases/download/bun-v${version}/SHASUMS256.txt`
1508
+ };
1509
+ const runtimeArchivePins = ({ runtime, version, shared, declared }) => {
1510
+ const key = `cloud.runtimeArchiveSha256.${runtime}`;
1511
+ const sharedPins = shared[version];
1512
+ if (declared !== void 0) {
1513
+ if (sharedPins !== void 0) throw new Error(`the shared policy pins ${runtime} ${version} archives; remove ${key}`);
1514
+ const pins = declared[version];
1515
+ if (pins === void 0) throw new Error(`${key} pins ${Object.keys(declared).join(", ")}, but the repository selects ${runtime} ${version}; update it with the amd64 and arm64 values from ${runtimeArchiveManifests[runtime](version)}`);
1516
+ return pins;
1517
+ }
1518
+ if (sharedPins === void 0) throw new Error(`the shared policy has no ${runtime} ${version} archive SHA256 pins; declare ${key} for ${version} with the amd64 and arm64 values from ${runtimeArchiveManifests[runtime](version)}`);
1519
+ return sharedPins;
1520
+ };
1497
1521
  const generateCloudSetup = ({ policy, cloud, nodeVersion, files = {}, rustExceptions = [] }) => {
1498
1522
  const selected = parseCloudSetup(cloud);
1499
1523
  if (selected === void 0) throw new Error("cloud declaration is required");
1500
1524
  const exactNode = nodeVersion.trim();
1501
1525
  if ((0, semver.valid)(exactNode) !== exactNode || !nodeSelectorMatches(exactNode, policy.node)) throw new Error("cloud requires a tracked exact .node-version within the shared Node series");
1526
+ const bunVersion = policy.bun;
1527
+ const nodeArchiveSha256 = runtimeArchivePins({
1528
+ runtime: "node",
1529
+ version: exactNode,
1530
+ shared: policy.nodeArchiveSha256,
1531
+ declared: selected.runtimeArchiveSha256?.node
1532
+ });
1533
+ const bunArchiveSha256 = runtimeArchivePins({
1534
+ runtime: "bun",
1535
+ version: bunVersion,
1536
+ shared: policy.bunArchiveSha256,
1537
+ declared: selected.runtimeArchiveSha256?.bun
1538
+ });
1502
1539
  const toolchains = resolveCloudToolchains({
1503
1540
  cloud: selected,
1504
1541
  files,
@@ -1511,7 +1548,7 @@ const generateCloudSetup = ({ policy, cloud, nodeVersion, files = {}, rustExcept
1511
1548
  ["@NETWORK@", renderCloudNetwork()],
1512
1549
  ["@TOOL_INSTALL@", renderCloudToolInstall(toolchains) + renderCloudShellInstall({
1513
1550
  nodeVersion: exactNode,
1514
- bunVersion: policy.bun,
1551
+ bunVersion,
1515
1552
  rust: toolchains.rust
1516
1553
  })],
1517
1554
  ["@INPUT_VALIDATION@", ["rust-toolchain.toml", "rust-toolchain"].flatMap((file) => {
@@ -1520,8 +1557,12 @@ const generateCloudSetup = ({ policy, cloud, nodeVersion, files = {}, rustExcept
1520
1557
  const hash = (0, node_crypto.createHash)("sha256").update(content).digest("hex");
1521
1558
  return [`[[ -f ${shellQuote(file)} && ! -L ${shellQuote(file)} ]] && [[ "$(sha256sum -- ${shellQuote(file)} | cut -d ' ' -f1)" == ${shellQuote(hash)} ]] || fail ${shellQuote(`${file} changed; regenerate cloud-setup.sh`)}`];
1522
1559
  }).concat(selected.tools?.["wasm-bindgen-cli"] === void 0 ? [] : [renderWasmBindgenLockValidation(selected.tools["wasm-bindgen-cli"])]).join("\n")],
1523
- ["@BUN@", policy.bun],
1560
+ ["@BUN@", bunVersion],
1524
1561
  ["@NODE@", exactNode],
1562
+ ["@NODE_AMD64_SHA@", nodeArchiveSha256.amd64],
1563
+ ["@NODE_ARM64_SHA@", nodeArchiveSha256.arm64],
1564
+ ["@BUN_AMD64_SHA@", bunArchiveSha256.amd64],
1565
+ ["@BUN_ARM64_SHA@", bunArchiveSha256.arm64],
1525
1566
  ["@ENV_ASSIGNMENTS@", selected.envFile === void 0 ? "" : `ENV_FILE=${shellQuote(selected.envFile)}\nENV_MARKER=${shellQuote(cloudEnvironmentMarker)}`],
1526
1567
  ["@ENV_FUNCTIONS@", selected.envFile === void 0 ? "" : environmentFunctions],
1527
1568
  ["@ENVIRONMENT_VALUES@", selected.services.length === 0 ? "" : environmentValuesFunction],
@@ -1531,6 +1572,11 @@ const generateCloudSetup = ({ policy, cloud, nodeVersion, files = {}, rustExcept
1531
1572
  ["@SESSION_ENVIRONMENT_CALL@", selected.services.length === 0 ? "" : "if [[ \"$MODE\" == session ]]; then emit_session_environment; fi"],
1532
1573
  ["@ENV_WRITE@", selected.envFile === void 0 ? "" : "write_environment"],
1533
1574
  ["@PREPARE_FUNCTION@", renderPrepare(selected.prepare, files)],
1575
+ ["@SUBMODULE_FUNCTION@", selected.submodules ? String.raw`install_submodules() {
1576
+ network_run github.com 240 runuser -u "$OUTPUT_USER" -- env HOME="$OUTPUT_HOME" git submodule sync --recursive
1577
+ network_run github.com 240 runuser -u "$OUTPUT_USER" -- env HOME="$OUTPUT_HOME" git submodule update --init --recursive --depth 1
1578
+ }`.concat("\n\n") : ""],
1579
+ ["@SUBMODULE_STEP@", selected.submodules ? " step submodules install_submodules\n" : ""],
1534
1580
  ["@PREPARE_STEP@", selected.prepare === void 0 ? "" : " step prepare prepare_sources"],
1535
1581
  ["@SERVICE_INSTALL@", renderCloudServiceInstall({
1536
1582
  services,
@@ -2122,6 +2168,12 @@ Object.defineProperty(exports, "nodeSupportRangeMatches", {
2122
2168
  return nodeSupportRangeMatches;
2123
2169
  }
2124
2170
  });
2171
+ Object.defineProperty(exports, "parseArchiveSha256", {
2172
+ enumerable: true,
2173
+ get: function() {
2174
+ return parseArchiveSha256;
2175
+ }
2176
+ });
2125
2177
  Object.defineProperty(exports, "parseCloudSetup", {
2126
2178
  enumerable: true,
2127
2179
  get: function() {