@treeseed/cli 0.4.7 → 0.4.9
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/README.md +10 -2
- package/dist/cli/handlers/close.js +3 -1
- package/dist/cli/handlers/config-ui.d.ts +72 -0
- package/dist/cli/handlers/config-ui.js +785 -0
- package/dist/cli/handlers/config.js +105 -35
- package/dist/cli/handlers/export.d.ts +2 -0
- package/dist/cli/handlers/export.js +28 -0
- package/dist/cli/handlers/release.js +3 -1
- package/dist/cli/handlers/save.js +5 -3
- package/dist/cli/handlers/stage.js +3 -1
- package/dist/cli/help-ui.d.ts +3 -0
- package/dist/cli/help-ui.js +490 -0
- package/dist/cli/help.d.ts +26 -0
- package/dist/cli/help.js +332 -91
- package/dist/cli/operations-registry.js +682 -29
- package/dist/cli/operations-types.d.ts +37 -2
- package/dist/cli/registry.d.ts +1 -0
- package/dist/cli/registry.js +2 -0
- package/dist/cli/runtime.js +22 -9
- package/dist/cli/ui/framework.d.ts +159 -0
- package/dist/cli/ui/framework.js +296 -0
- package/dist/cli/ui/mouse.d.ts +11 -0
- package/dist/cli/ui/mouse.js +72 -0
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -19,6 +19,14 @@ npm install @treeseed/cli @treeseed/core @treeseed/sdk
|
|
|
19
19
|
|
|
20
20
|
`@treeseed/cli` is a thin installable wrapper over `@treeseed/sdk` workflow and operations interfaces plus the `@treeseed/core` runtime namespaces. `treeseed dev` and `treeseed agents ...` resolve and delegate to the tenant-installed or sibling-workspace `@treeseed/core` runtime. In normal consumer installs, npm resolves the runtime dependencies automatically.
|
|
21
21
|
|
|
22
|
+
Workflow guarantees:
|
|
23
|
+
|
|
24
|
+
- `treeseed init`, `treeseed config`, and `treeseed release` resolve the project from nested directories and do not rely on the currently checked-out task branch.
|
|
25
|
+
- `treeseed switch` requires a clean worktree before leaving the current branch and creates new task branches from the latest `staging`.
|
|
26
|
+
- `treeseed save` is the canonical checkpoint command: it syncs the current branch with origin, succeeds even when no new changes exist, and can create or refresh preview deployments with `--preview`.
|
|
27
|
+
- `treeseed stage` and `treeseed close` auto-save meaningful uncommitted task-branch changes before merge or cleanup, then leave the repository on `staging`.
|
|
28
|
+
- `treeseed release` completes on `staging` after promoting `staging` into `main` and pushing the release tag.
|
|
29
|
+
|
|
22
30
|
After installation, the published binary is available as:
|
|
23
31
|
|
|
24
32
|
```bash
|
|
@@ -34,7 +42,7 @@ The main workflow commands exposed by the current CLI are:
|
|
|
34
42
|
- `treeseed tasks [--json]`
|
|
35
43
|
- `treeseed switch <branch-name> [--preview]`
|
|
36
44
|
- `treeseed dev`
|
|
37
|
-
- `treeseed save "<commit message>"`
|
|
45
|
+
- `treeseed save [--preview] "<commit message>"`
|
|
38
46
|
- `treeseed stage "<resolution message>"`
|
|
39
47
|
- `treeseed close "<close reason>"`
|
|
40
48
|
- `treeseed release --major|--minor|--patch`
|
|
@@ -51,7 +59,7 @@ treeseed status
|
|
|
51
59
|
treeseed config
|
|
52
60
|
treeseed switch feature/search-improvements --preview
|
|
53
61
|
treeseed dev
|
|
54
|
-
treeseed save "feat: add search filters"
|
|
62
|
+
treeseed save --preview "feat: add search filters"
|
|
55
63
|
treeseed stage "feat: add search filters"
|
|
56
64
|
treeseed release --patch
|
|
57
65
|
treeseed status --json
|
|
@@ -11,8 +11,10 @@ const handleClose = async (invocation, context) => {
|
|
|
11
11
|
summary: "Treeseed close completed successfully.",
|
|
12
12
|
facts: [
|
|
13
13
|
{ label: "Closed branch", value: payload.branchName },
|
|
14
|
+
{ label: "Auto-saved", value: payload.autoSaved ? "yes" : "no" },
|
|
14
15
|
{ label: "Deprecated tag", value: payload.deprecatedTag.tagName },
|
|
15
|
-
{ label: "Preview cleanup", value: payload.previewCleanup.performed ? "performed" : "not needed" }
|
|
16
|
+
{ label: "Preview cleanup", value: payload.previewCleanup.performed ? "performed" : "not needed" },
|
|
17
|
+
{ label: "Final branch", value: payload.finalBranch }
|
|
16
18
|
],
|
|
17
19
|
nextSteps: renderWorkflowNextSteps(result),
|
|
18
20
|
report: payload
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type UiViewportLayout } from '../ui/framework.js';
|
|
2
|
+
type ConfigScope = 'all' | 'local' | 'staging' | 'prod';
|
|
3
|
+
export type ConfigViewMode = 'startup' | 'full';
|
|
4
|
+
type ConfigEntry = {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
group: string;
|
|
8
|
+
description: string;
|
|
9
|
+
howToGet: string;
|
|
10
|
+
sensitivity: 'secret' | 'plain' | 'derived';
|
|
11
|
+
targets: string[];
|
|
12
|
+
purposes: string[];
|
|
13
|
+
storage: 'shared' | 'scoped';
|
|
14
|
+
scope: Exclude<ConfigScope, 'all'>;
|
|
15
|
+
sharedScopes: Array<Exclude<ConfigScope, 'all'>>;
|
|
16
|
+
required: boolean;
|
|
17
|
+
currentValue: string;
|
|
18
|
+
suggestedValue: string;
|
|
19
|
+
effectiveValue: string;
|
|
20
|
+
};
|
|
21
|
+
type ConfigContextSnapshot = {
|
|
22
|
+
project: {
|
|
23
|
+
name: string;
|
|
24
|
+
slug: string;
|
|
25
|
+
};
|
|
26
|
+
scopes: Array<Exclude<ConfigScope, 'all'>>;
|
|
27
|
+
entriesByScope: Record<Exclude<ConfigScope, 'all'>, ConfigEntry[]>;
|
|
28
|
+
authStatusByScope: Record<Exclude<ConfigScope, 'all'>, {
|
|
29
|
+
gh: {
|
|
30
|
+
authenticated: boolean;
|
|
31
|
+
};
|
|
32
|
+
wrangler: {
|
|
33
|
+
authenticated: boolean;
|
|
34
|
+
};
|
|
35
|
+
railway: {
|
|
36
|
+
authenticated: boolean;
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
};
|
|
40
|
+
export type ConfigPage = {
|
|
41
|
+
key: string;
|
|
42
|
+
entry: ConfigEntry;
|
|
43
|
+
scope: Exclude<ConfigScope, 'all'>;
|
|
44
|
+
scopes: Array<Exclude<ConfigScope, 'all'>>;
|
|
45
|
+
required: boolean;
|
|
46
|
+
currentValue: string;
|
|
47
|
+
suggestedValue: string;
|
|
48
|
+
finalValue: string;
|
|
49
|
+
wizardRequiredMissing: boolean;
|
|
50
|
+
};
|
|
51
|
+
export type ConfigWizardStep = ConfigPage & {
|
|
52
|
+
index: number;
|
|
53
|
+
total: number;
|
|
54
|
+
};
|
|
55
|
+
export type ConfigEditorResult = {
|
|
56
|
+
overrides: Record<string, string>;
|
|
57
|
+
viewMode: ConfigViewMode;
|
|
58
|
+
};
|
|
59
|
+
export type ConfigViewportLayout = UiViewportLayout & {
|
|
60
|
+
sidebarWidth: number;
|
|
61
|
+
contentWidth: number;
|
|
62
|
+
detailHeight: number;
|
|
63
|
+
detailViewportHeight: number;
|
|
64
|
+
inputHeight: number;
|
|
65
|
+
actionRowHeight: number;
|
|
66
|
+
};
|
|
67
|
+
export declare function computeConfigViewportLayout(rows: number, columns: number): ConfigViewportLayout;
|
|
68
|
+
export declare function buildCliConfigPages(context: ConfigContextSnapshot, selectedFilter: ConfigScope, overrides?: Record<string, string>, viewMode?: ConfigViewMode): ConfigPage[];
|
|
69
|
+
export declare function runCliConfigEditor(context: ConfigContextSnapshot, options?: {
|
|
70
|
+
initialViewMode?: ConfigViewMode;
|
|
71
|
+
}): Promise<ConfigEditorResult | null>;
|
|
72
|
+
export {};
|