@capgo/cli 8.32.7 → 8.33.0

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": "8.32.7",
4
+ "version": "8.33.0",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -160,7 +160,7 @@
160
160
  "test:ios-marketing-version": "bun test/test-ios-marketing-version.mjs",
161
161
  "test:platform-flow-contract": "bun test/test-platform-flow-contract.mjs",
162
162
  "test:tail-engine-shared": "bun test/test-tail-engine-shared.mjs",
163
- "test": "bun run build && bun run test:helper-dce && 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:native-dependencies && 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:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && 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-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && 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:cicd-failure-help && 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-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation",
163
+ "test": "bun run build && bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:fail-on-incompatible && bun run test:native-dependencies && 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:app-set-options && bun run test:mcp-analytics && bun run test:mcp-instructions && bun run test:mcp-live-update-onboarding && bun run test:mcp-stdout-guard && bun run test:mcp-platform-select && bun run test:mcp-explain-scopes && bun run test:mcp-oauth-reopen && bun run test:mcp-broker-oauth && bun run test:mcp-broker-session && bun run test:mcp-credentials-manage && bun run test:mcp-resume-prompt && bun run test:mcp-build-job && bun run test:mcp-build-tools && 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-monorepo-targeting && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:init-replay && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test:manifest-path-encoding && bun run test:macos-signing && bun run test:asc-key-protocol && bun run test:apple-api-import-helpers && bun run test:apple-api-verify-key && 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:cicd-failure-help && 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-upload-prompt && bun run test:support-bundle-files && bun run test:self-update && bun run test:update-prompt && bun run test:apple-api-cert-create && bun run test:android-tail-engine && bun run test:android-tail-render && bun run test:android-tail-routing && bun run test:dev-gate-stripped && bun run test:frame-fit-ios-shared && bun run test:ios-confirm-app-id && bun run test:ios-create-new && bun run test:ios-e2e && bun run test:ios-flow-contract && bun run test:ios-import-discovery && bun run test:ios-import-export && bun run test:ios-import-pickers && bun run test:ios-import-recovery && bun run test:ios-recovery && bun run test:ios-resume && bun run test:ios-tail-handoff && bun run test:ios-tui-render && bun run test:p8-error && bun run test:ios-tui-routing && bun run test:ios-updater-sync-validation && bun run test:ios-verify-app && bun run test:ios-marketing-version && bun run test:platform-flow-contract && bun run test:tail-engine-shared && bun run test:prescan && bun run test:android-reporting-api && bun run test:android-app-verification && bun run test:android-rename && bun run test:appflow-auth && bun run test:appflow-api-map && bun run test:appflow-validate && bun run test:appflow-flow && bun run test:appflow-gapfill && bun run test:appflow-engine && bun run test:appflow-tail && bun run test:appflow-fetch && bun run test:appflow-sa-decode && bun run test:app-permission-helper && bun run test:organization-set-api-host && bun run test:trial-warning && bun run test:plan-validation",
164
164
  "test:build-platform-selection": "bun test/test-build-platform-selection.mjs",
165
165
  "test:ai-log-capture": "bun test/test-ai-log-capture.mjs",
166
166
  "test:ai-analyze-flow": "bun test/test-ai-analyze-flow.mjs",
@@ -204,7 +204,8 @@
204
204
  "test:app-permission-helper": "bun test/test-app-permission-helper.mjs",
205
205
  "test:organization-set-api-host": "bun test/test-organization-set-api-host.mjs",
206
206
  "test:trial-warning": "bun test/test-trial-warning.mjs",
207
- "test:plan-validation": "bun test/test-plan-validation.mjs"
207
+ "test:plan-validation": "bun test/test-plan-validation.mjs",
208
+ "test:auto-bump-version": "bun test/test-auto-bump-version.mjs"
208
209
  },
209
210
  "dependencies": {
210
211
  "@inkjs/ui": "^2.0.0",
@@ -19,6 +19,10 @@ export interface PrescanCommandOptions {
19
19
  * will use, not a fresh saved-file/env merge.
20
20
  */
21
21
  credentials?: Record<string, string>;
22
+ /** Check ids to skip entirely (repeatable / comma-separated). */
23
+ skip?: string[] | string;
24
+ /** Check ids whose findings are downgraded to warning (repeatable / comma-separated). */
25
+ warn?: string[] | string;
22
26
  }
23
27
  export declare function validateFlags(opts: Pick<PrescanCommandOptions, 'failOnWarnings' | 'ignoreFatal'>): void;
24
28
  export declare function exitCodeFor(counts: Record<Severity, number>, opts: OutcomeOptions, findings?: PrescanReport['findings']): number;
@@ -1,7 +1,10 @@
1
1
  import type { OutcomeOptions, PrescanCheck, PrescanOutcome, PrescanReport, ScanContext } from './types';
2
+ import { type PrescanOverrides } from './overrides';
2
3
  interface EngineOptions {
3
4
  checkTimeoutMs?: number;
4
5
  }
5
- export declare function runPrescan(ctx: ScanContext, checks: PrescanCheck[], options?: EngineOptions): Promise<PrescanReport>;
6
+ export declare function runPrescan(ctx: ScanContext, checks: PrescanCheck[], options?: EngineOptions & {
7
+ overrides?: PrescanOverrides;
8
+ }): Promise<PrescanReport>;
6
9
  export declare function decideOutcome(report: Pick<PrescanReport, 'counts' | 'findings'>, options: OutcomeOptions): PrescanOutcome;
7
10
  export {};
@@ -0,0 +1,21 @@
1
+ import type { Finding, PrescanCheck, Severity } from './types';
2
+ export interface PrescanOverrides {
3
+ /** Check ids that must not run. */
4
+ skip: Set<string>;
5
+ /** Check ids whose findings are forced to severity=warning. */
6
+ warn: Set<string>;
7
+ }
8
+ export declare function emptyOverrides(): PrescanOverrides;
9
+ /** Split repeatable CLI values and comma-separated lists into unique trimmed ids. */
10
+ export declare function normalizeCheckIds(values: string[] | string | undefined): string[];
11
+ export declare function parsePrescanOverrides(opts: {
12
+ skip?: string[] | string;
13
+ warn?: string[] | string;
14
+ }): PrescanOverrides;
15
+ export declare function validateOverrideIds(overrides: PrescanOverrides, knownIds: Iterable<string>): void;
16
+ export declare function filterChecksForOverrides(checks: PrescanCheck[], overrides: PrescanOverrides): {
17
+ runnable: PrescanCheck[];
18
+ skipped: string[];
19
+ };
20
+ export declare function applyWarnOverrides(findings: Finding[], overrides: PrescanOverrides): Finding[];
21
+ export declare function recountSeverities(findings: Finding[]): Record<Severity, number>;
@@ -4,3 +4,5 @@ export declare const IOS_PRESCAN_EXPANSION_ENFORCE_AFTER = "2026-08-14T00:00:00.
4
4
  /** Legacy P12 encryption becomes mandatory for macOS runner compatibility at this UTC instant. */
5
5
  export declare const IOS_P12_LEGACY_ENFORCE_AFTER = "2026-08-17T00:00:00.000Z";
6
6
  export declare const ALL_CHECKS: PrescanCheck[];
7
+ /** Stable list of registered check ids for CLI override validation. */
8
+ export declare const ALL_CHECK_IDS: string[];
@@ -0,0 +1,37 @@
1
+ import type { PackageManagerRunner, PackageManagerType } from '@capgo/find-package-manager';
2
+ import type { ChildProcess } from 'node:child_process';
3
+ import { findInstallCommand } from '@capgo/find-package-manager';
4
+ export type SupportedPackageManager = Exclude<PackageManagerType, 'unknown'>;
5
+ export interface PackageManagerInfo {
6
+ pm: SupportedPackageManager;
7
+ command: ReturnType<typeof findInstallCommand>;
8
+ installCommand: string;
9
+ runner: PackageManagerRunner;
10
+ }
11
+ export interface ExecutableProbeOptions {
12
+ args?: string[];
13
+ cwd?: string;
14
+ env?: NodeJS.ProcessEnv;
15
+ timeoutMs?: number;
16
+ }
17
+ export interface ExecutableProbeResult {
18
+ available: boolean;
19
+ error?: NodeJS.ErrnoException;
20
+ status?: number | null;
21
+ stdout?: string;
22
+ }
23
+ export interface CommandResult {
24
+ success: boolean;
25
+ error?: Error;
26
+ }
27
+ export declare function createMissingExecutableError(command: string, executablePath?: string): NodeJS.ErrnoException;
28
+ export declare function preparePackageManagerCommandEnvironment(environment?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
29
+ export declare function probeExecutable(command: string, options?: ExecutableProbeOptions): ExecutableProbeResult;
30
+ export declare function supportsYarnDlx(version: string): boolean;
31
+ export declare function probePackageManagerCommand(commandLine: string, options?: ExecutableProbeOptions): ExecutableProbeResult;
32
+ export declare function resolveExecutableProbeError(command: string, probe: ExecutableProbeResult): Error;
33
+ export declare function getAvailablePackageManagers(detected: SupportedPackageManager, isAvailable?: (command: string) => boolean): SupportedPackageManager[];
34
+ export declare function getPackageManagerInfo(pm: SupportedPackageManager): PackageManagerInfo;
35
+ export declare function isPackageManagerAvailable(pm: SupportedPackageManager, isAvailable?: (command: string) => boolean): boolean;
36
+ export declare function getMissingPackageManagerExecutable(pm: SupportedPackageManager, isAvailable?: (command: string) => boolean): string | undefined;
37
+ export declare function waitForCommandResult(child: ChildProcess): Promise<CommandResult>;
@@ -60,6 +60,7 @@ export declare function getDirtyGitStatusActionOptions(): {
60
60
  hint: string;
61
61
  }[];
62
62
  export declare function injectInitCode(filePath: string, currentContent: string): string;
63
+ export declare function resolveInitPackageJsonPath(currentPath: string | undefined, startDir?: string): string | undefined;
63
64
  interface ResumeResult {
64
65
  stepDone: number;
65
66
  orgId: string;
@@ -25,6 +25,12 @@ export declare const mcpUploadBundleInputSchema: z.ZodObject<{
25
25
  minUpdateVersion: z.ZodOptional<z.ZodString>;
26
26
  autoMinUpdateVersion: z.ZodOptional<z.ZodBoolean>;
27
27
  autoSetBundle: z.ZodOptional<z.ZodBoolean>;
28
+ autoBump: z.ZodOptional<z.ZodEnum<{
29
+ major: "major";
30
+ minor: "minor";
31
+ patch: "patch";
32
+ metadata: "metadata";
33
+ }>>;
28
34
  encrypt: z.ZodOptional<z.ZodBoolean>;
29
35
  capacitorConfig: z.ZodOptional<z.ZodString>;
30
36
  }, z.core.$strip>;
@@ -89,6 +89,8 @@ export declare const buildRequestOptionsSchema: z.ZodObject<{
89
89
  }>>;
90
90
  prescan: z.ZodOptional<z.ZodBoolean>;
91
91
  prescanIgnoreFatal: z.ZodOptional<z.ZodBoolean>;
92
+ prescanSkip: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
+ prescanWarn: z.ZodOptional<z.ZodArray<z.ZodString>>;
92
94
  failOnWarnings: z.ZodOptional<z.ZodBoolean>;
93
95
  builderJourneyId: z.ZodOptional<z.ZodString>;
94
96
  }, z.core.$strip>;
@@ -28,6 +28,12 @@ export declare const optionsUploadSchema: z.ZodObject<{
28
28
  minUpdateVersion: z.ZodOptional<z.ZodString>;
29
29
  autoMinUpdateVersion: z.ZodOptional<z.ZodBoolean>;
30
30
  autoSetBundle: z.ZodOptional<z.ZodBoolean>;
31
+ autoBump: z.ZodOptional<z.ZodEnum<{
32
+ major: "major";
33
+ minor: "minor";
34
+ patch: "patch";
35
+ metadata: "metadata";
36
+ }>>;
31
37
  ignoreMetadataCheck: z.ZodOptional<z.ZodBoolean>;
32
38
  failOnIncompatible: z.ZodOptional<z.ZodBoolean>;
33
39
  ignoreChecksumCheck: z.ZodOptional<z.ZodBoolean>;
@@ -65,6 +65,13 @@ export declare const uploadOptionsSchema: z.ZodObject<{
65
65
  minUpdateVersion: z.ZodOptional<z.ZodString>;
66
66
  autoMinUpdateVersion: z.ZodOptional<z.ZodBoolean>;
67
67
  autoSetBundle: z.ZodOptional<z.ZodBoolean>;
68
+ autoBump: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
69
+ major: "major";
70
+ minor: "minor";
71
+ patch: "patch";
72
+ metadata: "metadata";
73
+ fix: "fix";
74
+ }>]>>;
68
75
  selfAssign: z.ZodOptional<z.ZodBoolean>;
69
76
  packageJsonPaths: z.ZodOptional<z.ZodString>;
70
77
  ignoreCompatibilityCheck: z.ZodOptional<z.ZodBoolean>;
@@ -365,6 +372,8 @@ export declare const requestBuildOptionsSchema: z.ZodObject<{
365
372
  supaAnon: z.ZodOptional<z.ZodString>;
366
373
  prescan: z.ZodOptional<z.ZodBoolean>;
367
374
  prescanIgnoreFatal: z.ZodOptional<z.ZodBoolean>;
375
+ prescanSkip: z.ZodOptional<z.ZodArray<z.ZodString>>;
376
+ prescanWarn: z.ZodOptional<z.ZodArray<z.ZodString>>;
368
377
  }, z.core.$strip>;
369
378
  export type RequestBuildOptions = z.infer<typeof requestBuildOptionsSchema>;
370
379
  export declare const currentBundleOptionsSchema: z.ZodObject<{