@capgo/cli 7.87.0 → 7.88.1
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/README.md +9 -0
- package/dist/index.js +623 -396
- package/dist/package.json +13 -2
- package/dist/src/build/onboarding/apple-api.d.ts +106 -0
- package/dist/src/build/onboarding/command.d.ts +1 -0
- package/dist/src/build/onboarding/csr.d.ts +33 -0
- package/dist/src/build/onboarding/file-picker.d.ts +10 -0
- package/dist/src/build/onboarding/progress.d.ts +19 -0
- package/dist/src/build/onboarding/types.d.ts +37 -0
- package/dist/src/build/onboarding/ui/app.d.ts +10 -0
- package/dist/src/build/onboarding/ui/components.d.ts +25 -0
- package/dist/src/build/request.d.ts +16 -1
- package/dist/src/sdk.js +229 -229
- package/package.json +13 -2
- package/skills/native-builds/SKILL.md +60 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.88.1",
|
|
5
5
|
"description": "A CLI to upload to capgo servers",
|
|
6
6
|
"author": "Martin martin@capgo.app",
|
|
7
7
|
"license": "Apache 2.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@antfu/eslint-config": "^7.0.0",
|
|
84
|
-
"@bradenmacdonald/s3-lite-client": "npm:@jsr/bradenmacdonald__s3-lite-client@0.9.
|
|
84
|
+
"@bradenmacdonald/s3-lite-client": "npm:@jsr/bradenmacdonald__s3-lite-client@0.9.5",
|
|
85
85
|
"@capacitor/cli": "^8.0.0",
|
|
86
86
|
"@capgo/find-package-manager": "^0.0.18",
|
|
87
87
|
"@clack/prompts": "^1.0.0",
|
|
@@ -91,8 +91,11 @@
|
|
|
91
91
|
"@supabase/supabase-js": "^2.79.0",
|
|
92
92
|
"@tanstack/intent": "^0.0.23",
|
|
93
93
|
"@types/adm-zip": "^0.5.7",
|
|
94
|
+
"@types/jsonwebtoken": "^9.0.10",
|
|
94
95
|
"@types/node": "^25.0.0",
|
|
96
|
+
"@types/node-forge": "^1.3.14",
|
|
95
97
|
"@types/prettyjson": "^0.0.33",
|
|
98
|
+
"@types/react": "^18.3.28",
|
|
96
99
|
"@types/tmp": "^0.2.6",
|
|
97
100
|
"@vercel/ncc": "^0.38.4",
|
|
98
101
|
"adm-zip": "^0.5.16",
|
|
@@ -111,5 +114,13 @@
|
|
|
111
114
|
"typescript": "^5.9.3",
|
|
112
115
|
"ws": "^8.18.3",
|
|
113
116
|
"zod": "^4.3.6"
|
|
117
|
+
},
|
|
118
|
+
"dependencies": {
|
|
119
|
+
"@inkjs/ui": "^2.0.0",
|
|
120
|
+
"ink": "^5.2.1",
|
|
121
|
+
"ink-spinner": "^5.0.0",
|
|
122
|
+
"jsonwebtoken": "^9.0.3",
|
|
123
|
+
"node-forge": "^1.3.3",
|
|
124
|
+
"react": "^18.3.1"
|
|
114
125
|
}
|
|
115
126
|
}
|
|
@@ -1,12 +1,71 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: native-builds
|
|
3
|
-
description: Use when working with Capgo Cloud native iOS and Android build requests, credential storage, credential updates, and build output upload settings.
|
|
3
|
+
description: Use when working with Capgo Cloud native iOS and Android build requests, onboarding, credential storage, credential updates, and build output upload settings.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Capgo CLI Native Builds
|
|
7
7
|
|
|
8
8
|
Use this skill for Capgo Cloud native iOS and Android build workflows.
|
|
9
9
|
|
|
10
|
+
## Onboarding (automated iOS setup)
|
|
11
|
+
|
|
12
|
+
### `build onboarding`
|
|
13
|
+
|
|
14
|
+
- Interactive command that automates iOS certificate and provisioning profile creation.
|
|
15
|
+
- Reduces iOS setup from ~10 manual steps to 1 manual step (creating an API key) + 1 command.
|
|
16
|
+
- Example: `npx @capgo/cli@latest build onboarding`
|
|
17
|
+
- Notes:
|
|
18
|
+
- Uses Ink (React for terminal) for the interactive UI — only command that uses Ink; all other commands use `@clack/prompts`.
|
|
19
|
+
- Requires running inside a Capacitor project directory with an `ios/` folder.
|
|
20
|
+
- The user creates ONE App Store Connect API key (.p8 file), then the CLI handles everything else.
|
|
21
|
+
- On macOS, offers a native file picker dialog for .p8 selection.
|
|
22
|
+
- Auto-detects Key ID from .p8 filename (e.g. `AuthKey_XXXX.p8`).
|
|
23
|
+
- Progress persists in `~/.capgo-credentials/onboarding/<appId>.json` — safe to interrupt and resume.
|
|
24
|
+
- Saves credentials to the same `~/.capgo-credentials/credentials.json` used by `build request`.
|
|
25
|
+
- Optionally kicks off the first build at the end.
|
|
26
|
+
|
|
27
|
+
#### What it automates (iOS)
|
|
28
|
+
|
|
29
|
+
1. Verifies the API key with Apple
|
|
30
|
+
2. Generates CSR + creates an `IOS_DISTRIBUTION` certificate via the App Store Connect API
|
|
31
|
+
3. Registers or reuses the bundle ID
|
|
32
|
+
4. Creates an `IOS_APP_STORE` provisioning profile
|
|
33
|
+
5. Saves all credentials (certificate as .p12, profile, API key, team ID)
|
|
34
|
+
6. Requests the first cloud build
|
|
35
|
+
|
|
36
|
+
#### Conflict resolution
|
|
37
|
+
|
|
38
|
+
- **Certificate limit reached**: lists existing certs, tags ones created by Capgo onboarding, lets the user pick one to revoke, then retries.
|
|
39
|
+
- **Duplicate provisioning profiles**: detects profiles matching the `Capgo <appId> AppStore` naming pattern, deletes them, and retries.
|
|
40
|
+
- **Existing credentials**: offers to backup existing credentials before proceeding, or exit onboarding.
|
|
41
|
+
|
|
42
|
+
#### Architecture
|
|
43
|
+
|
|
44
|
+
- `src/build/onboarding/command.ts` — entry point, launches Ink
|
|
45
|
+
- `src/build/onboarding/apple-api.ts` — JWT auth + App Store Connect API (verify, create cert, create profile, revoke, delete)
|
|
46
|
+
- `src/build/onboarding/csr.ts` — CSR generation + P12 creation via `node-forge`
|
|
47
|
+
- `src/build/onboarding/progress.ts` — per-app progress persistence
|
|
48
|
+
- `src/build/onboarding/file-picker.ts` — macOS native file picker via `osascript`
|
|
49
|
+
- `src/build/onboarding/ui/app.tsx` — Ink app (state machine)
|
|
50
|
+
- `src/build/onboarding/ui/components.tsx` — reusable UI components
|
|
51
|
+
|
|
52
|
+
#### BuildLogger callback interface
|
|
53
|
+
|
|
54
|
+
`requestBuildInternal` accepts an optional `BuildLogger` to receive log output via callbacks instead of writing directly to stdout. This enables clean integration with the Ink UI:
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
interface BuildLogger {
|
|
58
|
+
info: (msg: string) => void
|
|
59
|
+
error: (msg: string) => void
|
|
60
|
+
warn: (msg: string) => void
|
|
61
|
+
success: (msg: string) => void
|
|
62
|
+
buildLog: (msg: string) => void
|
|
63
|
+
uploadProgress: (percent: number) => void
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
10
69
|
## Core build request
|
|
11
70
|
|
|
12
71
|
### `build request [appId]`
|