@rightkit/release 0.6.46 → 0.6.47
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/bin/rightkit-gate.mjs +16 -7
- package/build-ownership.mjs +122 -14
- package/cross-targets.mjs +18 -2
- package/deterministic-scans.mjs +21 -13
- package/gate-acceptance.mjs +1443 -0
- package/gate-serve.mjs +66 -4
- package/handle-revocation.mjs +100 -0
- package/handle-revocation.rust-vector.json +1 -0
- package/handle-revocation.vectors.json +53 -0
- package/local-publish.mjs +4 -2
- package/managed-cargo.mjs +11 -0
- package/owner-process-proof.mjs +14 -0
- package/ownership-mark.mjs +10 -1
- package/ownership-recover.mjs +78 -0
- package/package.json +2 -2
- package/rightkit-drift.mjs +4 -3
- package/rightkit-versions.json +1 -1
- package/snapshot-broker.mjs +1 -1
- package/stage-sidecar.mjs +20 -4
- package/stamp-relay.mjs +37 -0
- package/unit-list-compile.mjs +2 -1
package/stamp-relay.mjs
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Line-stamping relay for the gate's inherited-output children (GATE-CONTRACT GC-A21, rightkit#1463/#1514): `node stamp-relay.mjs <cmd> [args...]`
|
|
3
|
+
// runs <cmd> with piped output and writes every complete line to its own stdout/stderr prefixed with the UTC time, the same form the gate's
|
|
4
|
+
// own lines carry. The gate keeps launching synchronously (spawnSync, stdio inherit) and only puts this relay in front, so a child's live output
|
|
5
|
+
// still streams. A partial last line is stamped and ended at exit. The relay passes stdin through, forwards SIGINT, SIGTERM and SIGHUP to the
|
|
6
|
+
// child, and ends the way the child ended: the same exit code, or the same signal re-raised on itself.
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
8
|
+
import { pathToFileURL } from "node:url";
|
|
9
|
+
|
|
10
|
+
export function lineStamper(write, now = () => new Date().toISOString()) {
|
|
11
|
+
let pending = "";
|
|
12
|
+
return {
|
|
13
|
+
push(chunk) {
|
|
14
|
+
pending += chunk;
|
|
15
|
+
let at;
|
|
16
|
+
while ((at = pending.indexOf("\n")) >= 0) { write(`${now()} ${pending.slice(0, at + 1)}`); pending = pending.slice(at + 1); }
|
|
17
|
+
},
|
|
18
|
+
end() { if (pending) { write(`${now()} ${pending}\n`); pending = ""; } },
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
23
|
+
const [cmd, ...args] = process.argv.slice(2);
|
|
24
|
+
if (!cmd) { process.stderr.write("usage: stamp-relay.mjs <cmd> [args...]\n"); process.exit(64); }
|
|
25
|
+
const child = spawn(cmd, args, { stdio: ["inherit", "pipe", "pipe"], windowsHide: true });
|
|
26
|
+
const out = lineStamper((s) => process.stdout.write(s));
|
|
27
|
+
const err = lineStamper((s) => process.stderr.write(s));
|
|
28
|
+
child.stdout.setEncoding("utf8").on("data", (c) => out.push(c));
|
|
29
|
+
child.stderr.setEncoding("utf8").on("data", (c) => err.push(c));
|
|
30
|
+
for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(sig, () => { try { child.kill(sig); } catch { /* already gone */ } });
|
|
31
|
+
child.on("error", (e) => { process.stderr.write(`${new Date().toISOString()} stamp-relay: ${cmd} could not be started (${e.code ?? e.message})\n`); process.exit(127); });
|
|
32
|
+
child.on("close", (code, signal) => {
|
|
33
|
+
out.end(); err.end();
|
|
34
|
+
if (signal) { process.removeAllListeners(signal); process.kill(process.pid, signal); return; }
|
|
35
|
+
process.exitCode = code ?? 1;
|
|
36
|
+
});
|
|
37
|
+
}
|
package/unit-list-compile.mjs
CHANGED
|
@@ -269,7 +269,8 @@ export async function publisherRequirementsForUnits({ selected, snapshot, rustUn
|
|
|
269
269
|
const manifest = npm ? readJson(`${dir}/package.json`) : null;
|
|
270
270
|
if (npm && manifest?.name !== unit) throw new Error(`${row.selector}: npm manifest identity differs`);
|
|
271
271
|
if (npm && manifest.private === true && !manifest.scripts?.build && !manifest.scripts?.test) throw new Error(`${row.selector}: private unit has no own build or test script; recursive workspace build cannot prove its coverage`);
|
|
272
|
-
|
|
272
|
+
// Class A's full pass (rustfmt over every Rust file of this snapshot) precedes these requirements in the same run: no per-crate fmt (GC-A24).
|
|
273
|
+
const planned = compileRequirements({ kind, unit, dir, config, manifest, platform, workspace: cargo ? discovered.cargoDir : ".", env, assetGated, formatProven: true });
|
|
273
274
|
out.push({ selector: row.selector, dir, ...planned });
|
|
274
275
|
}
|
|
275
276
|
return out;
|