@donotdev/cli 0.2.2 → 0.2.3

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.
Files changed (45) hide show
  1. package/dependencies-matrix.json +39 -38
  2. package/dist/bin/commands/agent-setup.js +135 -67
  3. package/dist/bin/commands/build.js +288 -232
  4. package/dist/bin/commands/bump.js +293 -250
  5. package/dist/bin/commands/cacheout.js +59 -49
  6. package/dist/bin/commands/coach.js +80 -50
  7. package/dist/bin/commands/create-app.js +501 -228
  8. package/dist/bin/commands/create-project.js +377 -241
  9. package/dist/bin/commands/db.js +1873 -1804
  10. package/dist/bin/commands/deploy.js +476 -287
  11. package/dist/bin/commands/dev.js +139 -108
  12. package/dist/bin/commands/doctor.js +91 -57
  13. package/dist/bin/commands/emu.js +196 -154
  14. package/dist/bin/commands/format.js +83 -50
  15. package/dist/bin/commands/get-demo.js +422 -197
  16. package/dist/bin/commands/make-admin.js +813 -707
  17. package/dist/bin/commands/preview.js +139 -108
  18. package/dist/bin/commands/seed.js +1874 -1809
  19. package/dist/bin/commands/setup-cicd.js +258 -204
  20. package/dist/bin/commands/setup.js +346 -247
  21. package/dist/bin/commands/staging.js +476 -287
  22. package/dist/bin/commands/sync-secrets.js +472 -141
  23. package/dist/bin/commands/type-check.js +163 -119
  24. package/dist/bin/commands/wai.js +53 -46
  25. package/dist/bin/dndev.js +10 -1
  26. package/dist/bin/donotdev.js +18 -8
  27. package/dist/index.js +590 -373
  28. package/package.json +2 -2
  29. package/templates/app-dndev/src/pages/legal/LegalNoticePage.tsx.example +1 -1
  30. package/templates/app-dndev/src/pages/legal/PrivacyPage.tsx.example +1 -1
  31. package/templates/app-dndev/src/pages/legal/TermsPage.tsx.example +1 -1
  32. package/templates/app-next/src/app/AppDocument.tsx.example +57 -0
  33. package/templates/app-next/src/app/ClientLayout.tsx.example +6 -2
  34. package/templates/app-next/src/pages/legal/LegalNoticePage.tsx.example +1 -1
  35. package/templates/app-next/src/pages/legal/PrivacyPage.tsx.example +1 -1
  36. package/templates/app-next/src/pages/legal/TermsPage.tsx.example +1 -1
  37. package/templates/app-vite/src/pages/FormPageExample.tsx.example +21 -16
  38. package/templates/app-vite/src/pages/legal/LegalNoticePage.tsx.example +1 -1
  39. package/templates/app-vite/src/pages/legal/PrivacyPage.tsx.example +1 -1
  40. package/templates/app-vite/src/pages/legal/TermsPage.tsx.example +1 -1
  41. package/templates/overlay-supabase/src/config/providers.nextjs.ts.example +37 -0
  42. package/templates/root-consumer/.claude/hooks/guard-write.sh.example +5 -1
  43. package/templates/root-consumer/.gitignore.example +7 -1
  44. package/templates/app-next/src/app/layout.tsx.example +0 -80
  45. package/templates/app-next/src/app/not-found.tsx.example +0 -40
@@ -2,7 +2,7 @@
2
2
  "$schema": "./dependencies-matrix.schema.json",
3
3
  "version": "0.0.8",
4
4
  "description": "Centralized dependency versions for DoNotDev framework. Single source of truth for all external dependencies. Third-party optional deps are auto-detected from peerDependenciesMeta via scanInstalledPackageOptionals() — no manual constants update needed.",
5
- "lastUpdated": "2026-11-09",
5
+ "lastUpdated": "2026-11-12",
6
6
  "migrationGuides": {
7
7
  "0.0→0.1": {
8
8
  "path": "docs/migration/v0.0-to-v0.1.md",
@@ -17,103 +17,103 @@
17
17
  "@donotdev/ai": {
18
18
  "description": "AI package - provider-agnostic LLM plumbing",
19
19
  "packages": {
20
- "@donotdev/ai": "^0.2.0"
20
+ "@donotdev/ai": "^0.2.3"
21
21
  }
22
22
  },
23
23
  "@donotdev/graphql": {
24
24
  "description": "GraphQL data provider - opt-in, not scaffolded by default",
25
25
  "packages": {
26
- "@donotdev/graphql": "^0.2.0"
26
+ "@donotdev/graphql": "^0.2.3"
27
27
  }
28
28
  },
29
29
  "@donotdev/restcrud": {
30
30
  "description": "REST CRUD data provider - opt-in, not scaffolded by default",
31
31
  "packages": {
32
- "@donotdev/restcrud": "^0.2.0"
32
+ "@donotdev/restcrud": "^0.2.3"
33
33
  }
34
34
  },
35
35
  "@donotdev/testing": {
36
36
  "description": "Testing utilities - opt-in, not scaffolded by default",
37
37
  "packages": {
38
- "@donotdev/testing": "^0.2.0"
38
+ "@donotdev/testing": "^0.2.3"
39
39
  }
40
40
  },
41
41
  "@donotdev/auth": {
42
42
  "description": "Authentication package",
43
43
  "packages": {
44
- "@donotdev/auth": "^0.2.2"
44
+ "@donotdev/auth": "^0.2.3"
45
45
  }
46
46
  },
47
47
  "@donotdev/billing": {
48
48
  "description": "Billing package",
49
49
  "packages": {
50
- "@donotdev/billing": "^0.2.2"
50
+ "@donotdev/billing": "^0.2.3"
51
51
  }
52
52
  },
53
53
  "@donotdev/components": {
54
54
  "description": "UI components package",
55
55
  "packages": {
56
- "@donotdev/components": "^0.2.2"
56
+ "@donotdev/components": "^0.2.3"
57
57
  }
58
58
  },
59
59
  "@donotdev/core": {
60
60
  "description": "Core framework package",
61
61
  "packages": {
62
- "@donotdev/core": "^0.2.2"
62
+ "@donotdev/core": "^0.2.3"
63
63
  }
64
64
  },
65
65
  "@donotdev/crud": {
66
66
  "description": "CRUD operations package",
67
67
  "packages": {
68
- "@donotdev/crud": "^0.2.2"
68
+ "@donotdev/crud": "^0.2.3"
69
69
  }
70
70
  },
71
71
  "@donotdev/demo": {
72
72
  "description": "Zero-backend demo provider package",
73
73
  "packages": {
74
- "@donotdev/demo": "^0.2.0"
74
+ "@donotdev/demo": "^0.2.3"
75
75
  }
76
76
  },
77
77
  "@donotdev/firebase": {
78
78
  "description": "Firebase provider package",
79
79
  "packages": {
80
- "@donotdev/firebase": "^0.2.2"
80
+ "@donotdev/firebase": "^0.2.3"
81
81
  }
82
82
  },
83
83
  "@donotdev/functions": {
84
84
  "description": "Firebase Functions package",
85
85
  "packages": {
86
- "@donotdev/functions": "^0.2.2"
86
+ "@donotdev/functions": "^0.2.3"
87
87
  }
88
88
  },
89
89
  "@donotdev/oauth": {
90
90
  "description": "OAuth package",
91
91
  "packages": {
92
- "@donotdev/oauth": "^0.2.0"
92
+ "@donotdev/oauth": "^0.2.3"
93
93
  }
94
94
  },
95
95
  "@donotdev/templates": {
96
96
  "description": "Page templates package",
97
97
  "packages": {
98
- "@donotdev/templates": "^0.2.2"
98
+ "@donotdev/templates": "^0.2.3"
99
99
  }
100
100
  },
101
101
  "@donotdev/ui": {
102
102
  "description": "UI and routing package",
103
103
  "packages": {
104
- "@donotdev/ui": "^0.2.2"
104
+ "@donotdev/ui": "^0.2.3"
105
105
  }
106
106
  },
107
107
  "@donotdev/expo": {
108
108
  "description": "Expo/React Native components package",
109
109
  "packages": {
110
- "@donotdev/expo": "^0.2.2"
110
+ "@donotdev/expo": "^0.2.3"
111
111
  }
112
112
  },
113
113
  "@donotdev/supabase": {
114
114
  "description": "Supabase provider package",
115
115
  "packages": {
116
- "@donotdev/supabase": "^0.2.0"
116
+ "@donotdev/supabase": "^0.2.3"
117
117
  }
118
118
  },
119
119
  "supabase-js": {
@@ -245,7 +245,7 @@
245
245
  },
246
246
  "forms": {
247
247
  "packages": {
248
- "react-hook-form": "^7.91.0"
248
+ "react-hook-form": "^7.92.0"
249
249
  }
250
250
  },
251
251
  "forms-resolvers": {
@@ -283,7 +283,7 @@
283
283
  },
284
284
  "firebase": {
285
285
  "packages": {
286
- "firebase": "^13.2.0"
286
+ "firebase": "^13.3.0"
287
287
  }
288
288
  },
289
289
  "browser-image-compression": {
@@ -295,21 +295,21 @@
295
295
  "ai-sdk": {
296
296
  "description": "Vercel AI SDK core (generateText/streamText, UI message stream). Node >= 22, ESM-only.",
297
297
  "packages": {
298
- "ai": "^7.0.165"
298
+ "ai": "^7.0.170"
299
299
  }
300
300
  },
301
301
  "ai-sdk-react": {
302
302
  "description": "Vercel AI SDK React bindings (useChat). Used by @donotdev/ai.",
303
303
  "packages": {
304
- "@ai-sdk/react": "^4.0.169"
304
+ "@ai-sdk/react": "^4.0.174"
305
305
  }
306
306
  },
307
307
  "ai-sdk-providers": {
308
308
  "description": "Vercel AI SDK model providers, loaded lazily by the @donotdev/functions AI route.",
309
309
  "packages": {
310
- "@ai-sdk/anthropic": "^4.0.99",
311
- "@ai-sdk/openai": "^4.0.111",
312
- "@ai-sdk/google": "^4.0.114"
310
+ "@ai-sdk/anthropic": "^4.0.102",
311
+ "@ai-sdk/openai": "^4.0.115",
312
+ "@ai-sdk/google": "^4.0.118"
313
313
  }
314
314
  },
315
315
  "isomorphic-dompurify": {
@@ -321,10 +321,10 @@
321
321
  "tiptap": {
322
322
  "description": "Rich text editor - optional peer dependency. Required: @tiptap/react, @tiptap/pm, @tiptap/starter-kit. Optional: @tiptap/extension-placeholder for placeholder text.",
323
323
  "packages": {
324
- "@tiptap/react": "^3.33.0",
325
- "@tiptap/pm": "^3.33.0",
326
- "@tiptap/starter-kit": "^3.33.0",
327
- "@tiptap/extension-placeholder": "^3.33.0"
324
+ "@tiptap/react": "^3.33.1",
325
+ "@tiptap/pm": "^3.33.1",
326
+ "@tiptap/starter-kit": "^3.33.1",
327
+ "@tiptap/extension-placeholder": "^3.33.1"
328
328
  }
329
329
  },
330
330
  "stripe": {
@@ -334,7 +334,7 @@
334
334
  },
335
335
  "firebase-admin": {
336
336
  "packages": {
337
- "firebase-admin": "^14.5.0"
337
+ "firebase-admin": "^14.5.1"
338
338
  }
339
339
  },
340
340
  "firebase-functions": {
@@ -344,7 +344,7 @@
344
344
  },
345
345
  "vercel-deps": {
346
346
  "packages": {
347
- "next": "^16.4.5",
347
+ "next": "^16.4.6",
348
348
  "vercel": "^65.12.1"
349
349
  }
350
350
  },
@@ -367,7 +367,7 @@
367
367
  "cli-prompts": {
368
368
  "description": "CLI prompts - used by core config for logging",
369
369
  "packages": {
370
- "@clack/prompts": "^1.8.1"
370
+ "@clack/prompts": "^1.9.0"
371
371
  }
372
372
  },
373
373
  "cli-commander": {
@@ -389,7 +389,7 @@
389
389
  },
390
390
  "next": {
391
391
  "packages": {
392
- "next": "^16.4.5"
392
+ "next": "^16.4.6"
393
393
  }
394
394
  },
395
395
  "expo": {
@@ -397,7 +397,8 @@
397
397
  "packages": {
398
398
  "expo": "^55.0.32",
399
399
  "expo-router": "^55.0.18",
400
- "expo-audio": "^1.1.1",
400
+ "expo-audio": "~55.0.18",
401
+ "expo-video": "~55.0.21",
401
402
  "expo-clipboard": "^55.0.17",
402
403
  "expo-document-picker": "^55.0.17",
403
404
  "@expo/vector-icons": "^15.1.1",
@@ -480,13 +481,13 @@
480
481
  "@donotdev/cli": {
481
482
  "description": "Cli package",
482
483
  "packages": {
483
- "@donotdev/cli": "^0.2.2"
484
+ "@donotdev/cli": "^0.2.3"
484
485
  }
485
486
  },
486
487
  "@donotdev/mcp-server": {
487
488
  "description": "MCP server for component type lookups",
488
489
  "packages": {
489
- "@donotdev/mcp-server": "^0.2.0"
490
+ "@donotdev/mcp-server": "^0.2.3"
490
491
  }
491
492
  },
492
493
  "mcp-sdk": {
@@ -512,7 +513,7 @@
512
513
  "@donotdev/security": {
513
514
  "description": "Security package",
514
515
  "packages": {
515
- "@donotdev/security": "^0.2.0"
516
+ "@donotdev/security": "^0.2.3"
516
517
  }
517
518
  },
518
519
  "xterm": {
@@ -558,7 +559,7 @@
558
559
  "@donotdev/canvas": {
559
560
  "description": "Canvas package",
560
561
  "packages": {
561
- "@donotdev/canvas": "^0.2.0"
562
+ "@donotdev/canvas": "^0.2.3"
562
563
  }
563
564
  }
564
565
  },
@@ -405,25 +405,29 @@ var init_main = __esm({
405
405
  }
406
406
  });
407
407
 
408
- // node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
409
- var require_src = __commonJS({
410
- "node_modules/.bun/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports, module) {
411
- "use strict";
408
+ // node_modules/.bun/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js
409
+ var ESC2, CSI2, cursor, erase, clear;
410
+ var init_dist3 = __esm({
411
+ "node_modules/.bun/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js"() {
412
412
  init_utils2();
413
- var ESC2 = "\x1B";
414
- var CSI2 = `${ESC2}[`;
415
- var beep = "\x07";
416
- var cursor3 = {
413
+ ESC2 = "\x1B";
414
+ CSI2 = `${ESC2}[`;
415
+ cursor = {
417
416
  to(x, y) {
418
- if (!y) return `${CSI2}${x + 1}G`;
417
+ if (!y)
418
+ return `${CSI2}${x + 1}G`;
419
419
  return `${CSI2}${y + 1};${x + 1}H`;
420
420
  },
421
421
  move(x, y) {
422
422
  let ret = "";
423
- if (x < 0) ret += `${CSI2}${-x}D`;
424
- else if (x > 0) ret += `${CSI2}${x}C`;
425
- if (y < 0) ret += `${CSI2}${-y}A`;
426
- else if (y > 0) ret += `${CSI2}${y}B`;
423
+ if (x < 0)
424
+ ret += `${CSI2}${-x}D`;
425
+ else if (x > 0)
426
+ ret += `${CSI2}${x}C`;
427
+ if (y < 0)
428
+ ret += `${CSI2}${-y}A`;
429
+ else if (y > 0)
430
+ ret += `${CSI2}${y}B`;
427
431
  return ret;
428
432
  },
429
433
  up: (count = 1) => `${CSI2}${count}A`,
@@ -438,11 +442,7 @@ var require_src = __commonJS({
438
442
  save: `${ESC2}7`,
439
443
  restore: `${ESC2}8`
440
444
  };
441
- var scroll = {
442
- up: (count = 1) => `${CSI2}S`.repeat(count),
443
- down: (count = 1) => `${CSI2}T`.repeat(count)
444
- };
445
- var erase3 = {
445
+ erase = {
446
446
  screen: `${CSI2}2J`,
447
447
  up: (count = 1) => `${CSI2}1J`.repeat(count),
448
448
  down: (count = 1) => `${CSI2}J`.repeat(count),
@@ -450,28 +450,31 @@ var require_src = __commonJS({
450
450
  lineEnd: `${CSI2}K`,
451
451
  lineStart: `${CSI2}1K`,
452
452
  lines(count) {
453
- let clear = "";
453
+ let clear2 = "";
454
454
  for (let i2 = 0; i2 < count; i2++)
455
- clear += this.line + (i2 < count - 1 ? cursor3.up() : "");
455
+ clear2 += this.line + (i2 < count - 1 ? cursor.up() : "");
456
456
  if (count)
457
- clear += cursor3.left;
458
- return clear;
457
+ clear2 += cursor.left;
458
+ return clear2;
459
459
  }
460
460
  };
461
- module.exports = { cursor: cursor3, scroll, erase: erase3, beep };
461
+ clear = {
462
+ screen: `${ESC2}c`
463
+ };
462
464
  }
463
465
  });
464
466
 
465
- // node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
467
+ // node_modules/.bun/@clack+core@1.6.0/node_modules/@clack/core/dist/index.mjs
466
468
  import { styleText } from "node:util";
467
469
  import { stdout, stdin } from "node:process";
468
470
  import { ReadStream } from "node:tty";
469
- var import_sisteransi, a$1, t, settings, R, getColumns;
470
- var init_dist3 = __esm({
471
- "node_modules/.bun/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs"() {
471
+ var a$1, t, settings, R, getColumns;
472
+ var init_dist4 = __esm({
473
+ "node_modules/.bun/@clack+core@1.6.0/node_modules/@clack/core/dist/index.mjs"() {
472
474
  init_utils2();
473
475
  init_main();
474
- import_sisteransi = __toESM(require_src(), 1);
476
+ init_dist3();
477
+ init_dist2();
475
478
  a$1 = ["up", "down", "left", "right", "space", "enter", "cancel"];
476
479
  t = [
477
480
  "January",
@@ -521,7 +524,7 @@ var init_dist3 = __esm({
521
524
  }
522
525
  });
523
526
 
524
- // node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs
527
+ // node_modules/.bun/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.mjs
525
528
  import { styleText as styleText2, stripVTControlCharacters } from "node:util";
526
529
  import process$1 from "node:process";
527
530
  import { existsSync, lstatSync, readdirSync } from "node:fs";
@@ -532,17 +535,17 @@ function isUnicodeSupported() {
532
535
  }
533
536
  return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
534
537
  }
535
- var import_sisteransi2, unicode, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, MULTISELECT_INSTRUCTIONS, log, intro, outro, W$1, C, note, u2, SELECT_INSTRUCTIONS, i;
536
- var init_dist4 = __esm({
537
- "node_modules/.bun/@clack+prompts@1.8.1/node_modules/@clack/prompts/dist/index.mjs"() {
538
+ var unicode, unicodeOr, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR_START, S_BAR, S_BAR_END, S_BAR_START_RIGHT, S_BAR_END_RIGHT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_PASSWORD_MASK, S_BAR_H, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_CORNER_TOP_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, MULTISELECT_INSTRUCTIONS, log, intro, outro, W, C, note, u2, SELECT_INSTRUCTIONS, i;
539
+ var init_dist5 = __esm({
540
+ "node_modules/.bun/@clack+prompts@1.9.0/node_modules/@clack/prompts/dist/index.mjs"() {
538
541
  init_utils2();
539
- init_dist3();
540
- init_dist3();
542
+ init_dist4();
543
+ init_dist4();
541
544
  init_main();
542
545
  init_dist2();
543
- import_sisteransi2 = __toESM(require_src(), 1);
546
+ init_dist3();
544
547
  unicode = isUnicodeSupported();
545
- unicodeOr = (o, e) => unicode ? o : e;
548
+ unicodeOr = (e, o) => unicode ? e : o;
546
549
  S_STEP_ACTIVE = unicodeOr("\u25C6", "*");
547
550
  S_STEP_CANCEL = unicodeOr("\u25A0", "x");
548
551
  S_STEP_ERROR = unicodeOr("\u25B2", "x");
@@ -579,9 +582,9 @@ var init_dist4 = __esm({
579
582
  secondarySymbol: r2 = styleText2("gray", S_BAR),
580
583
  output: m = process.stdout,
581
584
  spacing: l = 1,
582
- withGuide: c
585
+ withGuide: c2
583
586
  } = {}) => {
584
- const t2 = [], o = c ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
587
+ const t2 = [], o = c2 ?? settings.withGuide, f = o ? r2 : "", O = o ? `${e} ` : "", u3 = o ? `${r2} ` : "";
585
588
  for (let i2 = 0; i2 < l; i2++)
586
589
  t2.push(f);
587
590
  const g = Array.isArray(s) ? s : s.split(`
@@ -628,18 +631,18 @@ ${styleText2("gray", S_BAR_END)} ` : "";
628
631
 
629
632
  `);
630
633
  };
631
- W$1 = (o) => o;
634
+ W = (o) => o;
632
635
  C = (o, e, s) => {
633
636
  const a2 = {
634
637
  hard: true,
635
638
  trim: false
636
639
  }, i2 = wrapAnsi(o, e, a2).split(`
637
- `), c = i2.reduce((n2, t2) => Math.max(dist_default2(t2), n2), 0), u3 = i2.map(s).reduce((n2, t2) => Math.max(dist_default2(t2), n2), 0), g = e - (u3 - c);
640
+ `), c2 = i2.reduce((n2, t2) => Math.max(dist_default2(t2), n2), 0), u3 = i2.map(s).reduce((n2, t2) => Math.max(dist_default2(t2), n2), 0), g = e - (u3 - c2);
638
641
  return wrapAnsi(o, g, a2);
639
642
  };
640
643
  note = (o = "", e = "", s) => {
641
- const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c = s?.format ?? W$1, g = ["", ...C(o, getColumns(a2) - 6, c).split(`
642
- `).map(c), ""], n2 = dist_default2(e), t2 = Math.max(
644
+ const a2 = s?.output ?? process$1.stdout, i2 = s?.withGuide ?? settings.withGuide, c2 = s?.format ?? W, g = ["", ...C(o, getColumns(a2) - 6, c2).split(`
645
+ `).map(c2), ""], n2 = dist_default2(e), t2 = Math.max(
643
646
  g.reduce((m, F) => {
644
647
  const O = dist_default2(F);
645
648
  return O > m ? O : m;
@@ -719,8 +722,8 @@ var init_cli_output = __esm({
719
722
  "packages/tooling/src/utils/cli-output.ts"() {
720
723
  "use strict";
721
724
  init_utils2();
722
- init_dist4();
723
- init_dist4();
725
+ init_dist5();
726
+ init_dist5();
724
727
  colors = {
725
728
  reset: "\x1B[0m",
726
729
  // Success (green)
@@ -6810,6 +6813,9 @@ import {
6810
6813
  extname
6811
6814
  } from "node:path";
6812
6815
  import { fileURLToPath } from "node:url";
6816
+ function isEexistError(error2) {
6817
+ return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "EEXIST";
6818
+ }
6813
6819
  function safeExecuteAsync(fn, message) {
6814
6820
  return fn().catch((error2) => {
6815
6821
  throw new Error(
@@ -7181,7 +7187,7 @@ var init_PathResolver = __esm({
7181
7187
  try {
7182
7188
  await fs.promises.mkdir(dir, { recursive: true });
7183
7189
  } catch (error2) {
7184
- if (error2?.code !== "EEXIST") throw error2;
7190
+ if (!isEexistError(error2)) throw error2;
7185
7191
  }
7186
7192
  const detectedFormat = this._detectFormat(filePath, format);
7187
7193
  let writeContent;
@@ -7243,7 +7249,7 @@ var init_PathResolver = __esm({
7243
7249
  try {
7244
7250
  fs.mkdirSync(dir, { recursive: true });
7245
7251
  } catch (error2) {
7246
- if (error2?.code !== "EEXIST") throw error2;
7252
+ if (!isEexistError(error2)) throw error2;
7247
7253
  }
7248
7254
  const detectedFormat = this._detectFormat(filePath, format);
7249
7255
  let writeContent;
@@ -7300,7 +7306,7 @@ var init_PathResolver = __esm({
7300
7306
  try {
7301
7307
  await fs.promises.mkdir(dir, { recursive: true });
7302
7308
  } catch (error2) {
7303
- if (error2?.code !== "EEXIST") throw error2;
7309
+ if (!isEexistError(error2)) throw error2;
7304
7310
  }
7305
7311
  try {
7306
7312
  return await safeExecuteAsync(async () => {
@@ -7342,7 +7348,7 @@ var init_PathResolver = __esm({
7342
7348
  try {
7343
7349
  fs.mkdirSync(dir, { recursive: true });
7344
7350
  } catch (error2) {
7345
- if (error2?.code !== "EEXIST") throw error2;
7351
+ if (!isEexistError(error2)) throw error2;
7346
7352
  }
7347
7353
  try {
7348
7354
  fs.copyFileSync(srcPath, normalizedDestPath);
@@ -7458,7 +7464,7 @@ var init_PathResolver = __esm({
7458
7464
  try {
7459
7465
  await fs.promises.mkdir(dirPath, { recursive: true });
7460
7466
  } catch (error2) {
7461
- if (error2?.code !== "EEXIST") throw error2;
7467
+ if (!isEexistError(error2)) throw error2;
7462
7468
  }
7463
7469
  }
7464
7470
  /**
@@ -7470,7 +7476,7 @@ var init_PathResolver = __esm({
7470
7476
  try {
7471
7477
  fs.mkdirSync(dirPath, { recursive: true });
7472
7478
  } catch (error2) {
7473
- if (error2?.code !== "EEXIST") throw error2;
7479
+ if (!isEexistError(error2)) throw error2;
7474
7480
  }
7475
7481
  }
7476
7482
  /**
@@ -7719,6 +7725,7 @@ var init_PathResolver = __esm({
7719
7725
  * @param patternType - Type of patterns (css, routes, i18n, assets, pwa)
7720
7726
  * @returns Resolved patterns with absolute paths
7721
7727
  */
7728
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- why: mirrors the public PathResolver.d.ts signature; tightening it is a breaking change (any-audit)
7722
7729
  async resolvePatterns(patternType) {
7723
7730
  if (!constants.getPatternsFor) {
7724
7731
  return { framework: [], consumer: [], all: [] };
@@ -7895,6 +7902,17 @@ var init_pathResolver = __esm({
7895
7902
  }
7896
7903
  });
7897
7904
 
7905
+ // packages/tooling/src/utils/type-guards.ts
7906
+ function isObjectLike(value) {
7907
+ return typeof value === "object" && value !== null;
7908
+ }
7909
+ var init_type_guards = __esm({
7910
+ "packages/tooling/src/utils/type-guards.ts"() {
7911
+ "use strict";
7912
+ init_utils2();
7913
+ }
7914
+ });
7915
+
7898
7916
  // packages/tooling/src/bundler/utils.ts
7899
7917
  import { Buffer as Buffer2 } from "node:buffer";
7900
7918
  import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "node:fs";
@@ -7922,6 +7940,29 @@ var init_utils2 = __esm({
7922
7940
  }
7923
7941
  });
7924
7942
 
7943
+ // packages/tooling/src/utils/error-handling.ts
7944
+ function isError(error2) {
7945
+ return error2 instanceof Error;
7946
+ }
7947
+ function getErrorMessage(error2) {
7948
+ if (isError(error2)) {
7949
+ return error2.message;
7950
+ }
7951
+ if (typeof error2 === "string") {
7952
+ return error2;
7953
+ }
7954
+ if (error2 && typeof error2 === "object" && "message" in error2) {
7955
+ return String(error2.message);
7956
+ }
7957
+ return String(error2);
7958
+ }
7959
+ var init_error_handling = __esm({
7960
+ "packages/tooling/src/utils/error-handling.ts"() {
7961
+ "use strict";
7962
+ init_utils2();
7963
+ }
7964
+ });
7965
+
7925
7966
  // packages/cli/src/bin/commands/agent-setup.ts
7926
7967
  init_utils2();
7927
7968
 
@@ -7934,6 +7975,8 @@ init_utils2();
7934
7975
  // packages/tooling/src/cli/agent-setup.ts
7935
7976
  init_utils2();
7936
7977
  init_cli_output();
7978
+ init_error_handling();
7979
+ init_type_guards();
7937
7980
  init_pathResolver();
7938
7981
  var mcpConfig = {
7939
7982
  command: "bunx",
@@ -7942,12 +7985,25 @@ var mcpConfig = {
7942
7985
  function readJsonConfig(filePath, fallback) {
7943
7986
  try {
7944
7987
  if (pathExists(filePath)) {
7945
- return readSync(filePath, { format: "json" });
7988
+ const content = readSync(filePath, { format: "json" });
7989
+ return content;
7946
7990
  }
7947
7991
  } catch {
7948
7992
  }
7949
7993
  return fallback;
7950
7994
  }
7995
+ function setMcpServer(config, filePath, name, server) {
7996
+ if (!isObjectLike(config)) {
7997
+ throw new Error(`Invalid JSON config: ${filePath}`);
7998
+ }
7999
+ const servers = config.mcpServers || {};
8000
+ if (!isObjectLike(servers)) {
8001
+ throw new Error(`Invalid "mcpServers" in ${filePath}`);
8002
+ }
8003
+ config.mcpServers = servers;
8004
+ servers[name] = server;
8005
+ return config;
8006
+ }
7951
8007
  function writeJsonConfig(filePath, data) {
7952
8008
  ensureDirSync(getDirname(filePath));
7953
8009
  writeSync(filePath, data, { overwrite: true });
@@ -7963,13 +8019,16 @@ async function main(options = {}) {
7963
8019
  note(`[DRY RUN] Would write ${mcpJsonPath}`, "Claude Code");
7964
8020
  } else {
7965
8021
  try {
7966
- const config = readJsonConfig(mcpJsonPath, { mcpServers: {} });
7967
- config.mcpServers = config.mcpServers || {};
7968
- config.mcpServers.donotdev = mcpConfig;
8022
+ const config = setMcpServer(
8023
+ readJsonConfig(mcpJsonPath, { mcpServers: {} }),
8024
+ mcpJsonPath,
8025
+ "donotdev",
8026
+ mcpConfig
8027
+ );
7969
8028
  writeJsonConfig(mcpJsonPath, config);
7970
8029
  log2.success(".mcp.json configured (Claude Code).");
7971
8030
  } catch (e) {
7972
- log2.error(`Failed to configure .mcp.json: ${e.message}`);
8031
+ log2.error(`Failed to configure .mcp.json: ${getErrorMessage(e)}`);
7973
8032
  }
7974
8033
  }
7975
8034
  const cursorMcpPath = joinPath(cwd, ".cursor", "mcp.json");
@@ -7977,13 +8036,16 @@ async function main(options = {}) {
7977
8036
  note(`[DRY RUN] Would write ${cursorMcpPath}`, "Cursor");
7978
8037
  } else {
7979
8038
  try {
7980
- const config = readJsonConfig(cursorMcpPath, { mcpServers: {} });
7981
- config.mcpServers = config.mcpServers || {};
7982
- config.mcpServers.donotdev = mcpConfig;
8039
+ const config = setMcpServer(
8040
+ readJsonConfig(cursorMcpPath, { mcpServers: {} }),
8041
+ cursorMcpPath,
8042
+ "donotdev",
8043
+ mcpConfig
8044
+ );
7983
8045
  writeJsonConfig(cursorMcpPath, config);
7984
8046
  log2.success(".cursor/mcp.json configured (Cursor).");
7985
8047
  } catch (e) {
7986
- log2.error(`Failed to configure Cursor: ${e.message}`);
8048
+ log2.error(`Failed to configure Cursor: ${getErrorMessage(e)}`);
7987
8049
  }
7988
8050
  }
7989
8051
  const geminiConfigPath = joinPath(cwd, ".gemini", "settings.json");
@@ -7991,13 +8053,16 @@ async function main(options = {}) {
7991
8053
  note(`[DRY RUN] Would write ${geminiConfigPath}`, "Gemini");
7992
8054
  } else {
7993
8055
  try {
7994
- const config = readJsonConfig(geminiConfigPath, { mcpServers: {} });
7995
- config.mcpServers = config.mcpServers || {};
7996
- config.mcpServers.donotdev = { ...mcpConfig, trust: true };
8056
+ const config = setMcpServer(
8057
+ readJsonConfig(geminiConfigPath, { mcpServers: {} }),
8058
+ geminiConfigPath,
8059
+ "donotdev",
8060
+ { ...mcpConfig, trust: true }
8061
+ );
7997
8062
  writeJsonConfig(geminiConfigPath, config);
7998
8063
  log2.success(".gemini/settings.json configured (Gemini).");
7999
8064
  } catch (e) {
8000
- log2.error(`Failed to configure Gemini: ${e.message}`);
8065
+ log2.error(`Failed to configure Gemini: ${getErrorMessage(e)}`);
8001
8066
  }
8002
8067
  }
8003
8068
  const claudeConfigPath = isWindows ? joinPath(
@@ -8016,13 +8081,16 @@ async function main(options = {}) {
8016
8081
  note(`[DRY RUN] Would update ${claudeConfigPath}`, "Claude Desktop");
8017
8082
  } else {
8018
8083
  try {
8019
- const config = readJsonConfig(claudeConfigPath, { mcpServers: {} });
8020
- config.mcpServers = config.mcpServers || {};
8021
- config.mcpServers.donotdev = mcpConfig;
8084
+ const config = setMcpServer(
8085
+ readJsonConfig(claudeConfigPath, { mcpServers: {} }),
8086
+ claudeConfigPath,
8087
+ "donotdev",
8088
+ mcpConfig
8089
+ );
8022
8090
  writeJsonConfig(claudeConfigPath, config);
8023
8091
  log2.success("Claude Desktop configured (global).");
8024
8092
  } catch (e) {
8025
- log2.error(`Failed to configure Claude Desktop: ${e.message}`);
8093
+ log2.error(`Failed to configure Claude Desktop: ${getErrorMessage(e)}`);
8026
8094
  }
8027
8095
  }
8028
8096
  }