@capgo/cli 8.86.1 → 8.87.1
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 +1 -1
- package/dist/index.js +980 -975
- package/dist/notify-app-ready-worker.js +37 -37
- package/dist/onboarding-worker.js +143 -143
- package/dist/package.json +2 -2
- package/dist/src/app/builder-checklist.d.ts +26 -0
- package/dist/src/app/todo.d.ts +16 -0
- package/dist/src/build/onboarding/command.d.ts +2 -0
- package/dist/src/build/onboarding/ui/app-selection-gate.d.ts +1 -1
- package/dist/src/build/onboarding/ui/shell.d.ts +1 -0
- package/dist/src/init/builder-setup.d.ts +60 -0
- package/dist/src/init/command.d.ts +1 -1
- package/dist/src/sdk.js +191 -191
- package/dist/src/shared/cli-user-error.d.ts +1 -1
- package/dist/updater-installed-worker.js +37 -37
- package/package.json +2 -2
- package/skills/native-builds/SKILL.md +1 -0
- package/skills/usage/SKILL.md +2 -2
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.87.1",
|
|
5
5
|
"description": "A CLI to upload to capgo servers",
|
|
6
6
|
"author": "Martin martin@capgo.app",
|
|
7
7
|
"license": "Apache 2.0",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"test:app-add-exists": "bun test/test-app-add-exists.mjs",
|
|
121
121
|
"test:app-add-getting-started": "bun test/test-app-add-getting-started.mjs",
|
|
122
122
|
"test:app-list-output-text": "bun test/test-app-list-output-text.mjs",
|
|
123
|
-
"test:app-todo": "bun test/test-app-todo.mjs",
|
|
123
|
+
"test:app-todo": "bun test/test-app-todo.mjs && bun test/test-builder-only-checklist.mjs && bun test/test-builder-only-setup.mjs",
|
|
124
124
|
"test:doctor-analytics": "bun test/test-doctor-analytics.mjs",
|
|
125
125
|
"test:posthog-exception": "bun test/test-posthog-exception.mjs",
|
|
126
126
|
"test:cli-recovery": "bun test/test-cli-recovery.mjs",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const BUILDER_STEP_IDS: {
|
|
2
|
+
readonly ios: readonly ["start_setup", "choose_destination", "connect_app_store", "prepare_certificate", "prepare_profile", "successful_cloud_build"];
|
|
3
|
+
readonly android: readonly ["start_setup", "prepare_keystore", "connect_google_play", "successful_cloud_build"];
|
|
4
|
+
};
|
|
5
|
+
export type BuilderChecklistPlatform = keyof typeof BUILDER_STEP_IDS;
|
|
6
|
+
export type BuilderChecklistStatus = 'pending' | 'done' | 'skipped' | 'warning';
|
|
7
|
+
export declare function onboardingRecord(value: unknown): Record<string, unknown>;
|
|
8
|
+
export declare function getBuilderOnlySetup(value: unknown): Record<string, unknown> | null;
|
|
9
|
+
export declare function getBuilderOnlyChecklist(value: unknown): {
|
|
10
|
+
version: number;
|
|
11
|
+
path: "builder";
|
|
12
|
+
selectedPlatform: "android" | "ios" | undefined;
|
|
13
|
+
steps: {
|
|
14
|
+
id: string;
|
|
15
|
+
stepId: "start_setup" | "choose_destination" | "connect_app_store" | "prepare_certificate" | "prepare_profile" | "successful_cloud_build" | "prepare_keystore" | "connect_google_play";
|
|
16
|
+
platform: "android" | "ios";
|
|
17
|
+
title: string;
|
|
18
|
+
status: BuilderChecklistStatus;
|
|
19
|
+
at: string | undefined;
|
|
20
|
+
annotation: string | undefined;
|
|
21
|
+
annotationType: string | undefined;
|
|
22
|
+
}[];
|
|
23
|
+
} | null;
|
|
24
|
+
export declare function formatBuilderOnlyChecklist(appId: string, checklist: NonNullable<ReturnType<typeof getBuilderOnlyChecklist>>, options?: {
|
|
25
|
+
color?: boolean;
|
|
26
|
+
}): string;
|
package/dist/src/app/todo.d.ts
CHANGED
|
@@ -7,12 +7,28 @@ export interface AppTodoProgress {
|
|
|
7
7
|
export declare const TODO_BACKGROUND_WAIT_MS = 10000;
|
|
8
8
|
export declare function waitForTodoBackgroundChecks(checks: readonly Promise<void>[], onCountdown?: (remainingSeconds: number) => void, timeoutMs?: number): Promise<boolean>;
|
|
9
9
|
export declare function getAppTodoSteps(progress: AppTodoProgress): {
|
|
10
|
+
version: number;
|
|
11
|
+
path: "builder";
|
|
12
|
+
selectedPlatform: "android" | "ios" | undefined;
|
|
13
|
+
steps: {
|
|
14
|
+
id: string;
|
|
15
|
+
stepId: "start_setup" | "choose_destination" | "connect_app_store" | "prepare_certificate" | "prepare_profile" | "successful_cloud_build" | "prepare_keystore" | "connect_google_play";
|
|
16
|
+
platform: "android" | "ios";
|
|
17
|
+
title: string;
|
|
18
|
+
status: import("./builder-checklist").BuilderChecklistStatus;
|
|
19
|
+
at: string | undefined;
|
|
20
|
+
annotation: string | undefined;
|
|
21
|
+
annotationType: string | undefined;
|
|
22
|
+
}[];
|
|
23
|
+
} | {
|
|
10
24
|
version: number;
|
|
11
25
|
steps: {
|
|
12
26
|
id: "login_cli_mcp" | "add_channel" | "add_updater" | "add_code" | "add_encryption" | "select_platform" | "build_project" | "run_device" | "add_code_change" | "upload_bundle" | "test_update" | "completion" | "add_app";
|
|
13
27
|
title: string;
|
|
14
28
|
status: "done" | "skipped" | "pending";
|
|
15
29
|
}[];
|
|
30
|
+
path: "ota";
|
|
31
|
+
selectedPlatform: undefined;
|
|
16
32
|
};
|
|
17
33
|
export declare function formatAppTodoList(appId: string, progress: AppTodoProgress, options?: {
|
|
18
34
|
color?: boolean;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { BuilderProjectPrompts } from './project-selection.js';
|
|
2
2
|
export interface OnboardingBuilderOptions {
|
|
3
3
|
analytics?: boolean;
|
|
4
|
+
/** Exact app selected by a caller handing off an assigned Builder checklist. */
|
|
5
|
+
appId?: string;
|
|
4
6
|
apikey?: string;
|
|
5
7
|
platform?: string;
|
|
6
8
|
supaHost?: string;
|
|
@@ -14,7 +14,7 @@ export interface BuilderAppSelectionGateProps {
|
|
|
14
14
|
cols: number;
|
|
15
15
|
rows: number;
|
|
16
16
|
footer?: ReactNode;
|
|
17
|
-
onSelected: (appId: string) => void
|
|
17
|
+
onSelected: (appId: string) => void | Promise<void>;
|
|
18
18
|
onSwitchKey: () => void;
|
|
19
19
|
onCancel: () => void;
|
|
20
20
|
onEvent?: (event: AppSelectionEvent) => void;
|
|
@@ -39,6 +39,7 @@ export interface OnboardingShellProps {
|
|
|
39
39
|
journeyId: string;
|
|
40
40
|
/** Pre-resolved platform (--platform flag or the single existing native dir); skips the picker. */
|
|
41
41
|
initialPlatform?: Platform;
|
|
42
|
+
resolveChecklistPlatform?: (apikey: string, appId: string) => Promise<string | undefined>;
|
|
42
43
|
/**
|
|
43
44
|
* Set when a newer @capgo/cli is published. Drives the self-update prompt
|
|
44
45
|
* shown as the FIRST wizard screen (before platform selection / auto-load).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { OnboardingBuilderOptions } from '../build/onboarding/command';
|
|
2
|
+
import { invokeCapgoCliApi } from '../utils';
|
|
3
|
+
type SetupOptions = {
|
|
4
|
+
apikey: string;
|
|
5
|
+
} & Pick<OnboardingBuilderOptions, 'supaHost' | 'supaAnon' | 'analytics'>;
|
|
6
|
+
export declare function readBuilderOnlyAssignment(appId: string, options: SetupOptions, request?: typeof invokeCapgoCliApi): Promise<{
|
|
7
|
+
version: number;
|
|
8
|
+
path: "builder";
|
|
9
|
+
selectedPlatform: "android" | "ios" | undefined;
|
|
10
|
+
steps: {
|
|
11
|
+
id: string;
|
|
12
|
+
stepId: "start_setup" | "choose_destination" | "connect_app_store" | "prepare_certificate" | "prepare_profile" | "successful_cloud_build" | "prepare_keystore" | "connect_google_play";
|
|
13
|
+
platform: "android" | "ios";
|
|
14
|
+
title: string;
|
|
15
|
+
status: import("../app/builder-checklist").BuilderChecklistStatus;
|
|
16
|
+
at: string | undefined;
|
|
17
|
+
annotation: string | undefined;
|
|
18
|
+
annotationType: string | undefined;
|
|
19
|
+
}[];
|
|
20
|
+
} | null>;
|
|
21
|
+
export declare function readBuilderOnlyInitAssignment(appId: string, options: SetupOptions, request?: typeof invokeCapgoCliApi, warn?: (message: string) => void): Promise<{
|
|
22
|
+
version: number;
|
|
23
|
+
path: "builder";
|
|
24
|
+
selectedPlatform: "android" | "ios" | undefined;
|
|
25
|
+
steps: {
|
|
26
|
+
id: string;
|
|
27
|
+
stepId: "start_setup" | "choose_destination" | "connect_app_store" | "prepare_certificate" | "prepare_profile" | "successful_cloud_build" | "prepare_keystore" | "connect_google_play";
|
|
28
|
+
platform: "android" | "ios";
|
|
29
|
+
title: string;
|
|
30
|
+
status: import("../app/builder-checklist").BuilderChecklistStatus;
|
|
31
|
+
at: string | undefined;
|
|
32
|
+
annotation: string | undefined;
|
|
33
|
+
annotationType: string | undefined;
|
|
34
|
+
}[];
|
|
35
|
+
} | null>;
|
|
36
|
+
export declare function tryBuilderOnlyInit(appId: string | undefined, options: SetupOptions, dependencies?: {
|
|
37
|
+
request?: typeof invokeCapgoCliApi;
|
|
38
|
+
warn?: (message: string) => void;
|
|
39
|
+
beforeLaunch?: () => Promise<void>;
|
|
40
|
+
launch?: (options: OnboardingBuilderOptions) => Promise<void>;
|
|
41
|
+
}): Promise<boolean>;
|
|
42
|
+
export declare function resolveBuilderChecklistPlatform(appId: string, options: SetupOptions, explicitPlatform: string | undefined, inferredPlatform: OnboardingBuilderOptions['platform'], request?: typeof invokeCapgoCliApi): Promise<{
|
|
43
|
+
platform: string | undefined;
|
|
44
|
+
checklist: {
|
|
45
|
+
version: number;
|
|
46
|
+
path: "builder";
|
|
47
|
+
selectedPlatform: "android" | "ios" | undefined;
|
|
48
|
+
steps: {
|
|
49
|
+
id: string;
|
|
50
|
+
stepId: "start_setup" | "choose_destination" | "connect_app_store" | "prepare_certificate" | "prepare_profile" | "successful_cloud_build" | "prepare_keystore" | "connect_google_play";
|
|
51
|
+
platform: "android" | "ios";
|
|
52
|
+
title: string;
|
|
53
|
+
status: import("../app/builder-checklist").BuilderChecklistStatus;
|
|
54
|
+
at: string | undefined;
|
|
55
|
+
annotation: string | undefined;
|
|
56
|
+
annotationType: string | undefined;
|
|
57
|
+
}[];
|
|
58
|
+
} | null;
|
|
59
|
+
}>;
|
|
60
|
+
export {};
|
|
@@ -111,5 +111,5 @@ export declare function getPhysicalIosRunTargets(targets: CapacitorRunTarget[]):
|
|
|
111
111
|
export declare function getSimulatorIosRunTargets(targets: CapacitorRunTarget[]): CapacitorRunTarget[];
|
|
112
112
|
export declare function resolveRunDeviceCommand(cancelHandler: RunDeviceCancelHandler, pm: PackageManagerInfo, platformName: PlatformChoice, projectDir?: string): Promise<RunDeviceStepOutcome>;
|
|
113
113
|
export declare function normalizeRunDevicePlatform(platformName: string): PlatformChoice;
|
|
114
|
-
export declare function initApp(apikeyCommand: string, appId: string, options: SuperOptions): Promise<
|
|
114
|
+
export declare function initApp(apikeyCommand: string, appId: string, options: SuperOptions): Promise<undefined>;
|
|
115
115
|
export {};
|