@donotdev/cli 0.3.0 → 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 (104) 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 -896
  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 +513 -30
  27. package/dist/bin/donotdev.js +33 -8
  28. package/dist/index.js +14568 -12497
  29. package/package.json +1 -1
  30. package/templates/app-demo/index.html.example +0 -1
  31. package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +2 -2
  32. package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +1 -0
  33. package/templates/app-demo/tsconfig.json.example +1 -1
  34. package/templates/app-dndev/index.html.example +1 -3
  35. package/templates/app-dndev/src/pages/NotFoundPage.tsx.example +1 -0
  36. package/templates/app-expo/app/_layout.tsx.example +1 -1
  37. package/templates/app-expo/app/form.tsx.example +10 -3
  38. package/templates/app-expo/app/index.tsx.example +3 -3
  39. package/templates/app-expo/app/list.tsx.example +2 -2
  40. package/templates/app-expo/app/profile.tsx.example +4 -3
  41. package/templates/app-expo/app/signin.tsx.example +2 -2
  42. package/templates/app-expo/babel.config.js.example +23 -6
  43. package/templates/app-expo/metro.config.js.example +7 -17
  44. package/templates/app-expo/tsconfig.json.example +2 -1
  45. package/templates/app-next/src/app/AppDocument.tsx.example +2 -3
  46. package/templates/app-vite/index.html.example +1 -3
  47. package/templates/app-vite/src/locales/home_en.json.example +6 -6
  48. package/templates/app-vite/src/pages/FormPageExample.tsx.example +1 -1
  49. package/templates/app-vite/src/pages/HomePage.tsx.example +3 -3
  50. package/templates/app-vite/src/pages/NotFoundPage.tsx.example +1 -0
  51. package/templates/deploy-config/firebase.json.example +6 -5
  52. package/templates/deploy-config/tsconfig.functions.json.example +2 -7
  53. package/templates/deploy-config/vercel.json.example +6 -420
  54. package/templates/functions-firebase/README.md.example +8 -8
  55. package/templates/functions-firebase/functions.config.js.example +2 -1
  56. package/templates/functions-firebase/src/index.ts.example +4 -3
  57. package/templates/functions-firebase/src/oauth/exchangeToken.ts.example +8 -6
  58. package/templates/functions-firebase/src/oauth/refreshToken.ts.example +8 -6
  59. package/templates/functions-firebase/tsconfig.json.example +3 -5
  60. package/templates/functions-supabase/supabase/config.toml.example +2 -1
  61. package/templates/functions-supabase/supabase/functions/change-plan/index.ts.example +2 -3
  62. package/templates/functions-supabase/supabase/functions/create-checkout-session/index.ts.example +2 -3
  63. package/templates/functions-supabase/supabase/functions/stripe-webhook/index.ts.example +2 -3
  64. package/templates/functions-vercel/README.md.example +15 -25
  65. package/templates/functions-vercel/build.mjs.example +4 -46
  66. package/templates/functions-vercel/src/api/auth/setCustomClaims.ts.example +6 -11
  67. package/templates/functions-vercel/src/api/billing/handleStripeWebhook.ts.example +2 -3
  68. package/templates/functions-vercel/src/api/oauth/checkGitHubAccess.ts.example +5 -11
  69. package/templates/functions-vercel/src/api/oauth/exchangeToken.ts.example +5 -11
  70. package/templates/functions-vercel/src/api/oauth/grantGitHubAccess.ts.example +5 -11
  71. package/templates/functions-vercel/tsconfig.json.example +5 -6
  72. package/templates/github/workflows/firebase-deploy.yml.example +1 -1
  73. package/templates/preset-admin/src/pages/DashboardPage.tsx.example +3 -2
  74. package/templates/preset-admin/src/pages/ReportsPage.tsx.example +13 -12
  75. package/templates/preset-admin/src/pages/SettingsPage.tsx.example +5 -5
  76. package/templates/preset-admin/src/pages/UsersPage.tsx.example +13 -12
  77. package/templates/preset-ecommerce/src/pages/CartPage.tsx.example +5 -5
  78. package/templates/preset-ecommerce/src/pages/CatalogPage.tsx.example +1 -4
  79. package/templates/preset-ecommerce/src/pages/CheckoutPage.tsx.example +10 -12
  80. package/templates/preset-ecommerce/src/pages/ProductPage.tsx.example +7 -4
  81. package/templates/preset-landing/src/pages/AboutPage.tsx.example +11 -9
  82. package/templates/preset-landing/src/pages/ContactPage.tsx.example +13 -7
  83. package/templates/preset-landing/src/pages/HomePage.tsx.example +50 -32
  84. package/templates/preset-saas/src/pages/DashboardPage.tsx.example +1 -1
  85. package/templates/preset-saas/src/pages/HomePage.tsx.example +3 -2
  86. package/templates/preset-saas/src/pages/PricingPage.tsx.example +4 -3
  87. package/templates/preset-saas/src/pages/ProfilePage.tsx.example +7 -7
  88. package/templates/preset-saas/src/pages/SettingsPage.tsx.example +3 -3
  89. package/templates/root-consumer/.claude/hooks/guard-bash.sh.example +101 -10
  90. package/templates/root-consumer/.claude/rules/definition-of-done.md.example +2 -2
  91. package/templates/root-consumer/.claude/rules/framework.md.example +1 -1
  92. package/templates/root-consumer/.claude/settings.json.example +0 -11
  93. package/templates/root-consumer/.claude/skills/build/SKILL.md.example +1 -1
  94. package/templates/root-consumer/.dndev/args.json.example +2 -2
  95. package/templates/root-consumer/.env.example +1 -1
  96. package/templates/root-consumer/.gitignore.example +2 -0
  97. package/templates/root-consumer/AGENTS.md.example +3 -3
  98. package/templates/root-consumer/README.md.example +1 -1
  99. package/templates/app-vite/csp.example.json +0 -44
  100. package/templates/functions-vercel/src/api/oauth/disconnect.ts.example +0 -20
  101. package/templates/functions-vercel/src/api/oauth/getConnections.ts.example +0 -20
  102. package/templates/functions-vercel/src/api/oauth/refreshToken.ts.example +0 -20
  103. package/templates/functions-vercel/vercel.json.example +0 -14
  104. package/templates/root-consumer/.claude/hooks/typecheck-stop.sh.example +0 -18
@@ -6290,11 +6290,12 @@ function getPatternsFor(type, repoRoot = null) {
6290
6290
  function getGlobOptionsFor(type) {
6291
6291
  return GLOB_OPTIONS[type] || GLOB_OPTIONS.base;
6292
6292
  }
6293
- var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
6293
+ var DEFAULT_OG_IMAGE, I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
6294
6294
  var init_constants = __esm({
6295
6295
  "packages/core/config/constants.js"() {
6296
6296
  "use strict";
6297
6297
  init_utils2();
6298
+ DEFAULT_OG_IMAGE = "/og-image.png";
6298
6299
  I18N_PATHS = {
6299
6300
  // Monorepo source structure (locales at root, not in src/)
6300
6301
  SOURCE_ROOT: "packages/core/i18n",
@@ -6305,7 +6306,9 @@ var init_constants = __esm({
6305
6306
  PUBLISHED_ROOT: "i18n",
6306
6307
  PUBLISHED_LOCALES: "i18n/locales",
6307
6308
  PUBLISHED_EAGER: "i18n/locales/eager",
6308
- PUBLISHED_LAZY: "i18n/locales/lazy"
6309
+ PUBLISHED_LAZY: "i18n/locales/lazy",
6310
+ // Flag artwork: one SVG per flag code (flagFileName), copied to public/flags/ (AssetDiscovery)
6311
+ PUBLISHED_FLAGS: "i18n/flags"
6309
6312
  };
6310
6313
  SCAN_PATTERNS = {
6311
6314
  routes: {
@@ -6367,7 +6370,12 @@ var init_constants = __esm({
6367
6370
  "logo.avif",
6368
6371
  "apple-touch-icon*.png",
6369
6372
  "android-chrome-*.png",
6370
- "manifest.json"
6373
+ // Generated from logo.svg (AssetDiscovery._generateMissingAssets) or the app's own
6374
+ "icon-*x*.png",
6375
+ DEFAULT_OG_IMAGE.slice(1)
6376
+ // Not manifest.json: the web app manifest is a build output on Next (the PWA step
6377
+ // rewrites it after this scan), so its scanned size would differ between a clean
6378
+ // build and a rebuild. The asset manifest's `manifest` reads it from disk instead.
6371
6379
  ],
6372
6380
  fonts: ["fonts/**/*.woff2", "fonts/**/*.woff", "fonts/**/*.ttf"],
6373
6381
  framework: ["packages/ui/assets/**/*"]
@@ -6444,7 +6452,6 @@ import {
6444
6452
  sep,
6445
6453
  extname
6446
6454
  } from "node:path";
6447
- import { fileURLToPath } from "node:url";
6448
6455
  function isEexistError(error2) {
6449
6456
  return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "EEXIST";
6450
6457
  }
@@ -7266,7 +7273,10 @@ var init_PathResolver = __esm({
7266
7273
  return resolvedPath;
7267
7274
  }
7268
7275
  /**
7269
- * Execute fast-glob with normalized results
7276
+ * Execute fast-glob with normalized results, sorted. fast-glob returns files in
7277
+ * filesystem completion order, which varies between runs: every discovery (routes,
7278
+ * themes, i18n, assets) and what it generates (route manifest, sitemap, llms.txt,
7279
+ * proxy) must list the same sources in the same order on every build.
7270
7280
  * @private
7271
7281
  */
7272
7282
  async _globWithNormalization(patterns, options) {
@@ -7274,7 +7284,7 @@ var init_PathResolver = __esm({
7274
7284
  return results.map((path) => {
7275
7285
  const pathStr = typeof path === "string" ? path : path.path;
7276
7286
  return this.normalizePath(pathStr);
7277
- });
7287
+ }).sort();
7278
7288
  }
7279
7289
  /**
7280
7290
  * Resolve files using patterns with cross-platform support
@@ -7429,15 +7439,6 @@ var init_PathResolver = __esm({
7429
7439
  const cjsPath = this.getEmptyCjsModulePath();
7430
7440
  return cjsPath.replace(/\.cjs$/, ".js");
7431
7441
  }
7432
- /**
7433
- * Get absolute path to empty flag component module.
7434
- * Returns `export default () => null;` — used by flag filtering plugins
7435
- * to replace unused flag files at build time.
7436
- */
7437
- getEmptyFlagModulePath() {
7438
- const __dirname2 = dirname2(fileURLToPath(import.meta.url));
7439
- return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
7440
- }
7441
7442
  /**
7442
7443
  * Get absolute path to empty CJS module for esbuild pre-bundling.
7443
7444
  * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
@@ -7510,7 +7511,7 @@ import {
7510
7511
  parse,
7511
7512
  isAbsolute as pathIsAbsolute
7512
7513
  } from "node:path";
7513
- import { fileURLToPath as fileURLToPath2 } from "node:url";
7514
+ import { fileURLToPath } from "node:url";
7514
7515
  var pathResolverInstance, getRepoRoot, normalizePath, pathExists, readSync, joinPath;
7515
7516
  var init_pathResolver = __esm({
7516
7517
  "packages/tooling/src/utils/pathResolver.ts"() {
@@ -7536,13 +7537,13 @@ import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFile
7536
7537
  import { createRequire as createRequire3 } from "node:module";
7537
7538
  import { dirname as dirname4, resolve as resolve3 } from "node:path";
7538
7539
  import process from "node:process";
7539
- import { fileURLToPath as fileURLToPath3 } from "node:url";
7540
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
7540
7541
  var require2, __filename, __dirname;
7541
7542
  var init_utils2 = __esm({
7542
7543
  "packages/tooling/src/bundler/utils.ts"() {
7543
7544
  "use strict";
7544
7545
  require2 = createRequire3(import.meta.url);
7545
- __filename = fileURLToPath3(import.meta.url);
7546
+ __filename = fileURLToPath2(import.meta.url);
7546
7547
  __dirname = dirname4(__filename);
7547
7548
  if (typeof globalThis !== "undefined") {
7548
7549
  globalThis.require = require2;
@@ -7557,6 +7558,14 @@ var init_utils2 = __esm({
7557
7558
  }
7558
7559
  });
7559
7560
 
7561
+ // packages/tooling/src/utils/create-utils.ts
7562
+ var init_create_utils = __esm({
7563
+ "packages/tooling/src/utils/create-utils.ts"() {
7564
+ "use strict";
7565
+ init_utils2();
7566
+ }
7567
+ });
7568
+
7560
7569
  // packages/cli/src/bin/commands/wai.ts
7561
7570
  init_utils2();
7562
7571
 
@@ -7565,6 +7574,7 @@ init_utils2();
7565
7574
 
7566
7575
  // packages/tooling/src/cli/index.ts
7567
7576
  init_utils2();
7577
+ init_create_utils();
7568
7578
 
7569
7579
  // packages/tooling/src/cli/wai.ts
7570
7580
  init_utils2();