@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
@@ -6432,11 +6432,12 @@ function getPatternsFor(type, repoRoot = null) {
6432
6432
  function getGlobOptionsFor(type) {
6433
6433
  return GLOB_OPTIONS[type] || GLOB_OPTIONS.base;
6434
6434
  }
6435
- var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
6435
+ var DEFAULT_OG_IMAGE, I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
6436
6436
  var init_constants = __esm({
6437
6437
  "packages/core/config/constants.js"() {
6438
6438
  "use strict";
6439
6439
  init_utils2();
6440
+ DEFAULT_OG_IMAGE = "/og-image.png";
6440
6441
  I18N_PATHS = {
6441
6442
  // Monorepo source structure (locales at root, not in src/)
6442
6443
  SOURCE_ROOT: "packages/core/i18n",
@@ -6447,7 +6448,9 @@ var init_constants = __esm({
6447
6448
  PUBLISHED_ROOT: "i18n",
6448
6449
  PUBLISHED_LOCALES: "i18n/locales",
6449
6450
  PUBLISHED_EAGER: "i18n/locales/eager",
6450
- PUBLISHED_LAZY: "i18n/locales/lazy"
6451
+ PUBLISHED_LAZY: "i18n/locales/lazy",
6452
+ // Flag artwork: one SVG per flag code (flagFileName), copied to public/flags/ (AssetDiscovery)
6453
+ PUBLISHED_FLAGS: "i18n/flags"
6451
6454
  };
6452
6455
  SCAN_PATTERNS = {
6453
6456
  routes: {
@@ -6509,7 +6512,12 @@ var init_constants = __esm({
6509
6512
  "logo.avif",
6510
6513
  "apple-touch-icon*.png",
6511
6514
  "android-chrome-*.png",
6512
- "manifest.json"
6515
+ // Generated from logo.svg (AssetDiscovery._generateMissingAssets) or the app's own
6516
+ "icon-*x*.png",
6517
+ DEFAULT_OG_IMAGE.slice(1)
6518
+ // Not manifest.json: the web app manifest is a build output on Next (the PWA step
6519
+ // rewrites it after this scan), so its scanned size would differ between a clean
6520
+ // build and a rebuild. The asset manifest's `manifest` reads it from disk instead.
6513
6521
  ],
6514
6522
  fonts: ["fonts/**/*.woff2", "fonts/**/*.woff", "fonts/**/*.ttf"],
6515
6523
  framework: ["packages/ui/assets/**/*"]
@@ -6586,7 +6594,6 @@ import {
6586
6594
  sep,
6587
6595
  extname
6588
6596
  } from "node:path";
6589
- import { fileURLToPath } from "node:url";
6590
6597
  function isEexistError(error2) {
6591
6598
  return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "EEXIST";
6592
6599
  }
@@ -7408,7 +7415,10 @@ var init_PathResolver = __esm({
7408
7415
  return resolvedPath;
7409
7416
  }
7410
7417
  /**
7411
- * Execute fast-glob with normalized results
7418
+ * Execute fast-glob with normalized results, sorted. fast-glob returns files in
7419
+ * filesystem completion order, which varies between runs: every discovery (routes,
7420
+ * themes, i18n, assets) and what it generates (route manifest, sitemap, llms.txt,
7421
+ * proxy) must list the same sources in the same order on every build.
7412
7422
  * @private
7413
7423
  */
7414
7424
  async _globWithNormalization(patterns, options) {
@@ -7416,7 +7426,7 @@ var init_PathResolver = __esm({
7416
7426
  return results.map((path) => {
7417
7427
  const pathStr = typeof path === "string" ? path : path.path;
7418
7428
  return this.normalizePath(pathStr);
7419
- });
7429
+ }).sort();
7420
7430
  }
7421
7431
  /**
7422
7432
  * Resolve files using patterns with cross-platform support
@@ -7571,15 +7581,6 @@ var init_PathResolver = __esm({
7571
7581
  const cjsPath = this.getEmptyCjsModulePath();
7572
7582
  return cjsPath.replace(/\.cjs$/, ".js");
7573
7583
  }
7574
- /**
7575
- * Get absolute path to empty flag component module.
7576
- * Returns `export default () => null;` — used by flag filtering plugins
7577
- * to replace unused flag files at build time.
7578
- */
7579
- getEmptyFlagModulePath() {
7580
- const __dirname2 = dirname2(fileURLToPath(import.meta.url));
7581
- return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
7582
- }
7583
7584
  /**
7584
7585
  * Get absolute path to empty CJS module for esbuild pre-bundling.
7585
7586
  * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
@@ -7652,7 +7653,7 @@ import {
7652
7653
  parse,
7653
7654
  isAbsolute as pathIsAbsolute
7654
7655
  } from "node:path";
7655
- import { fileURLToPath as fileURLToPath2 } from "node:url";
7656
+ import { fileURLToPath } from "node:url";
7656
7657
  function readdirSync3(dirPath, options) {
7657
7658
  if (options !== null && typeof options === "object" && options.withFileTypes === true) {
7658
7659
  return pathResolverInstance.readdirSync(dirPath, options);
@@ -7710,13 +7711,13 @@ import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFile
7710
7711
  import { createRequire as createRequire3 } from "node:module";
7711
7712
  import { dirname as dirname4, resolve as resolve3 } from "node:path";
7712
7713
  import process from "node:process";
7713
- import { fileURLToPath as fileURLToPath3 } from "node:url";
7714
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
7714
7715
  var require2, __filename, __dirname;
7715
7716
  var init_utils2 = __esm({
7716
7717
  "packages/tooling/src/bundler/utils.ts"() {
7717
7718
  "use strict";
7718
7719
  require2 = createRequire3(import.meta.url);
7719
- __filename = fileURLToPath3(import.meta.url);
7720
+ __filename = fileURLToPath2(import.meta.url);
7720
7721
  __dirname = dirname4(__filename);
7721
7722
  if (typeof globalThis !== "undefined") {
7722
7723
  globalThis.require = require2;
@@ -7731,6 +7732,14 @@ var init_utils2 = __esm({
7731
7732
  }
7732
7733
  });
7733
7734
 
7735
+ // packages/tooling/src/utils/create-utils.ts
7736
+ var init_create_utils = __esm({
7737
+ "packages/tooling/src/utils/create-utils.ts"() {
7738
+ "use strict";
7739
+ init_utils2();
7740
+ }
7741
+ });
7742
+
7734
7743
  // packages/cli/src/bin/commands/format.ts
7735
7744
  init_utils2();
7736
7745
 
@@ -7739,6 +7748,7 @@ init_utils2();
7739
7748
 
7740
7749
  // packages/tooling/src/cli/index.ts
7741
7750
  init_utils2();
7751
+ init_create_utils();
7742
7752
 
7743
7753
  // packages/tooling/src/quality/format.ts
7744
7754
  init_utils2();
@@ -7348,11 +7348,12 @@ function getPatternsFor(type, repoRoot = null) {
7348
7348
  function getGlobOptionsFor(type) {
7349
7349
  return GLOB_OPTIONS[type] || GLOB_OPTIONS.base;
7350
7350
  }
7351
- var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
7351
+ var DEFAULT_OG_IMAGE, I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
7352
7352
  var init_constants = __esm({
7353
7353
  "packages/core/config/constants.js"() {
7354
7354
  "use strict";
7355
7355
  init_utils2();
7356
+ DEFAULT_OG_IMAGE = "/og-image.png";
7356
7357
  I18N_PATHS = {
7357
7358
  // Monorepo source structure (locales at root, not in src/)
7358
7359
  SOURCE_ROOT: "packages/core/i18n",
@@ -7363,7 +7364,9 @@ var init_constants = __esm({
7363
7364
  PUBLISHED_ROOT: "i18n",
7364
7365
  PUBLISHED_LOCALES: "i18n/locales",
7365
7366
  PUBLISHED_EAGER: "i18n/locales/eager",
7366
- PUBLISHED_LAZY: "i18n/locales/lazy"
7367
+ PUBLISHED_LAZY: "i18n/locales/lazy",
7368
+ // Flag artwork: one SVG per flag code (flagFileName), copied to public/flags/ (AssetDiscovery)
7369
+ PUBLISHED_FLAGS: "i18n/flags"
7367
7370
  };
7368
7371
  SCAN_PATTERNS = {
7369
7372
  routes: {
@@ -7425,7 +7428,12 @@ var init_constants = __esm({
7425
7428
  "logo.avif",
7426
7429
  "apple-touch-icon*.png",
7427
7430
  "android-chrome-*.png",
7428
- "manifest.json"
7431
+ // Generated from logo.svg (AssetDiscovery._generateMissingAssets) or the app's own
7432
+ "icon-*x*.png",
7433
+ DEFAULT_OG_IMAGE.slice(1)
7434
+ // Not manifest.json: the web app manifest is a build output on Next (the PWA step
7435
+ // rewrites it after this scan), so its scanned size would differ between a clean
7436
+ // build and a rebuild. The asset manifest's `manifest` reads it from disk instead.
7429
7437
  ],
7430
7438
  fonts: ["fonts/**/*.woff2", "fonts/**/*.woff", "fonts/**/*.ttf"],
7431
7439
  framework: ["packages/ui/assets/**/*"]
@@ -7502,7 +7510,6 @@ import {
7502
7510
  sep,
7503
7511
  extname
7504
7512
  } from "node:path";
7505
- import { fileURLToPath } from "node:url";
7506
7513
  function isEexistError(error2) {
7507
7514
  return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "EEXIST";
7508
7515
  }
@@ -8324,7 +8331,10 @@ var init_PathResolver = __esm({
8324
8331
  return resolvedPath;
8325
8332
  }
8326
8333
  /**
8327
- * Execute fast-glob with normalized results
8334
+ * Execute fast-glob with normalized results, sorted. fast-glob returns files in
8335
+ * filesystem completion order, which varies between runs: every discovery (routes,
8336
+ * themes, i18n, assets) and what it generates (route manifest, sitemap, llms.txt,
8337
+ * proxy) must list the same sources in the same order on every build.
8328
8338
  * @private
8329
8339
  */
8330
8340
  async _globWithNormalization(patterns, options) {
@@ -8332,7 +8342,7 @@ var init_PathResolver = __esm({
8332
8342
  return results.map((path) => {
8333
8343
  const pathStr = typeof path === "string" ? path : path.path;
8334
8344
  return this.normalizePath(pathStr);
8335
- });
8345
+ }).sort();
8336
8346
  }
8337
8347
  /**
8338
8348
  * Resolve files using patterns with cross-platform support
@@ -8487,15 +8497,6 @@ var init_PathResolver = __esm({
8487
8497
  const cjsPath = this.getEmptyCjsModulePath();
8488
8498
  return cjsPath.replace(/\.cjs$/, ".js");
8489
8499
  }
8490
- /**
8491
- * Get absolute path to empty flag component module.
8492
- * Returns `export default () => null;` — used by flag filtering plugins
8493
- * to replace unused flag files at build time.
8494
- */
8495
- getEmptyFlagModulePath() {
8496
- const __dirname2 = dirname2(fileURLToPath(import.meta.url));
8497
- return this.normalizePath(resolve(__dirname2, "emptyFlag.js"));
8498
- }
8499
8500
  /**
8500
8501
  * Get absolute path to empty CJS module for esbuild pre-bundling.
8501
8502
  * CJS because esbuild statically analyzes ESM exports — CJS has dynamic
@@ -8568,12 +8569,12 @@ import {
8568
8569
  parse,
8569
8570
  isAbsolute as pathIsAbsolute
8570
8571
  } from "node:path";
8571
- import { fileURLToPath as fileURLToPath2 } from "node:url";
8572
+ import { fileURLToPath } from "node:url";
8572
8573
  function getDirnameFromUrl(importMetaUrl) {
8573
- return dirname3(fileURLToPath2(importMetaUrl));
8574
+ return dirname3(fileURLToPath(importMetaUrl));
8574
8575
  }
8575
8576
  function detectExecutionMode() {
8576
- const fileUrlPath = fileURLToPath2(import.meta.url);
8577
+ const fileUrlPath = fileURLToPath(import.meta.url);
8577
8578
  if (fileUrlPath.includes("node_modules")) {
8578
8579
  return "published";
8579
8580
  }
@@ -8585,7 +8586,7 @@ function detectExecutionMode() {
8585
8586
  function getTemplatesRoot() {
8586
8587
  const mode = detectExecutionMode();
8587
8588
  if (mode === "development") {
8588
- const fileUrlPath = fileURLToPath2(import.meta.url);
8589
+ const fileUrlPath = fileURLToPath(import.meta.url);
8589
8590
  const frameworkRoot = normalizePath(dirname3(fileUrlPath), "../../../..");
8590
8591
  return normalizePath(frameworkRoot, PACKAGE_PATHS.CLI, "templates");
8591
8592
  } else {
@@ -8738,13 +8739,13 @@ import { copyFileSync as copyFileSync2, readFileSync as readFileSync2, writeFile
8738
8739
  import { createRequire as createRequire3 } from "node:module";
8739
8740
  import { dirname as dirname4, resolve as resolve3 } from "node:path";
8740
8741
  import process from "node:process";
8741
- import { fileURLToPath as fileURLToPath3 } from "node:url";
8742
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
8742
8743
  var require2, __filename, __dirname;
8743
8744
  var init_utils2 = __esm({
8744
8745
  "packages/tooling/src/bundler/utils.ts"() {
8745
8746
  "use strict";
8746
8747
  require2 = createRequire3(import.meta.url);
8747
- __filename = fileURLToPath3(import.meta.url);
8748
+ __filename = fileURLToPath2(import.meta.url);
8748
8749
  __dirname = dirname4(__filename);
8749
8750
  if (typeof globalThis !== "undefined") {
8750
8751
  globalThis.require = require2;
@@ -8760,6 +8761,10 @@ var init_utils2 = __esm({
8760
8761
  });
8761
8762
 
8762
8763
  // packages/tooling/src/utils/cli-input.ts
8764
+ function exitCancelled() {
8765
+ cancel("Cancelled");
8766
+ process.exit(CANCELLED_EXIT_CODE);
8767
+ }
8763
8768
  async function askForSelection(message, choices, defaultValue = 0) {
8764
8769
  const options = choices.map((choice) => {
8765
8770
  const value = choice.value;
@@ -8771,21 +8776,20 @@ async function askForSelection(message, choices, defaultValue = 0) {
8771
8776
  options,
8772
8777
  initialValue
8773
8778
  });
8774
- if (isCancel(result)) {
8775
- cancel("Operation cancelled.");
8776
- process.exit(0);
8777
- }
8779
+ if (isCancel(result)) exitCancelled();
8778
8780
  const picked = choices.find((choice) => choice.value === result);
8779
8781
  if (!picked) {
8780
8782
  throw new Error(`Unknown selection: ${result}`);
8781
8783
  }
8782
8784
  return picked.value;
8783
8785
  }
8786
+ var CANCELLED_EXIT_CODE;
8784
8787
  var init_cli_input = __esm({
8785
8788
  "packages/tooling/src/utils/cli-input.ts"() {
8786
8789
  "use strict";
8787
8790
  init_utils2();
8788
8791
  init_dist5();
8792
+ CANCELLED_EXIT_CODE = 130;
8789
8793
  }
8790
8794
  });
8791
8795
 
@@ -8812,21 +8816,7 @@ var init_error_handling = __esm({
8812
8816
  }
8813
8817
  });
8814
8818
 
8815
- // packages/cli/src/bin/commands/get-demo.ts
8816
- init_utils2();
8817
-
8818
- // packages/tooling/src/index.ts
8819
- init_utils2();
8820
-
8821
- // packages/tooling/src/cli/index.ts
8822
- init_utils2();
8823
-
8824
8819
  // packages/tooling/src/utils/create-utils.ts
8825
- init_utils2();
8826
- init_cli_output();
8827
- init_error_handling();
8828
- init_pathResolver();
8829
- init_type_guards();
8830
8820
  async function copyTemplateFiles(sourceDir, destDir, replacements) {
8831
8821
  if (!pathExists(sourceDir)) {
8832
8822
  log2.warn(`Warning: Template directory does not exist: ${sourceDir}`);
@@ -8970,12 +8960,19 @@ function processArrayIterations(content, replacements) {
8970
8960
  }
8971
8961
  return content;
8972
8962
  }
8963
+ var init_create_utils = __esm({
8964
+ "packages/tooling/src/utils/create-utils.ts"() {
8965
+ "use strict";
8966
+ init_utils2();
8967
+ init_cli_output();
8968
+ init_error_handling();
8969
+ init_pathResolver();
8970
+ init_type_guards();
8971
+ }
8972
+ });
8973
8973
 
8974
8974
  // packages/tooling/src/utils/matrix.ts
8975
- init_utils2();
8976
- init_pathResolver();
8977
8975
  import { createRequire as createRequire4 } from "node:module";
8978
- var cachedMatrix = null;
8979
8976
  function getMatrixPath(mode) {
8980
8977
  try {
8981
8978
  const require3 = createRequire4(import.meta.url);
@@ -9034,6 +9031,15 @@ function loadMatrix(mode) {
9034
9031
  };
9035
9032
  return cachedMatrix;
9036
9033
  }
9034
+ function getNodePolicy(mode) {
9035
+ const matrix = loadMatrix(mode)?.matrix;
9036
+ if (!matrix?.nodePolicy) {
9037
+ throw new Error(
9038
+ 'dependencies-matrix.json has no "nodePolicy" (Node version policy).'
9039
+ );
9040
+ }
9041
+ return matrix.nodePolicy;
9042
+ }
9037
9043
  function resolveGroup(groupName, matrix) {
9038
9044
  const group2 = matrix.groups[groupName];
9039
9045
  if (!group2) return {};
@@ -9055,9 +9061,28 @@ function resolveGroups(groupNames, matrix) {
9055
9061
  }
9056
9062
  return result;
9057
9063
  }
9064
+ var cachedMatrix;
9065
+ var init_matrix = __esm({
9066
+ "packages/tooling/src/utils/matrix.ts"() {
9067
+ "use strict";
9068
+ init_utils2();
9069
+ init_pathResolver();
9070
+ cachedMatrix = null;
9071
+ }
9072
+ });
9073
+
9074
+ // packages/cli/src/bin/commands/get-demo.ts
9075
+ init_utils2();
9076
+
9077
+ // packages/tooling/src/index.ts
9078
+ init_utils2();
9079
+
9080
+ // packages/tooling/src/cli/index.ts
9081
+ init_utils2();
9058
9082
 
9059
9083
  // packages/tooling/src/utils/dependency-resolver.ts
9060
9084
  init_utils2();
9085
+ init_matrix();
9061
9086
  function applyConditionals(template, options) {
9062
9087
  if (!template.conditional) return [];
9063
9088
  const groups = [];
@@ -9097,13 +9122,13 @@ function generateScripts(templateName, options) {
9097
9122
  scripts.lint = "eslint .";
9098
9123
  scripts["type-check"] = "tsc --noEmit";
9099
9124
  } else if (templateName === "consumer-root") {
9100
- scripts.dev = "dndev dev";
9125
+ scripts.dev = "turbo run dev";
9101
9126
  scripts.build = "turbo run build";
9102
9127
  scripts.lint = "turbo run lint";
9103
- scripts["type-check"] = "dndev tc";
9128
+ scripts["type-check"] = "turbo run type-check";
9104
9129
  } else if (templateName.includes("functions")) {
9105
9130
  scripts.build = "node build.mjs";
9106
- scripts["build:tsc"] = "tsc";
9131
+ scripts["type-check"] = "tsc --noEmit";
9107
9132
  if (templateName.includes("firebase") || options.platform === "firebase") {
9108
9133
  scripts.serve = "firebase emulators:start --only functions";
9109
9134
  scripts.dev = "firebase emulators:start --only functions --inspect-functions";
@@ -9182,13 +9207,19 @@ function generatePackageJson(templateName, mode, options = {}) {
9182
9207
  }
9183
9208
  if (templateName === "consumer-root") {
9184
9209
  result.packageManager = "bun@1.3.5";
9185
- result.engines = { node: ">=24.0.0", bun: ">=1.3.0" };
9210
+ result.engines = {
9211
+ node: getNodePolicy(mode).enginesMin,
9212
+ bun: ">=1.3.0"
9213
+ };
9186
9214
  result.workspaces = ["apps/*", "entities"];
9187
9215
  }
9188
9216
  if (templateName === "entities") {
9189
9217
  result.main = "./index.ts";
9190
9218
  result.types = "./index.ts";
9191
9219
  }
9220
+ if (templateName.includes("expo")) {
9221
+ result.main = "expo-router/entry";
9222
+ }
9192
9223
  if (templateName.includes("nextjs")) {
9193
9224
  result.browserslist = [
9194
9225
  "chrome >= 64",
@@ -9249,6 +9280,7 @@ function generatePackageJson(templateName, mode, options = {}) {
9249
9280
  init_utils2();
9250
9281
  init_cli_input();
9251
9282
  init_cli_output();
9283
+ init_create_utils();
9252
9284
  init_pathResolver();
9253
9285
  init_type_guards();
9254
9286
  async function main(options) {
@@ -9340,6 +9372,9 @@ function getProjectName(cwd) {
9340
9372
  }
9341
9373
  return cwd.split("/").pop() || "my-project";
9342
9374
  }
9375
+
9376
+ // packages/tooling/src/cli/index.ts
9377
+ init_create_utils();
9343
9378
  export {
9344
9379
  main
9345
9380
  };