@cbartens/bkit 5.3.0 → 5.5.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.
- package/.bkit/README.md +20 -7
- package/.bkit/core/.agents/docs.md +1 -1
- package/.bkit/core/.agents/rules.md +14 -9
- package/.bkit/core/.bkit/README.md +19 -6
- package/.bkit/core/.bkit/cloud.md +77 -46
- package/.bkit/core/.bkit/comparison.md +3 -3
- package/.bkit/core/.bkit/install.md +21 -18
- package/.bkit/core/.bkit/lite.md +6 -6
- package/.bkit/core/.bkit/pipeline.md +6 -3
- package/.bkit/core/.bkit/prompts.md +14 -10
- package/.bkit/core/.bkit/providers.md +7 -7
- package/.bkit/core/.bkit/templates.md +46 -10
- package/.bkit/core/.bkit/trackers.md +92 -38
- package/.bkit/core/.bkit/workflows.md +140 -116
- package/.bkit/core/AGENTS.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-accessibility.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-agents.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-aio-seo.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-analytics.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-annotations.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-app-performance.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-app-store.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-architecture.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-ci-performance.md +4 -2
- package/.bkit/core/docs/templates/bkit-audit-config.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-cost.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-coverage.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-database.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-dead-code.md +5 -5
- package/.bkit/core/docs/templates/bkit-audit-deferrals.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +14 -13
- package/.bkit/core/docs/templates/bkit-audit-documentation.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-duplication.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-failures.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-flakes.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-gates.md +5 -2
- package/.bkit/core/docs/templates/bkit-audit-issues.md +25 -8
- package/.bkit/core/docs/templates/bkit-audit-llm.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-logs.md +10 -6
- package/.bkit/core/docs/templates/bkit-audit-models.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-privacy.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +5 -5
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-reliability.md +3 -2
- package/.bkit/core/docs/templates/bkit-audit-repo.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-security.md +11 -9
- package/.bkit/core/docs/templates/bkit-audit-slop.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-testing.md +6 -5
- package/.bkit/core/docs/templates/bkit-audit-usability.md +1 -1
- package/.bkit/core/engine/checks/after/auth.ts +88 -45
- package/.bkit/core/engine/checks/after/github.ts +18 -5
- package/.bkit/core/engine/checks/after/index.ts +1 -1
- package/.bkit/core/engine/checks/after/tools.ts +1 -1
- package/.bkit/core/engine/checks/before/env.ts +28 -18
- package/.bkit/core/engine/checks/before/mcp.ts +4 -2
- package/.bkit/core/engine/checks/status-holes.ts +0 -1
- package/.bkit/core/engine/checks/tips/catalogue.ts +31 -2
- package/.bkit/core/engine/checks/tips/index.ts +49 -27
- package/.bkit/core/engine/cli.ts +27 -18
- package/.bkit/core/engine/commands/ci/ci.ts +107 -0
- package/.bkit/core/engine/commands/comply.ts +25 -16
- package/.bkit/core/engine/commands/install/install.ts +11 -4
- package/.bkit/core/engine/commands/install/uninstall.ts +46 -0
- package/.bkit/core/engine/commands/land.ts +156 -0
- package/.bkit/core/engine/commands/lib.ts +10 -8
- package/.bkit/core/engine/commands/registry.ts +2 -0
- package/.bkit/core/engine/commands/tips.ts +7 -3
- package/.bkit/core/engine/commands/workflow/branches.ts +382 -282
- package/.bkit/core/engine/commands/workflow/disk.ts +556 -0
- package/.bkit/core/engine/commands/workflow/fids.ts +23 -15
- package/.bkit/core/engine/commands/workflow/issues.ts +106 -42
- package/.bkit/core/engine/commands/workflow/ledgers.ts +28 -11
- package/.bkit/core/engine/commands/workflow/locks.ts +38 -152
- package/.bkit/core/engine/commands/workflow/prs.ts +14 -3
- package/.bkit/core/engine/commands/workflow/repo.ts +6 -0
- package/.bkit/core/engine/commands/workflow/roadmap.ts +53 -54
- package/.bkit/core/engine/commands/workflow/runtime.ts +3 -2
- package/.bkit/core/engine/commands/workflow/status.ts +33 -11
- package/.bkit/core/engine/commands/workflow/steps.ts +26 -17
- package/.bkit/core/engine/commands/workflow/workflows.ts +442 -269
- package/.bkit/core/engine/commands/workflow/workstreams.ts +3 -2
- package/.bkit/core/engine/commands/workflow/worktrees.ts +11 -1
- package/.bkit/core/engine/install/manifest.ts +31 -10
- package/.bkit/core/engine/install/modules/cloud.ts +3 -1
- package/.bkit/core/engine/install/modules/core.ts +97 -4
- package/.bkit/core/engine/install/modules/opencode.ts +5 -0
- package/.bkit/core/engine/install/placeholders.ts +13 -17
- package/.bkit/core/engine/install/write.ts +37 -1
- package/.bkit/core/engine/render/trackers.ts +35 -23
- package/.bkit/core/engine/shared/egress.ts +6 -0
- package/.bkit/core/engine/shared/settings.ts +96 -1
- package/.bkit/core/engine/shared/timeouts.ts +8 -7
- package/.bkit/core/hooks/guardrails-tiers.js +1 -1
- package/.bkit/core/prompts/bkit-audit-generate.md +80 -7
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-execute.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +1 -1
- package/.bkit/core/prompts/bkit-design-generate.md +2 -1
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +1 -1
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +4 -2
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +4 -2
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +12 -2
- package/.bkit/core/prompts/bkit-utility-update-failures.md +4 -2
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +4 -2
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +12 -5
- package/.bkit/core/prompts/bkit-utility-update-tracker.md +159 -0
- package/.bkit/core/workflows/bkit-auto.md +19 -6
- package/.bkit/core/workflows/bkit-build.md +64 -22
- package/.bkit/core/workflows/bkit-debug.md +72 -28
- package/.bkit/core/workflows/bkit-design.md +101 -37
- package/.bkit/core/workflows/bkit-plan.md +82 -31
- package/.bkit/core/workflows/bkit-ship.md +127 -108
- package/.bkit/shared/.bkit/.env.example +8 -0
- package/.bkit/shared/.claude/bkit-cloud.md +12 -12
- package/.bkit/shared/.claude/settings.json +4 -1
- package/.bkit/shared/.cursor/bkit-cloud.md +2 -2
- package/.bkit/shared/.cursor/mcp.json +11 -4
- package/.bkit/shared/.mcp.json +11 -4
- package/.bkit/shared/.opencode/opencode.json +2 -0
- package/.bkit/shared/docs/deployments.md +44 -29
- package/.bkit/shared/docs/security.md +1 -1
- package/.bkit/shared/docs/testing.md +3 -3
- package/.bkit/shared/gitignore +1 -2
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +2 -2
- package/.bkit/templates/.github/renovate.json5 +1 -1
- package/.bkit/templates/.github/workflows/bkit-ci.yml +29 -56
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +40 -12
- package/.bkit/templates/.husky/pre-commit +10 -4
- package/.bkit/templates/.husky/pre-push +69 -12
- package/.bkit/templates/.lintstagedrc.json +5 -1
- package/.bkit/templates/scripts/ci/lanes/check-tree-cache.mjs +138 -0
- package/.bkit/templates/scripts/ci/lanes/check-tree-cache.test.mjs +181 -0
- package/.bkit/templates/scripts/cleanup/bkit-disk-prune.machine.mjs +197 -0
- package/.bkit/templates/scripts/cleanup/bkit-disk-prune.mjs +164 -0
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +1 -1
- package/CHANGELOG.md +85 -1
- package/README.md +102 -100
- package/dist/checks/after/auth.js +81 -45
- package/dist/checks/after/github.js +17 -5
- package/dist/checks/after/index.js +1 -1
- package/dist/checks/after/tools.js +1 -1
- package/dist/checks/before/env.js +24 -17
- package/dist/checks/before/mcp.js +4 -2
- package/dist/checks/status-holes.js +0 -1
- package/dist/checks/tips/catalogue.js +28 -2
- package/dist/checks/tips/index.js +44 -28
- package/dist/cli.js +27 -19
- package/dist/commands/ci/ci.js +100 -0
- package/dist/commands/comply.js +20 -13
- package/dist/commands/install/install.js +10 -4
- package/dist/commands/install/uninstall.js +42 -0
- package/dist/commands/land.js +129 -0
- package/dist/commands/lib.js +9 -6
- package/dist/commands/registry.js +2 -0
- package/dist/commands/tips.js +7 -3
- package/dist/commands/workflow/branches.js +300 -243
- package/dist/commands/workflow/disk.js +452 -0
- package/dist/commands/workflow/fids.js +22 -15
- package/dist/commands/workflow/issues.js +90 -41
- package/dist/commands/workflow/ledgers.js +26 -11
- package/dist/commands/workflow/locks.js +35 -130
- package/dist/commands/workflow/prs.js +8 -3
- package/dist/commands/workflow/repo.js +5 -0
- package/dist/commands/workflow/roadmap.js +52 -57
- package/dist/commands/workflow/runtime.js +3 -2
- package/dist/commands/workflow/status.js +32 -12
- package/dist/commands/workflow/steps.js +20 -13
- package/dist/commands/workflow/workflows.js +397 -251
- package/dist/commands/workflow/workstreams.js +3 -2
- package/dist/commands/workflow/worktrees.js +11 -1
- package/dist/install/manifest.js +30 -10
- package/dist/install/modules/cloud.js +3 -1
- package/dist/install/modules/core.js +95 -5
- package/dist/install/modules/opencode.js +6 -0
- package/dist/install/placeholders.js +13 -19
- package/dist/install/write.js +26 -2
- package/dist/render/trackers.js +34 -20
- package/dist/shared/egress.js +6 -0
- package/dist/shared/settings.js +44 -0
- package/dist/shared/timeouts.js +8 -7
- package/package.json +11 -2
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
CommandError,
|
|
21
21
|
EXIT,
|
|
22
|
+
git,
|
|
22
23
|
parseJson,
|
|
23
24
|
statusLocation,
|
|
24
25
|
type CommandSpec,
|
|
@@ -58,20 +59,43 @@ export const SUB_PLAN_FLAG: FlagSpec = {
|
|
|
58
59
|
/** Exit code: status.jsonl missing, unreadable, or not valid NDJSON. */
|
|
59
60
|
export const EXIT_NO_STATUS = 3;
|
|
60
61
|
|
|
61
|
-
/** Parse every line of `status.jsonl`. Missing, unreadable or malformed is an error, never "no rows". */
|
|
62
62
|
/** Every row of status.jsonl, whatever its type; exit 3 when the file is missing or a line is not JSON. */
|
|
63
63
|
export function readStatusRows(file: string): StatusRow[] {
|
|
64
64
|
if (!fs.existsSync(file)) throw new CommandError(EXIT_NO_STATUS, `${file} does not exist`);
|
|
65
|
-
return fs
|
|
66
|
-
|
|
65
|
+
return parseStatusRows(fs.readFileSync(file, "utf-8"), file);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The rows of status.jsonl as committed on `ref`, not as on disk: exit 3 when
|
|
70
|
+
* the ref does not carry the file. `file` need not exist; the repo is the one
|
|
71
|
+
* holding its nearest existing parent directory.
|
|
72
|
+
*/
|
|
73
|
+
export function readStatusRowsAt(file: string, ref: string): StatusRow[] {
|
|
74
|
+
let dir = path.dirname(file);
|
|
75
|
+
while (!fs.existsSync(dir) && path.dirname(dir) !== dir) dir = path.dirname(dir);
|
|
76
|
+
const top = git(dir, ["rev-parse", "--show-toplevel"]);
|
|
77
|
+
if (top === null) throw new CommandError(EXIT_NO_STATUS, `${file} is not inside a git repo`);
|
|
78
|
+
const rel = path
|
|
79
|
+
.relative(fs.realpathSync(top), path.join(fs.realpathSync(dir), path.relative(dir, file)))
|
|
80
|
+
.split(path.sep)
|
|
81
|
+
.join("/");
|
|
82
|
+
const spec = `${ref}:${rel}`;
|
|
83
|
+
const text = git(top, ["show", spec]);
|
|
84
|
+
if (text === null) throw new CommandError(EXIT_NO_STATUS, `${spec} does not exist`);
|
|
85
|
+
return parseStatusRows(text, spec);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Parse NDJSON status text; `label` names it in errors. Malformed is an error, never "no rows". */
|
|
89
|
+
function parseStatusRows(text: string, label: string): StatusRow[] {
|
|
90
|
+
return text
|
|
67
91
|
.split("\n")
|
|
68
92
|
.map((l) => l.trim())
|
|
69
93
|
.filter((l) => l !== "")
|
|
70
94
|
.map((l, i) => {
|
|
71
95
|
const parsed = parseJson(l);
|
|
72
|
-
if (!parsed.ok) throw new CommandError(EXIT_NO_STATUS, `${
|
|
96
|
+
if (!parsed.ok) throw new CommandError(EXIT_NO_STATUS, `${label} line ${i + 1} is not JSON`);
|
|
73
97
|
if (typeof parsed.value !== "object" || parsed.value === null) {
|
|
74
|
-
throw new CommandError(EXIT_NO_STATUS, `${
|
|
98
|
+
throw new CommandError(EXIT_NO_STATUS, `${label} line ${i + 1} is not a JSON object`);
|
|
75
99
|
}
|
|
76
100
|
return parsed.value as StatusRow;
|
|
77
101
|
});
|
|
@@ -83,6 +107,10 @@ export const readStatusEvents = (file: string): StatusEvent[] =>
|
|
|
83
107
|
|
|
84
108
|
export const readRuns = (file: string): WorkflowRun[] => fold(readStatusEvents(file));
|
|
85
109
|
|
|
110
|
+
/** The runs as committed on `ref` (see readStatusRowsAt). */
|
|
111
|
+
export const readRunsAt = (file: string, ref: string): WorkflowRun[] =>
|
|
112
|
+
fold(readStatusRowsAt(file, ref) as StatusEvent[]);
|
|
113
|
+
|
|
86
114
|
/** `--file`, resolved against the command's working directory. */
|
|
87
115
|
export const statusFile = (ctx: RunContext) => path.resolve(ctx.cwd, String(ctx.flags.file));
|
|
88
116
|
|
|
@@ -242,11 +270,6 @@ export const statusCommand: CommandSpec = {
|
|
|
242
270
|
WORKFLOW_FLAG,
|
|
243
271
|
{ name: "fid", type: "string", required: true, help: "feature id" },
|
|
244
272
|
{ name: "month", type: "string", required: true, help: "month bucket, YYYYMM" },
|
|
245
|
-
{
|
|
246
|
-
name: "dev-pushes",
|
|
247
|
-
type: "boolean",
|
|
248
|
-
help: "ship only: this runtime pushes to dev (RUNTIME_DEVPUSHES=true)",
|
|
249
|
-
},
|
|
250
273
|
],
|
|
251
274
|
output: {
|
|
252
275
|
path: "absolute path to status.jsonl",
|
|
@@ -261,7 +284,6 @@ export const statusCommand: CommandSpec = {
|
|
|
261
284
|
workflow: String(ctx.flags.workflow),
|
|
262
285
|
fid: String(ctx.flags.fid),
|
|
263
286
|
month,
|
|
264
|
-
devPushes: ctx.flags.devPushes === true,
|
|
265
287
|
});
|
|
266
288
|
ctx.emit({ ...loc, exists: fs.existsSync(loc.path) });
|
|
267
289
|
return EXIT.OK;
|
|
@@ -33,9 +33,9 @@ import {
|
|
|
33
33
|
type FlagValue,
|
|
34
34
|
type RunContext,
|
|
35
35
|
} from "../lib.js";
|
|
36
|
-
import { FID_PATTERNS, readIssueTracker } from "./fids.js";
|
|
36
|
+
import { FID_PATTERNS, normaliseFid, readIssueTracker } from "./fids.js";
|
|
37
37
|
import { buildComment } from "./issues.js";
|
|
38
|
-
import {
|
|
38
|
+
import { readHolder, resolveMonth, workflowLockPath } from "./locks.js";
|
|
39
39
|
import {
|
|
40
40
|
EXIT_NO_STATUS,
|
|
41
41
|
FILE_FLAG,
|
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
nonNegativeInt,
|
|
47
47
|
positiveInt,
|
|
48
48
|
readRuns,
|
|
49
|
+
readRunsAt,
|
|
49
50
|
statusFile,
|
|
50
51
|
str,
|
|
51
52
|
} from "./status.js";
|
|
@@ -422,6 +423,8 @@ export interface Check {
|
|
|
422
423
|
|
|
423
424
|
interface GateOptions {
|
|
424
425
|
file?: string;
|
|
426
|
+
/** Read `file` as committed on this ref instead of from disk. */
|
|
427
|
+
ref?: string;
|
|
425
428
|
workflow: string;
|
|
426
429
|
step: string;
|
|
427
430
|
subPlan?: number;
|
|
@@ -432,7 +435,6 @@ interface GateOptions {
|
|
|
432
435
|
fid?: string;
|
|
433
436
|
month?: string;
|
|
434
437
|
token?: string;
|
|
435
|
-
devPushes?: boolean;
|
|
436
438
|
placeholders: string[];
|
|
437
439
|
}
|
|
438
440
|
|
|
@@ -454,7 +456,7 @@ function gateChecks(cwd: string, o: GateOptions): Check[] {
|
|
|
454
456
|
|
|
455
457
|
if (o.fid !== undefined) {
|
|
456
458
|
const tracker = readIssueTracker(cwd);
|
|
457
|
-
const fid =
|
|
459
|
+
const fid = normaliseFid(o.fid, tracker);
|
|
458
460
|
add(
|
|
459
461
|
`fid ${fid}`,
|
|
460
462
|
FID_PATTERNS[tracker].test(fid)
|
|
@@ -463,11 +465,8 @@ function gateChecks(cwd: string, o: GateOptions): Check[] {
|
|
|
463
465
|
`${tracker} shape`,
|
|
464
466
|
);
|
|
465
467
|
if (o.token !== undefined) {
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
resolveMonth(repoRoot(cwd), o.fid, o.month),
|
|
469
|
-
o.fid,
|
|
470
|
-
);
|
|
468
|
+
const root = repoRoot(cwd);
|
|
469
|
+
const lock = workflowLockPath(root, resolveMonth(root, o.fid, o.month), o.fid);
|
|
471
470
|
const holder = readHolder(lock);
|
|
472
471
|
add(
|
|
473
472
|
"workflow lock",
|
|
@@ -513,7 +512,8 @@ function gateChecks(cwd: string, o: GateOptions): Check[] {
|
|
|
513
512
|
}
|
|
514
513
|
|
|
515
514
|
if (o.file === undefined) return checks;
|
|
516
|
-
const
|
|
515
|
+
const runs = o.ref === undefined ? readRuns(o.file) : readRunsAt(o.file, o.ref);
|
|
516
|
+
const rows = activeDoneSteps(runs, o.workflow, { step: o.step, subPlan: o.subPlan });
|
|
517
517
|
const row = rows.filter((r) => o.attempt === undefined || r.attempt === o.attempt).at(-1);
|
|
518
518
|
const rowProblems: string[] = [];
|
|
519
519
|
if (!row) {
|
|
@@ -1187,6 +1187,11 @@ export const stepsCommand: CommandSpec = {
|
|
|
1187
1187
|
required: false,
|
|
1188
1188
|
help: "path to status.jsonl; without it the status row is not checked (Step 1)",
|
|
1189
1189
|
},
|
|
1190
|
+
{
|
|
1191
|
+
name: "ref",
|
|
1192
|
+
type: "string",
|
|
1193
|
+
help: "read --file as committed on this ref (e.g. origin/dev), not from disk",
|
|
1194
|
+
},
|
|
1190
1195
|
WORKFLOW_FLAG,
|
|
1191
1196
|
STEP_FLAG,
|
|
1192
1197
|
SUB_PLAN_FLAG,
|
|
@@ -1225,15 +1230,11 @@ export const stepsCommand: CommandSpec = {
|
|
|
1225
1230
|
type: "string",
|
|
1226
1231
|
help: "the workflow lock must be held with this token (needs --fid)",
|
|
1227
1232
|
},
|
|
1228
|
-
{
|
|
1229
|
-
name: "dev-pushes",
|
|
1230
|
-
type: "boolean",
|
|
1231
|
-
help: "ship only: the lock lives in the main checkout",
|
|
1232
|
-
},
|
|
1233
1233
|
],
|
|
1234
1234
|
output: { pass: "true when every check passed", checks: "[{check, ok, detail}] per check" },
|
|
1235
1235
|
exitCodes: {
|
|
1236
|
-
[EXIT_NO_STATUS]:
|
|
1236
|
+
[EXIT_NO_STATUS]:
|
|
1237
|
+
"status.jsonl missing (on disk, or on --ref), unreadable, or not valid NDJSON",
|
|
1237
1238
|
},
|
|
1238
1239
|
run: (ctx) => {
|
|
1239
1240
|
const f = ctx.flags;
|
|
@@ -1244,12 +1245,21 @@ export const stepsCommand: CommandSpec = {
|
|
|
1244
1245
|
throw new CommandError(EXIT.USAGE, "give --attempt or --attempt-of, not both");
|
|
1245
1246
|
if (f.attemptOf !== undefined && file === undefined)
|
|
1246
1247
|
throw new CommandError(EXIT.USAGE, "--attempt-of needs --file");
|
|
1248
|
+
const ref = str(f.ref);
|
|
1249
|
+
if (ref !== undefined && file === undefined)
|
|
1250
|
+
throw new CommandError(EXIT.USAGE, "--ref needs --file");
|
|
1251
|
+
if (ref !== undefined && f.attemptOf !== undefined)
|
|
1252
|
+
throw new CommandError(
|
|
1253
|
+
EXIT.USAGE,
|
|
1254
|
+
"--attempt-of reads the file on disk; give --attempt with --ref",
|
|
1255
|
+
);
|
|
1247
1256
|
const attempt =
|
|
1248
1257
|
f.attemptOf !== undefined
|
|
1249
1258
|
? derivedCounter(file!, workflow, String(f.attemptOf), subPlan, undefined)
|
|
1250
1259
|
: nonNegativeInt(f.attempt, "attempt");
|
|
1251
1260
|
const checks = gateChecks(ctx.cwd, {
|
|
1252
1261
|
file,
|
|
1262
|
+
ref,
|
|
1253
1263
|
workflow,
|
|
1254
1264
|
step: String(f.step),
|
|
1255
1265
|
subPlan,
|
|
@@ -1260,7 +1270,6 @@ export const stepsCommand: CommandSpec = {
|
|
|
1260
1270
|
fid: str(f.fid),
|
|
1261
1271
|
month: str(f.month),
|
|
1262
1272
|
token: str(f.token),
|
|
1263
|
-
devPushes: f.devPushes === true,
|
|
1264
1273
|
placeholders: list(f.placeholder),
|
|
1265
1274
|
});
|
|
1266
1275
|
const pass = checks.every((c) => c.ok);
|