@capgo/cli 8.0.0-alpha.4 → 8.0.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.
Files changed (221) hide show
  1. package/README.md +755 -75
  2. package/dist/index.js +1135 -311
  3. package/dist/keychain-export.swift +351 -0
  4. package/dist/package.json +120 -29
  5. package/dist/src/ai/analyze.d.ts +48 -0
  6. package/dist/src/ai/log-capture.d.ts +14 -0
  7. package/dist/src/ai/prompt.d.ts +1 -0
  8. package/dist/src/ai/render-markdown.d.ts +12 -0
  9. package/dist/src/ai/sse.d.ts +5 -0
  10. package/dist/src/ai/stream-markdown.d.ts +22 -0
  11. package/dist/src/ai/telemetry.d.ts +39 -0
  12. package/dist/src/analytics/error-category.d.ts +11 -0
  13. package/dist/src/analytics/org-resolver.d.ts +11 -0
  14. package/dist/src/analytics/supabase-perf.d.ts +48 -0
  15. package/dist/src/analytics/track.d.ts +70 -0
  16. package/dist/src/api/app.d.ts +17 -8
  17. package/dist/src/api/channels.d.ts +2442 -2729
  18. package/dist/src/api/crypto.d.ts +26 -0
  19. package/dist/src/api/update.d.ts +7 -1
  20. package/dist/src/api/versions.d.ts +9 -2
  21. package/dist/src/app/add.d.ts +6 -4
  22. package/dist/src/app/debug.d.ts +3 -7
  23. package/dist/src/app/delete.d.ts +1 -2
  24. package/dist/src/app/info.d.ts +5 -1
  25. package/dist/src/app/list.d.ts +23 -2
  26. package/dist/src/app/set.d.ts +0 -1
  27. package/dist/src/app/setting.d.ts +3 -9
  28. package/dist/src/app/updateProbe.d.ts +43 -0
  29. package/dist/src/build/credentials-command.d.ts +89 -0
  30. package/dist/src/build/credentials-manage.d.ts +7 -0
  31. package/dist/src/build/credentials.d.ts +78 -0
  32. package/dist/src/build/env-render.d.ts +8 -0
  33. package/dist/src/build/last-output-command.d.ts +6 -0
  34. package/dist/src/build/mobileprovision-parser.d.ts +35 -0
  35. package/dist/src/build/needed.d.ts +28 -0
  36. package/dist/src/build/onboarding/ai-fit.d.ts +110 -0
  37. package/dist/src/build/onboarding/analytics.d.ts +23 -0
  38. package/dist/src/build/onboarding/android/gcp-api.d.ts +128 -0
  39. package/dist/src/build/onboarding/android/gradle-parser.d.ts +19 -0
  40. package/dist/src/build/onboarding/android/keystore.d.ts +77 -0
  41. package/dist/src/build/onboarding/android/oauth-config.d.ts +24 -0
  42. package/dist/src/build/onboarding/android/oauth-google.d.ts +134 -0
  43. package/dist/src/build/onboarding/android/play-api.d.ts +91 -0
  44. package/dist/src/build/onboarding/android/progress.d.ts +22 -0
  45. package/dist/src/build/onboarding/android/service-account-validation.d.ts +58 -0
  46. package/dist/src/build/onboarding/android/types.d.ts +72 -0
  47. package/dist/src/build/onboarding/android/ui/app.d.ts +17 -0
  48. package/dist/src/build/onboarding/app-verification.d.ts +86 -0
  49. package/dist/src/build/onboarding/apple-api.d.ts +234 -0
  50. package/dist/src/build/onboarding/build-log.d.ts +10 -0
  51. package/dist/src/build/onboarding/bundle-id-detector.d.ts +117 -0
  52. package/dist/src/build/onboarding/ci-secrets.d.ts +87 -0
  53. package/dist/src/build/onboarding/command.d.ts +6 -0
  54. package/dist/src/build/onboarding/csr.d.ts +33 -0
  55. package/dist/src/build/onboarding/diff-utils.d.ts +24 -0
  56. package/dist/src/build/onboarding/env-export.d.ts +46 -0
  57. package/dist/src/build/onboarding/error-categories.d.ts +13 -0
  58. package/dist/src/build/onboarding/file-picker.d.ts +47 -0
  59. package/dist/src/build/onboarding/macos-signing.d.ts +190 -0
  60. package/dist/src/build/onboarding/min-terminal-size.d.ts +16 -0
  61. package/dist/src/build/onboarding/progress.d.ts +51 -0
  62. package/dist/src/build/onboarding/recovery.d.ts +7 -0
  63. package/dist/src/build/onboarding/telemetry.d.ts +28 -0
  64. package/dist/src/build/onboarding/types.d.ts +140 -0
  65. package/dist/src/build/onboarding/ui/app.d.ts +36 -0
  66. package/dist/src/build/onboarding/ui/completed-steps-log.d.ts +9 -0
  67. package/dist/src/build/onboarding/ui/components.d.ts +178 -0
  68. package/dist/src/build/onboarding/ui/frame-fit.d.ts +10 -0
  69. package/dist/src/build/onboarding/ui/min-size-gate.d.ts +20 -0
  70. package/dist/src/build/onboarding/ui/platform-picker.d.ts +19 -0
  71. package/dist/src/build/onboarding/ui/shell.d.ts +33 -0
  72. package/dist/src/build/onboarding/ui/steps/android-ci.d.ts +45 -0
  73. package/dist/src/build/onboarding/ui/steps/android-keystore.d.ts +75 -0
  74. package/dist/src/build/onboarding/ui/steps/android-sa-gcp.d.ts +85 -0
  75. package/dist/src/build/onboarding/ui/steps/android-shared.d.ts +67 -0
  76. package/dist/src/build/onboarding/ui/steps/ios-ci.d.ts +44 -0
  77. package/dist/src/build/onboarding/ui/steps/ios-credentials.d.ts +66 -0
  78. package/dist/src/build/onboarding/ui/steps/ios-import.d.ts +79 -0
  79. package/dist/src/build/onboarding/ui/steps/ios-shared.d.ts +93 -0
  80. package/dist/src/build/onboarding/workflow-generator.d.ts +48 -0
  81. package/dist/src/build/onboarding/workflow-ui-helpers.d.ts +18 -0
  82. package/dist/src/build/onboarding/workflow-writer.d.ts +36 -0
  83. package/dist/src/build/output-record.d.ts +30 -0
  84. package/dist/src/build/pbxproj-parser.d.ts +48 -0
  85. package/dist/src/build/platform-paths.d.ts +20 -0
  86. package/dist/src/build/qr.d.ts +5 -0
  87. package/dist/src/build/request.d.ts +107 -0
  88. package/dist/src/build/telemetry.d.ts +17 -0
  89. package/dist/src/bundle/builder-cta.d.ts +67 -0
  90. package/dist/src/bundle/check.d.ts +0 -1
  91. package/dist/src/bundle/cleanup.d.ts +3 -12
  92. package/dist/src/bundle/compatibility.d.ts +23 -12
  93. package/dist/src/bundle/decrypt.d.ts +4 -0
  94. package/dist/src/bundle/delete.d.ts +3 -8
  95. package/dist/src/bundle/encrypt.d.ts +4 -0
  96. package/dist/src/bundle/list.d.ts +5 -2
  97. package/dist/src/bundle/partial.d.ts +5 -3
  98. package/dist/src/bundle/releaseType.d.ts +15 -0
  99. package/dist/src/bundle/unlink.d.ts +6 -5
  100. package/dist/src/bundle/upload-command.d.ts +8 -0
  101. package/dist/src/bundle/upload.d.ts +21 -14
  102. package/dist/src/bundle/upload_interface.d.ts +2 -50
  103. package/dist/src/bundle/zip.d.ts +4 -19
  104. package/dist/src/capacitor-cli.d.ts +13 -0
  105. package/dist/src/channel/add.d.ts +8 -10
  106. package/dist/src/channel/currentBundle.d.ts +3 -9
  107. package/dist/src/channel/delete.d.ts +3 -9
  108. package/dist/src/channel/list.d.ts +31 -4
  109. package/dist/src/channel/set.d.ts +2 -17
  110. package/dist/src/checksum.d.ts +1 -2
  111. package/dist/src/config/index.d.ts +2 -13
  112. package/dist/src/docs.d.ts +0 -1
  113. package/dist/src/github-command.d.ts +9 -0
  114. package/dist/src/github.d.ts +40 -0
  115. package/dist/src/index.d.ts +0 -1
  116. package/dist/src/init/app-conflict.d.ts +2 -0
  117. package/dist/src/init/command.d.ts +57 -0
  118. package/dist/src/init/index.d.ts +1 -0
  119. package/dist/src/init/prompts.d.ts +41 -0
  120. package/dist/src/init/runtime.d.ts +111 -0
  121. package/dist/src/init/ui/app.d.ts +9 -0
  122. package/dist/src/init/ui/components.d.ts +31 -0
  123. package/dist/src/init/ui.d.ts +12 -0
  124. package/dist/src/init/updater.d.ts +13 -0
  125. package/dist/src/key.d.ts +16 -0
  126. package/dist/src/login.d.ts +0 -1
  127. package/dist/src/mcp/server.d.ts +5 -0
  128. package/dist/src/onboarding-support.d.ts +18 -0
  129. package/dist/src/organization/add.d.ts +26 -0
  130. package/dist/src/organization/delete.d.ts +3 -0
  131. package/dist/src/{organisation → organization}/index.d.ts +1 -1
  132. package/dist/src/{organisation → organization}/list.d.ts +14 -2
  133. package/dist/src/organization/members.d.ts +12 -0
  134. package/dist/src/organization/set.d.ts +21 -0
  135. package/dist/src/posthog.d.ts +13 -0
  136. package/dist/src/probe.d.ts +20 -0
  137. package/dist/src/promptPreferences.d.ts +13 -0
  138. package/dist/src/replicationProgress.d.ts +8 -0
  139. package/dist/src/run/device.d.ts +5 -0
  140. package/dist/src/runner-command.d.ts +5 -0
  141. package/dist/src/schemas/app.d.ts +26 -0
  142. package/dist/src/schemas/base.d.ts +7 -0
  143. package/dist/src/schemas/build.d.ts +196 -0
  144. package/dist/src/schemas/bundle.d.ts +157 -0
  145. package/dist/src/schemas/channel.d.ts +62 -0
  146. package/dist/src/schemas/common.d.ts +46 -0
  147. package/dist/src/schemas/config.d.ts +20 -0
  148. package/dist/src/schemas/index.d.ts +19 -0
  149. package/dist/src/schemas/organization.d.ts +41 -0
  150. package/dist/src/schemas/sdk.d.ts +335 -0
  151. package/dist/src/schemas/validate.d.ts +12 -0
  152. package/dist/src/sdk.d.ts +138 -317
  153. package/dist/src/sdk.js +542 -299
  154. package/dist/src/terminal-table.d.ts +7 -0
  155. package/dist/src/types/supabase.types.d.ts +2770 -296
  156. package/dist/src/updaterConfig.d.ts +8 -0
  157. package/dist/src/user/account.d.ts +0 -1
  158. package/dist/src/utils/latest-version.d.ts +0 -1
  159. package/dist/src/utils/safeWrites.d.ts +21 -0
  160. package/dist/src/utils/security_policy_errors.d.ts +47 -0
  161. package/dist/src/utils.d.ts +2869 -341
  162. package/dist/src/versionHelpers.d.ts +19 -0
  163. package/package.json +120 -29
  164. package/skills/native-builds/SKILL.md +255 -0
  165. package/skills/organization-management/SKILL.md +93 -0
  166. package/skills/release-management/SKILL.md +225 -0
  167. package/skills/usage/SKILL.md +92 -0
  168. package/dist/src/api/app.d.ts.map +0 -1
  169. package/dist/src/api/channels.d.ts.map +0 -1
  170. package/dist/src/api/cryptoV2.d.ts +0 -16
  171. package/dist/src/api/cryptoV2.d.ts.map +0 -1
  172. package/dist/src/api/update.d.ts.map +0 -1
  173. package/dist/src/api/versions.d.ts.map +0 -1
  174. package/dist/src/app/add.d.ts.map +0 -1
  175. package/dist/src/app/debug.d.ts.map +0 -1
  176. package/dist/src/app/delete.d.ts.map +0 -1
  177. package/dist/src/app/info.d.ts.map +0 -1
  178. package/dist/src/app/list.d.ts.map +0 -1
  179. package/dist/src/app/set.d.ts.map +0 -1
  180. package/dist/src/app/setting.d.ts.map +0 -1
  181. package/dist/src/bundle/check.d.ts.map +0 -1
  182. package/dist/src/bundle/cleanup.d.ts.map +0 -1
  183. package/dist/src/bundle/compatibility.d.ts.map +0 -1
  184. package/dist/src/bundle/decryptV2.d.ts +0 -13
  185. package/dist/src/bundle/decryptV2.d.ts.map +0 -1
  186. package/dist/src/bundle/delete.d.ts.map +0 -1
  187. package/dist/src/bundle/encryptV2.d.ts +0 -14
  188. package/dist/src/bundle/encryptV2.d.ts.map +0 -1
  189. package/dist/src/bundle/list.d.ts.map +0 -1
  190. package/dist/src/bundle/partial.d.ts.map +0 -1
  191. package/dist/src/bundle/unlink.d.ts.map +0 -1
  192. package/dist/src/bundle/upload.d.ts.map +0 -1
  193. package/dist/src/bundle/upload_interface.d.ts.map +0 -1
  194. package/dist/src/bundle/zip.d.ts.map +0 -1
  195. package/dist/src/channel/add.d.ts.map +0 -1
  196. package/dist/src/channel/currentBundle.d.ts.map +0 -1
  197. package/dist/src/channel/delete.d.ts.map +0 -1
  198. package/dist/src/channel/list.d.ts.map +0 -1
  199. package/dist/src/channel/set.d.ts.map +0 -1
  200. package/dist/src/checksum.d.ts.map +0 -1
  201. package/dist/src/config/index.d.ts.map +0 -1
  202. package/dist/src/docs.d.ts.map +0 -1
  203. package/dist/src/index.d.ts.map +0 -1
  204. package/dist/src/init.d.ts +0 -7
  205. package/dist/src/init.d.ts.map +0 -1
  206. package/dist/src/keyV2.d.ts +0 -19
  207. package/dist/src/keyV2.d.ts.map +0 -1
  208. package/dist/src/login.d.ts.map +0 -1
  209. package/dist/src/organisation/add.d.ts +0 -19
  210. package/dist/src/organisation/add.d.ts.map +0 -1
  211. package/dist/src/organisation/delete.d.ts +0 -8
  212. package/dist/src/organisation/delete.d.ts.map +0 -1
  213. package/dist/src/organisation/index.d.ts.map +0 -1
  214. package/dist/src/organisation/list.d.ts.map +0 -1
  215. package/dist/src/organisation/set.d.ts +0 -13
  216. package/dist/src/organisation/set.d.ts.map +0 -1
  217. package/dist/src/sdk.d.ts.map +0 -1
  218. package/dist/src/types/supabase.types.d.ts.map +0 -1
  219. package/dist/src/user/account.d.ts.map +0 -1
  220. package/dist/src/utils/latest-version.d.ts.map +0 -1
  221. package/dist/src/utils.d.ts.map +0 -1
@@ -0,0 +1,178 @@
1
+ import type { FC } from 'react';
2
+ import type { DiffLine } from '../diff-utils.js';
3
+ export declare const Divider: FC<{
4
+ width?: number;
5
+ }>;
6
+ export declare const BOX_HEADER_ROWS = 5;
7
+ export declare const COMPACT_HEADER_ROWS = 1;
8
+ export declare const WIZARD_PADDING_ROWS = 2;
9
+ /**
10
+ * Minimal in-house Table component. Auto-sizes each column to the widest
11
+ * value (header or any row cell) up to `maxColumnWidth`, truncates with
12
+ * an ellipsis when a cell exceeds that width, and renders box-drawing
13
+ * borders.
14
+ *
15
+ * Why inline instead of `ink-table`: the published `ink-table@3.1.0` is
16
+ * CommonJS and modern `ink` (v5+) is ESM with top-level await, so bundling
17
+ * fails. This component is the small subset of ink-table's API we need
18
+ * (rows of plain string cells) without the compat headache.
19
+ *
20
+ * The `data` rows must share a single key order so columns line up — we
21
+ * derive the column list from the first row's keys.
22
+ *
23
+ * `cellColor` runs per-cell and returns an Ink color name (or undefined
24
+ * for default). Used by the available/unavailable-certs tables to colour
25
+ * the status column green/red while keeping Name/Team dim.
26
+ */
27
+ export interface TableProps {
28
+ data: Record<string, string>[];
29
+ /** Hard cap on column width before truncation. Default 50. */
30
+ maxColumnWidth?: number;
31
+ /** Optional per-cell color function. */
32
+ cellColor?: (column: string, value: string, rowIndex: number) => string | undefined;
33
+ /** Optional per-cell dim flag (defaults to false). */
34
+ cellDim?: (column: string, value: string, rowIndex: number) => boolean;
35
+ /** Padding inside each cell (left/right). Default 1. */
36
+ cellPadding?: number;
37
+ }
38
+ export declare const Table: FC<TableProps>;
39
+ export declare const SpinnerLine: FC<{
40
+ text: string;
41
+ }>;
42
+ export declare const SuccessLine: FC<{
43
+ text: string;
44
+ detail?: string;
45
+ }>;
46
+ export declare const ErrorLine: FC<{
47
+ text: string;
48
+ }>;
49
+ export type AiResultKind = 'already_analyzed' | 'too_big' | 'error';
50
+ export declare const AiResultBanner: FC<{
51
+ kind: AiResultKind;
52
+ message: string;
53
+ dense?: boolean;
54
+ }>;
55
+ /**
56
+ * Custom TextInput that filters out specific characters (e.g. '=').
57
+ * @inkjs/ui's TextInput is uncontrolled and can't filter keystrokes,
58
+ * so we build a minimal one with Ink's useInput.
59
+ */
60
+ export declare const FilteredTextInput: FC<{
61
+ placeholder?: string;
62
+ /**
63
+ * Blacklist of characters to strip from input. Each char in this string is
64
+ * removed from the buffer after every keystroke. Used for casual filtering
65
+ * (e.g. stripping `=` from env-var values).
66
+ */
67
+ filter?: string;
68
+ /**
69
+ * Whitelist regex matched per-character. Anything not matching is dropped.
70
+ * Takes precedence over `filter` when both are set. Used when the field has
71
+ * a tight format (Apple Key ID is exactly 10 alphanumeric chars; Issuer ID
72
+ * is a UUID; etc.) so users can't even type invalid characters.
73
+ */
74
+ allowedPattern?: RegExp;
75
+ /**
76
+ * Hard cap on input length. Extra characters past the cap are dropped
77
+ * silently (paste-safe). Pair with `allowedPattern` for known-format fields
78
+ * — e.g. Apple Key ID has `maxLength=10` so a paste of "Key ID: KDTXMK292V"
79
+ * truncates to the first 10 valid chars after filtering.
80
+ */
81
+ maxLength?: number;
82
+ /**
83
+ * Post-filter transform applied to the entire buffer after each keystroke.
84
+ * Most common use: `(s) => s.toUpperCase()` for fields that are case-
85
+ * insensitive but conventionally uppercase. Runs after filter + maxLength.
86
+ */
87
+ transform?: (value: string) => string;
88
+ mask?: boolean;
89
+ /**
90
+ * Pre-fills the input. Used when the user is editing an already-entered
91
+ * value (e.g. fixing a typo in their ASC Key ID / Issuer ID after a
92
+ * verifying-key failure) so they don't have to retype everything.
93
+ * Backspace works normally to delete from the pre-filled value.
94
+ */
95
+ initialValue?: string;
96
+ onSubmit: (value: string) => void;
97
+ }>;
98
+ export declare const Header: FC<{
99
+ compact?: boolean;
100
+ }>;
101
+ /**
102
+ * Scrollable, fullscreen viewer for the AI build-analysis markdown when it
103
+ * is taller than the user's terminal viewport. Mirrors the shape of the
104
+ * workflow-file diff viewer on main, but for pre-rendered ANSI lines (no
105
+ * `add`/`del` colouring — the markdown renderer already styled them).
106
+ *
107
+ * Keybindings:
108
+ * ↑/k scroll one line up
109
+ * ↓/j scroll one line down
110
+ * PgUp/u jump up one viewport
111
+ * PgDn/d/␣ jump down one viewport
112
+ * Home/g jump to top
113
+ * End/G jump to bottom
114
+ * Esc/Enter dismiss the viewer (returns control to the parent step)
115
+ */
116
+ export declare const FullscreenAiViewer: FC<{
117
+ title: string;
118
+ subtitle?: string;
119
+ lines: string[];
120
+ terminalRows: number;
121
+ onExit: () => void;
122
+ }>;
123
+ export declare function isBuildCompleteDismissKey(input: string, key: {
124
+ return?: boolean;
125
+ escape?: boolean;
126
+ }): boolean;
127
+ export interface BuildScrollState {
128
+ scrollOffset: number;
129
+ follow: boolean;
130
+ }
131
+ export declare function buildScrollAction(input: string, key: {
132
+ upArrow?: boolean;
133
+ downArrow?: boolean;
134
+ pageUp?: boolean;
135
+ pageDown?: boolean;
136
+ }, state: {
137
+ scrollOffset: number;
138
+ maxScrollOffset: number;
139
+ viewportRows: number;
140
+ }): BuildScrollState | null;
141
+ export declare function formatElapsed(ms: number): string;
142
+ export declare const FullscreenBuildOutput: FC<{
143
+ title: string;
144
+ lines: string[];
145
+ terminalRows: number;
146
+ }>;
147
+ /**
148
+ * Minimal bordered table component for the confirm-secrets-push step.
149
+ *
150
+ * Rolled in-house instead of pulling `ink-table` because that package is
151
+ * CommonJS-only and Ink 5 uses top-level await — bun can't bundle the combo.
152
+ * Replicates the visual style (box-drawing borders, aligned columns) with
153
+ * ~50 lines of Ink primitives, lets us color the Status column per-row, and
154
+ * leaves nothing to maintain outside this repo.
155
+ */
156
+ export interface SecretRow {
157
+ name: string;
158
+ status: 'NEW' | 'REPLACE';
159
+ }
160
+ export declare const DiffSummary: FC<{
161
+ title: string;
162
+ subtitle?: string;
163
+ lines: DiffLine[];
164
+ }>;
165
+ export declare const FullscreenDiffViewer: FC<{
166
+ title: string;
167
+ subtitle?: string;
168
+ lines: DiffLine[];
169
+ terminalRows: number;
170
+ onExit: () => void;
171
+ }>;
172
+ /**
173
+ * Render the secrets table inline. Keep this dynamic so the onboarding header
174
+ * and prompt stay in one live Ink frame.
175
+ */
176
+ export declare const SecretsTable: FC<{
177
+ rows: SecretRow[];
178
+ }>;
@@ -0,0 +1,10 @@
1
+ export type PlatformPickerLayout = 'cards' | 'list';
2
+ export declare const PLATFORM_CARDS_MIN_COLS = 44;
3
+ export declare const PLATFORM_CARDS_MIN_ROWS = 16;
4
+ export declare function pickPlatformLayout(cols: number, rows: number): PlatformPickerLayout;
5
+ export declare function logBudgetRows(terminalRows: number, headerRows: number, bodyHeight: number): number;
6
+ export interface CappedLog<T> {
7
+ hidden: number;
8
+ visible: T[];
9
+ }
10
+ export declare function capLogRows<T>(entries: T[], maxRows: number): CappedLog<T>;
@@ -0,0 +1,20 @@
1
+ import type { FC, ReactNode } from 'react';
2
+ export interface TerminalTooSmallPromptProps {
3
+ cols: number;
4
+ rows: number;
5
+ /** Minimum columns this screen needs. Defaults to the full onboarding floor;
6
+ * the platform picker passes its smaller PICKER_MIN_COLS. */
7
+ minCols?: number;
8
+ /** Minimum rows this screen needs. Defaults to the full onboarding floor; the
9
+ * platform picker passes its smaller PICKER_MIN_ROWS. So the prompt always
10
+ * states the floor of the screen that's actually too small (e.g. "11 rows" on
11
+ * the picker, not the wizard's 49). */
12
+ minRows?: number;
13
+ }
14
+ export declare const TerminalTooSmallPrompt: FC<TerminalTooSmallPromptProps>;
15
+ export interface MinSizeGateProps {
16
+ cols: number;
17
+ rows: number;
18
+ children: ReactNode;
19
+ }
20
+ export declare const MinSizeGate: FC<MinSizeGateProps>;
@@ -0,0 +1,19 @@
1
+ import type { FC } from 'react';
2
+ import type { Platform } from '../types.js';
3
+ import type { PlatformPickerLayout } from './frame-fit.js';
4
+ export type PlatformKeyAction = {
5
+ type: 'select';
6
+ platform: Platform;
7
+ } | {
8
+ type: 'confirm';
9
+ } | null;
10
+ export declare function platformKeyAction(input: string, key: {
11
+ leftArrow?: boolean;
12
+ rightArrow?: boolean;
13
+ return?: boolean;
14
+ }): PlatformKeyAction;
15
+ export interface PlatformPickerProps {
16
+ layout: PlatformPickerLayout;
17
+ onSelect: (platform: Platform) => void;
18
+ }
19
+ export declare const PlatformPicker: FC<PlatformPickerProps>;
@@ -0,0 +1,33 @@
1
+ import type { FC } from 'react';
2
+ import type { OnboardingResult, Platform } from '../types.js';
3
+ export declare function useTerminalSize(): {
4
+ cols: number;
5
+ rows: number;
6
+ };
7
+ export interface OnboardingShellProps {
8
+ appId: string;
9
+ /**
10
+ * iOS-side bundle id default — sourced from `config.appId` (top-level), which
11
+ * is what `cap sync` writes into `PRODUCT_BUNDLE_IDENTIFIER`. Distinct from
12
+ * `appId` above, which `getAppId()` may resolve to
13
+ * `config.plugins.CapacitorUpdater.appId` (a Capgo lookup key — wrong for
14
+ * Apple signing). Threaded down to the iOS OnboardingApp; the Android app
15
+ * ignores it.
16
+ */
17
+ iosBundleIdInitial: string;
18
+ iosDir: string;
19
+ androidDir: string;
20
+ apikey?: string;
21
+ supaHost?: string;
22
+ /** Pre-resolved platform (--platform flag or the single existing native dir); skips the picker. */
23
+ initialPlatform?: Platform;
24
+ /** Called once a platform is chosen so the caller can print the completion breadcrumb. */
25
+ onResolvePlatform?: (platform: Platform) => void;
26
+ /** Called by the mounted app when it reaches the build-complete screen, so the
27
+ * caller prints the accurate post-exit message + durable summary. If the wizard
28
+ * exits any other way (cancel / missing platform), this never fires and the
29
+ * caller treats it as cancelled. */
30
+ onResult?: (result: OnboardingResult) => void;
31
+ }
32
+ declare const OnboardingShell: FC<OnboardingShellProps>;
33
+ export default OnboardingShell;
@@ -0,0 +1,45 @@
1
+ import type { FC } from 'react';
2
+ import type { CiSecretSetupAdvice } from '../../ci-secrets.js';
3
+ export interface SelectOption {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export declare const SavingCredentialsStep: FC;
8
+ export declare const DetectingCiSecretsStep: FC;
9
+ export interface CiSecretsSetupStepProps {
10
+ advice: CiSecretSetupAdvice[];
11
+ onChoose: (choice: 'retry' | 'skip') => void;
12
+ dense?: boolean;
13
+ }
14
+ export declare const CiSecretsSetupStep: FC<CiSecretsSetupStepProps>;
15
+ export interface CiSecretsTargetSelectStepProps {
16
+ options: SelectOption[];
17
+ onChange: (value: string) => void;
18
+ dense?: boolean;
19
+ }
20
+ export declare const CiSecretsTargetSelectStep: FC<CiSecretsTargetSelectStepProps>;
21
+ export interface AskCiSecretsStepProps {
22
+ entryCount: number;
23
+ targetLabel: string;
24
+ cli: string;
25
+ onChoose: (choice: 'yes' | 'no') => void;
26
+ dense?: boolean;
27
+ }
28
+ export declare const AskCiSecretsStep: FC<AskCiSecretsStepProps>;
29
+ export interface ConfirmCiSecretOverwriteStepProps {
30
+ existingKeys: string[];
31
+ onChoose: (choice: 'replace' | 'skip') => void;
32
+ dense?: boolean;
33
+ }
34
+ export declare const ConfirmCiSecretOverwriteStep: FC<ConfirmCiSecretOverwriteStepProps>;
35
+ export interface CiSecretsFailedStepProps {
36
+ error: string | null;
37
+ onChoose: (choice: 'retry' | 'continue') => void;
38
+ dense?: boolean;
39
+ }
40
+ export declare const CiSecretsFailedStep: FC<CiSecretsFailedStepProps>;
41
+ export interface AskBuildStepProps {
42
+ onChoose: (choice: 'yes' | 'no') => void;
43
+ dense?: boolean;
44
+ }
45
+ export declare const AskBuildStep: FC<AskBuildStepProps>;
@@ -0,0 +1,75 @@
1
+ import type { FC } from 'react';
2
+ export type KeystoreMethodChoice = 'existing' | 'generate' | 'learn';
3
+ export interface KeystoreMethodSelectStepProps {
4
+ onChoose: (choice: KeystoreMethodChoice) => void;
5
+ dense?: boolean;
6
+ }
7
+ export declare const KeystoreMethodSelectStep: FC<KeystoreMethodSelectStepProps>;
8
+ export interface KeystoreExplainerStepProps {
9
+ onBack: () => void;
10
+ dense?: boolean;
11
+ }
12
+ export declare const KeystoreExplainerStep: FC<KeystoreExplainerStepProps>;
13
+ export interface KeystoreExistingPathStepProps {
14
+ /** When true, render the picker-vs-manual chooser; else the path text input. */
15
+ showChooser: boolean;
16
+ onChoosePicker: () => void;
17
+ onChooseManual: () => void;
18
+ onSubmitPath: (value: string) => void;
19
+ dense?: boolean;
20
+ }
21
+ export declare const KeystoreExistingPathStep: FC<KeystoreExistingPathStepProps>;
22
+ export declare const KeystoreExistingPickerStep: FC;
23
+ export interface KeystoreExistingStorePasswordStepProps {
24
+ onSubmit: (value: string) => void;
25
+ dense?: boolean;
26
+ }
27
+ export declare const KeystoreExistingStorePasswordStep: FC<KeystoreExistingStorePasswordStepProps>;
28
+ export declare const KeystoreExistingDetectingAliasStep: FC;
29
+ export interface KeystoreExistingAliasSelectStepProps {
30
+ aliases: string[];
31
+ onSelect: (alias: string) => void;
32
+ dense?: boolean;
33
+ }
34
+ export declare const KeystoreExistingAliasSelectStep: FC<KeystoreExistingAliasSelectStepProps>;
35
+ export interface KeystoreExistingAliasStepProps {
36
+ onSubmit: (value: string) => void;
37
+ dense?: boolean;
38
+ }
39
+ export declare const KeystoreExistingAliasStep: FC<KeystoreExistingAliasStepProps>;
40
+ export interface KeystoreExistingKeyPasswordStepProps {
41
+ /** `probing` shows a spinner while we auto-detect; `prompt` asks the user. */
42
+ mode: 'probing' | 'prompt';
43
+ onSubmit: (value: string) => void;
44
+ dense?: boolean;
45
+ }
46
+ export declare const KeystoreExistingKeyPasswordStep: FC<KeystoreExistingKeyPasswordStepProps>;
47
+ export interface KeystoreNewAliasStepProps {
48
+ onSubmit: (value: string) => void;
49
+ dense?: boolean;
50
+ }
51
+ export declare const KeystoreNewAliasStep: FC<KeystoreNewAliasStepProps>;
52
+ export type KeystorePasswordMethodChoice = 'random' | 'manual';
53
+ export interface KeystoreNewPasswordMethodStepProps {
54
+ onChoose: (choice: KeystorePasswordMethodChoice) => void;
55
+ dense?: boolean;
56
+ }
57
+ export declare const KeystoreNewPasswordMethodStep: FC<KeystoreNewPasswordMethodStepProps>;
58
+ export interface KeystoreNewStorePasswordStepProps {
59
+ onSubmit: (value: string) => void;
60
+ dense?: boolean;
61
+ }
62
+ export declare const KeystoreNewStorePasswordStep: FC<KeystoreNewStorePasswordStepProps>;
63
+ export interface KeystoreNewKeyPasswordStepProps {
64
+ onSubmit: (value: string) => void;
65
+ dense?: boolean;
66
+ }
67
+ export declare const KeystoreNewKeyPasswordStep: FC<KeystoreNewKeyPasswordStepProps>;
68
+ export interface KeystoreNewCommonNameStepProps {
69
+ /** Placeholder shown for the default (the app id). */
70
+ appId: string;
71
+ onSubmit: (value: string) => void;
72
+ dense?: boolean;
73
+ }
74
+ export declare const KeystoreNewCommonNameStep: FC<KeystoreNewCommonNameStepProps>;
75
+ export declare const KeystoreGeneratingStep: FC;
@@ -0,0 +1,85 @@
1
+ import type { FC } from 'react';
2
+ export interface SelectOption {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export type ServiceAccountMethodChoice = 'existing' | 'generate';
7
+ export interface ServiceAccountMethodSelectStepProps {
8
+ onChoose: (choice: ServiceAccountMethodChoice) => void;
9
+ dense?: boolean;
10
+ }
11
+ export declare const ServiceAccountMethodSelectStep: FC<ServiceAccountMethodSelectStepProps>;
12
+ export interface SaJsonExistingPathStepProps {
13
+ showChooser: boolean;
14
+ onChoosePicker: () => void;
15
+ onChooseManual: () => void;
16
+ onSubmitPath: (value: string) => void;
17
+ dense?: boolean;
18
+ }
19
+ export declare const SaJsonExistingPathStep: FC<SaJsonExistingPathStepProps>;
20
+ export declare const SaJsonExistingPickerStep: FC;
21
+ export declare const SaJsonValidatingStep: FC;
22
+ export interface SaJsonValidationFailedStepProps {
23
+ message: string;
24
+ onChoose: (choice: 'retry' | 'save-anyway' | 'oauth') => void;
25
+ dense?: boolean;
26
+ }
27
+ export declare const SaJsonValidationFailedStep: FC<SaJsonValidationFailedStepProps>;
28
+ export type GoogleSignInChoice = 'go' | 'learn' | 'exit';
29
+ export interface GoogleSignInStepProps {
30
+ onChoose: (choice: GoogleSignInChoice) => void;
31
+ dense?: boolean;
32
+ }
33
+ export declare const GoogleSignInStep: FC<GoogleSignInStepProps>;
34
+ export interface GoogleSignInLearnMoreStepProps {
35
+ onBack: () => void;
36
+ dense?: boolean;
37
+ }
38
+ export declare const GoogleSignInLearnMoreStep: FC<GoogleSignInLearnMoreStepProps>;
39
+ export interface GoogleSignInRunningStepProps {
40
+ statusMessages: string[];
41
+ dense?: boolean;
42
+ }
43
+ export declare const GoogleSignInRunningStep: FC<GoogleSignInRunningStepProps>;
44
+ export type PlayDevIdActionChoice = 'open' | 'tutorial' | 'manual';
45
+ export interface PlayDeveloperIdActionsStepProps {
46
+ playDeveloperUrl: string;
47
+ onChoose: (choice: PlayDevIdActionChoice) => void;
48
+ dense?: boolean;
49
+ }
50
+ export declare const PlayDeveloperIdActionsStep: FC<PlayDeveloperIdActionsStepProps>;
51
+ export interface PlayDeveloperIdInputStepProps {
52
+ onSubmit: (value: string) => void;
53
+ dense?: boolean;
54
+ }
55
+ export declare const PlayDeveloperIdInputStep: FC<PlayDeveloperIdInputStepProps>;
56
+ export declare const GcpProjectsLoadingStep: FC;
57
+ export interface GcpProjectsSelectStepProps {
58
+ options: SelectOption[];
59
+ onChange: (value: string) => void;
60
+ dense?: boolean;
61
+ }
62
+ export declare const GcpProjectsSelectStep: FC<GcpProjectsSelectStepProps>;
63
+ export interface GcpProjectCreateNameStepProps {
64
+ /** Placeholder shown for the default project display name. */
65
+ defaultDisplayName: string;
66
+ onSubmit: (value: string) => void;
67
+ dense?: boolean;
68
+ }
69
+ export declare const GcpProjectCreateNameStep: FC<GcpProjectCreateNameStepProps>;
70
+ export interface AndroidPackageSelectStepProps {
71
+ showChooser: boolean;
72
+ detectedOptions: SelectOption[];
73
+ detectedCount: number;
74
+ /** The configured native dir (e.g. "android") — used in the comfortable copy. */
75
+ androidDir: string;
76
+ onChooseDetected: (value: string) => void;
77
+ onSubmitManual: (value: string) => void;
78
+ dense?: boolean;
79
+ }
80
+ export declare const AndroidPackageSelectStep: FC<AndroidPackageSelectStepProps>;
81
+ export interface GcpSetupRunningStepProps {
82
+ statusMessages: string[];
83
+ dense?: boolean;
84
+ }
85
+ export declare const GcpSetupRunningStep: FC<GcpSetupRunningStepProps>;
@@ -0,0 +1,67 @@
1
+ import type { FC } from 'react';
2
+ import type { AiResultKind } from '../components.js';
3
+ export declare const WelcomeStep: FC;
4
+ export interface NoPlatformStepProps {
5
+ androidDir: string;
6
+ dense?: boolean;
7
+ }
8
+ export declare const NoPlatformStep: FC<NoPlatformStepProps>;
9
+ export interface CredentialsExistStepProps {
10
+ appId: string;
11
+ onChoose: (choice: 'backup' | 'exit') => void;
12
+ dense?: boolean;
13
+ }
14
+ export declare const CredentialsExistStep: FC<CredentialsExistStepProps>;
15
+ export declare const BackingUpStep: FC;
16
+ export interface BuildCompleteStepProps {
17
+ uploadSummary: string | null;
18
+ buildUrl: string;
19
+ /** Absolute path of a workflow file written by the GitHub Actions flow. */
20
+ workflowWrittenPath?: string | null;
21
+ /** Absolute path of credentials exported to a .env fallback. */
22
+ envExportPath?: string | null;
23
+ /** Surfaced when the .env export failed (non-fatal). */
24
+ envExportError?: string | null;
25
+ dense?: boolean;
26
+ }
27
+ export declare const BuildCompleteStep: FC<BuildCompleteStepProps>;
28
+ export interface ErrorStepProps {
29
+ message: string;
30
+ onChoose: (choice: 'retry' | 'exit') => void;
31
+ dense?: boolean;
32
+ }
33
+ export declare const ErrorStep: FC<ErrorStepProps>;
34
+ export interface AiAnalysisPromptStepProps {
35
+ onChoose: (choice: 'debug' | 'skip') => void;
36
+ dense?: boolean;
37
+ }
38
+ export declare const AiAnalysisPromptStep: FC<AiAnalysisPromptStepProps>;
39
+ export declare const AiAnalysisRunningStep: FC<{
40
+ streamText?: string;
41
+ terminalRows: number;
42
+ terminalCols: number;
43
+ }>;
44
+ export interface AiAnalysisResultStepProps {
45
+ /** Pre-rendered (markdown→ANSI) analysis text, or null on a non-success result. */
46
+ analysisText: string | null;
47
+ /**
48
+ * True when the analysis is too tall to show inline alongside the picker, so
49
+ * it lives in the scroll viewer and is replaced here by a compact marker + a
50
+ * "Re-read analysis" option. False ⇒ render the full text inline.
51
+ */
52
+ collapsed: boolean;
53
+ /** Non-success outcome banner (error / already_analyzed / too_big), else null. */
54
+ result: {
55
+ kind: AiResultKind;
56
+ message: string;
57
+ } | null;
58
+ /** Retries already consumed; with `maxRetries` decides whether retry is offered. */
59
+ retryCount: number;
60
+ maxRetries: number;
61
+ onRetry: () => void;
62
+ onSkipOrContinue: () => void;
63
+ /** Re-open the fullscreen scroll viewer to re-read the analysis. */
64
+ onReread: () => void;
65
+ dense?: boolean;
66
+ }
67
+ export declare const AiAnalysisResultStep: FC<AiAnalysisResultStepProps>;
@@ -0,0 +1,44 @@
1
+ import type { FC } from 'react';
2
+ import type { CiSecretSetupAdvice, CiSecretTarget } from '../../ci-secrets.js';
3
+ export interface SelectOption {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export declare const DetectingCiSecretsStep: FC;
8
+ export interface CiSecretsSetupStepProps {
9
+ advice: CiSecretSetupAdvice[];
10
+ dense?: boolean;
11
+ onChange: (value: string) => void;
12
+ }
13
+ export declare const CiSecretsSetupStep: FC<CiSecretsSetupStepProps>;
14
+ export interface CiSecretsTargetSelectStepProps {
15
+ options: SelectOption[];
16
+ dense?: boolean;
17
+ onChange: (value: string) => void;
18
+ }
19
+ export declare const CiSecretsTargetSelectStep: FC<CiSecretsTargetSelectStepProps>;
20
+ export interface AskCiSecretsStepProps {
21
+ entryCount: number;
22
+ target: CiSecretTarget | null;
23
+ targetLabel: string;
24
+ dense?: boolean;
25
+ onChange: (value: string) => void;
26
+ }
27
+ export declare const AskCiSecretsStep: FC<AskCiSecretsStepProps>;
28
+ export interface ConfirmCiSecretOverwriteStepProps {
29
+ existingKeys: string[];
30
+ dense?: boolean;
31
+ onChange: (value: string) => void;
32
+ }
33
+ export declare const ConfirmCiSecretOverwriteStep: FC<ConfirmCiSecretOverwriteStepProps>;
34
+ export interface CiSecretsFailedStepProps {
35
+ error: string | null;
36
+ dense?: boolean;
37
+ onChange: (value: string) => void;
38
+ }
39
+ export declare const CiSecretsFailedStep: FC<CiSecretsFailedStepProps>;
40
+ export interface AskBuildStepProps {
41
+ dense?: boolean;
42
+ onChange: (value: string) => void;
43
+ }
44
+ export declare const AskBuildStep: FC<AskBuildStepProps>;
@@ -0,0 +1,66 @@
1
+ import type { FC } from 'react';
2
+ export interface SelectOption {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export interface CredentialsExistStepProps {
7
+ appId: string;
8
+ dense?: boolean;
9
+ onChange: (value: string) => void;
10
+ }
11
+ export declare const CredentialsExistStep: FC<CredentialsExistStepProps>;
12
+ export declare const BackingUpStep: FC;
13
+ export interface SetupMethodSelectStepProps {
14
+ dense?: boolean;
15
+ onChange: (value: string) => void | Promise<void>;
16
+ }
17
+ export declare const SetupMethodSelectStep: FC<SetupMethodSelectStepProps>;
18
+ export interface ApiKeyInstructionsStepProps {
19
+ canUseFilePicker: boolean;
20
+ dense?: boolean;
21
+ onMethodChange: (value: string) => void;
22
+ onPathSubmit: (value: string) => void | Promise<void>;
23
+ }
24
+ export declare const ApiKeyInstructionsStep: FC<ApiKeyInstructionsStepProps>;
25
+ export declare const P8MethodSelectStep: FC;
26
+ export interface InputP8PathStepProps {
27
+ onSubmit: (value: string) => void | Promise<void>;
28
+ }
29
+ export declare const InputP8PathStep: FC<InputP8PathStepProps>;
30
+ export interface InputKeyIdStepProps {
31
+ keyId: string;
32
+ dense?: boolean;
33
+ onSubmit: (value: string) => void;
34
+ }
35
+ export declare const InputKeyIdStep: FC<InputKeyIdStepProps>;
36
+ export interface InputIssuerIdStepProps {
37
+ dense?: boolean;
38
+ onSubmit: (value: string) => void;
39
+ }
40
+ export declare const InputIssuerIdStep: FC<InputIssuerIdStepProps>;
41
+ export declare const VerifyingKeyStep: FC;
42
+ export declare const CreatingCertificateStep: FC;
43
+ export interface CertLimitPromptStepProps {
44
+ existingCount: number;
45
+ options: SelectOption[];
46
+ dense?: boolean;
47
+ onChange: (value: string) => void;
48
+ }
49
+ export declare const CertLimitPromptStep: FC<CertLimitPromptStepProps>;
50
+ export declare const RevokingCertificateStep: FC;
51
+ export interface CreatingProfileStepProps {
52
+ appId: string;
53
+ dense?: boolean;
54
+ }
55
+ export declare const CreatingProfileStep: FC<CreatingProfileStepProps>;
56
+ export interface DuplicateProfilePromptStepProps {
57
+ duplicateCount: number;
58
+ dense?: boolean;
59
+ onChange: (value: string) => void;
60
+ }
61
+ export declare const DuplicateProfilePromptStep: FC<DuplicateProfilePromptStepProps>;
62
+ export interface DeletingDuplicateProfilesStepProps {
63
+ duplicateCount: number;
64
+ }
65
+ export declare const DeletingDuplicateProfilesStep: FC<DeletingDuplicateProfilesStepProps>;
66
+ export declare const SavingCredentialsStep: FC;