@sixb/cli 0.1.21 → 0.1.22

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.
Files changed (129) hide show
  1. package/README.md +18 -3
  2. package/dist/commands/api.d.ts.map +1 -1
  3. package/dist/commands/app.d.ts.map +1 -1
  4. package/dist/commands/build.d.ts.map +1 -1
  5. package/dist/commands/check.d.ts.map +1 -1
  6. package/dist/commands/db-migrate.d.ts.map +1 -1
  7. package/dist/commands/deploy.d.ts.map +1 -1
  8. package/dist/commands/desktop.d.ts +15 -0
  9. package/dist/commands/desktop.d.ts.map +1 -0
  10. package/dist/commands/dev-runner.d.ts +4 -0
  11. package/dist/commands/dev-runner.d.ts.map +1 -1
  12. package/dist/commands/dev.d.ts.map +1 -1
  13. package/dist/commands/init.d.ts.map +1 -1
  14. package/dist/commands/lake-check.d.ts.map +1 -1
  15. package/dist/commands/lake-cleanup.d.ts.map +1 -1
  16. package/dist/commands/login.d.ts.map +1 -1
  17. package/dist/commands/logout.d.ts.map +1 -1
  18. package/dist/commands/orchestrator.d.ts.map +1 -1
  19. package/dist/commands/profile.d.ts.map +1 -1
  20. package/dist/commands/rules.d.ts.map +1 -1
  21. package/dist/commands/scheduler.d.ts.map +1 -1
  22. package/dist/commands/service-account.d.ts.map +1 -1
  23. package/dist/commands/status.d.ts.map +1 -1
  24. package/dist/commands/token.d.ts.map +1 -1
  25. package/dist/commands/typegen.d.ts.map +1 -1
  26. package/dist/commands/worker-group.d.ts +2 -0
  27. package/dist/commands/worker-group.d.ts.map +1 -1
  28. package/dist/commands/worker.d.ts +2 -0
  29. package/dist/commands/worker.d.ts.map +1 -1
  30. package/dist/lib/command-line.d.ts +22 -2
  31. package/dist/lib/command-line.d.ts.map +1 -1
  32. package/dist/lib/deploy-release.d.ts +3 -1
  33. package/dist/lib/deploy-release.d.ts.map +1 -1
  34. package/dist/lib/desktop.d.ts +26 -0
  35. package/dist/lib/desktop.d.ts.map +1 -0
  36. package/dist/lib/dev-messages.d.ts +43 -0
  37. package/dist/lib/dev-messages.d.ts.map +1 -0
  38. package/dist/lib/dev-supervisor.d.ts +27 -0
  39. package/dist/lib/dev-supervisor.d.ts.map +1 -1
  40. package/dist/lib/open-url.d.ts +3 -0
  41. package/dist/lib/open-url.d.ts.map +1 -0
  42. package/dist/lib/role-lifecycle.d.ts.map +1 -1
  43. package/dist/lib/runtime.d.ts +2 -0
  44. package/dist/lib/runtime.d.ts.map +1 -1
  45. package/dist/lib/worker-concurrency.d.ts +11 -0
  46. package/dist/lib/worker-concurrency.d.ts.map +1 -1
  47. package/dist/lib/worker-registry.d.ts +2 -0
  48. package/dist/lib/worker-registry.d.ts.map +1 -1
  49. package/dist/ui/deploy-screens.d.ts +48 -0
  50. package/dist/ui/deploy-screens.d.ts.map +1 -0
  51. package/dist/ui/index.d.ts +28 -244
  52. package/dist/ui/index.d.ts.map +1 -1
  53. package/dist/ui/layout.d.ts +65 -0
  54. package/dist/ui/layout.d.ts.map +1 -0
  55. package/dist/ui/live/ansi.d.ts +8 -0
  56. package/dist/ui/live/ansi.d.ts.map +1 -0
  57. package/dist/ui/live/can-run-live.d.ts +6 -0
  58. package/dist/ui/live/can-run-live.d.ts.map +1 -0
  59. package/dist/ui/live/components.d.ts +17 -0
  60. package/dist/ui/live/components.d.ts.map +1 -0
  61. package/dist/ui/live/deploy.d.ts +22 -0
  62. package/dist/ui/live/deploy.d.ts.map +1 -0
  63. package/dist/ui/live/dev.d.ts +47 -0
  64. package/dist/ui/live/dev.d.ts.map +1 -0
  65. package/dist/ui/live/prompt.d.ts +30 -0
  66. package/dist/ui/live/prompt.d.ts.map +1 -0
  67. package/dist/ui/live/session.d.ts +27 -0
  68. package/dist/ui/live/session.d.ts.map +1 -0
  69. package/dist/ui/screens.d.ts +136 -0
  70. package/dist/ui/screens.d.ts.map +1 -0
  71. package/dist/ui/theme.d.ts +58 -0
  72. package/dist/ui/theme.d.ts.map +1 -0
  73. package/package.json +19 -18
  74. package/src/commands/{api.tsx → api.ts} +18 -27
  75. package/src/commands/{app.tsx → app.ts} +14 -18
  76. package/src/commands/build.ts +70 -0
  77. package/src/commands/{check.tsx → check.ts} +27 -18
  78. package/src/commands/db-migrate.ts +32 -0
  79. package/src/commands/{deploy.tsx → deploy.ts} +109 -102
  80. package/src/commands/desktop.ts +71 -0
  81. package/src/commands/{dev-runner.tsx → dev-runner.ts} +67 -33
  82. package/src/commands/{init.tsx → init.ts} +19 -8
  83. package/src/commands/lake-check.ts +36 -0
  84. package/src/commands/{lake-cleanup.tsx → lake-cleanup.ts} +17 -12
  85. package/src/commands/{login.tsx → login.ts} +36 -30
  86. package/src/commands/{logout.tsx → logout.ts} +5 -5
  87. package/src/commands/{orchestrator.tsx → orchestrator.ts} +15 -28
  88. package/src/commands/{profile.tsx → profile.ts} +38 -19
  89. package/src/commands/{rules.tsx → rules.ts} +15 -24
  90. package/src/commands/{scheduler.tsx → scheduler.ts} +14 -27
  91. package/src/commands/{service-account.tsx → service-account.ts} +37 -39
  92. package/src/commands/{status.tsx → status.ts} +8 -8
  93. package/src/commands/{token.tsx → token.ts} +19 -20
  94. package/src/commands/typegen.ts +18 -0
  95. package/src/commands/{worker-group.tsx → worker-group.ts} +40 -29
  96. package/src/commands/{worker.tsx → worker.ts} +30 -22
  97. package/src/index.tsx +22 -1
  98. package/src/lib/command-line.ts +108 -57
  99. package/src/lib/deploy-release.ts +17 -1
  100. package/src/lib/desktop.ts +52 -0
  101. package/src/lib/dev-messages.ts +44 -0
  102. package/src/lib/dev-supervisor.ts +132 -12
  103. package/src/lib/open-url.ts +15 -0
  104. package/src/lib/role-lifecycle.ts +2 -3
  105. package/src/lib/runtime.ts +4 -0
  106. package/src/lib/worker-concurrency.ts +31 -0
  107. package/src/lib/worker-registry.ts +4 -0
  108. package/src/ui/README.md +54 -0
  109. package/src/ui/deploy-screens.ts +360 -0
  110. package/src/ui/index.ts +158 -0
  111. package/src/ui/layout.ts +245 -0
  112. package/src/ui/live/ansi.ts +103 -0
  113. package/src/ui/live/can-run-live.ts +9 -0
  114. package/src/ui/live/components.tsx +81 -0
  115. package/src/ui/live/deploy.tsx +170 -0
  116. package/src/ui/live/dev.tsx +522 -0
  117. package/src/ui/live/prompt.tsx +205 -0
  118. package/src/ui/live/session.ts +103 -0
  119. package/src/ui/screens.ts +490 -0
  120. package/src/ui/theme.ts +122 -0
  121. package/dist/lib/role-view.d.ts +0 -21
  122. package/dist/lib/role-view.d.ts.map +0 -1
  123. package/src/commands/build.tsx +0 -65
  124. package/src/commands/db-migrate.tsx +0 -30
  125. package/src/commands/lake-check.tsx +0 -33
  126. package/src/commands/typegen.tsx +0 -18
  127. package/src/lib/role-view.ts +0 -49
  128. package/src/ui/index.tsx +0 -1398
  129. /package/src/commands/{dev.tsx → dev.ts} +0 -0
@@ -1,8 +1,11 @@
1
- import type { DeployAccessKey, DeployCheck, DeployRelease, DeployStatus } from "@sixb/core/deploy";
2
- import type React from "react";
3
- import { type CliHelp } from "../lib/command-line";
4
- export declare function renderStatic(view: React.ReactNode): Promise<void>;
5
- export declare function renderPersistent(view: React.ReactNode): import("ink").Instance;
1
+ import type { CliHelp } from "../lib/command-line";
2
+ export * from "./deploy-screens";
3
+ export * from "./screens";
4
+ /**
5
+ * Writes a finished screen. Screens are plain strings, so nothing here loads a renderer: the
6
+ * live screens (`sixb dev`, a deploy in progress, prompts) live in `./live` and load on demand.
7
+ */
8
+ export declare function renderStatic(view: string): Promise<void>;
6
9
  /**
7
10
  * Renders a caught failure the one way the CLI renders failures, so a remediation carried on
8
11
  * the error reaches the terminal without each caller remembering to pass it through.
@@ -11,247 +14,28 @@ export declare function renderCliError(error: unknown, options?: {
11
14
  readonly title?: string;
12
15
  readonly details?: readonly string[];
13
16
  }): Promise<void>;
17
+ /** The screen `renderCliError` prints, for a live view that ends with it. */
18
+ export declare function cliErrorView(error: unknown, options?: {
19
+ readonly title?: string;
20
+ readonly details?: readonly string[];
21
+ }): string;
14
22
  export declare function renderVersion(version: string): Promise<void>;
15
23
  /** Root or command help, after the usage error that led to it when there is one. */
16
24
  export declare function renderHelp(help: CliHelp, usageError?: string): Promise<void>;
17
- export interface RoleStartupPanel {
18
- started(view: {
19
- readonly title: string;
20
- readonly name: string;
21
- readonly serviceName: string;
22
- readonly items: KeyValueItem[];
23
- }): void;
24
- unmount(): void;
25
+ export interface Task {
26
+ /** Says what the work is doing now. */
27
+ step(label: string): void;
28
+ /** Clears the spinner. What was printed while it spun stays. */
29
+ stop(): void;
25
30
  }
26
- /** A long-running role's loading panel, replaced by its started view. */
27
- export declare function renderRoleStartup(loading: {
28
- readonly title: string;
29
- readonly subtitle: string;
30
- readonly status: string;
31
- }): RoleStartupPanel;
32
- export type KeyValueItem = {
33
- label: string;
34
- value: string;
35
- };
36
- export declare function KeyValueResultView({ title, subtitle, items, titleColor, message, }: {
37
- title: string;
38
- subtitle?: string;
39
- items: readonly KeyValueItem[];
40
- titleColor?: string;
41
- message?: string;
42
- }): React.JSX.Element;
43
- export declare function TableResultView({ title, subtitle, headers, rows, emptyMessage, }: {
44
- title: string;
45
- subtitle?: string;
46
- headers: readonly string[];
47
- rows: readonly (readonly string[])[];
48
- emptyMessage: string;
49
- }): React.JSX.Element;
50
- export declare function SecretResultView({ title, subtitle, items, secretLabel, secret, message, }: {
51
- title: string;
52
- subtitle?: string;
53
- items: readonly KeyValueItem[];
54
- secretLabel?: string;
55
- secret: string;
56
- message?: string;
57
- }): React.JSX.Element;
58
- export declare function LoadingView({ title, subtitle, status, }: {
59
- title: string;
60
- subtitle?: string;
61
- status: string;
62
- }): React.JSX.Element;
63
- export declare function HelpView({ errorMessage }: {
64
- errorMessage?: string;
65
- }): React.JSX.Element;
66
- export declare function CommandHelpView({ help, errorMessage }: {
67
- help: CliHelp;
68
- errorMessage?: string;
69
- }): React.JSX.Element;
70
- export declare function VersionView({ version }: {
71
- version: string;
72
- }): React.JSX.Element;
73
- export declare function ErrorView({ title, message, remediation, details, }: {
74
- title?: string;
75
- message: string;
76
- /** What to do next. Rendered apart from the diagnosis, not appended to it. */
77
- remediation?: string;
78
- details?: readonly string[];
79
- }): React.JSX.Element;
80
- export declare function DevView({ name, apiUrl, apiDocsUrl, wsUrl, appUrl, workers, warnings, }: {
81
- name: string;
82
- apiUrl: string;
83
- apiDocsUrl: string;
84
- wsUrl: string;
85
- /** `null` when the app could not start; a warning says why. */
86
- appUrl: string | null;
87
- workers?: readonly {
88
- readonly type: string;
89
- readonly concurrency: number;
90
- }[];
91
- warnings?: readonly string[];
92
- }): React.JSX.Element;
93
- export declare function WorkerView({ name, workerId, concurrency, storage, warnings, }: {
94
- name: string;
95
- workerId: string;
96
- concurrency: number;
97
- storage?: string | null;
98
- warnings?: readonly string[];
99
- }): React.JSX.Element;
100
- export declare function WorkerGroupView({ name, workers, storage, warnings, }: {
101
- name: string;
102
- workers: readonly {
103
- readonly type: string;
104
- readonly concurrency: number;
105
- }[];
106
- storage?: string | null;
107
- warnings?: readonly string[];
108
- }): React.JSX.Element;
109
- export declare function RoleView({ title, name, serviceName, items, storage, warnings, }: {
110
- title: string;
111
- name: string;
112
- serviceName: string;
113
- items: KeyValueItem[];
114
- storage?: string | null;
115
- warnings?: readonly string[];
116
- }): React.JSX.Element;
117
- export declare function CheckView({ projectId, storage, timeseries, broker, queues, projectValidation, markings, ontology, warnings, }: {
118
- projectId: string;
119
- storage: {
120
- ok: boolean;
121
- message?: string;
122
- };
123
- timeseries: {
124
- ok: boolean;
125
- message?: string;
126
- };
127
- broker: {
128
- ok: boolean;
129
- message?: string;
130
- };
131
- queues: {
132
- ok: boolean;
133
- message?: string;
134
- };
135
- projectValidation?: {
136
- ok: boolean;
137
- message?: string;
138
- };
139
- /**
140
- * The pipeline markings preflight: what SQL steps derive, checked against projections. A warning
141
- * reports projections whose applied version adds markings the code no longer declares.
142
- */
143
- markings?: {
144
- ok: boolean;
145
- warning?: boolean;
146
- message?: string;
147
- };
148
- ontology?: {
149
- enabled: boolean;
150
- source: string;
151
- errors: number;
152
- warnings: number;
153
- };
154
- warnings: readonly string[];
155
- }): React.JSX.Element;
156
- export declare function BuildView({ entry, outdir }: {
157
- entry: string;
158
- outdir: string;
159
- }): React.JSX.Element;
160
- export declare function TypegenView({ path, objectTypes, skipped, written, }: {
161
- path: string;
162
- objectTypes: number;
163
- skipped: boolean;
164
- written: boolean;
165
- }): React.JSX.Element;
166
- export declare function DbMigrateView({ projectId, status, applied, }: {
167
- projectId: string;
168
- status: "migrated" | "current" | "skipped";
169
- /** Migration step ids this run applied, named so the output can be checked. */
170
- applied?: readonly string[];
171
- }): React.JSX.Element;
172
- export declare function LakeCheckView({ projectId, status, warnings, }: {
173
- projectId: string;
174
- status: "ok";
175
- warnings?: readonly string[];
176
- }): React.JSX.Element;
177
- export declare function DeployReleaseView({ release, configPath, }: {
178
- release: DeployRelease;
179
- configPath: string;
180
- }): React.JSX.Element;
181
- export interface DeployProgressState {
182
- readonly name: string;
183
- readonly location: string;
184
- readonly commit: string;
185
- readonly ref: string;
186
- readonly dirty: boolean;
187
- readonly labels: readonly string[];
188
- /** How many steps have finished, in order. */
189
- readonly done: number;
190
- readonly current: number | null;
191
- /** The latest output lines, shown while a step runs and kept when one fails. */
192
- readonly output: readonly string[];
193
- readonly outcome: "running" | "done" | "failed";
194
- }
195
- export declare function DeployProgressView({ state }: {
196
- state: DeployProgressState;
197
- }): React.JSX.Element;
198
- export declare function DeployCompleteView({ release, commit, ref, }: {
199
- release: DeployRelease;
200
- commit: string;
201
- ref: string;
202
- }): React.JSX.Element;
203
- export declare function DeployStatusView({ name, location, status, }: {
204
- name: string;
205
- location: string;
206
- status: DeployStatus;
207
- }): React.JSX.Element;
208
- export declare function DeployChecksView({ name, location, checks, }: {
209
- name: string;
210
- location: string;
211
- checks: readonly DeployCheck[];
212
- }): React.JSX.Element;
213
- export declare function DeployCiView({ name, repo, environment, branch, credential, secrets, retired, workflow, token, }: {
214
- name: string;
215
- repo: string;
216
- environment: string;
217
- branch: string;
218
- credential: string;
219
- secrets: readonly string[];
220
- retired: readonly DeployAccessKey[];
221
- workflow: {
222
- readonly path: string;
223
- readonly state: "written" | "unchanged" | "kept";
224
- };
225
- token: {
226
- readonly name: string;
227
- readonly submodules: readonly {
228
- readonly path: string;
229
- readonly url: string;
230
- readonly repo: string | null;
231
- }[];
232
- } | null;
233
- }): React.JSX.Element;
234
- export declare function DeployAccessView({ title, keys, }: {
235
- title: string;
236
- keys: readonly DeployAccessKey[];
237
- }): React.JSX.Element;
238
- export interface LakeCleanupReport {
239
- readonly dryRun: boolean;
240
- readonly expireOlderThan: string;
241
- readonly deleteOlderThan: string;
242
- readonly snapshots: number;
243
- readonly keptSnapshots?: number;
244
- readonly oldFiles: number;
245
- readonly orphanedFiles: number;
246
- }
247
- export declare function LakeCleanupView({ projectId, report, }: {
248
- projectId: string;
249
- report: LakeCleanupReport;
250
- }): React.JSX.Element;
251
- export declare function InitView({ name, targetDir, files, commands, }: {
252
- name: string;
253
- targetDir: string;
254
- files: string[];
255
- commands: readonly string[];
256
- }): React.JSX.Element;
31
+ /**
32
+ * A one-line spinner for work that takes a moment: `⠋ sixb check · Loading runtime`. Only a
33
+ * terminal sees it; a pipe or a CI log gets nothing, and the result screen that follows says what
34
+ * happened. Lines the work prints meanwhile land above the spinner, not inside it.
35
+ */
36
+ export declare function startTask(command: string, label: string): Task;
37
+ /** Runs work behind a spinner, and clears it whether the work succeeds or throws. */
38
+ export declare function withTask<T>(command: string, label: string, work: (task: Task) => Promise<T>): Promise<T>;
39
+ /** The line a long-running role prints as it begins to shut down. */
40
+ export declare function printStopping(command: string): void;
257
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EAEX,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAgB,KA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CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GAC9E,MAAM,CAQR;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAElE;AAED,oFAAoF;AACpF,wBAAsB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMlF;AAID,MAAM,WAAW,IAAI;IACnB,uCAAuC;IACvC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,gEAAgE;IAChE,IAAI,IAAI,IAAI,CAAA;CACb;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAsE9D;AAED,qFAAqF;AACrF,wBAAsB,QAAQ,CAAC,CAAC,EAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,GAC/B,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED,qEAAqE;AACrE,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEnD"}
@@ -0,0 +1,65 @@
1
+ export type Block = string | null | undefined | false;
2
+ /** Joins blocks with a blank line between them, indented, with breathing room above and below. */
3
+ export declare function screen(...blocks: Block[]): string;
4
+ /** Joins blocks with no blank line between them. */
5
+ export declare function stack(...blocks: Block[]): string;
6
+ /**
7
+ * Columns the output can use, less the gutter. Piped output never wraps: a log line stays one
8
+ * line, so it still greps.
9
+ */
10
+ export declare function contentWidth(): number;
11
+ /** Past this, a wide terminal only spreads a screen out: the eye loses the end of the line. */
12
+ export declare const MAX_COLUMNS = 104;
13
+ export declare function visibleWidth(text: string): number;
14
+ export declare function pad(text: string, width: number): string;
15
+ /** Breaks plain text into lines no wider than `width`, at spaces where it can. */
16
+ export declare function wrap(text: string, width: number): string[];
17
+ /** Wraps plain text and styles each line, so color never spans a line break. */
18
+ export declare function paragraph(text: string, style?: (line: string) => string): string;
19
+ /** Names the command that is running, for screens that open with it. Set once, at startup. */
20
+ export declare function setCommandPath(path: readonly string[]): void;
21
+ /**
22
+ * The line that opens every screen: the mark, then what ran, then where, then how it stands.
23
+ * Without a command, the one that is running.
24
+ *
25
+ * ▰ sixb check northline
26
+ * ▰ sixb worker-group northline ● running
27
+ */
28
+ export declare function header(command?: string, context?: string, state?: string): string;
29
+ export type Status = "ok" | "warn" | "fail" | "live" | "idle";
30
+ /** A result's headline: a status mark, a sentence, a quieter aside, and where it landed. */
31
+ export declare function headline(status: Status, text: string, detail?: string, target?: string): string;
32
+ /** What to do about a problem, in prose: led by an arrow, never colored like a command. */
33
+ export declare function remedy(text: string): string;
34
+ export interface Row {
35
+ readonly label: string;
36
+ readonly value: string;
37
+ readonly status?: Status;
38
+ /** A dimmer line under the value, such as a path. */
39
+ readonly note?: string;
40
+ /** What to do about it, under the value, led by an arrow. */
41
+ readonly remedy?: string;
42
+ }
43
+ /**
44
+ * Labels in a column and values beside them. A value wraps under itself, never under the label.
45
+ *
46
+ * ✓ Storage SqliteStorage · schema current
47
+ * Project 11 object types
48
+ */
49
+ export declare function rows(items: readonly Row[]): string;
50
+ /** A quiet heading over a group of lines: the content carries the weight, not the label. */
51
+ export declare function section(title: string, body: string): string;
52
+ /** Columns sized to their widest cell, the header in quiet type, no rules. */
53
+ export declare function table(headers: readonly string[], cells: readonly (readonly string[])[]): string;
54
+ /** Warnings, each wrapped under its own mark. */
55
+ export declare function warnings(items: readonly string[]): string | null;
56
+ /** A line led by a one-cell mark, wrapped so the text keeps its column. */
57
+ export declare function marked(mark: string, text: string, style?: (line: string) => string): string;
58
+ /** Command lines to run, as the next thing to do. */
59
+ export declare function commands(lines: readonly string[]): string;
60
+ /** Verbatim output, such as a build log, set off by a rule. The last 40 lines are enough. */
61
+ export declare function quoted(lines: readonly string[]): string;
62
+ /** Key hints at the foot of a long-running screen: `ctrl+c stop`. */
63
+ export declare function hints(items: readonly (readonly [string, string])[]): string;
64
+ export declare function plural(count: number, one: string, many?: string): string;
65
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/ui/layout.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,CAAA;AAErD,kGAAkG;AAClG,wBAAgB,MAAM,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAKjD;AAED,oDAAoD;AACpD,wBAAgB,KAAK,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAEhD;AASD;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED,+FAA+F;AAC/F,eAAO,MAAM,WAAW,MAAM,CAAA;AAE9B,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,kFAAkF;AAClF,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAqB1D;AAED,gFAAgF;AAChF,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAuB,GAAG,MAAM,CAEhG;AAID,8FAA8F;AAC9F,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,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IAAI,EAAE,MAAM,KAAK,MAAuB,GAC/C,MAAM,CAGR;AAED,qDAAqD;AACrD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEzD;AAED,6FAA6F;AAC7F,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAUvD;AAED,qEAAqE;AACrE,wBAAgB,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,CAI3E;AAMD,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,SAAY,GAAG,MAAM,CAE3E"}
@@ -0,0 +1,8 @@
1
+ import { StyledText } from "@opentui/core";
2
+ /**
3
+ * Turns text styled with SGR escapes (what the printed screens and a child process write) into
4
+ * OpenTUI styled text, so it keeps its colors in the scrollback above a live footer. Every other
5
+ * escape is dropped: OpenTUI would show it as text.
6
+ */
7
+ export declare function ansiToStyledText(text: string, defaultFg: string): StyledText;
8
+ //# sourceMappingURL=ansi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ansi.d.ts","sourceRoot":"","sources":["../../../src/ui/live/ansi.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,UAAU,EAAkB,MAAM,eAAe,CAAA;AAwCtF;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CA2B5E"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A live screen needs both ends of a terminal; a pipe, a CI log, or a dumb terminal gets lines.
3
+ * Kept apart from `./session` so asking does not load the renderer.
4
+ */
5
+ export declare function canRunLive(): boolean;
6
+ //# sourceMappingURL=can-run-live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"can-run-live.d.ts","sourceRoot":"","sources":["../../../src/ui/live/can-run-live.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAIpC"}
@@ -0,0 +1,17 @@
1
+ import type { LiveColors } from "./session";
2
+ export declare const BOLD: number;
3
+ export declare function useSpinner(active?: boolean): string;
4
+ /** Re-renders every `ms`, for clocks such as an uptime. */
5
+ export declare function useTick(ms: number): number;
6
+ /** The mosaic as progress: tiles fill palest blue first. */
7
+ export declare function Tiles({ colors, filled, total, }: {
8
+ readonly colors: LiveColors;
9
+ readonly filled: number;
10
+ readonly total: number;
11
+ }): import("react").ReactNode;
12
+ /** Key hints: `o open app · r restart · q quit`. */
13
+ export declare function Hints({ colors, items, }: {
14
+ readonly colors: LiveColors;
15
+ readonly items: readonly (readonly [string, string])[];
16
+ }): import("react").ReactNode;
17
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/ui/live/components.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,eAAO,MAAM,IAAI,QAAuC,CAAA;AAExD,wBAAgB,UAAU,CAAC,MAAM,UAAO,GAAG,MAAM,CAQhD;AAED,2DAA2D;AAC3D,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAO1C;AAED,4DAA4D;AAC5D,wBAAgB,KAAK,CAAC,EACpB,MAAM,EACN,MAAM,EACN,KAAK,GACN,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,6BAoBA;AAED,wDAAwD;AACxD,wBAAgB,KAAK,CAAC,EACpB,MAAM,EACN,KAAK,GACN,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAA;CACvD,6BAcA"}
@@ -0,0 +1,22 @@
1
+ export interface DeployProgressHeader {
2
+ readonly name: string;
3
+ readonly location: string;
4
+ readonly commit: string;
5
+ readonly ref: string;
6
+ readonly dirty: boolean;
7
+ }
8
+ export interface LiveDeployProgress {
9
+ steps(labels: readonly string[]): void;
10
+ running(index: number): void;
11
+ done(index: number, seconds: string): void;
12
+ output(line: string): void;
13
+ /** Marks the step that failed, then leaves `report` (the error screen) in the scrollback. */
14
+ failed(index: number | null, seconds: string | null, report: string): Promise<void>;
15
+ finished(report: string): Promise<void>;
16
+ }
17
+ /**
18
+ * A deploy in a terminal. Finished steps land in the scrollback as they finish; the footer holds
19
+ * the step running now, the mosaic filling toward done, and that step's latest output.
20
+ */
21
+ export declare function startLiveDeploy(release: DeployProgressHeader): Promise<LiveDeployProgress>;
22
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/ui/live/deploy.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAYD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;IACtC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,6FAA6F;IAC7F,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACnF,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxC;AAID;;;GAGG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAoEhG"}
@@ -0,0 +1,47 @@
1
+ import { type DevReadyView, type DevStartupFailure } from "../../lib/dev-messages";
2
+ import type { DevControls, DevReporter } from "../../lib/dev-supervisor";
3
+ import { type LiveColors } from "./session";
4
+ type Phase =
5
+ /** `restart` when a dev process came before this one. */
6
+ {
7
+ readonly kind: "starting";
8
+ readonly step: number;
9
+ readonly restart: boolean;
10
+ } | {
11
+ readonly kind: "ready";
12
+ } | {
13
+ readonly kind: "failed";
14
+ readonly error: DevStartupFailure;
15
+ } | {
16
+ readonly kind: "exited";
17
+ readonly code: number | null;
18
+ } | {
19
+ readonly kind: "stopping";
20
+ };
21
+ export interface DevState {
22
+ readonly phase: Phase;
23
+ readonly view: DevReadyView | null;
24
+ /** Restarts since `sixb dev` began, by a source change or by hand. */
25
+ readonly restarts: number;
26
+ readonly readySince: number | null;
27
+ }
28
+ /**
29
+ * `sixb dev` in a terminal: a footer that outlives every restart, showing what the dev process
30
+ * serves and how it is doing, with the dev process's output scrolling above it.
31
+ */
32
+ export declare function startDevFooter(options: {
33
+ readonly root: string;
34
+ readonly controls: DevControls;
35
+ }): Promise<DevReporter>;
36
+ /** The footer itself, drawn from the state the reporter keeps. */
37
+ export declare function DevFooter({ store, colors, projectName, controls, }: {
38
+ readonly store: {
39
+ subscribe(listener: () => void): () => void;
40
+ get(): DevState;
41
+ };
42
+ readonly colors: LiveColors;
43
+ readonly projectName: string;
44
+ readonly controls: DevControls;
45
+ }): import("react").ReactNode;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C/B,GAAG,OAAO,CAAC,WAAW,CAAC,CAyHvB;AAaD,kEAAkE;AAClE,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,MAAM,EACN,WAAW,EACX,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;QAAC,GAAG,IAAI,QAAQ,CAAA;KAAE,CAAA;IAChF,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAA;CAC/B,6BAoDA"}
@@ -0,0 +1,30 @@
1
+ /** Thrown when the person answering a prompt backs out with esc or ctrl+c. */
2
+ export declare class PromptCancelledError extends Error {
3
+ constructor();
4
+ }
5
+ /**
6
+ * Asks for one line of text, in a footer under the command. The answer stays in the scrollback
7
+ * the way it was asked: `✓ Project directory acme-ops`.
8
+ */
9
+ export declare function promptText(options: {
10
+ readonly command: string;
11
+ readonly label: string;
12
+ /** What Enter accepts when nothing was typed. */
13
+ readonly defaultValue?: string;
14
+ readonly hint?: string;
15
+ /** A message for an answer that will not do; `null` when it will. */
16
+ readonly validate?: (value: string) => string | null;
17
+ }): Promise<string>;
18
+ export interface Choice<T> {
19
+ readonly label: string;
20
+ readonly value: T;
21
+ readonly detail?: string;
22
+ }
23
+ /** Asks for one of a few choices, picked with the arrow keys. */
24
+ export declare function promptSelect<T>(options: {
25
+ readonly command: string;
26
+ readonly label: string;
27
+ readonly choices: readonly Choice<T>[];
28
+ readonly initial?: number;
29
+ }): Promise<T>;
30
+ //# sourceMappingURL=prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../../src/ui/live/prompt.tsx"],"names":[],"mappings":"AAQA,8EAA8E;AAC9E,qBAAa,oBAAqB,SAAQ,KAAK;;CAK9C;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,iDAAiD;IACjD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;CACrD,GAAG,OAAO,CAAC,MAAM,CAAC,CAMlB;AAED,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;IACjB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,iEAAiE;AACjE,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,OAAO,CAAC,CAAC,CAAC,CAOb"}
@@ -0,0 +1,27 @@
1
+ import { type CliRenderer } from "@opentui/core";
2
+ import type { ReactNode } from "react";
3
+ import { palette } from "../theme";
4
+ /**
5
+ * The live screens draw a footer pinned to the bottom of the terminal while output scrolls above
6
+ * it (OpenTUI's split-footer mode). Nothing leaves the main screen: when the footer goes, what
7
+ * scrolled past stays in the scrollback like any other command's output.
8
+ */
9
+ /** Sixb's palette, plus the terminal's foreground: OpenTUI needs a color for plain text. */
10
+ export type LiveColors = typeof palette & {
11
+ readonly text: string;
12
+ };
13
+ export interface Footer {
14
+ readonly colors: LiveColors;
15
+ readonly renderer: CliRenderer;
16
+ render(node: ReactNode): void;
17
+ /** Writes text, which may carry SGR colors, into the scrollback above the footer. */
18
+ print(text: string): void;
19
+ /** How many rows the footer takes; it never takes more than the terminal has. */
20
+ resize(rows: number): void;
21
+ /** Removes the footer and gives the terminal back. */
22
+ stop(): Promise<void>;
23
+ }
24
+ export declare function startFooter(options: {
25
+ readonly rows: number;
26
+ }): Promise<Footer>;
27
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/ui/live/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAqC,MAAM,eAAe,CAAA;AAEnF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGlC;;;;GAIG;AAEH,4FAA4F;AAC5F,MAAM,MAAM,UAAU,GAAG,OAAO,OAAO,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEnE,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAA;IAC9B,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAA;IAC7B,qFAAqF;IACrF,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,iFAAiF;IACjF,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,sDAAsD;IACtD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACtB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA0ErF"}