@capgo/cli 8.58.0 → 8.59.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.58.0",
4
+ "version": "8.59.0",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -133,11 +133,12 @@
133
133
  "test:init-replay": "bun test/test-init-replay.mjs",
134
134
  "test:init-telemetry": "bun test/test-init-telemetry.mjs",
135
135
  "test:capacitor-config-target": "bun test/test-capacitor-config-target.mjs",
136
+ "test:builder-app-id-config": "bun test/test-builder-app-id-config.mjs",
136
137
  "test:capacitor-config-typescript7": "bun test/test-capacitor-config-typescript7.mjs",
137
138
  "test:capacitor-config-native-import": "bun test/test-capacitor-config-native-import.mjs",
138
139
  "test:cli-user-error-config": "bun test/test-cli-user-error-config.mjs",
139
140
  "test:cordova-upload-mode": "bun test/test-cordova-upload-mode.mjs",
140
- "test:init-monorepo-targeting": "bun run test:capacitor-config-target && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs",
141
+ "test:init-monorepo-targeting": "bun run test:capacitor-config-target && bun run test:builder-app-id-config && bun run test:capacitor-config-typescript7 && bun run test:capacitor-config-native-import && bun run test:cli-user-error-config && bun test/test-init-monorepo-targeting.mjs",
141
142
  "test:prompt-preferences": "bun test/test-prompt-preferences.mjs",
142
143
  "test:esm-sdk": "node test/test-sdk-esm.mjs",
143
144
  "test:auth-session": "bun test/test-auth-session.mjs",
@@ -2,7 +2,8 @@ import { withSupabaseSource } from './supabase-perf';
2
2
  export { getGlobalAnalyticsProps, getInvocationSource, setInvocationSource } from './global-props';
3
3
  export declare function isTelemetryDisabled(): boolean;
4
4
  export declare function flushAnalytics(timeoutMs?: number): Promise<void>;
5
- export declare function resolveTrackingContext(apikey: string, signal?: AbortSignal): Promise<{
5
+ export declare function isBuilderInvocation(commandPath: string): boolean;
6
+ export declare function resolveTrackingContext(apikey: string, signal?: AbortSignal, builder?: boolean): Promise<{
6
7
  appId?: string;
7
8
  orgId?: string;
8
9
  }>;
@@ -0,0 +1,5 @@
1
+ import type { CapacitorConfig } from '../config';
2
+ export declare function hasBuilderAppIdField(config: CapacitorConfig | undefined): boolean;
3
+ export declare function getConfiguredBuilderAppId(config: CapacitorConfig | undefined): string | undefined;
4
+ /** Resolve the Capgo app key for Builder commands only. */
5
+ export declare function getBuilderAppId(explicitAppId: string | undefined, config: CapacitorConfig | undefined, legacyDefault?: 'updater' | 'native', explicitMode?: 'truthy' | 'defined'): string | undefined;
@@ -173,6 +173,8 @@ export interface EngineDeps {
173
173
  cwd: string;
174
174
  hasSavedKey: () => boolean;
175
175
  getAppId: () => Promise<string | undefined>;
176
+ /** Native package/bundle id, separate from the Capgo Builder app key. */
177
+ getNativeAppId?: () => Promise<string | undefined>;
176
178
  detectPlatforms: () => Promise<Platform[]>;
177
179
  isAppRegistered: (appId: string) => Promise<boolean>;
178
180
  loadProgress: (appId: string) => Promise<OnboardingProgress | null>;
@@ -17,7 +17,7 @@ export interface TrackBuilderOnboardingStepInput {
17
17
  errorCategory?: OnboardingErrorCategory | AndroidOnboardingErrorCategory;
18
18
  replaySessionId?: string;
19
19
  }
20
- export type BuilderOnboardingAction = 'resume_prompt_decision' | 'android_sa_method_selected' | 'android_sa_validation_recovery_selected' | 'android_sa_validation_result';
20
+ export type BuilderOnboardingAction = 'resume_prompt_decision' | 'question_shown' | 'question_answered' | 'android_sa_method_selected' | 'android_sa_validation_recovery_selected' | 'android_sa_validation_result';
21
21
  export interface TrackBuilderOnboardingActionInput {
22
22
  apikey: string;
23
23
  appId: string;
@@ -4,10 +4,9 @@ import type { OnboardingBeforeExit } from './exit.js';
4
4
  interface AppProps {
5
5
  /**
6
6
  * Capgo lookup key (progress files, saved credentials, Capgo SaaS build
7
- * API). Resolved by `getAppId()`, which prefers
8
- * `config.plugins.CapacitorUpdater.appId` over `config.appId` so dev-tunnel
9
- * sandboxes can override the Capgo-side identifier without renaming the
10
- * iOS bundle. Do NOT use for Apple-side operations — see
7
+ * API). Resolved by the Builder app-id helper, which uses
8
+ * `plugins.CapgoBuilder.capgoBuilderAppId` when configured and otherwise
9
+ * keeps the prior updater/native fallback. Do NOT use for Apple-side operations — see
11
10
  * `iosBundleIdInitial`.
12
11
  */
13
12
  appId: string;
@@ -4,6 +4,7 @@ import type { MigrationScope } from '../appflow/types.js';
4
4
  import type { OnboardingBeforeExit } from './exit.js';
5
5
  export interface AppflowAppProps {
6
6
  appId: string;
7
+ packageName?: string;
7
8
  /** Migration scope ('ios' | 'android') from the single-platform "migrating from Appflow?" gate. */
8
9
  scope: MigrationScope;
9
10
  apikey?: string;
@@ -10,12 +10,14 @@ export interface OnboardingShellProps {
10
10
  /**
11
11
  * iOS-side bundle id default — sourced from `config.appId` (top-level), which
12
12
  * is what `cap sync` writes into `PRODUCT_BUNDLE_IDENTIFIER`. Distinct from
13
- * `appId` above, which `getAppId()` may resolve to
13
+ * `appId` above, which the Builder resolver may resolve to
14
14
  * `config.plugins.CapacitorUpdater.appId` (a Capgo lookup key — wrong for
15
15
  * Apple signing). Threaded down to the iOS OnboardingApp; the Android app
16
16
  * ignores it.
17
17
  */
18
18
  iosBundleIdInitial: string;
19
+ /** Android package name for Appflow validation; defaults to the legacy Capgo key. */
20
+ appflowPackageName?: string;
19
21
  iosDir: string;
20
22
  androidDir: string;
21
23
  /**
@@ -28,6 +28,7 @@ export declare function validateFlags(opts: Pick<PrescanCommandOptions, 'failOnW
28
28
  export declare function exitCodeFor(counts: Record<Severity, number>, opts: OutcomeOptions, findings?: PrescanReport['findings']): number;
29
29
  export interface PrescanExecution {
30
30
  report: PrescanReport;
31
+ appId: string;
31
32
  /** apikey actually used for the scan (flag or saved key); undefined when remote checks were skipped */
32
33
  apikey?: string;
33
34
  }
@@ -20,6 +20,8 @@ export interface Finding {
20
20
  }
21
21
  export interface ScanContext {
22
22
  appId: string;
23
+ /** Native bundle/package id for local checks; defaults to appId for legacy scans. */
24
+ nativeAppId?: string;
23
25
  platform: Platform;
24
26
  /** Operating system running the prescan, used for host-specific local checks. */
25
27
  hostPlatform: NodeJS.Platform;