Commit ee7cc34
fix(target): preserve app context across bundle and publish (#74)
* fix(app): honor selected config path
* fix(bundle): preserve app target for publish
* fix(publish): bind using the resolved app id
* test(publish): cover app target propagation
* test(target): cover config and bundle context
* style: apply biome formatting
* style: format bundle target lookup
* style: format publish regression test
* refactor(target): add operation-scoped app resolver
* fix(target): reuse one resolved app across bundle and publish
* test(target): cover operation-scoped app resolution
* docs(target): document app resolution lifecycle
* docs(target): document bundle target flow
* refactor(target): resolve one app id per operation; keep update.json for both brands
Follow-up to the review of #74.
- keep `update.json` as the selected-app file for cresc too: the cresc docs
and the client SDK read that name, and `cresc.config.json` was never wired
in, so switching the default would have broken every existing cresc project
- replace the nine hand-rolled `options.appId || getSelectedApp(...)` blocks
in bundle/versions/package with one `resolveAppId()` helper
- bundle: resolve the app before any side effect (.gitignore edits, plugin
probes) so a named bundle without a selected app fails immediately; a
bundle-only run only tolerates a missing selection (typed
AppNotSelectedError) and reports malformed configs instead of swallowing
them; drop the dead `config` forwarding and the three-way cached target
- SDK: `BundleOptions.appId/config` and `provider.getSelectedApp(platform,
config)` so programmatic callers get the same single-app guarantee
- messages: parse/mismatch errors name the file (or `--appId`) actually used
- tests: exercise bundleCommands.bundle end to end (Hermes base + publish get
the same app, fail-fast, bundle-only fallback, dev bundles) and the default
file, instead of the removed wrapper helpers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCaS35vZG4DCtmM24MYaVR
* feat(target): verify an explicit --appId matches the command's platform
The server accepts a bundle or native package for any app the account
owns and never learns which platform it was built for, so `bundle
--platform ios --appId <android app> --name v3` used to publish an iOS
bundle into the Android app and bind it to Android packages. resolveAppId
now looks the app up (GET /app/:id) whenever an explicit appId meets a
known platform and fails before any expensive work when they disagree;
a foreign or missing id fails there too instead of after the build.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JCaS35vZG4DCtmM24MYaVR
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent df02eaf commit ee7cc34
12 files changed
Lines changed: 639 additions & 136 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
13 | 30 | | |
14 | 31 | | |
15 | 32 | | |
16 | 33 | | |
17 | 34 | | |
18 | 35 | | |
| 36 | + | |
19 | 37 | | |
20 | 38 | | |
21 | 39 | | |
22 | 40 | | |
23 | 41 | | |
24 | 42 | | |
25 | 43 | | |
| 44 | + | |
26 | 45 | | |
27 | 46 | | |
28 | 47 | | |
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
32 | | - | |
33 | | - | |
| 51 | + | |
| 52 | + | |
34 | 53 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 54 | + | |
38 | 55 | | |
39 | 56 | | |
40 | | - | |
| 57 | + | |
41 | 58 | | |
42 | 59 | | |
43 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
44 | 69 | | |
45 | 70 | | |
46 | | - | |
| 71 | + | |
47 | 72 | | |
48 | 73 | | |
49 | 74 | | |
| |||
52 | 77 | | |
53 | 78 | | |
54 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
55 | 119 | | |
56 | 120 | | |
57 | 121 | | |
| |||
77 | 141 | | |
78 | 142 | | |
79 | 143 | | |
| 144 | + | |
80 | 145 | | |
81 | 146 | | |
82 | 147 | | |
| |||
89 | 154 | | |
90 | 155 | | |
91 | 156 | | |
| 157 | + | |
92 | 158 | | |
93 | 159 | | |
94 | 160 | | |
95 | 161 | | |
96 | 162 | | |
97 | | - | |
| 163 | + | |
98 | 164 | | |
99 | 165 | | |
100 | 166 | | |
101 | 167 | | |
102 | 168 | | |
103 | 169 | | |
104 | | - | |
| 170 | + | |
105 | 171 | | |
106 | 172 | | |
107 | 173 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 174 | + | |
111 | 175 | | |
112 | 176 | | |
113 | | - | |
| 177 | + | |
114 | 178 | | |
115 | 179 | | |
116 | 180 | | |
| |||
120 | 184 | | |
121 | 185 | | |
122 | 186 | | |
123 | | - | |
| 187 | + | |
124 | 188 | | |
125 | 189 | | |
126 | 190 | | |
127 | 191 | | |
128 | 192 | | |
| 193 | + | |
129 | 194 | | |
130 | 195 | | |
| 196 | + | |
131 | 197 | | |
132 | 198 | | |
133 | 199 | | |
134 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
135 | 206 | | |
136 | 207 | | |
137 | 208 | | |
| |||
140 | 211 | | |
141 | 212 | | |
142 | 213 | | |
143 | | - | |
| 214 | + | |
144 | 215 | | |
145 | 216 | | |
| 217 | + | |
146 | 218 | | |
147 | 219 | | |
148 | 220 | | |
| |||
159 | 231 | | |
160 | 232 | | |
161 | 233 | | |
| 234 | + | |
162 | 235 | | |
163 | 236 | | |
164 | 237 | | |
| |||
0 commit comments