jetbridge 0.1.0-rc.0 → 0.1.0-rc.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 +84 -155
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +2112 -1297
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +23 -6
- package/dist/index.js +2040 -1279
- package/dist/index.js.map +1 -1
- package/dist/{variant-Bh99wLZC.d.ts → variant-BqU-O12A.d.ts} +125 -25
- package/package.json +9 -22
- package/schema/v1.json +17 -110
package/README.md
CHANGED
|
@@ -2,129 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
Build, sign and deliver iOS dev builds — to a simulator, down a cable, or over the air to your own bucket.
|
|
4
4
|
|
|
5
|
-
One config file, one command per
|
|
5
|
+
One config file, one command per destination, and no service in the middle: the `.ipa` goes to a bucket you own, and the phone installs from a link.
|
|
6
6
|
|
|
7
|
+
```sh
|
|
8
|
+
npm install --save-dev jetbridge
|
|
7
9
|
```
|
|
8
|
-
jetbridge init # write jetbridge.config.json by inspecting your Xcode project
|
|
9
|
-
jetbridge sim # build and launch on a simulator
|
|
10
|
-
jetbridge wired # build and install over the cable
|
|
11
|
-
jetbridge ota # archive, upload, print an install URL
|
|
12
|
-
jetbridge clean # remove variant bundle ids from your developer account
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Documentation
|
|
16
10
|
|
|
17
|
-
|
|
18
|
-
- [Troubleshooting](docs/troubleshooting.md) — organised by the symptom you see, because the visible error rarely names the cause.
|
|
11
|
+
**Contents** — [Quick start](#quick-start) · [Commands](#commands) · [Variants](#variants) · [Configuration](#configuration) · [Credentials](#credentials) · [Unattended runs](#unattended-runs) · [JSON output](#json-output) · [Guides](#guides)
|
|
19
12
|
|
|
20
|
-
##
|
|
13
|
+
## Quick start
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
jetbridge wired --suffix seeded-feed
|
|
26
|
-
→ io.acme.app.dev.seededfeed, home-screen "Acme Seeded Feed"
|
|
27
|
-
|
|
28
|
-
jetbridge wired --suffix
|
|
29
|
-
→ the same, named after the current git branch
|
|
15
|
+
```sh
|
|
16
|
+
npx jetbridge init # writes jetbridge.config.json by reading your Xcode project
|
|
17
|
+
npx jetbridge install # builds and launches on a simulator
|
|
30
18
|
```
|
|
31
19
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Over the air
|
|
35
|
-
|
|
36
|
-
`jetbridge ota` archives, exports an Ad Hoc `.ipa`, uploads it to any S3-compatible bucket (AWS, R2, MinIO, Backblaze) and prints an `itms-services://` URL. A rolling index page lists recent builds.
|
|
37
|
-
|
|
38
|
-
Two things iOS insists on, and jetbridge checks before printing a URL rather than letting you find out on the phone:
|
|
39
|
-
|
|
40
|
-
1. **HTTPS with a valid certificate**, for both the manifest and the `.ipa`. A `http://` base URL is rejected by the config schema.
|
|
41
|
-
2. **The device must be in the Ad Hoc profile.** An unregistered phone gets "Unable to install" with no explanation.
|
|
42
|
-
|
|
43
|
-
A bucket that is not publicly readable returns 403, and iOS reports only "Cannot connect" — so the manifest is fetched once, before the URL is shown, and the failure names the bucket policy.
|
|
44
|
-
|
|
45
|
-
## App Store Connect credentials
|
|
46
|
-
|
|
47
|
-
Registering a variant bundle id and minting a provisioning profile happens through the App Store Connect API, so jetbridge needs an API key. You make one once, per team.
|
|
48
|
-
|
|
49
|
-
Not every command needs it:
|
|
50
|
-
|
|
51
|
-
| Command | Needs a key | Why |
|
|
52
|
-
| -------------------------- | ----------- | ------------------------------------------------ |
|
|
53
|
-
| `jetbridge sim` | no | a simulator validates no signature at all |
|
|
54
|
-
| `jetbridge sim --suffix` | no | same — a variant on the simulator signs nothing |
|
|
55
|
-
| `jetbridge wired` | no | signs against a profile you already have |
|
|
56
|
-
| `jetbridge wired --suffix` | **yes** | a new bundle id has to be registered |
|
|
57
|
-
| `jetbridge ota` | **yes** | archives against a generated Ad Hoc profile |
|
|
58
|
-
| `jetbridge clean` | **yes** | removes bundle ids and profiles from the account |
|
|
59
|
-
|
|
60
|
-
### 1. Create the key
|
|
61
|
-
|
|
62
|
-
In [App Store Connect](https://appstoreconnect.apple.com) → **Users and Access** → **Integrations** → **App Store Connect API** → **Team Keys**, select **+**.
|
|
63
|
-
|
|
64
|
-
Give it a name you will recognise later (`jetbridge`), and grant the **App Manager** role. Admin works too. **Developer is not enough** — it cannot register a new bundle id, and the failure arrives as a bare `403 FORBIDDEN_ERROR` with nothing about roles in it.
|
|
65
|
-
|
|
66
|
-
You need a key of the **Team Keys** kind, not an Individual Key: individual keys cannot manage bundle ids or profiles.
|
|
67
|
-
|
|
68
|
-
### 2. Download the `.p8`, once
|
|
69
|
-
|
|
70
|
-
Apple lets you download the private key **exactly once**. Lose it and the only remedy is to revoke the key and make another.
|
|
71
|
-
|
|
72
|
-
Note the two identifiers on the same page:
|
|
73
|
-
|
|
74
|
-
- **Key ID** — ten characters, also in the filename Apple gives you.
|
|
75
|
-
- **Issuer ID** — a UUID at the top of the page, shared by every key on the team.
|
|
76
|
-
|
|
77
|
-
### 3. Put the key where jetbridge looks
|
|
78
|
-
|
|
79
|
-
Use the filename Apple gave you, unchanged:
|
|
20
|
+
Start there deliberately: a simulator validates no code signature, so that second command needs no Apple credentials, no provisioning and no paired phone. Once it works, add [credentials](#credentials) and move to a real device.
|
|
80
21
|
|
|
81
22
|
```sh
|
|
82
|
-
|
|
83
|
-
|
|
23
|
+
npx jetbridge install --device # over the cable
|
|
24
|
+
npx jetbridge link # upload, and print a link anyone can install from
|
|
84
25
|
```
|
|
85
26
|
|
|
86
|
-
|
|
27
|
+
## Commands
|
|
87
28
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
29
|
+
| Command | What it does | Needs Apple credentials |
|
|
30
|
+
| ----------------------------- | ------------------------------------------------- | ----------------------- |
|
|
31
|
+
| `jetbridge init` | write the config by inspecting your Xcode project | no |
|
|
32
|
+
| `jetbridge install` | build and launch on a simulator | no |
|
|
33
|
+
| `jetbridge install --device` | build and install over the cable | only with `--suffix` |
|
|
34
|
+
| `jetbridge link` | archive, upload, print an install link | yes |
|
|
35
|
+
| `jetbridge bundles ls` | what this project has registered with Apple | yes |
|
|
36
|
+
| `jetbridge bundles provision` | refresh profiles without building | yes |
|
|
37
|
+
| `jetbridge bundles rm <slug>` | remove named variants | yes |
|
|
38
|
+
| `jetbridge bundles prune` | remove variants whose git branch is gone | yes |
|
|
39
|
+
| `jetbridge reindex` | rebuild the build index page from the bucket | no |
|
|
94
40
|
|
|
95
|
-
|
|
41
|
+
The destination is a flag, not a separate command: `--device` means the cable, and `--device "Dev's iPhone"` means that one phone. Same for `--simulator`.
|
|
96
42
|
|
|
97
|
-
|
|
43
|
+
Deleting anything is a dry run by default — `bundles rm` and `bundles prune` print the plan and stop until you pass `-y`. Apple restores nothing.
|
|
98
44
|
|
|
99
|
-
|
|
100
|
-
export ASC_API_KEY_ID=ABCD123456
|
|
101
|
-
export ASC_API_ISSUER_ID=69a6de70-0000-0000-0000-000000000000
|
|
102
|
-
```
|
|
45
|
+
## Variants
|
|
103
46
|
|
|
104
|
-
|
|
47
|
+
Two branches installing dev builds overwrite each other, because both carry the same bundle id. A variant gives a branch its own bundle id and its own home-screen label, so both apps sit side by side and stay distinguishable.
|
|
105
48
|
|
|
106
|
-
|
|
49
|
+
```sh
|
|
50
|
+
jetbridge install --device --suffix seeded-feed
|
|
51
|
+
→ io.acme.app.dev.seededfeed, home-screen "Acme Seeded Feed"
|
|
107
52
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"ascKeyId": "MY_ASC_KEY_ID",
|
|
111
|
-
"ascIssuerId": "MY_ASC_ISSUER_ID"
|
|
112
|
-
}
|
|
53
|
+
jetbridge install --device --suffix
|
|
54
|
+
→ the same, named after the current git branch
|
|
113
55
|
```
|
|
114
56
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
A profile can only install on devices registered to the team. The simplest way to register one is to plug it in and build to it once from Xcode; after that jetbridge picks it up automatically, because every profile it mints covers every enabled device on the team.
|
|
118
|
-
|
|
119
|
-
An unregistered device is the second most common OTA failure — iOS says only "Unable to install", with no hint that the device is missing from the profile.
|
|
120
|
-
|
|
121
|
-
### Keeping the key safe
|
|
122
|
-
|
|
123
|
-
The `.p8` is a credential for your whole developer account. Never commit it, never put it in the config file, and never paste it into a CI log. For CI, hold it as a secret and write it to disk at the start of the job. If it leaks, revoke it in App Store Connect immediately — revoking is instant and making a replacement takes a minute.
|
|
57
|
+
Every variant registers a bundle id and a profile with Apple, permanently. `jetbridge bundles prune` clears out the ones whose branch has since been merged or deleted.
|
|
124
58
|
|
|
125
59
|
## Configuration
|
|
126
60
|
|
|
127
|
-
`jetbridge.config.json`
|
|
61
|
+
`jetbridge.config.json` sits at the root of your project, and `jetbridge init` writes it for you. Editors autocomplete it from the `$schema` key.
|
|
128
62
|
|
|
129
63
|
```jsonc
|
|
130
64
|
{
|
|
@@ -133,24 +67,19 @@ The `.p8` is a credential for your whole developer account. Never commit it, nev
|
|
|
133
67
|
|
|
134
68
|
"project": {
|
|
135
69
|
"iosDir": "ios",
|
|
136
|
-
"xcodeproj": "Acme.xcodeproj",
|
|
137
70
|
"scheme": "Acme",
|
|
138
71
|
"teamId": "ABCDE12345",
|
|
139
72
|
"baseBundleId": "io.acme.app.dev",
|
|
140
73
|
},
|
|
141
74
|
|
|
142
|
-
"configurations": {
|
|
143
|
-
"available": ["Debug", "Release"],
|
|
144
|
-
"wired": "Debug",
|
|
145
|
-
"archive": "Release",
|
|
146
|
-
},
|
|
147
|
-
|
|
148
75
|
"variant": {
|
|
149
76
|
"displayName": "Acme Dev",
|
|
150
|
-
"targets": [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
77
|
+
"targets": [{ "name": "Acme" }, { "name": "UploadWidget" }],
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
"credentials": {
|
|
81
|
+
"ascKeyId": "${ASC_API_KEY_ID}",
|
|
82
|
+
"ascIssuerId": "${ASC_API_ISSUER_ID}",
|
|
154
83
|
},
|
|
155
84
|
|
|
156
85
|
"ota": {
|
|
@@ -158,79 +87,79 @@ The `.p8` is a credential for your whole developer account. Never commit it, nev
|
|
|
158
87
|
"bucket": "acme-builds",
|
|
159
88
|
"region": "eu-central-1",
|
|
160
89
|
"publicBaseUrl": "https://builds.example.com",
|
|
90
|
+
"accessKeyId": "${JETBRIDGE_S3_ACCESS_KEY_ID}",
|
|
91
|
+
"secretAccessKey": "${JETBRIDGE_S3_SECRET_ACCESS_KEY}",
|
|
161
92
|
},
|
|
162
93
|
},
|
|
163
94
|
}
|
|
164
95
|
```
|
|
165
96
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
`teamId` is your ten-character Apple team id, on the [Membership details](https://developer.apple.com/account) page — the same value Xcode shows as **Team ID**. `jetbridge init` reads it out of your project when the project already sets `DEVELOPMENT_TEAM`.
|
|
97
|
+
Nothing secret belongs in this file. Every credential is a `${VAR}` reference to the environment, never a value, so the config is safe to commit — and a bare `"ASC_API_KEY_ID"` is rejected rather than guessed at, because it reads as either a name or the secret.
|
|
169
98
|
|
|
170
|
-
|
|
99
|
+
Your project also has to consume a few build settings that jetbridge passes on the command line — appending the variant suffix to the bundle id, and pointing at the generated profile. The names are fixed: `JETBRIDGE_SUFFIX`, `JETBRIDGE_DISPLAY_NAME`, `JETBRIDGE_SIGN_STYLE`, `JETBRIDGE_GIT_SHA`, and one `JETBRIDGE_PROFILE_<TARGET>` per target. Those lines, and the reduced entitlements a variant needs, are in **[Adopting jetbridge](https://github.com/panofm/jetbridge/blob/main/docs/adopting.md)**.
|
|
171
100
|
|
|
172
|
-
|
|
101
|
+
## Credentials
|
|
173
102
|
|
|
174
|
-
|
|
175
|
-
| ------------------------- | -------------------------- | ------------------------------------- |
|
|
176
|
-
| `JETBRIDGE_BUNDLE_SUFFIX` | `.seededfeed` | append to `PRODUCT_BUNDLE_IDENTIFIER` |
|
|
177
|
-
| `JETBRIDGE_DISPLAY_NAME` | `Acme Seeded Feed` | `INFOPLIST_KEY_CFBundleDisplayName` |
|
|
178
|
-
| `JETBRIDGE_SIGN_STYLE` | `Manual` for a variant | `CODE_SIGN_STYLE` |
|
|
179
|
-
| `JETBRIDGE_PROFILE_APP` | the generated profile name | `PROVISIONING_PROFILE_SPECIFIER` |
|
|
103
|
+
Registering a variant bundle id or minting a profile goes through the App Store Connect API, so those commands need an API key with the **App Manager** role. `install` on a simulator needs nothing, and a plain `install --device` signs against a profile you already have.
|
|
180
104
|
|
|
181
|
-
|
|
105
|
+
```sh
|
|
106
|
+
export ASC_API_KEY_ID=ABCD123456
|
|
107
|
+
export ASC_API_ISSUER_ID=69a6de70-0000-0000-0000-000000000000
|
|
108
|
+
# key file at ~/.appstoreconnect/private_keys/AuthKey_ABCD123456.p8
|
|
109
|
+
```
|
|
182
110
|
|
|
183
|
-
|
|
111
|
+
Making the key, where to put it, which role fails and why, and registering your device: **[Credentials](https://github.com/panofm/jetbridge/blob/main/docs/credentials.md)**.
|
|
184
112
|
|
|
185
113
|
## Unattended runs
|
|
186
114
|
|
|
187
|
-
Every command works with nobody watching —
|
|
115
|
+
Every command works with nobody watching — a script, a pipe, CI, or an AI agent. **You never need to set `CI=1`.**
|
|
188
116
|
|
|
189
|
-
|
|
117
|
+
No terminal means no questions: jetbridge falls back to the flag-driven path and, where an answer is genuinely required, fails immediately naming the flag that supplies it. It never waits for input it cannot receive, because a command that hangs prints nothing at all.
|
|
190
118
|
|
|
191
|
-
```
|
|
192
|
-
jetbridge init --yes --scheme Acme --team-id ABCDE12345 | cat
|
|
119
|
+
```sh
|
|
120
|
+
jetbridge init --yes --scheme Acme --team-id ABCDE12345 | cat
|
|
193
121
|
```
|
|
194
122
|
|
|
195
|
-
|
|
123
|
+
`--yes` supplies consent: to writing the config, and to a deletion in `bundles rm` / `bundles prune`. If you are on a terminal and want the unattended path anyway, `CI=1` and `JETBRIDGE_NON_INTERACTIVE=1` both force it — neither is ever required.
|
|
196
124
|
|
|
197
|
-
|
|
198
|
-
| ------------------------------- | ------------------------------------------------------------------------ |
|
|
199
|
-
| `jetbridge init --yes` | accepts every detected default, and consents to writing the file |
|
|
200
|
-
| `jetbridge init --scheme` etc. | any value `init` could not infer — the error names the missing flag |
|
|
201
|
-
| `jetbridge bundles rm --yes` | consents to the deletion; without it the plan prints and nothing changes |
|
|
202
|
-
| `jetbridge bundles prune --yes` | the same, for pruning |
|
|
125
|
+
## JSON output
|
|
203
126
|
|
|
204
|
-
|
|
127
|
+
Every command takes `--json`. Machine output goes to **stdout**, one JSON object per line; every human line goes to **stderr**. So a script parses stdout while a person still watches the run.
|
|
205
128
|
|
|
206
|
-
|
|
207
|
-
|
|
129
|
+
```sh
|
|
130
|
+
jetbridge install --device --json | jq -c 'select(.event == "step" and .phase == "end")'
|
|
131
|
+
```
|
|
208
132
|
|
|
209
|
-
|
|
133
|
+
```jsonc
|
|
134
|
+
{"event":"start","command":"install","destination":"device","bundleId":"io.acme.app.dev.wave","displayName":"Acme Wave","configuration":"Debug","suffix":"wave"}
|
|
135
|
+
{"event":"devices","devices":[{"id":"10BFE051","name":"Dev's 17 Pro","udid":"…","transport":"wired"}]}
|
|
136
|
+
{"event":"signing","decision":"cached","profiles":["Acme wave app","Acme wave uploadwidget"]}
|
|
137
|
+
{"event":"step","step":"build","phase":"start"}
|
|
138
|
+
{"event":"step","step":"build","phase":"end","ok":true,"durationMs":72000,"buildNumber":"1786437647","configuration":"Debug"}
|
|
139
|
+
{"event":"step","step":"install","phase":"end","ok":true,"durationMs":18000,"device":{"id":"10BFE051","name":"Dev's 17 Pro"},"bundleId":"io.acme.app.dev.wave"}
|
|
140
|
+
{"event":"done","ok":true,"durationMs":113000,"devices":1,"bundleId":"io.acme.app.dev.wave"}
|
|
141
|
+
```
|
|
210
142
|
|
|
211
|
-
|
|
143
|
+
Every object has an `event`. `start` names the run, `devices` and `signing` carry the header facts, each `step` appears twice (`phase` `start` then `end`, the second with `durationMs` and `ok`), and `done` closes the stream with `ok` and the total. `jetbridge link` adds `link`, with the install, index and manifest URLs. A failure emits `error` with the message, then `done` with `"ok":false`, and the exit code is non-zero — so a reader can loop until `done` and never hang.
|
|
212
144
|
|
|
213
|
-
|
|
214
|
-
- Node 20 or newer
|
|
215
|
-
- An Apple Developer account, for anything that signs for a device
|
|
216
|
-
|
|
217
|
-
## Releasing
|
|
145
|
+
Every command opens with `start` and closes with `done`, so a reader can loop until `done` and never hang. `init` and `reindex` carry no header rows and add one event of their own (`init`, `reindex`) before closing.
|
|
218
146
|
|
|
219
|
-
|
|
147
|
+
`bundles ls --json` is the one exception: it prints a single array of variants, the shape it always had, and nothing else — no `start`, no `done`. Read it with `JSON.parse` on the whole stream, not line by line.
|
|
220
148
|
|
|
221
|
-
|
|
149
|
+
Without `--json`, stdout carries only a command's own payload (the `bundles ls` table); the progress you read while it runs is stderr either way. On a terminal a step rewrites its own line as it finishes; redirected to a file, each step prints one plain line and no escape codes.
|
|
222
150
|
|
|
223
|
-
|
|
224
|
-
npx changeset # pick patch / minor / major, describe the change
|
|
225
|
-
git add .changeset
|
|
226
|
-
```
|
|
151
|
+
## Guides
|
|
227
152
|
|
|
228
|
-
|
|
153
|
+
- **[Adopting jetbridge](https://github.com/panofm/jetbridge/blob/main/docs/adopting.md)** — an existing app from nothing to a working variant install: what `init` infers, the xcconfig wiring, reduced entitlements, extensions.
|
|
154
|
+
- **[Credentials](https://github.com/panofm/jetbridge/blob/main/docs/credentials.md)** — creating the App Store Connect key, where it lives, registering devices.
|
|
155
|
+
- **[Troubleshooting](https://github.com/panofm/jetbridge/blob/main/docs/troubleshooting.md)** — organised by the symptom you see, because the visible error rarely names the cause.
|
|
156
|
+
- **[Releasing](https://github.com/panofm/jetbridge/blob/main/docs/releasing.md)** — how a change reaches npm.
|
|
229
157
|
|
|
230
|
-
|
|
231
|
-
2. Merging that PR publishes to npm and pushes the git tag.
|
|
158
|
+
## Requirements
|
|
232
159
|
|
|
233
|
-
|
|
160
|
+
- macOS with Xcode and its command line tools
|
|
161
|
+
- Node 20 or newer
|
|
162
|
+
- An Apple Developer account, for anything that signs for a device
|
|
234
163
|
|
|
235
164
|
## License
|
|
236
165
|
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as Boundary, P as Project } from './variant-
|
|
2
|
-
export { a as assertSingleSegment } from './variant-
|
|
1
|
+
import { B as Boundary, P as Project } from './variant-BqU-O12A.js';
|
|
2
|
+
export { a as assertSingleSegment } from './variant-BqU-O12A.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
interface VariantOptions {
|