@treeseed/cli 0.4.8 → 0.4.10
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/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/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 +678 -28
- 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
|
@@ -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 {};
|