bitfab 0.78.4 → 0.78.5
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.
- checksums.yaml +4 -4
- data/lib/bitfab/cloudReplay.mjs +12 -12
- data/lib/bitfab/cloud_execute.rb +1434 -0
- data/lib/bitfab/cloud_replay_cli.rb +1 -0
- data/lib/bitfab/replay_cli.rb +1 -0
- data/lib/bitfab/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e04206fd104ce3004142355495e4258b104fc2ffc09108c87705e0cf964c1723
|
|
4
|
+
data.tar.gz: c1ee11bf687ab36b0ede9a3cf02dbeb5074922382506c4bbf64f539f66a4184c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ccbbcdc722cb9d7a37d59571f896d493e85a542301dbeb21e339a0632edd30fda987c1cde5551f0be6c67de04935129b1ce32b621c67e1117a05db7cff04e5d3
|
|
7
|
+
data.tar.gz: 006606f3c5c749d82fe6aaa7df105cf90d301fd5eb428df94f02ed3d3ade2a36b57b579512168e4c5520df8dc3152e69d056b0d422896e3b22695c3f901794e8
|
data/lib/bitfab/cloudReplay.mjs
CHANGED
|
@@ -20085,7 +20085,7 @@ function validateEnvironment(values) {
|
|
|
20085
20085
|
function workflowEnvironmentConflicts(root, values) {
|
|
20086
20086
|
const workflow = runningWorkflow(root);
|
|
20087
20087
|
const mapped = existsSync2(workflow) ? workflowSecrets(readFileSync(workflow, "utf8")) : {};
|
|
20088
|
-
const conflicts = Object.keys(values).filter((name) => name
|
|
20088
|
+
const conflicts = Object.keys(values).filter((name) => Object.hasOwn(mapped, name)).sort();
|
|
20089
20089
|
if (conflicts.length > 0) {
|
|
20090
20090
|
throw new ValueError(
|
|
20091
20091
|
`The workflow already reads ${conflicts.join(", ")} from a GitHub secret, so a replay cannot set it; update the secret with bitfab-replay --cloud-secrets`
|
|
@@ -20881,7 +20881,16 @@ async function bitfabApi(client, location, { method = "POST", payload } = {}) {
|
|
|
20881
20881
|
throw error;
|
|
20882
20882
|
}
|
|
20883
20883
|
const text = body.toString("utf8");
|
|
20884
|
-
|
|
20884
|
+
if (!text.trim()) {
|
|
20885
|
+
return {};
|
|
20886
|
+
}
|
|
20887
|
+
try {
|
|
20888
|
+
return JSON.parse(text);
|
|
20889
|
+
} catch {
|
|
20890
|
+
throw new CommandError(
|
|
20891
|
+
`Bitfab ${method} ${location} returned a response that is not JSON`
|
|
20892
|
+
);
|
|
20893
|
+
}
|
|
20885
20894
|
}
|
|
20886
20895
|
async function issueKeyToken(root, record, text) {
|
|
20887
20896
|
const shared = "so the run uses the workflow's BITFAB_API_KEY secret";
|
|
@@ -23182,11 +23191,6 @@ import {
|
|
|
23182
23191
|
writeFileSync as writeFileSync3
|
|
23183
23192
|
} from "node:fs";
|
|
23184
23193
|
import path6 from "node:path";
|
|
23185
|
-
var NODE_SETUP = {
|
|
23186
|
-
uses: ACTIONS.node,
|
|
23187
|
-
with: { "node-version": "lts/*" }
|
|
23188
|
-
};
|
|
23189
|
-
var NODE_ON_THE_RUNNER = "Cloud replay runs with Node.js 18+ on the runner. GitHub-hosted runners include it; on a self-hosted runner or in a container job without it, add an actions/setup-node step before the step that runs --cloud-execute";
|
|
23190
23194
|
var PNPM_FOR_LOCKFILE = {
|
|
23191
23195
|
"9": "10",
|
|
23192
23196
|
"6": "8",
|
|
@@ -23951,9 +23955,6 @@ async function updateWorkflow(root, workflowPath, { removeOldKeySecrets = false
|
|
|
23951
23955
|
"Already set up. Edit the workflow directly to change its install steps, secrets, runner, or Environment"
|
|
23952
23956
|
);
|
|
23953
23957
|
}
|
|
23954
|
-
if (!text.includes("actions/setup-node@")) {
|
|
23955
|
-
steps.push(NODE_ON_THE_RUNNER);
|
|
23956
|
-
}
|
|
23957
23958
|
const [leftovers, leftoverSteps] = await leftoverKeySecretReport(
|
|
23958
23959
|
root,
|
|
23959
23960
|
text,
|
|
@@ -24042,8 +24043,7 @@ async function initialize(argv, name = "--cloud-init") {
|
|
|
24042
24043
|
if (project === void 0) {
|
|
24043
24044
|
throw new ValueError(`'${language}'`);
|
|
24044
24045
|
}
|
|
24045
|
-
const [
|
|
24046
|
-
const steps = language === "typescript" ? projectSteps : [NODE_SETUP, ...projectSteps];
|
|
24046
|
+
const [steps, detected] = project(root, start);
|
|
24047
24047
|
const run = args.run || detected;
|
|
24048
24048
|
if (!run) {
|
|
24049
24049
|
throw new ValueError(
|