Commit d555c04
feat(module init): apps-service routing, pre-flight slug check, rich UX
Three issues from local dev testing:
1. **404 on POST /v1/modules**: the CLI was talking to the account
service (8081), but modules live on the applications service (8082).
Split out `MIRRORSTACK_APPS_API_URL` (default `https://apps-api.mirrorstack.ai`,
local `http://localhost:8082`) and route `create_module` / `get_module`
through it. The `me` lookup still goes to the account service.
2. **No availability check before POST**: easy to forget you already
created `media` last week and end up with a confusing 409. New
`GET /v1/modules/{slug}` pre-flight catches the common
already-owned-by-caller case with a clear error before we POST.
Reserved/format checks still happen server-side (no equivalent
endpoint, and not worth adding for one CLI consumer).
3. **Plain-text prompts**: replaced ad-hoc `prompt`/`confirm` helpers
with `dialoguer` (themed Input + Confirm), `console` (styled output:
bold cyan slugs, dim labels, green ✓), and `indicatif` (steady-tick
spinner during network calls). `--yes` mode unchanged — no prompts,
no spinner-suppression needed since indicatif already detects
non-tty stderr.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d21251d commit d555c04
6 files changed
Lines changed: 314 additions & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
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 | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
111 | 155 | | |
112 | 156 | | |
113 | | - | |
| 157 | + | |
114 | 158 | | |
115 | 159 | | |
116 | 160 | | |
117 | | - | |
| 161 | + | |
118 | 162 | | |
119 | 163 | | |
120 | 164 | | |
| |||
234 | 278 | | |
235 | 279 | | |
236 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
237 | 316 | | |
238 | 317 | | |
239 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
0 commit comments