Commit b0fa745
authored
fix: Fix incorrect storage of id_token, add missing awaits for some async operations( #1121)
* fix: await settings writes across create/clone flows
Ensure project settings persistence is awaited before command and MCP clone flows return success.
This removes fire-and-forget writes so I/O failures are surfaced in-band instead of being lost.
Add assertions that create/clone produce a persisted .clasp.json and add a real filesystem test that setProjectId propagates write failures.
* fix: handle invalid --project and --ignore paths
Convert explicit missing config and ignore paths into controlled CLI errors instead of bubbling raw fs.stat ENOENT output.
Treat both ENOENT and ENOTDIR as user path-not-found cases so directory/file mixups are handled consistently.
Cover both error paths with real filesystem tests and validate the exact CLI messages via direct command execution.
* fix: align MCP pull/clone response wording
Update MCP pull_project and clone_project status text to match the actual operation names.
Correct create_project and clone_project error text that previously referenced push.
Keep this scoped to user-facing response copy without changing command behavior.
* Fix open-web-app deployment label formatting
Correct the deployment choice label in open-web-app by removing an
extra closing brace from the rendered string.
This prevents malformed output in the interactive deployment picker.
* Update tail-logs options in README command list
Remove stale --open and --setup flags from the tail-logs command
summary so it matches the current CLI implementation.
This keeps the command index aligned with supported options.
* chore: format files.ts to satisfy biome check
Apply biome formatting adjustments in Files core implementation to eliminate the pre-existing check failure.
This is a non-functional change that only normalizes whitespace, indentation, and line wrapping.
Keeps the combined PR green under npm run check.
* fix: await logout credential deletion
Await credential store deletion in the logout command so write failures
are surfaced before success output is emitted.
Add a regression test with an unwritable auth file to verify logout exits
with an error and does not print JSON success when deletion fails.
* fix: persist correct id_token on token refresh
Stop writing access tokens into the id_token field when OAuth tokens
refresh for loaded credentials and post-login credentials.
Add auth-level regression tests that trigger refresh events through both
code paths and verify the persisted id_token value matches token.id_token.
Include import ordering updates in the new auth test to satisfy lint checks.1 parent b225233 commit b0fa745
15 files changed
Lines changed: 250 additions & 30 deletions
File tree
- src
- auth
- commands
- core
- mcp
- test
- auth
- commands
- core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
250 | 258 | | |
251 | 259 | | |
252 | 260 | | |
| |||
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
282 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
283 | 299 | | |
284 | 300 | | |
285 | 301 | | |
| |||
328 | 344 | | |
329 | 345 | | |
330 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 61 | + | |
72 | 62 | | |
73 | 63 | | |
74 | | - | |
75 | | - | |
76 | 64 | | |
77 | 65 | | |
78 | 66 | | |
| |||
207 | 195 | | |
208 | 196 | | |
209 | 197 | | |
210 | | - | |
| 198 | + | |
211 | 199 | | |
212 | 200 | | |
213 | 201 | | |
| |||
241 | 229 | | |
242 | 230 | | |
243 | 231 | | |
244 | | - | |
| 232 | + | |
245 | 233 | | |
246 | 234 | | |
247 | 235 | | |
| |||
601 | 589 | | |
602 | 590 | | |
603 | 591 | | |
604 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
| 397 | + | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
| |||
0 commit comments