Commit d8c7a1e
authored
feat: add
* feat: add `build onboarding` command for automated iOS credential setup
Interactive Ink-based CLI flow that automates iOS certificate and
provisioning profile creation via the App Store Connect API.
User provides ONE API key (.p8 file), and the CLI handles:
- CSR generation and iOS Distribution certificate creation
- Bundle ID registration (or reuse)
- App Store provisioning profile creation
- Credential saving to ~/.capgo-credentials/credentials.json
- Optional first build kick-off with live log streaming
Key features:
- macOS native file picker for .p8 selection
- Auto-detect Key ID from .p8 filename
- Progress persistence in ~/.capgo-credentials/onboarding/<appId>.json
- Resume from interruption without losing progress
- Smart cert/profile conflict resolution (revoke & recreate)
- Ctrl+O to open App Store Connect in browser
Also refactors requestBuildInternal to use a BuildLogger callback
interface instead of direct @clack/prompts logging, enabling clean
integration with the Ink UI without stdout interception hacks.
* fix: address code review findings from PR #547
- Fix ESLint import order: ink before react in command.ts
- Use explicit process import and @clack/prompts log instead of
console.error for consistent CLI output
- Only treat ENOENT as "no progress" in loadProgress, rethrow
JSON corruption and permission errors
- Clear onboarding progress when user skips credential overwrite
to prevent stale resume state
- Fix stale JSDoc: @param silent → @param logger in fetchWithRetry
* fix: preserve silent build behavior by skipping log streaming
When silent=true and no custom logger is provided, pass undefined
to streamBuildLogs so the early return kicks in. This restores
the pre-refactor behavior where silent SDK callers go directly
to REST polling without WebSocket overhead.
* docs: add build onboarding to native-builds skill documentation
Documents the new `build onboarding` command, its architecture,
conflict resolution behavior, and the BuildLogger callback interface.
* fix(onboarding): incremental progress, backup credentials, early overwrite check
- Save progress incrementally at each input step (p8Path, keyId, issuerId)
so interrupted onboarding resumes at the right step
- Show completed partial steps as checkmarks when resuming
- Check for existing credentials at start (after platform select) instead
of at the end — avoids creating orphaned certs/profiles
- Backup existing credentials to credentials-DATE.copy.json before proceeding
- Remove old overwrite prompt at save step
- Fix: don't save keyId from filename extraction until user confirms
- Fix: move async backup to useEffect to avoid Select onChange re-fire
* fix(onboarding): exit instantly after completion screen
* fix(onboarding): add TTY guard to fail fast in CI/pipes
* fix(onboarding): sanitize appId in progress file path to prevent traversal
* fix(onboarding): use capacitor config to resolve iOS platform directory
Instead of hardcoding `ios/`, use `getPlatformDirFromCapacitorConfig`
to respect custom `ios.path` settings in capacitor.config.ts.
* chore: remove unused readdir import from progress.ts
* fix(request): use block-style if, eslint-disable for console.log, fix hardcoded platform in error messages
* fix(onboarding): show correct completion message based on build status
Branch on buildUrl: if set, show "building in the cloud" + track link.
If not (skipped, failed, no API key), show "credentials saved and ready".
* fix: resolve all ESLint errors in onboarding and request modules
- Fix import ordering (perfectionist/sort-imports, sort-named-imports)
- Split multi-statement lines (style/max-statements-per-line)
- Add explicit node:process and node:buffer imports
- Use top-level type-only imports (import/consistent-type-specifier-style)
* fix: address Copilot review findings
- Replace process.exit() with Ink's exit() inside the Ink app to ensure
proper terminal teardown
- Fix verifyApiKey: include HTTP status in ascFetch error messages so
401/403 matching actually works
- Fix P12 password JSDoc to match actual DEFAULT_P12_PASSWORD behavior
- Update skill docs: existing credentials flow is backup+proceed or exit
- Implement uploadProgress in default BuildLogger (10% interval logging)
to restore upload feedback for non-onboarding build requests
- Remove duplicate ❯ prompt wrappers around FilteredTextInput
- Fix FilteredTextInput paste handling: strip forbidden chars from
accumulated string, not just individual keystrokes
* fix(request): restore upload spinner in default BuildLogger
Replace the log.info() upload progress (printed separate lines at 10%
intervals) with the original @clack/prompts spinner that shows a live
animated percentage update on a single line.build onboarding for automated iOS credential setup (#547)1 parent 918f5ab commit d8c7a1e
File tree
15 files changed
+2471
-168
lines changed- skills/native-builds
- src
- build
- onboarding
- ui
15 files changed
+2471
-168
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
257 | 271 | | |
258 | 272 | | |
259 | 273 | | |
| |||
309 | 323 | | |
310 | 324 | | |
311 | 325 | | |
| 326 | + | |
312 | 327 | | |
313 | 328 | | |
314 | 329 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
| 96 | + | |
95 | 97 | | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
114 | 125 | | |
115 | 126 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
10 | 69 | | |
11 | 70 | | |
12 | 71 | | |
| |||
0 commit comments