@donotdev/cli 0.3.1 → 0.3.2

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 (99) hide show
  1. package/dependencies-matrix.json +51 -27
  2. package/dist/bin/commands/agent-setup.js +28 -18
  3. package/dist/bin/commands/build.js +1086 -58
  4. package/dist/bin/commands/bump.js +337 -53
  5. package/dist/bin/commands/cacheout.js +28 -18
  6. package/dist/bin/commands/coach.js +33 -25
  7. package/dist/bin/commands/create-app.js +597 -244
  8. package/dist/bin/commands/create-project.js +607 -254
  9. package/dist/bin/commands/db-check.js +37 -28
  10. package/dist/bin/commands/db.js +37 -28
  11. package/dist/bin/commands/deploy.js +13758 -11807
  12. package/dist/bin/commands/dev.js +50 -34
  13. package/dist/bin/commands/doctor.js +33 -25
  14. package/dist/bin/commands/emu.js +65 -43
  15. package/dist/bin/commands/format.js +28 -18
  16. package/dist/bin/commands/get-demo.js +81 -46
  17. package/dist/bin/commands/make-admin.js +966 -905
  18. package/dist/bin/commands/preview.js +50 -34
  19. package/dist/bin/commands/seed.js +37 -28
  20. package/dist/bin/commands/setup-cicd.js +1286 -87
  21. package/dist/bin/commands/setup.js +152 -138
  22. package/dist/bin/commands/staging.js +13758 -11807
  23. package/dist/bin/commands/sync-secrets.js +152 -132
  24. package/dist/bin/commands/type-check.js +1086 -39
  25. package/dist/bin/commands/wai.js +28 -18
  26. package/dist/bin/dndev.js +501 -27
  27. package/dist/index.js +14568 -12497
  28. package/package.json +1 -1
  29. package/templates/app-demo/index.html.example +0 -1
  30. package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +2 -2
  31. package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +1 -0
  32. package/templates/app-demo/tsconfig.json.example +1 -1
  33. package/templates/app-dndev/index.html.example +1 -3
  34. package/templates/app-expo/app/_layout.tsx.example +1 -1
  35. package/templates/app-expo/app/form.tsx.example +10 -3
  36. package/templates/app-expo/app/index.tsx.example +3 -3
  37. package/templates/app-expo/app/list.tsx.example +2 -2
  38. package/templates/app-expo/app/profile.tsx.example +4 -3
  39. package/templates/app-expo/app/signin.tsx.example +2 -2
  40. package/templates/app-expo/babel.config.js.example +23 -6
  41. package/templates/app-expo/metro.config.js.example +7 -17
  42. package/templates/app-expo/tsconfig.json.example +2 -1
  43. package/templates/app-next/src/app/AppDocument.tsx.example +2 -3
  44. package/templates/app-vite/index.html.example +1 -3
  45. package/templates/app-vite/src/locales/home_en.json.example +6 -6
  46. package/templates/app-vite/src/pages/FormPageExample.tsx.example +1 -1
  47. package/templates/app-vite/src/pages/HomePage.tsx.example +3 -3
  48. package/templates/deploy-config/firebase.json.example +6 -5
  49. package/templates/deploy-config/tsconfig.functions.json.example +2 -7
  50. package/templates/deploy-config/vercel.json.example +5 -56
  51. package/templates/functions-firebase/README.md.example +8 -8
  52. package/templates/functions-firebase/functions.config.js.example +2 -1
  53. package/templates/functions-firebase/src/index.ts.example +4 -3
  54. package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +8 -6
  55. package/templates/functions-firebase/src/oauth/refreshToken.ts.example +8 -6
  56. package/templates/functions-firebase/tsconfig.json.example +3 -5
  57. package/templates/functions-supabase/supabase/config.toml.example +2 -1
  58. package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +2 -3
  59. package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +2 -3
  60. package/templates/functions-supabase/supabase/functions/stripe-webhook/index.ts.example +2 -3
  61. package/templates/functions-vercel/README.md.example +15 -25
  62. package/templates/functions-vercel/build.mjs.example +4 -46
  63. package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +6 -11
  64. package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +2 -3
  65. package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +5 -11
  66. package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +5 -11
  67. package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +5 -11
  68. package/templates/functions-vercel/tsconfig.json.example +5 -6
  69. package/templates/github/workflows/firebase-deploy.yml.example +1 -1
  70. package/templates/preset-admin/src/pages/DashboardPage.tsx.example +3 -2
  71. package/templates/preset-admin/src/pages/ReportsPage.tsx.example +13 -12
  72. package/templates/preset-admin/src/pages/SettingsPage.tsx.example +5 -5
  73. package/templates/preset-admin/src/pages/UsersPage.tsx.example +13 -12
  74. package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +5 -5
  75. package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +1 -4
  76. package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +10 -12
  77. package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +7 -4
  78. package/templates/preset-landing/src/pages/AboutPage.tsx.example +11 -9
  79. package/templates/preset-landing/src/pages/ContactPage.tsx.example +13 -7
  80. package/templates/preset-landing/src/pages/HomePage.tsx.example +50 -32
  81. package/templates/preset-saas/src/pages/DashboardPage.tsx.example +1 -1
  82. package/templates/preset-saas/src/pages/HomePage.tsx.example +3 -2
  83. package/templates/preset-saas/src/pages/PricingPage.tsx.example +4 -3
  84. package/templates/preset-saas/src/pages/ProfilePage.tsx.example +7 -7
  85. package/templates/preset-saas/src/pages/SettingsPage.tsx.example +3 -3
  86. package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +101 -10
  87. package/templates/root-consumer/.claude/rules/definition-of-done.md.example +2 -2
  88. package/templates/root-consumer/.claude/rules/framework.md.example +1 -1
  89. package/templates/root-consumer/.claude/settings.json.example +0 -11
  90. package/templates/root-consumer/.claude/skills/build/SKILL.md.example +1 -1
  91. package/templates/root-consumer/.dndev/args.json.example +2 -2
  92. package/templates/root-consumer/.env.example +1 -1
  93. package/templates/root-consumer/AGENTS.md.example +3 -3
  94. package/templates/root-consumer/README.md.example +1 -1
  95. package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -20
  96. package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -20
  97. package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -20
  98. package/templates/functions-vercel/vercel.json.example +0 -14
  99. package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +0 -18
@@ -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-20",
5
+ "lastUpdated": "2026-11-21",
6
6
  "migrationGuides": {
7
7
  "0.0→0.1": {
8
8
  "path": "docs/migration/v0.0-to-v0.1.md",
@@ -13,107 +13,112 @@
13
13
  "breakingChanges": []
14
14
  }
15
15
  },
16
+ "nodePolicy": {
17
+ "description": "Node.js version policy, single source of truth: ci = version generated CI workflows run on (current Active LTS), enginesMin = minimum supported (engines.node range). Firebase/Vercel functions runtimes are separate (Cloud Functions runtime list).",
18
+ "ci": "26",
19
+ "enginesMin": ">=24"
20
+ },
16
21
  "groups": {
17
22
  "@donotdev/ai": {
18
23
  "description": "AI package - provider-agnostic LLM plumbing",
19
24
  "packages": {
20
- "@donotdev/ai": "^0.3.1"
25
+ "@donotdev/ai": "^0.3.2"
21
26
  }
22
27
  },
23
28
  "@donotdev/graphql": {
24
29
  "description": "GraphQL data provider - opt-in, not scaffolded by default",
25
30
  "packages": {
26
- "@donotdev/graphql": "^0.3.1"
31
+ "@donotdev/graphql": "^0.3.2"
27
32
  }
28
33
  },
29
34
  "@donotdev/restcrud": {
30
35
  "description": "REST CRUD data provider - opt-in, not scaffolded by default",
31
36
  "packages": {
32
- "@donotdev/restcrud": "^0.3.1"
37
+ "@donotdev/restcrud": "^0.3.2"
33
38
  }
34
39
  },
35
40
  "@donotdev/testing": {
36
41
  "description": "Testing utilities - opt-in, not scaffolded by default",
37
42
  "packages": {
38
- "@donotdev/testing": "^0.3.1"
43
+ "@donotdev/testing": "^0.3.2"
39
44
  }
40
45
  },
41
46
  "@donotdev/auth": {
42
47
  "description": "Authentication package",
43
48
  "packages": {
44
- "@donotdev/auth": "^0.3.1"
49
+ "@donotdev/auth": "^0.3.2"
45
50
  }
46
51
  },
47
52
  "@donotdev/billing": {
48
53
  "description": "Billing package",
49
54
  "packages": {
50
- "@donotdev/billing": "^0.3.1"
55
+ "@donotdev/billing": "^0.3.2"
51
56
  }
52
57
  },
53
58
  "@donotdev/components": {
54
59
  "description": "UI components package",
55
60
  "packages": {
56
- "@donotdev/components": "^0.3.2"
61
+ "@donotdev/components": "^0.3.3"
57
62
  }
58
63
  },
59
64
  "@donotdev/core": {
60
65
  "description": "Core framework package",
61
66
  "packages": {
62
- "@donotdev/core": "^0.3.1"
67
+ "@donotdev/core": "^0.3.2"
63
68
  }
64
69
  },
65
70
  "@donotdev/crud": {
66
71
  "description": "CRUD operations package",
67
72
  "packages": {
68
- "@donotdev/crud": "^0.3.1"
73
+ "@donotdev/crud": "^0.3.2"
69
74
  }
70
75
  },
71
76
  "@donotdev/demo": {
72
77
  "description": "Zero-backend demo provider package",
73
78
  "packages": {
74
- "@donotdev/demo": "^0.3.1"
79
+ "@donotdev/demo": "^0.3.2"
75
80
  }
76
81
  },
77
82
  "@donotdev/firebase": {
78
83
  "description": "Firebase provider package",
79
84
  "packages": {
80
- "@donotdev/firebase": "^0.3.1"
85
+ "@donotdev/firebase": "^0.3.2"
81
86
  }
82
87
  },
83
88
  "@donotdev/functions": {
84
89
  "description": "Firebase Functions package",
85
90
  "packages": {
86
- "@donotdev/functions": "^0.3.1"
91
+ "@donotdev/functions": "^0.3.2"
87
92
  }
88
93
  },
89
94
  "@donotdev/oauth": {
90
95
  "description": "OAuth package",
91
96
  "packages": {
92
- "@donotdev/oauth": "^0.3.1"
97
+ "@donotdev/oauth": "^0.3.2"
93
98
  }
94
99
  },
95
100
  "@donotdev/templates": {
96
101
  "description": "Page templates package",
97
102
  "packages": {
98
- "@donotdev/templates": "^0.3.1"
103
+ "@donotdev/templates": "^0.3.2"
99
104
  }
100
105
  },
101
106
  "@donotdev/ui": {
102
107
  "description": "UI and routing package",
103
108
  "packages": {
104
- "@donotdev/ui": "^0.3.2"
109
+ "@donotdev/ui": "^0.3.3"
105
110
  }
106
111
  },
107
112
  "@donotdev/expo": {
108
113
  "description": "Expo/React Native components package",
109
114
  "packages": {
110
- "@donotdev/expo": "^0.3.1"
115
+ "@donotdev/expo": "^0.3.2"
111
116
  }
112
117
  },
113
118
  "@donotdev/supabase": {
114
119
  "description": "Supabase provider package",
115
120
  "packages": {
116
- "@donotdev/supabase": "^0.3.1"
121
+ "@donotdev/supabase": "^0.3.2"
117
122
  }
118
123
  },
119
124
  "supabase-js": {
@@ -312,6 +317,14 @@
312
317
  "@ai-sdk/google": "^4.0.118"
313
318
  }
314
319
  },
320
+ "upstash": {
321
+ "description": "Upstash rate limiting (Redis), loaded lazily by the @donotdev/functions AI route. Scaffolded Vercel functions declare it; in this repo only packages/functions installs it (rootExclude).",
322
+ "rootExclude": true,
323
+ "packages": {
324
+ "@upstash/ratelimit": "^2.2.0",
325
+ "@upstash/redis": "^1.41.0"
326
+ }
327
+ },
315
328
  "html-sanitizer": {
316
329
  "description": "HTML sanitization: DOMPurify in the browser, DOMPurify + jsdom on the server (SSR). jsdom stays on 26.x: later releases require an ESM-only package that Vercel's function runtime cannot load. Pulled in by @donotdev/components; consumer apps never add it.",
317
330
  "packages": {
@@ -469,7 +482,6 @@
469
482
  },
470
483
  "root-consumer-tooling": {
471
484
  "packages": {
472
- "@donotdev/cli": "latest",
473
485
  "turbo": "^2.11.10",
474
486
  "sharp": "^0.35.5"
475
487
  }
@@ -482,13 +494,13 @@
482
494
  "@donotdev/cli": {
483
495
  "description": "Cli package",
484
496
  "packages": {
485
- "@donotdev/cli": "^0.3.1"
497
+ "@donotdev/cli": "^0.3.2"
486
498
  }
487
499
  },
488
500
  "@donotdev/mcp-server": {
489
501
  "description": "MCP server for component type lookups",
490
502
  "packages": {
491
- "@donotdev/mcp-server": "^0.3.1"
503
+ "@donotdev/mcp-server": "^0.3.2"
492
504
  }
493
505
  },
494
506
  "mcp-sdk": {
@@ -514,7 +526,7 @@
514
526
  "@donotdev/security": {
515
527
  "description": "Security package",
516
528
  "packages": {
517
- "@donotdev/security": "^0.3.1"
529
+ "@donotdev/security": "^0.3.2"
518
530
  }
519
531
  },
520
532
  "xterm": {
@@ -560,7 +572,7 @@
560
572
  "@donotdev/canvas": {
561
573
  "description": "Canvas package",
562
574
  "packages": {
563
- "@donotdev/canvas": "^0.3.1"
575
+ "@donotdev/canvas": "^0.3.2"
564
576
  }
565
577
  }
566
578
  },
@@ -748,7 +760,15 @@
748
760
  "browser-image-compression",
749
761
  "firebase",
750
762
  "firebase-admin"
751
- ]
763
+ ],
764
+ "peerDependencies": [
765
+ "stripe"
766
+ ],
767
+ "peerDependenciesMeta": {
768
+ "stripe": {
769
+ "optional": true
770
+ }
771
+ }
752
772
  },
753
773
  "@donotdev/supabase": {
754
774
  "dependencies": [
@@ -1173,14 +1193,18 @@
1173
1193
  ]
1174
1194
  },
1175
1195
  "functions-vercel": {
1176
- "description": "Vercel Functions app",
1196
+ "description": "Vercel Functions app: what the bundle imports. @donotdev/functions/vercel loads the Firebase (@donotdev/firebase) and Supabase (@supabase/supabase-js) admin clients and the AI route (ai, model providers, Upstash) itself; next is for the handler types.",
1177
1197
  "dependencies": [
1178
1198
  "@donotdev/functions",
1199
+ "@donotdev/firebase",
1200
+ "supabase-js",
1179
1201
  "next",
1180
- "firebase-functions",
1181
1202
  "validation",
1182
1203
  "monitoring-node",
1183
- "stripe"
1204
+ "stripe",
1205
+ "ai-sdk",
1206
+ "ai-sdk-providers",
1207
+ "upstash"
1184
1208
  ],
1185
1209
  "devDependencies": [
1186
1210
  "vercel"
@@ -6658,11 +6658,12 @@ function getPatternsFor(type, repoRoot = null) {
6658
6658
  function getGlobOptionsFor(type) {
6659
6659
  return GLOB_OPTIONS[type] || GLOB_OPTIONS.base;
6660
6660
  }
6661
- var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
6661
+ var DEFAULT_OG_IMAGE, I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
6662
6662
  var init_constants = __esm({
6663
6663
  "packages/core/config/constants.js"() {
6664
6664
  "use strict";
6665
6665
  init_utils2();
6666
+ DEFAULT_OG_IMAGE = "/og-image.png";
6666
6667
  I18N_PATHS = {
6667
6668
  // Monorepo source structure (locales at root, not in src/)
6668
6669
  SOURCE_ROOT: "packages/core/i18n",
@@ -6673,7 +6674,9 @@ var init_constants = __esm({
6673
6674
  PUBLISHED_ROOT: "i18n",
6674
6675
  PUBLISHED_LOCALES: "i18n/locales",
6675
6676
  PUBLISHED_EAGER: "i18n/locales/eager",
6676
- PUBLISHED_LAZY: "i18n/locales/lazy"
6677
+ PUBLISHED_LAZY: "i18n/locales/lazy",
6678
+ // Flag artwork: one SVG per flag code (flagFileName), copied to public/flags/ (AssetDiscovery)
6679
+ PUBLISHED_FLAGS: "i18n/flags"
6677
6680
  };
6678
6681
  SCAN_PATTERNS = {
6679
6682
  routes: {
@@ -6735,7 +6738,12 @@ var init_constants = __esm({
6735
6738
  "logo.avif",
6736
6739
  "apple-touch-icon*.png",
6737
6740
  "android-chrome-*.png",
6738
- "manifest.json"
6741
+ // Generated from logo.svg (AssetDiscovery._generateMissingAssets) or the app's own
6742
+ "icon-*x*.png",
6743
+ DEFAULT_OG_IMAGE.slice(1)
6744
+ // Not manifest.json: the web app manifest is a build output on Next (the PWA step
6745
+ // rewrites it after this scan), so its scanned size would differ between a clean
6746
+ // build and a rebuild. The asset manifest's `manifest` reads it from disk instead.
6739
6747
  ],
6740
6748
  fonts: ["fonts/**/*.woff2", "fonts/**/*.woff", "fonts/**/*.ttf"],
6741
6749
  framework: ["packages/ui/assets/**/*"]
@@ -6812,7 +6820,6 @@ import {
6812
6820
  sep,
6813
6821
  extname
6814
6822
  } from "node:path";
6815
- import { fileURLToPath } from "node:url";
6816
6823
  function isEexistError(error2) {
6817
6824
  return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "EEXIST";
6818
6825
  }
@@ -7634,7 +7641,10 @@ var init_PathResolver = __esm({
7634
7641
  return resolvedPath;
7635
7642
  }
7636
7643
  /**
7637
- * Execute fast-glob with normalized results
7644
+ * Execute fast-glob with normalized results, sorted. fast-glob returns files in
7645
+ * filesystem completion order, which varies between runs: every discovery (routes,
7646
+ * themes, i18n, assets) and what it generates (route manifest, sitemap, llms.txt,
7647
+ * proxy) must list the same sources in the same order on every build.
7638
7648
  * @private
7639
7649
  */
7640
7650
  async _globWithNormalization(patterns, options) {
@@ -7642,7 +7652,7 @@ var init_PathResolver = __esm({
7642
7652
  return results.map((path) => {
7643
7653
  const pathStr = typeof path === "string" ? path : path.path;
7644
7654
  return this.normalizePath(pathStr);
7645
- });
7655
+ }).sort();
7646
7656
  }
7647
7657
  /**
7648
7658
  * Resolve files using patterns with cross-platform support
@@ -7797,15 +7807,6 @@ var init_PathResolver = __esm({
7797
7807
  const cjsPath = this.getEmptyCjsModulePath();
7798
7808
  return cjsPath.replace(/\.cjs$/, ".js");
7799
7809
  }
7800
- /**
7801
- * Get absolute path to empty flag component module.
7802
- * Returns `export default () => null;` — used by flag filtering plugins
7803
- * to replace unused flag files at build time.
7804
- */
7805
- getEmptyFlagModulePath() {
7806
- const __dirname2 = dirname2(fileURLToPath(import.meta.url));
7807
- return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
7808
- }
7809
7810
  /**
7810
7811
  * Get absolute path to empty CJS module for esbuild pre-bundling.
7811
7812
  * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
@@ -7878,7 +7879,7 @@ import {
7878
7879
  parse,
7879
7880
  isAbsolute as pathIsAbsolute
7880
7881
  } from "node:path";
7881
- import { fileURLToPath as fileURLToPath2 } from "node:url";
7882
+ import { fileURLToPath } from "node:url";
7882
7883
  var pathResolverInstance, normalizePath, pathExists, readSync, writeSync, ensureDirSync, getDirname, joinPath;
7883
7884
  var init_pathResolver = __esm({
7884
7885
  "packages/tooling/src/utils/pathResolver.ts"() {
@@ -7919,13 +7920,13 @@ import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFile
7919
7920
  import { createRequire as createRequire3 } from "node:module";
7920
7921
  import { dirname as dirname4, resolve as resolve3 } from "node:path";
7921
7922
  import process from "node:process";
7922
- import { fileURLToPath as fileURLToPath3 } from "node:url";
7923
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
7923
7924
  var require2, __filename, __dirname;
7924
7925
  var init_utils2 = __esm({
7925
7926
  "packages/tooling/src/bundler/utils.ts"() {
7926
7927
  "use strict";
7927
7928
  require2 = createRequire3(import.meta.url);
7928
- __filename = fileURLToPath3(import.meta.url);
7929
+ __filename = fileURLToPath2(import.meta.url);
7929
7930
  __dirname = dirname4(__filename);
7930
7931
  if (typeof globalThis !== "undefined") {
7931
7932
  globalThis.require = require2;
@@ -7963,6 +7964,14 @@ var init_error_handling = __esm({
7963
7964
  }
7964
7965
  });
7965
7966
 
7967
+ // packages/tooling/src/utils/create-utils.ts
7968
+ var init_create_utils = __esm({
7969
+ "packages/tooling/src/utils/create-utils.ts"() {
7970
+ "use strict";
7971
+ init_utils2();
7972
+ }
7973
+ });
7974
+
7966
7975
  // packages/cli/src/bin/commands/agent-setup.ts
7967
7976
  init_utils2();
7968
7977
 
@@ -7971,6 +7980,7 @@ init_utils2();
7971
7980
 
7972
7981
  // packages/tooling/src/cli/index.ts
7973
7982
  init_utils2();
7983
+ init_create_utils();
7974
7984
 
7975
7985
  // packages/tooling/src/cli/agent-setup.ts
7976
7986
  init_utils2();