@rightkit/release 0.6.74 → 0.6.77

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.
@@ -274,7 +274,9 @@ export const carriedReadOnlyScan = (words, options) => carriedScanRefusal(words,
274
274
  export function directReadSpawn({ spawn, cargoCommand, snapshotRoot, directPath, pathKey = "PATH", tmpRoot, env, err = () => {}, memo = null, isAsync = false, served = null }) {
275
275
  const prefix = cargoCommand.slice(1);
276
276
  const refused = (code, message) => { err(`rightkit-gate: ${code}: ${message}`); return { status: CARGO_REFUSAL_STATUS, signal: null, error: null, stdout: "", stderr: `rightkit-gate: ${code}: ${message}\n` }; };
277
- return (cmd, args, opts = {}) => {
277
+ // Anything but cargo in the snapshot goes to `spawn` untouched; `underlying` names it, so a caller can tell this wrapper still starts real programs
278
+ // (NN08: the scan's pnpm version probe kept no answer behind this wrapper, 0.6.74 case 1).
279
+ const wrapped = (cmd, args, opts = {}) => {
278
280
  const cargo = cmd === cargoCommand[0] && prefix.every((w, i) => args[i] === w);
279
281
  if (!cargo || typeof opts.cwd !== "string" || !within(real(opts.cwd), real(snapshotRoot))) return spawn(cmd, args, opts);
280
282
  // A seam request (reset plan section 3: RUSTRIGHT_GATE_COMMIT set) is a class B compile the broker admits; it runs in the snapshot by design and is never a
@@ -302,4 +304,6 @@ export function directReadSpawn({ spawn, cargoCommand, snapshotRoot, directPath,
302
304
  cleanup();
303
305
  return remember(r);
304
306
  };
307
+ wrapped.underlying = spawn;
308
+ return wrapped;
305
309
  }
@@ -24,7 +24,7 @@ function stableSha256(value) {
24
24
  return createHash("sha256").update(JSON.stringify(canonical(value))).digest("hex");
25
25
  }
26
26
 
27
- function assertIdentity({ product, version, target, sourceCommit }) {
27
+ export function assertIdentity({ product, version, target, sourceCommit }) {
28
28
  if (!/^[a-z][a-z0-9-]+$/.test(product ?? "")) throw new Error("supply-chain product is invalid");
29
29
  if (!VERSION.test(version ?? "")) throw new Error("supply-chain version must be stable SemVer");
30
30
  if (!/^(?:windows|macos)-(?:x86_64|arm64)$/.test(target ?? "")) throw new Error("supply-chain target is invalid");