@capgo/cli 7.88.1 → 7.88.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "7.88.1",
4
+ "version": "7.88.3",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -1 +1,8 @@
1
+ export interface VersionCheckResult {
2
+ currentVersion: string;
3
+ latestVersion: string;
4
+ isOutdated: boolean;
5
+ majorVersion: string;
6
+ }
7
+ export declare function checkVersionStatus(): Promise<VersionCheckResult>;
1
8
  export declare function checkAlerts(): Promise<void>;
@@ -1 +1 @@
1
- export declare function onboardingCommand(): Promise<void>;
1
+ export declare function onboardingBuilderCommand(): Promise<void>;
@@ -8,3 +8,4 @@ export declare function canUseFilePicker(): boolean;
8
8
  * Non-blocking — uses async execFile so Ink spinners keep animating.
9
9
  */
10
10
  export declare function openFilePicker(): Promise<string | null>;
11
+ export declare function openPackageJsonPicker(): Promise<string | null>;
@@ -1,4 +1,4 @@
1
- import type { Options } from './api/app';
1
+ import type { Options } from '../api/app';
2
2
  interface SuperOptions extends Options {
3
3
  local: boolean;
4
4
  }
@@ -0,0 +1 @@
1
+ export { initApp } from './command';
@@ -0,0 +1,41 @@
1
+ export declare const CANCEL: symbol;
2
+ type SpinnerTone = 'success' | 'neutral' | 'error';
3
+ type PromptResult<T> = Promise<T | symbol>;
4
+ interface ConfirmOptions {
5
+ message: string;
6
+ initialValue?: boolean;
7
+ }
8
+ interface TextOptions {
9
+ message: string;
10
+ placeholder?: string;
11
+ validate?: (value: string | undefined) => string | undefined;
12
+ }
13
+ interface SelectOption<T extends string = string> {
14
+ value: T;
15
+ label: string;
16
+ hint?: string;
17
+ }
18
+ interface SelectOptions<T extends string = string> {
19
+ message: string;
20
+ options: SelectOption<T>[];
21
+ }
22
+ interface SpinnerController {
23
+ start: (message: string) => void;
24
+ stop: (message?: string, tone?: SpinnerTone) => void;
25
+ message: (message: string) => void;
26
+ }
27
+ export declare function intro(_message: string): void;
28
+ export declare function outro(message: string): void;
29
+ export declare function cancel(message: string): void;
30
+ export declare function isCancel(value: unknown): value is symbol;
31
+ export declare const log: {
32
+ info(message: string): void;
33
+ warn(message: string): void;
34
+ error(message: string): void;
35
+ success(message: string): void;
36
+ };
37
+ export declare function confirm(options: ConfirmOptions): PromptResult<boolean>;
38
+ export declare function text(options: TextOptions): PromptResult<string>;
39
+ export declare function select<T extends string = string>(options: SelectOptions<T>): PromptResult<T>;
40
+ export declare function spinner(): SpinnerController;
41
+ export {};
@@ -0,0 +1,73 @@
1
+ export declare const INIT_CANCEL: unique symbol;
2
+ export type InitLogTone = 'cyan' | 'yellow' | 'green' | 'red';
3
+ export type InitScreenTone = 'cyan' | 'blue' | 'green' | 'yellow';
4
+ export interface InitScreen {
5
+ title?: string;
6
+ introLines?: string[];
7
+ phaseLabel?: string;
8
+ progress?: number;
9
+ stepLabel?: string;
10
+ stepSummary?: string;
11
+ roadmapLine?: string;
12
+ statusLine?: string;
13
+ resumeLine?: string;
14
+ completionLines?: string[];
15
+ tone?: InitScreenTone;
16
+ }
17
+ export interface ConfirmPrompt {
18
+ kind: 'confirm';
19
+ message: string;
20
+ initialValue?: boolean;
21
+ resolve: (value: boolean | symbol) => void;
22
+ }
23
+ export interface TextPrompt {
24
+ kind: 'text';
25
+ message: string;
26
+ placeholder?: string;
27
+ validate?: (value: string | undefined) => string | undefined;
28
+ error?: string;
29
+ resolve: (value: string | symbol) => void;
30
+ }
31
+ export interface SelectPromptOption {
32
+ label: string;
33
+ hint?: string;
34
+ value: string;
35
+ }
36
+ export interface SelectPrompt {
37
+ kind: 'select';
38
+ message: string;
39
+ options: SelectPromptOption[];
40
+ resolve: (value: string | symbol) => void;
41
+ }
42
+ export type PromptRequest = ConfirmPrompt | TextPrompt | SelectPrompt;
43
+ export interface InitLogEntry {
44
+ message: string;
45
+ tone: InitLogTone;
46
+ }
47
+ export interface InitVersionWarning {
48
+ currentVersion: string;
49
+ latestVersion: string;
50
+ majorVersion: string;
51
+ }
52
+ export interface InitRuntimeState {
53
+ screen?: InitScreen;
54
+ logs: InitLogEntry[];
55
+ spinner?: string;
56
+ prompt?: PromptRequest;
57
+ versionWarning?: InitVersionWarning;
58
+ }
59
+ export declare function subscribe(listener: () => void): () => boolean;
60
+ export declare function getInitSnapshot(): InitRuntimeState;
61
+ export declare function ensureInitInkSession(): void;
62
+ export declare function stopInitInkSession(finalMessage?: {
63
+ text: string;
64
+ tone: 'green' | 'yellow';
65
+ }): void;
66
+ export declare function setInitScreen(screen: InitScreen): void;
67
+ export declare function pushInitLog(message: string, tone: InitLogTone): void;
68
+ export declare function clearInitLogs(): void;
69
+ export declare function setInitSpinner(message?: string): void;
70
+ export declare function requestInitConfirm(message: string, initialValue?: boolean): Promise<boolean | symbol>;
71
+ export declare function requestInitText(message: string, placeholder?: string, validate?: (value: string | undefined) => string | undefined): Promise<string | symbol>;
72
+ export declare function requestInitSelect(message: string, options: SelectPromptOption[]): Promise<string | symbol>;
73
+ export declare function setInitVersionWarning(currentVersion: string, latestVersion: string, majorVersion: string): void;
@@ -0,0 +1,8 @@
1
+ import type { InitRuntimeState } from '../runtime';
2
+ interface InitInkAppProps {
3
+ getSnapshot: () => InitRuntimeState;
4
+ subscribe: (listener: () => void) => () => void;
5
+ updatePromptError: (error?: string) => void;
6
+ }
7
+ export default function InitInkApp({ getSnapshot, subscribe, updatePromptError }: Readonly<InitInkAppProps>): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,28 @@
1
+ import type { ConfirmPrompt, InitScreen, PromptRequest, SelectPrompt, TextPrompt } from '../runtime';
2
+ export declare function InitHeader(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ScreenIntro({ screen }: Readonly<{
4
+ screen: InitScreen;
5
+ }>): import("react/jsx-runtime").JSX.Element;
6
+ export declare function ProgressSection({ screen }: Readonly<{
7
+ screen: InitScreen;
8
+ }>): import("react/jsx-runtime").JSX.Element | null;
9
+ export declare function CurrentStepSection({ screen }: Readonly<{
10
+ screen: InitScreen;
11
+ }>): import("react/jsx-runtime").JSX.Element | null;
12
+ export declare function ConfirmPromptView({ prompt }: Readonly<{
13
+ prompt: ConfirmPrompt;
14
+ }>): import("react/jsx-runtime").JSX.Element;
15
+ export declare function TextPromptView({ prompt, onError }: Readonly<{
16
+ prompt: TextPrompt;
17
+ onError: (error?: string) => void;
18
+ }>): import("react/jsx-runtime").JSX.Element;
19
+ export declare function SelectPromptView({ prompt }: Readonly<{
20
+ prompt: SelectPrompt;
21
+ }>): import("react/jsx-runtime").JSX.Element;
22
+ export declare function PromptArea({ prompt, onTextError }: Readonly<{
23
+ prompt?: PromptRequest;
24
+ onTextError: (error?: string) => void;
25
+ }>): import("react/jsx-runtime").JSX.Element | null;
26
+ export declare function SpinnerArea({ text }: Readonly<{
27
+ text?: string;
28
+ }>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ export interface InitOnboardingStepDefinition {
2
+ title: string;
3
+ summary: string;
4
+ phase: string;
5
+ }
6
+ export declare const initOnboardingSteps: InitOnboardingStepDefinition[];
7
+ export declare function renderInitOnboardingWelcome(totalSteps: number): void;
8
+ export declare function renderInitOnboardingFrame(currentStepNumber: number, totalSteps: number, options?: {
9
+ resumed?: boolean;
10
+ }): void;
11
+ export declare function renderInitOnboardingComplete(appId: string, nextUploadCommand: string, debugCommand: string): void;
12
+ export declare function formatInitResumeMessage(stepDone: number, totalSteps: number): string;