@capgo/cli 7.100.7 → 7.101.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.
@@ -15,5 +15,9 @@ export declare function deleteProgress(appId: string, baseDir?: string): Promise
15
15
  /**
16
16
  * Determine the first incomplete step based on saved progress.
17
17
  * Returns the step to resume from.
18
+ *
19
+ * Branches on `setupMethod` so the import flow doesn't accidentally resume
20
+ * into the create-new path's `creating-certificate` step (which would trigger
21
+ * the Apple 3-cert-limit error for users at the limit).
18
22
  */
19
23
  export declare function getResumeStep(progress: OnboardingProgress | null): OnboardingStep;
@@ -1,5 +1,5 @@
1
1
  export type Platform = 'ios' | 'android';
2
- export type OnboardingStep = 'welcome' | 'platform-select' | 'adding-platform' | 'credentials-exist' | 'backing-up' | 'api-key-instructions' | 'p8-method-select' | 'input-p8-path' | 'input-key-id' | 'input-issuer-id' | 'verifying-key' | 'creating-certificate' | 'cert-limit-prompt' | 'revoking-certificate' | 'creating-profile' | 'duplicate-profile-prompt' | 'deleting-duplicate-profiles' | 'saving-credentials' | 'ask-build' | 'requesting-build' | 'build-complete' | 'no-platform' | 'error';
2
+ export type OnboardingStep = 'welcome' | 'platform-select' | 'adding-platform' | 'credentials-exist' | 'backing-up' | 'setup-method-select' | 'import-scanning' | 'import-distribution-mode' | 'import-pick-identity' | 'import-pick-profile' | 'import-no-match-recovery' | 'import-fetching-profile' | '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' | 'creating-certificate' | 'cert-limit-prompt' | 'revoking-certificate' | 'creating-profile' | 'duplicate-profile-prompt' | 'deleting-duplicate-profiles' | 'saving-credentials' | 'ask-build' | 'requesting-build' | 'build-complete' | 'no-platform' | 'error';
3
3
  export interface ApiKeyData {
4
4
  keyId: string;
5
5
  issuerId: string;
@@ -24,6 +24,28 @@ export interface OnboardingProgress {
24
24
  /** Partial input — saved incrementally so resume works mid-flow */
25
25
  keyId?: string;
26
26
  issuerId?: string;
27
+ /**
28
+ * Records which fork the user picked at `setup-method-select`. Crucial for
29
+ * resume — without this, a partial import-flow run would resume at
30
+ * `creating-certificate` (the create-new path) and immediately hit the
31
+ * Apple cert-limit error.
32
+ *
33
+ * Absent on legacy progress files (created before this field existed) →
34
+ * resume defaults to `create-new` for backward compatibility.
35
+ */
36
+ setupMethod?: 'create-new' | 'import-existing';
37
+ /**
38
+ * Records the distribution mode picked at `import-distribution-mode`.
39
+ *
40
+ * Persisted (not derived from .p8 presence) because ad_hoc users can
41
+ * legitimately enter a one-shot .p8 during no-match recovery, which would
42
+ * otherwise make .p8-presence-implies-app_store an incorrect heuristic. On
43
+ * resume the UI hydrates `importDistribution` from this field so the
44
+ * `verifying-key` branch and `doSaveCredentials` route correctly.
45
+ *
46
+ * Only meaningful when `setupMethod === 'import-existing'`.
47
+ */
48
+ importDistribution?: 'app_store' | 'ad_hoc';
27
49
  completedSteps: {
28
50
  apiKeyVerified?: ApiKeyData;
29
51
  certificateCreated?: CertificateData;