@kungfu-tech/buildchain 3.0.2-alpha.0 → 3.0.2-alpha.2
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/dist/site/buildchain-contract.json +49 -19
- package/dist/site/buildchain-site.json +4 -4
- package/dist/site/capability-registry.json +1 -1
- package/dist/site/controller-registry.json +27 -3
- package/dist/site/kfd-claims.json +23 -5
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/node-api-registry.json +17 -4
- package/dist/site/public-surface-audit.json +9 -3
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +1 -0
- package/dist/site/site-manifest.json +4 -4
- package/dist/site/workflow-registry.json +8 -2
- package/package.json +2 -1
- package/packages/core/cache-evidence.js +288 -0
- package/packages/core/diagnostics.js +276 -10
- package/packages/core/github-governance-authority.js +71 -16
- package/packages/core/index.js +10 -0
- package/scripts/auditable-demo.mjs +29 -6
- package/scripts/generate-site-bundle.mjs +1 -0
- package/scripts/locked-source-checkout.mjs +48 -0
- package/scripts/reconcile-github-governance.mjs +158 -25
- package/scripts/shifu-gate-profile.mjs +26 -20
|
@@ -114,10 +114,24 @@ export function prepareGateExecutionFiles(files) {
|
|
|
114
114
|
for (const file of files) fs.rmSync(file, { force: true });
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
export function commandSpawnOptions({
|
|
118
|
+
cwd,
|
|
119
|
+
env = process.env,
|
|
120
|
+
streamOutput = false,
|
|
121
|
+
} = {}) {
|
|
122
|
+
if (streamOutput) return { cwd, env, stdio: "inherit" };
|
|
123
|
+
return {
|
|
124
|
+
cwd,
|
|
125
|
+
env,
|
|
126
|
+
encoding: "utf8",
|
|
127
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
117
131
|
function runArgv(
|
|
118
132
|
argv,
|
|
119
133
|
args,
|
|
120
|
-
{ cwd, env = process.env, allowFailure = false } = {},
|
|
134
|
+
{ cwd, env = process.env, allowFailure = false, streamOutput = false } = {},
|
|
121
135
|
) {
|
|
122
136
|
const command = argv[0];
|
|
123
137
|
const commandArgs = [...argv.slice(1), ...args];
|
|
@@ -126,25 +140,12 @@ function runArgv(
|
|
|
126
140
|
const batchInvocation = windowsBatch
|
|
127
141
|
? windowsBatchInvocation(command, commandArgs, { cwd })
|
|
128
142
|
: null;
|
|
143
|
+
const spawnOptions = commandSpawnOptions({ cwd, env, streamOutput });
|
|
129
144
|
const result = windowsBatch
|
|
130
|
-
? spawnSync(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
cwd,
|
|
135
|
-
env,
|
|
136
|
-
encoding: "utf8",
|
|
137
|
-
maxBuffer: 16 * 1024 * 1024,
|
|
138
|
-
},
|
|
139
|
-
)
|
|
140
|
-
: spawnSync(command, commandArgs, {
|
|
141
|
-
cwd,
|
|
142
|
-
env,
|
|
143
|
-
encoding: "utf8",
|
|
144
|
-
maxBuffer: 16 * 1024 * 1024,
|
|
145
|
-
});
|
|
146
|
-
if (result.stdout) process.stdout.write(result.stdout);
|
|
147
|
-
if (result.stderr) process.stderr.write(result.stderr);
|
|
145
|
+
? spawnSync(batchInvocation.command, batchInvocation.args, spawnOptions)
|
|
146
|
+
: spawnSync(command, commandArgs, spawnOptions);
|
|
147
|
+
if (!streamOutput && result.stdout) process.stdout.write(result.stdout);
|
|
148
|
+
if (!streamOutput && result.stderr) process.stderr.write(result.stderr);
|
|
148
149
|
if (result.error) throw result.error;
|
|
149
150
|
const status = result.status ?? 1;
|
|
150
151
|
if (!allowFailure && status !== 0)
|
|
@@ -257,7 +258,12 @@ function runMode() {
|
|
|
257
258
|
],
|
|
258
259
|
registry,
|
|
259
260
|
);
|
|
260
|
-
const runResult = runArgv(argv, runArgs, {
|
|
261
|
+
const runResult = runArgv(argv, runArgs, {
|
|
262
|
+
cwd,
|
|
263
|
+
env,
|
|
264
|
+
allowFailure: true,
|
|
265
|
+
streamOutput: true,
|
|
266
|
+
});
|
|
261
267
|
let receipt = fs.existsSync(receiptPath)
|
|
262
268
|
? readJson(receiptPath, "Shifu gate receipt")
|
|
263
269
|
: null;
|