@treeseed/cli 0.6.30 → 0.6.32
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.
|
@@ -3,18 +3,22 @@ import { createWorkflowSdk, renderWorkflowNextSteps, workflowErrorResult } from
|
|
|
3
3
|
const handleRecover = async (invocation, context) => {
|
|
4
4
|
try {
|
|
5
5
|
const result = await createWorkflowSdk(context).recover({
|
|
6
|
-
pruneStale: invocation.args.pruneStale === true
|
|
6
|
+
pruneStale: invocation.args.pruneStale === true,
|
|
7
|
+
obsoleteRunId: typeof invocation.args.obsolete === "string" ? invocation.args.obsolete : void 0,
|
|
8
|
+
obsoleteReason: typeof invocation.args.reason === "string" ? invocation.args.reason : void 0
|
|
7
9
|
});
|
|
8
10
|
const payload = result.payload;
|
|
11
|
+
const markedObsolete = payload.markedObsoleteRun;
|
|
9
12
|
return guidedResult({
|
|
10
13
|
command: "recover",
|
|
11
|
-
summary: payload.interruptedRuns.length > 0 || payload.lock.active ? "Treeseed recover found workflow state that may need attention." : "Treeseed recover found no active locks or interrupted runs.",
|
|
14
|
+
summary: markedObsolete ? `Treeseed recover marked ${markedObsolete.runId} obsolete.` : payload.interruptedRuns.length > 0 || payload.lock.active ? "Treeseed recover found workflow state that may need attention." : "Treeseed recover found no active locks or interrupted runs.",
|
|
12
15
|
facts: [
|
|
13
16
|
{ label: "Active lock", value: payload.lock.active ? "yes" : "no" },
|
|
14
17
|
{ label: "Stale lock", value: payload.lock.stale ? "yes" : "no" },
|
|
15
18
|
{ label: "Interrupted runs", value: payload.interruptedRuns.length },
|
|
16
19
|
{ label: "Stale runs", value: payload.staleRuns?.length ?? 0 },
|
|
17
20
|
{ label: "Pruned runs", value: payload.prunedRuns?.length ?? 0 },
|
|
21
|
+
{ label: "Marked obsolete", value: markedObsolete?.runId ?? "(none)" },
|
|
18
22
|
{ label: "Recorded runs", value: payload.runCount }
|
|
19
23
|
],
|
|
20
24
|
nextSteps: renderWorkflowNextSteps(result),
|
|
@@ -61,6 +61,7 @@ const handleRelease = async (invocation, context) => {
|
|
|
61
61
|
worktreeMode: typeof invocation.args.worktreeMode === "string" ? invocation.args.worktreeMode : void 0,
|
|
62
62
|
ciMode: typeof invocation.args.ciMode === "string" ? invocation.args.ciMode : void 0,
|
|
63
63
|
workspaceLinks: typeof invocation.args.workspaceLinks === "string" ? invocation.args.workspaceLinks : void 0,
|
|
64
|
+
fresh: invocation.args.fresh === true,
|
|
64
65
|
plan: invocation.args.plan === true || invocation.args.dryRun === true,
|
|
65
66
|
dryRun: invocation.args.dryRun === true
|
|
66
67
|
});
|
|
@@ -86,6 +87,7 @@ const handleRelease = async (invocation, context) => {
|
|
|
86
87
|
{ label: result.executionMode === "plan" ? "Packages planned" : "Released packages", value: String((payload.touchedPackages ?? payload.packageSelection.selected).length) },
|
|
87
88
|
{ label: "Publish waits", value: result.executionMode === "plan" ? String(plannedPublishes) : String(completedPublishes) },
|
|
88
89
|
{ label: "CI mode", value: payload.ciMode ?? "auto" },
|
|
90
|
+
{ label: "Fresh release", value: payload.fresh === true ? "yes" : "no" },
|
|
89
91
|
{ label: "Workflow gates", value: String(payload.workflowGates?.length ?? 0) },
|
|
90
92
|
{ label: "Worktree path", value: payload.worktreePath ?? "(in-place)" },
|
|
91
93
|
{ label: "Final branch", value: payload.finalBranch ?? (result.executionMode === "plan" ? payload.stagingBranch : "(unknown)") }
|
|
@@ -482,9 +482,11 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
|
|
|
482
482
|
["recover", command({
|
|
483
483
|
options: [
|
|
484
484
|
{ name: "pruneStale", flags: "--prune-stale", description: "Archive stale interrupted runs that are no longer safe to resume.", kind: "boolean" },
|
|
485
|
+
{ name: "obsolete", flags: "--obsolete <run-id>", description: "Mark one failed workflow run obsolete so it will not be auto-resumed.", kind: "string" },
|
|
486
|
+
{ name: "reason", flags: "--reason <text>", description: "Reason to store when marking a workflow run obsolete.", kind: "string" },
|
|
485
487
|
{ name: "json", flags: "--json", description: "Emit machine-readable JSON instead of human-readable text.", kind: "boolean" }
|
|
486
488
|
],
|
|
487
|
-
examples: ["treeseed recover", "treeseed recover --json", "treeseed recover --prune-stale --json"],
|
|
489
|
+
examples: ["treeseed recover", "treeseed recover --json", "treeseed recover --prune-stale --json", 'treeseed recover --obsolete release-abcd12 --reason "superseded by new staging save"'],
|
|
488
490
|
help: {
|
|
489
491
|
workflowPosition: "recover",
|
|
490
492
|
longSummary: [
|
|
@@ -1024,11 +1026,12 @@ const CLI_COMMAND_OVERLAYS = /* @__PURE__ */ new Map([
|
|
|
1024
1026
|
{ name: "worktreeMode", flags: "--worktree <mode>", description: "Control managed workflow worktrees.", kind: "enum", values: ["auto", "on", "off"] },
|
|
1025
1027
|
{ name: "ciMode", flags: "--ci <mode>", description: "Control hosted GitHub Actions waits.", kind: "enum", values: ["auto", "hosted", "off"] },
|
|
1026
1028
|
{ name: "workspaceLinks", flags: "--workspace-links <mode>", description: "Control local workspace package links.", kind: "enum", values: ["auto", "off"] },
|
|
1029
|
+
{ name: "fresh", flags: "--fresh", description: "Start a new release instead of auto-resuming stale failed release runs.", kind: "boolean" },
|
|
1027
1030
|
{ name: "plan", flags: "--plan", description: "Compute the recursive release plan without mutating any repo.", kind: "boolean" },
|
|
1028
1031
|
{ name: "dryRun", flags: "--dry-run", description: "Alias for --plan.", kind: "boolean" },
|
|
1029
1032
|
{ name: "json", flags: "--json", description: "Emit machine-readable JSON instead of human-readable text.", kind: "boolean" }
|
|
1030
1033
|
],
|
|
1031
|
-
examples: ["treeseed release --patch", "treeseed release --minor", "treeseed release --patch --plan"],
|
|
1034
|
+
examples: ["treeseed release --patch", "treeseed release --minor", "treeseed release --patch --fresh", "treeseed release --patch --plan"],
|
|
1032
1035
|
notes: ["Requires exactly one bump flag."],
|
|
1033
1036
|
help: {
|
|
1034
1037
|
workflowPosition: "promote to production",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeseed/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.32",
|
|
4
4
|
"description": "Operator-facing Treeseed CLI package.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"release:publish": "node ./scripts/run-ts.mjs ./scripts/publish-package.ts"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@treeseed/sdk": "0.6.
|
|
48
|
+
"@treeseed/sdk": "0.6.34",
|
|
49
49
|
"ink": "^7.0.0",
|
|
50
50
|
"react": "^19.2.5"
|
|
51
51
|
},
|