@capgo/cli 8.0.6 → 8.0.8
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/index.js +549 -508
- package/dist/package.json +9 -3
- package/dist/src/build/onboarding/android/types.d.ts +1 -1
- package/dist/src/build/onboarding/types.d.ts +1 -1
- package/dist/src/build/onboarding/ui/components.d.ts +1 -0
- package/dist/src/build/onboarding/ui/steps/android-shared.d.ts +8 -2
- package/dist/src/build/onboarding/ui/steps/ios-shared.d.ts +4 -1
- package/dist/src/onboarding-support.d.ts +11 -1
- package/dist/src/sdk.js +304 -285
- package/dist/src/support/clipboard.d.ts +5 -0
- package/dist/src/support/contact-support.d.ts +23 -0
- package/dist/src/support/help-menu.d.ts +7 -0
- package/dist/src/support/internal-log.d.ts +4 -0
- package/dist/src/support/mailto.d.ts +7 -0
- package/dist/src/support/redact.d.ts +1 -0
- package/dist/src/support/support-upload.d.ts +12 -0
- package/package.json +9 -3
- package/skills/native-builds/SKILL.md +1 -0
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.8",
|
|
5
5
|
"description": "A CLI to upload to capgo servers",
|
|
6
6
|
"author": "Martin martin@capgo.app",
|
|
7
7
|
"license": "Apache 2.0",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"test:app-verification": "bun test/test-app-verification.mjs",
|
|
112
112
|
"test:pbxproj-parser": "bun test/test-pbxproj-parser.mjs",
|
|
113
113
|
"test:manifest-path-encoding": "bun test/test-manifest-path-encoding.mjs",
|
|
114
|
-
"test": "bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:mcp-analytics && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:apple-api-import-helpers && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream",
|
|
114
|
+
"test": "bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:credentials && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:ci-prompts && bun run test:ci-secrets && bun run test:android-onboarding-progress && bun run test:onboarding-telemetry && bun run test:v2-event-migration && bun run test:analytics && bun run test:analytics-error-category && bun run test:analytics-org-resolver && bun run test:supabase-perf && bun run test:preview-qr && bun run test:mcp-analytics && bun run test:app-created-source && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:build-platform-selection && bun run test:onboarding-recovery && bun run test:onboarding-progress && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:apple-api-import-helpers && bun run test:bundle-id-detector && bun run test:apple-api-app-list && bun run test:app-verification && bun run test:pbxproj-parser && bun run test:ai-log-capture && bun run test:ai-analyze-flow && bun run test:ai-sse-parser && bun run test:ai-render-markdown && bun run test:ai-stream-markdown && bun run test:ai-onboarding-mode && bun run test:ai-fit && bun run test:platform-layout && bun run test:frame-fit && bun run test:onboarding-min-size && bun run test:min-size-gate && bun run test:shell-size-gate && bun run test:build-log-sanitize && bun run test:build-output-viewport && bun run test:diff-viewer-viewport && bun run test:build-complete-exit && bun run test:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-bundle-files",
|
|
115
115
|
"test:build-platform-selection": "bun test/test-build-platform-selection.mjs",
|
|
116
116
|
"test:ai-log-capture": "bun test/test-ai-log-capture.mjs",
|
|
117
117
|
"test:ai-analyze-flow": "bun test/test-ai-analyze-flow.mjs",
|
|
@@ -129,7 +129,13 @@
|
|
|
129
129
|
"test:build-output-viewport": "bun test/test-build-output-viewport.mjs",
|
|
130
130
|
"test:diff-viewer-viewport": "bun test/test-diff-viewer-viewport.mjs",
|
|
131
131
|
"test:build-complete-exit": "bun test/test-build-complete-exit.mjs",
|
|
132
|
-
"test:ai-stream-markdown": "bun test/test-ai-stream-markdown.mjs"
|
|
132
|
+
"test:ai-stream-markdown": "bun test/test-ai-stream-markdown.mjs",
|
|
133
|
+
"test:support-mailto": "bun test/test-support-mailto.mjs",
|
|
134
|
+
"test:support-redact": "bun test/test-support-redact.mjs",
|
|
135
|
+
"test:support-internal-log": "bun test/test-support-internal-log.mjs",
|
|
136
|
+
"test:support-help-menu": "bun test/test-support-help-menu.mjs",
|
|
137
|
+
"test:support-contact": "bun test/test-support-contact.mjs",
|
|
138
|
+
"test:support-bundle-files": "bun test/test-support-bundle-files.mjs"
|
|
133
139
|
},
|
|
134
140
|
"dependencies": {
|
|
135
141
|
"@inkjs/ui": "^2.0.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type AndroidOnboardingStep = 'welcome' | 'resume-prompt' | 'credentials-exist' | 'backing-up' | 'no-platform' | 'keystore-method-select' | 'keystore-explainer' | 'keystore-existing-path' | 'keystore-existing-picker' | 'keystore-existing-store-password' | 'keystore-existing-detecting-alias' | 'keystore-existing-alias-select' | 'keystore-existing-alias' | 'keystore-existing-key-password' | 'keystore-new-alias' | 'keystore-new-password-method' | 'keystore-new-store-password' | 'keystore-new-key-password' | 'keystore-new-cn' | 'keystore-generating' | 'service-account-method-select' | 'sa-json-existing-path' | 'sa-json-existing-picker' | 'sa-json-validating' | 'sa-json-validation-failed' | 'google-sign-in' | 'google-sign-in-running' | 'play-developer-id-input' | 'gcp-projects-loading' | 'gcp-projects-select' | 'gcp-project-create-name' | 'android-package-select' | 'gcp-setup-running' | 'saving-credentials' | 'detecting-ci-secrets' | 'ci-secrets-setup' | 'ci-secrets-target-select' | 'ask-ci-secrets' | 'checking-ci-secrets' | 'confirm-ci-secret-overwrite' | 'uploading-ci-secrets' | 'ci-secrets-failed' | 'ask-github-actions-setup' | 'confirm-secrets-push' | 'ask-export-env' | 'exporting-env' | 'confirm-env-export-overwrite' | 'overwrite-and-export-env' | 'pick-package-manager' | 'pick-build-script' | 'pick-build-script-custom' | 'preview-workflow-file' | 'view-workflow-diff' | 'writing-workflow-file' | 'ask-build' | 'requesting-build' | 'ai-analysis-prompt' | 'ai-analysis-running' | 'ai-analysis-result' | 'ai-analysis-result-scroll' | 'build-complete' | 'error';
|
|
1
|
+
export type AndroidOnboardingStep = 'welcome' | 'resume-prompt' | 'credentials-exist' | 'backing-up' | 'no-platform' | 'keystore-method-select' | 'keystore-explainer' | 'keystore-existing-path' | 'keystore-existing-picker' | 'keystore-existing-store-password' | 'keystore-existing-detecting-alias' | 'keystore-existing-alias-select' | 'keystore-existing-alias' | 'keystore-existing-key-password' | 'keystore-new-alias' | 'keystore-new-password-method' | 'keystore-new-store-password' | 'keystore-new-key-password' | 'keystore-new-cn' | 'keystore-generating' | 'service-account-method-select' | 'sa-json-existing-path' | 'sa-json-existing-picker' | 'sa-json-validating' | 'sa-json-validation-failed' | 'google-sign-in' | 'google-sign-in-running' | 'play-developer-id-input' | 'gcp-projects-loading' | 'gcp-projects-select' | 'gcp-project-create-name' | 'android-package-select' | 'gcp-setup-running' | 'saving-credentials' | 'detecting-ci-secrets' | 'ci-secrets-setup' | 'ci-secrets-target-select' | 'ask-ci-secrets' | 'checking-ci-secrets' | 'confirm-ci-secret-overwrite' | 'uploading-ci-secrets' | 'ci-secrets-failed' | 'ask-github-actions-setup' | 'confirm-secrets-push' | 'ask-export-env' | 'exporting-env' | 'confirm-env-export-overwrite' | 'overwrite-and-export-env' | 'pick-package-manager' | 'pick-build-script' | 'pick-build-script-custom' | 'preview-workflow-file' | 'view-workflow-diff' | 'writing-workflow-file' | 'ask-build' | 'requesting-build' | 'ai-analysis-prompt' | 'ai-analysis-running' | 'ai-analysis-result' | 'ai-analysis-result-scroll' | 'build-complete' | 'error' | 'support-confirm' | 'support-log-view' | 'support-uploading';
|
|
2
2
|
export type AndroidOnboardingErrorCategory = 'keystore_invalid' | 'google_oauth_failed' | 'play_account_id_invalid' | 'sa_json_shape_invalid' | 'sa_json_token_rejected' | 'sa_json_no_app_access' | 'sa_json_network_error' | 'unknown';
|
|
3
3
|
export type KeystoreMethod = 'existing' | 'generate';
|
|
4
4
|
export type ServiceAccountMethod = 'existing' | 'generate';
|
|
@@ -16,7 +16,7 @@ export interface OnboardingResult {
|
|
|
16
16
|
/** Present only when outcome === 'completed'. */
|
|
17
17
|
summary?: OnboardingCompletionSummary;
|
|
18
18
|
}
|
|
19
|
-
export type OnboardingStep = 'welcome' | 'resume-prompt' | 'platform-select' | 'adding-platform' | 'credentials-exist' | 'backing-up' | 'setup-method-select' | 'import-scanning' | 'import-distribution-mode' | 'import-pick-identity' | 'import-pick-profile' | 'import-validating-all-certs' | 'import-checking-apple-cert' | 'import-no-match-recovery' | 'import-portal-explanation' | 'import-provide-profile-path' | 'import-create-profile-only' | 'import-export-warning' | 'import-compiling-helper' | 'import-exporting' | 'api-key-instructions' | 'p8-method-select' | 'input-p8-path' | 'input-key-id' | 'input-issuer-id' | 'verifying-key' | 'verify-app' | 'creating-certificate' | 'cert-limit-prompt' | 'revoking-certificate' | 'creating-profile' | 'duplicate-profile-prompt' | 'deleting-duplicate-profiles' | 'saving-credentials' | 'detecting-ci-secrets' | 'ci-secrets-setup' | 'ci-secrets-target-select' | 'ask-ci-secrets' | 'checking-ci-secrets' | 'confirm-ci-secret-overwrite' | 'uploading-ci-secrets' | 'ci-secrets-failed' | 'ask-github-actions-setup' | 'confirm-secrets-push' | 'ask-export-env' | 'exporting-env' | 'confirm-env-export-overwrite' | 'overwrite-and-export-env' | 'pick-package-manager' | 'pick-build-script' | 'pick-build-script-custom' | 'preview-workflow-file' | 'view-workflow-diff' | 'writing-workflow-file' | 'ask-build' | 'requesting-build' | 'ai-analysis-prompt' | 'ai-analysis-running' | 'ai-analysis-result' | 'ai-analysis-result-scroll' | 'build-complete' | 'no-platform' | 'error';
|
|
19
|
+
export type OnboardingStep = 'welcome' | 'resume-prompt' | 'platform-select' | 'adding-platform' | 'credentials-exist' | 'backing-up' | 'setup-method-select' | 'import-scanning' | 'import-distribution-mode' | 'import-pick-identity' | 'import-pick-profile' | 'import-validating-all-certs' | 'import-checking-apple-cert' | 'import-no-match-recovery' | 'import-portal-explanation' | 'import-provide-profile-path' | 'import-create-profile-only' | 'import-export-warning' | 'import-compiling-helper' | 'import-exporting' | 'api-key-instructions' | 'p8-method-select' | 'input-p8-path' | 'input-key-id' | 'input-issuer-id' | 'verifying-key' | 'verify-app' | 'creating-certificate' | 'cert-limit-prompt' | 'revoking-certificate' | 'creating-profile' | 'duplicate-profile-prompt' | 'deleting-duplicate-profiles' | 'saving-credentials' | 'detecting-ci-secrets' | 'ci-secrets-setup' | 'ci-secrets-target-select' | 'ask-ci-secrets' | 'checking-ci-secrets' | 'confirm-ci-secret-overwrite' | 'uploading-ci-secrets' | 'ci-secrets-failed' | 'ask-github-actions-setup' | 'confirm-secrets-push' | 'ask-export-env' | 'exporting-env' | 'confirm-env-export-overwrite' | 'overwrite-and-export-env' | 'pick-package-manager' | 'pick-build-script' | 'pick-build-script-custom' | 'preview-workflow-file' | 'view-workflow-diff' | 'writing-workflow-file' | 'ask-build' | 'requesting-build' | 'ai-analysis-prompt' | 'ai-analysis-running' | 'ai-analysis-result' | 'ai-analysis-result-scroll' | 'build-complete' | 'no-platform' | 'error' | 'support-confirm' | 'support-log-view' | 'support-uploading';
|
|
20
20
|
export type OnboardingErrorCategory = 'apple_api_unauthorized' | 'apple_api_rate_limited' | 'cert_limit_reached' | 'profile_creation_failed' | 'p8_invalid' | 'keychain_no_identities' | 'keychain_export_failed' | 'keychain_helper_compile_failed' | 'profile_no_match' | 'profile_read_failed' | 'unknown';
|
|
21
21
|
export interface ApiKeyData {
|
|
22
22
|
keyId: string;
|
|
@@ -25,14 +25,18 @@ export interface BuildCompleteStepProps {
|
|
|
25
25
|
dense?: boolean;
|
|
26
26
|
}
|
|
27
27
|
export declare const BuildCompleteStep: FC<BuildCompleteStepProps>;
|
|
28
|
+
export type ErrorStepChoice = 'support' | 'ai' | 'retry' | 'exit';
|
|
28
29
|
export interface ErrorStepProps {
|
|
29
30
|
message: string;
|
|
30
|
-
onChoose: (choice:
|
|
31
|
+
onChoose: (choice: ErrorStepChoice) => void;
|
|
32
|
+
/** A captured build log exists for this run (e.g. a build was attempted), so
|
|
33
|
+
* the help menu may offer the "Ask AI for help" option. Defaults to false. */
|
|
34
|
+
hasBuildLog?: boolean;
|
|
31
35
|
dense?: boolean;
|
|
32
36
|
}
|
|
33
37
|
export declare const ErrorStep: FC<ErrorStepProps>;
|
|
34
38
|
export interface AiAnalysisPromptStepProps {
|
|
35
|
-
onChoose: (choice: 'debug' | 'skip') => void;
|
|
39
|
+
onChoose: (choice: 'debug' | 'skip' | 'support') => void;
|
|
36
40
|
dense?: boolean;
|
|
37
41
|
}
|
|
38
42
|
export declare const AiAnalysisPromptStep: FC<AiAnalysisPromptStepProps>;
|
|
@@ -62,6 +66,8 @@ export interface AiAnalysisResultStepProps {
|
|
|
62
66
|
onSkipOrContinue: () => void;
|
|
63
67
|
/** Re-open the fullscreen scroll viewer to re-read the analysis. */
|
|
64
68
|
onReread: () => void;
|
|
69
|
+
/** Escalate to Capgo support (email flow), carrying the logs + this analysis. */
|
|
70
|
+
onSupport: () => void;
|
|
65
71
|
dense?: boolean;
|
|
66
72
|
}
|
|
67
73
|
export declare const AiAnalysisResultStep: FC<AiAnalysisResultStepProps>;
|
|
@@ -57,6 +57,9 @@ export interface ErrorStepProps {
|
|
|
57
57
|
* error headline + the action prompt here — keeping Try again / Restart /
|
|
58
58
|
* Exit reachable no matter how long the advice was. */
|
|
59
59
|
collapsed?: boolean;
|
|
60
|
+
/** A captured build log exists for this run (e.g. a build was attempted), so
|
|
61
|
+
* the help menu may offer the "Ask AI for help" option. Defaults to false. */
|
|
62
|
+
hasBuildLog?: boolean;
|
|
60
63
|
onChange: (value: string) => void | Promise<void>;
|
|
61
64
|
}
|
|
62
65
|
export declare function formatErrorViewerLines(error: string, recoveryAdvice: BuildOnboardingRecoveryAdvice | null, supportBundlePath: string | null): string[];
|
|
@@ -76,7 +79,7 @@ export declare function formatErrorViewerLines(error: string, recoveryAdvice: Bu
|
|
|
76
79
|
* chrome (boxed header + completed-steps log + padding) is a fixed ~15 rows the
|
|
77
80
|
* caller reserves on top.
|
|
78
81
|
*/
|
|
79
|
-
export declare function estimateErrorBodyRows(error: string, recoveryAdvice: BuildOnboardingRecoveryAdvice | null, supportBundlePath: string | null, cols: number, showRetry: boolean): number;
|
|
82
|
+
export declare function estimateErrorBodyRows(error: string, recoveryAdvice: BuildOnboardingRecoveryAdvice | null, supportBundlePath: string | null, cols: number, showRetry: boolean, hasBuildLog: boolean): number;
|
|
80
83
|
export declare const ErrorStep: FC<ErrorStepProps>;
|
|
81
84
|
export interface BuildCompleteStepProps {
|
|
82
85
|
buildUrl: string;
|
|
@@ -3,7 +3,7 @@ export interface OnboardingSupportSection {
|
|
|
3
3
|
lines: string[];
|
|
4
4
|
}
|
|
5
5
|
export interface OnboardingSupportBundleInput {
|
|
6
|
-
kind: 'init' | 'build-init';
|
|
6
|
+
kind: 'init' | 'build-init' | 'build-request';
|
|
7
7
|
error: string;
|
|
8
8
|
appId?: string;
|
|
9
9
|
currentStep?: string;
|
|
@@ -15,4 +15,14 @@ export interface OnboardingSupportBundleInput {
|
|
|
15
15
|
sections?: OnboardingSupportSection[];
|
|
16
16
|
}
|
|
17
17
|
export declare function renderOnboardingSupportBundle(input: OnboardingSupportBundleInput): string;
|
|
18
|
+
export declare const SUPPORT_GZ_CAP_BYTES: number;
|
|
19
|
+
export declare function renderBundleWithinGzCap(input: OnboardingSupportBundleInput, capBytes?: number, onPass?: () => void): {
|
|
20
|
+
rendered: string;
|
|
21
|
+
gz: Buffer;
|
|
22
|
+
};
|
|
18
23
|
export declare function writeOnboardingSupportBundle(input: OnboardingSupportBundleInput, supportDir?: string): string | null;
|
|
24
|
+
export interface SupportBundleFiles {
|
|
25
|
+
logPath: string;
|
|
26
|
+
gzPath: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function writeSupportBundleFiles(input: OnboardingSupportBundleInput, supportDir?: string): SupportBundleFiles | null;
|