@donotdev/cli 0.0.6 → 0.0.7

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 (82) hide show
  1. package/dependencies-matrix.json +25 -7
  2. package/dist/bin/commands/build.js +156 -158
  3. package/dist/bin/commands/bump.js +153 -153
  4. package/dist/bin/commands/cacheout.js +154 -154
  5. package/dist/bin/commands/create-app.js +184 -156
  6. package/dist/bin/commands/create-project.js +154 -154
  7. package/dist/bin/commands/deploy.js +470 -470
  8. package/dist/bin/commands/dev.js +155 -155
  9. package/dist/bin/commands/emu.js +155 -155
  10. package/dist/bin/commands/format.js +154 -154
  11. package/dist/bin/commands/lint.js +157 -154
  12. package/dist/bin/commands/preview.js +155 -155
  13. package/dist/bin/commands/sync-secrets.js +155 -155
  14. package/dist/bin/commands/wai.d.ts +11 -0
  15. package/dist/bin/commands/wai.d.ts.map +1 -0
  16. package/dist/bin/commands/wai.js +12 -0
  17. package/dist/bin/commands/wai.js.map +1 -0
  18. package/dist/bin/dndev.js +24 -8
  19. package/dist/bin/donotdev.js +24 -8
  20. package/dist/index.js +524 -497
  21. package/package.json +1 -1
  22. package/templates/app-demo/src/config/app.ts.example +12 -0
  23. package/templates/app-next/src/config/app.ts.example +75 -48
  24. package/templates/app-vite/index.html.example +71 -37
  25. package/templates/app-vite/src/config/app.ts.example +75 -47
  26. package/templates/app-vite/src/pages/FormPageExample.tsx.example +152 -0
  27. package/templates/app-vite/src/pages/HomePage.tsx.example +81 -134
  28. package/templates/app-vite/src/pages/ListPageExample.tsx.example +88 -0
  29. package/templates/functions-firebase/build.mjs.example +8 -1
  30. package/templates/functions-firebase/functions-firebase/build.mjs.example +8 -1
  31. package/templates/functions-firebase/functions-firebase/src/index.ts.example +19 -25
  32. package/templates/functions-firebase/functions.config.js.example +35 -0
  33. package/templates/root-consumer/entities/ExampleEntity.ts.example +223 -0
  34. package/templates/root-consumer/entities/demo.ts.example +562 -0
  35. package/templates/root-consumer/entities/index.ts.example +15 -0
  36. package/templates/root-consumer/guides/{AGENT_START_HERE.md.example → dndev/AGENT_START_HERE.md.example} +22 -0
  37. package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +231 -0
  38. package/templates/root-consumer/guides/{SETUP_AUTH.md.example → dndev/SETUP_AUTH.md.example} +30 -0
  39. package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +473 -0
  40. package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +116 -0
  41. package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +404 -0
  42. package/templates/root-consumer/guides/wai-way/agents/architect.md.example +78 -0
  43. package/templates/root-consumer/guides/wai-way/agents/builder.md.example +87 -0
  44. package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +325 -0
  45. package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +100 -0
  46. package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +281 -0
  47. package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +77 -0
  48. package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +104 -0
  49. package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +124 -0
  50. package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +165 -0
  51. package/templates/root-consumer/guides/wai-way/context_map.json.example +95 -0
  52. package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +840 -0
  53. package/templates/root-consumer/guides/wai-way/page_patterns.md.example +686 -0
  54. package/templates/root-consumer/guides/wai-way/presets_guide.md.example +217 -0
  55. package/templates/root-consumer/guides/wai-way/spec_template.md.example +312 -0
  56. package/templates/functions-firebase/functions-firebase/src/crud/createEntity.ts.example +0 -19
  57. package/templates/functions-firebase/functions-firebase/src/crud/deleteEntity.ts.example +0 -14
  58. package/templates/functions-firebase/functions-firebase/src/crud/getEntity.ts.example +0 -14
  59. package/templates/functions-firebase/functions-firebase/src/crud/index.ts.example +0 -12
  60. package/templates/functions-firebase/functions-firebase/src/crud/listEntities.ts.example +0 -14
  61. package/templates/functions-firebase/functions-firebase/src/crud/updateEntity.ts.example +0 -14
  62. package/templates/root-consumer/guides/COMPONENTS_CRUD.md.example +0 -70
  63. package/templates/root-consumer/guides/SETUP_CRUD.md.example +0 -1244
  64. package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +0 -114
  65. /package/templates/root-consumer/guides/{COMPONENTS_ADV.md.example → dndev/COMPONENTS_ADV.md.example} +0 -0
  66. /package/templates/root-consumer/guides/{COMPONENTS_ATOMIC.md.example → dndev/COMPONENTS_ATOMIC.md.example} +0 -0
  67. /package/templates/root-consumer/guides/{COMPONENTS_UI.md.example → dndev/COMPONENTS_UI.md.example} +0 -0
  68. /package/templates/root-consumer/guides/{ENV_SETUP.md.example → dndev/ENV_SETUP.md.example} +0 -0
  69. /package/templates/root-consumer/guides/{INDEX.md.example → dndev/INDEX.md.example} +0 -0
  70. /package/templates/root-consumer/guides/{SETUP_APP_CONFIG.md.example → dndev/SETUP_APP_CONFIG.md.example} +0 -0
  71. /package/templates/root-consumer/guides/{SETUP_BILLING.md.example → dndev/SETUP_BILLING.md.example} +0 -0
  72. /package/templates/root-consumer/guides/{SETUP_I18N.md.example → dndev/SETUP_I18N.md.example} +0 -0
  73. /package/templates/root-consumer/guides/{SETUP_LAYOUTS.md.example → dndev/SETUP_LAYOUTS.md.example} +0 -0
  74. /package/templates/root-consumer/guides/{SETUP_OAUTH.md.example → dndev/SETUP_OAUTH.md.example} +0 -0
  75. /package/templates/root-consumer/guides/{SETUP_PAGES.md.example → dndev/SETUP_PAGES.md.example} +0 -0
  76. /package/templates/root-consumer/guides/{SETUP_PWA.md.example → dndev/SETUP_PWA.md.example} +0 -0
  77. /package/templates/root-consumer/guides/{SETUP_THEMES.md.example → dndev/SETUP_THEMES.md.example} +0 -0
  78. /package/templates/root-consumer/guides/{USE_ROUTING.md.example → dndev/USE_ROUTING.md.example} +0 -0
  79. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/APP_CHECK.md.example +0 -0
  80. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/COOKIE_REFERENCE.md.example +0 -0
  81. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/EMULATORS.md.example +0 -0
  82. /package/templates/root-consumer/guides/{advanced → dndev/advanced}/VERSION_CONTROL.md.example +0 -0
@@ -1013,155 +1013,6 @@ var init_cli_output = __esm({
1013
1013
  }
1014
1014
  });
1015
1015
 
1016
- // packages/core/config/constants.js
1017
- function getPatternsFor(type, repoRoot = null) {
1018
- const patterns = SCAN_PATTERNS[type];
1019
- if (!patterns) {
1020
- throw new Error(`Unknown pattern type: ${type}`);
1021
- }
1022
- if (repoRoot && patterns.framework) {
1023
- return {
1024
- ...patterns,
1025
- framework: patterns.framework.map((pattern) => `${repoRoot}/${pattern}`)
1026
- };
1027
- }
1028
- return patterns;
1029
- }
1030
- function getGlobOptionsFor(type) {
1031
- return GLOB_OPTIONS[type] || GLOB_OPTIONS.base;
1032
- }
1033
- var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
1034
- var init_constants = __esm({
1035
- "packages/core/config/constants.js"() {
1036
- "use strict";
1037
- init_utils();
1038
- I18N_PATHS = {
1039
- // Monorepo source structure (locales at root, not in src/)
1040
- SOURCE_ROOT: "packages/core/i18n",
1041
- SOURCE_LOCALES: "packages/core/i18n/locales",
1042
- SOURCE_EAGER: "packages/core/i18n/locales/eager",
1043
- SOURCE_LAZY: "packages/core/i18n/locales/lazy",
1044
- // Published structure (same as source - no flattening needed)
1045
- PUBLISHED_ROOT: "i18n",
1046
- PUBLISHED_LOCALES: "i18n/locales",
1047
- PUBLISHED_EAGER: "i18n/locales/eager",
1048
- PUBLISHED_LAZY: "i18n/locales/lazy"
1049
- };
1050
- SCAN_PATTERNS = {
1051
- routes: {
1052
- consumer: ["src/**/*Page.tsx", "src/pages/**/*Page.tsx"],
1053
- exclude: [
1054
- "**/node_modules/**",
1055
- "**/dist/**",
1056
- "**/build/**",
1057
- "**/*.test.tsx",
1058
- "**/*.stories.tsx"
1059
- ],
1060
- extensions: [".tsx"]
1061
- },
1062
- css: {
1063
- consumer: ["src/**/*.css"],
1064
- themes: ["src/**/*.css"],
1065
- extensions: [".css", ".scss", ".sass"],
1066
- framework: [
1067
- "packages/ui/src/**/*.css",
1068
- "packages/core/components/src/**/*.css",
1069
- "packages/core/templates/src/**/*.css"
1070
- ]
1071
- },
1072
- i18n: {
1073
- eager: ["src/locales/*_*.json"],
1074
- lazy: ["src/**/locales/*_*.json", "!src/locales/*_*.json"],
1075
- framework: {
1076
- eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
1077
- lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
1078
- },
1079
- extensions: [".json"]
1080
- },
1081
- assets: {
1082
- consumer: ["public/**/*"],
1083
- fallback: ["manifest.json"],
1084
- modern: [
1085
- "logo.svg",
1086
- "favicon.svg",
1087
- "apple-touch-icon.png",
1088
- "android-chrome-192x192.png",
1089
- "android-chrome-512x512.png"
1090
- ],
1091
- patterns: [
1092
- "favicon.svg",
1093
- "favicon.ico",
1094
- "favicon-*.png",
1095
- "logo.svg",
1096
- "logo.png",
1097
- "logo.webp",
1098
- "logo.avif",
1099
- "apple-touch-icon*.png",
1100
- "android-chrome-*.png",
1101
- "manifest.json"
1102
- ],
1103
- fonts: ["fonts/**/*.woff2", "fonts/**/*.woff", "fonts/**/*.ttf"],
1104
- framework: ["packages/ui/assets/**/*"]
1105
- },
1106
- pwa: {
1107
- consumer: [
1108
- "public/manifest.json",
1109
- "public/service-worker.js",
1110
- "public/sw.js",
1111
- "public/icon-192x192.png",
1112
- "public/icon-512x512.png",
1113
- "public/favicon.ico",
1114
- "public/favicon.svg",
1115
- "public/apple-touch-icon.png",
1116
- "public/logo.svg"
1117
- ],
1118
- exclude: ["**/node_modules/**", "**/dist/**", "**/build/**"],
1119
- extensions: [".json", ".js", ".png", ".svg", ".ico"],
1120
- framework: ["packages/ui/assets/**/*"]
1121
- },
1122
- globalIgnore: [
1123
- "**/node_modules/**",
1124
- "**/dist/**",
1125
- "**/build/**",
1126
- "**/.git/**",
1127
- "**/coverage/**",
1128
- "**/test/**"
1129
- ]
1130
- };
1131
- GLOB_OPTIONS = {
1132
- base: {
1133
- absolute: true,
1134
- onlyFiles: true,
1135
- ignore: SCAN_PATTERNS.globalIgnore
1136
- },
1137
- css: {
1138
- absolute: true,
1139
- onlyFiles: true,
1140
- ignore: [...SCAN_PATTERNS.globalIgnore, "**/*.test.css"]
1141
- },
1142
- routes: {
1143
- absolute: true,
1144
- onlyFiles: true,
1145
- ignore: [
1146
- ...SCAN_PATTERNS.globalIgnore,
1147
- "**/*.test.tsx",
1148
- "**/*.stories.tsx"
1149
- ]
1150
- },
1151
- i18n: {
1152
- absolute: true,
1153
- onlyFiles: true,
1154
- ignore: SCAN_PATTERNS.globalIgnore
1155
- },
1156
- assets: {
1157
- absolute: true,
1158
- onlyFiles: true,
1159
- ignore: SCAN_PATTERNS.globalIgnore
1160
- }
1161
- };
1162
- }
1163
- });
1164
-
1165
1016
  // node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js
1166
1017
  var require_array = __commonJS({
1167
1018
  "node_modules/.bun/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js"(exports) {
@@ -6746,7 +6597,157 @@ var require_out4 = __commonJS({
6746
6597
  }
6747
6598
  });
6748
6599
 
6600
+ // packages/core/config/constants.js
6601
+ function getPatternsFor(type, repoRoot = null) {
6602
+ const patterns = SCAN_PATTERNS[type];
6603
+ if (!patterns) {
6604
+ throw new Error(`Unknown pattern type: ${type}`);
6605
+ }
6606
+ if (repoRoot && patterns.framework) {
6607
+ return {
6608
+ ...patterns,
6609
+ framework: patterns.framework.map((pattern) => `${repoRoot}/${pattern}`)
6610
+ };
6611
+ }
6612
+ return patterns;
6613
+ }
6614
+ function getGlobOptionsFor(type) {
6615
+ return GLOB_OPTIONS[type] || GLOB_OPTIONS.base;
6616
+ }
6617
+ var I18N_PATHS, SCAN_PATTERNS, GLOB_OPTIONS;
6618
+ var init_constants = __esm({
6619
+ "packages/core/config/constants.js"() {
6620
+ "use strict";
6621
+ init_utils();
6622
+ I18N_PATHS = {
6623
+ // Monorepo source structure (locales at root, not in src/)
6624
+ SOURCE_ROOT: "packages/core/i18n",
6625
+ SOURCE_LOCALES: "packages/core/i18n/locales",
6626
+ SOURCE_EAGER: "packages/core/i18n/locales/eager",
6627
+ SOURCE_LAZY: "packages/core/i18n/locales/lazy",
6628
+ // Published structure (same as source - no flattening needed)
6629
+ PUBLISHED_ROOT: "i18n",
6630
+ PUBLISHED_LOCALES: "i18n/locales",
6631
+ PUBLISHED_EAGER: "i18n/locales/eager",
6632
+ PUBLISHED_LAZY: "i18n/locales/lazy"
6633
+ };
6634
+ SCAN_PATTERNS = {
6635
+ routes: {
6636
+ consumer: ["src/**/*Page.tsx", "src/pages/**/*Page.tsx"],
6637
+ exclude: [
6638
+ "**/node_modules/**",
6639
+ "**/dist/**",
6640
+ "**/build/**",
6641
+ "**/*.test.tsx",
6642
+ "**/*.stories.tsx"
6643
+ ],
6644
+ extensions: [".tsx"]
6645
+ },
6646
+ css: {
6647
+ consumer: ["src/**/*.css"],
6648
+ themes: ["src/**/*.css"],
6649
+ extensions: [".css", ".scss", ".sass"],
6650
+ framework: [
6651
+ "packages/ui/src/**/*.css",
6652
+ "packages/core/components/src/**/*.css",
6653
+ "packages/core/templates/src/**/*.css"
6654
+ ]
6655
+ },
6656
+ i18n: {
6657
+ eager: ["src/locales/*_*.json"],
6658
+ lazy: ["src/**/locales/*_*.json", "!src/locales/*_*.json"],
6659
+ framework: {
6660
+ eager: [`${I18N_PATHS.SOURCE_EAGER}/*_*.json`],
6661
+ lazy: [`${I18N_PATHS.SOURCE_LAZY}/*_*.json`]
6662
+ },
6663
+ extensions: [".json"]
6664
+ },
6665
+ assets: {
6666
+ consumer: ["public/**/*"],
6667
+ fallback: ["manifest.json"],
6668
+ modern: [
6669
+ "logo.svg",
6670
+ "favicon.svg",
6671
+ "apple-touch-icon.png",
6672
+ "android-chrome-192x192.png",
6673
+ "android-chrome-512x512.png"
6674
+ ],
6675
+ patterns: [
6676
+ "favicon.svg",
6677
+ "favicon.ico",
6678
+ "favicon-*.png",
6679
+ "logo.svg",
6680
+ "logo.png",
6681
+ "logo.webp",
6682
+ "logo.avif",
6683
+ "apple-touch-icon*.png",
6684
+ "android-chrome-*.png",
6685
+ "manifest.json"
6686
+ ],
6687
+ fonts: ["fonts/**/*.woff2", "fonts/**/*.woff", "fonts/**/*.ttf"],
6688
+ framework: ["packages/ui/assets/**/*"]
6689
+ },
6690
+ pwa: {
6691
+ consumer: [
6692
+ "public/manifest.json",
6693
+ "public/service-worker.js",
6694
+ "public/sw.js",
6695
+ "public/icon-192x192.png",
6696
+ "public/icon-512x512.png",
6697
+ "public/favicon.ico",
6698
+ "public/favicon.svg",
6699
+ "public/apple-touch-icon.png",
6700
+ "public/logo.svg"
6701
+ ],
6702
+ exclude: ["**/node_modules/**", "**/dist/**", "**/build/**"],
6703
+ extensions: [".json", ".js", ".png", ".svg", ".ico"],
6704
+ framework: ["packages/ui/assets/**/*"]
6705
+ },
6706
+ globalIgnore: [
6707
+ "**/node_modules/**",
6708
+ "**/dist/**",
6709
+ "**/build/**",
6710
+ "**/.git/**",
6711
+ "**/coverage/**",
6712
+ "**/test/**"
6713
+ ]
6714
+ };
6715
+ GLOB_OPTIONS = {
6716
+ base: {
6717
+ absolute: true,
6718
+ onlyFiles: true,
6719
+ ignore: SCAN_PATTERNS.globalIgnore
6720
+ },
6721
+ css: {
6722
+ absolute: true,
6723
+ onlyFiles: true,
6724
+ ignore: [...SCAN_PATTERNS.globalIgnore, "**/*.test.css"]
6725
+ },
6726
+ routes: {
6727
+ absolute: true,
6728
+ onlyFiles: true,
6729
+ ignore: [
6730
+ ...SCAN_PATTERNS.globalIgnore,
6731
+ "**/*.test.tsx",
6732
+ "**/*.stories.tsx"
6733
+ ]
6734
+ },
6735
+ i18n: {
6736
+ absolute: true,
6737
+ onlyFiles: true,
6738
+ ignore: SCAN_PATTERNS.globalIgnore
6739
+ },
6740
+ assets: {
6741
+ absolute: true,
6742
+ onlyFiles: true,
6743
+ ignore: SCAN_PATTERNS.globalIgnore
6744
+ }
6745
+ };
6746
+ }
6747
+ });
6748
+
6749
6749
  // packages/core/config/utils/PathResolver.ts
6750
+ import * as fs from "node:fs";
6750
6751
  import { createRequire } from "node:module";
6751
6752
  import {
6752
6753
  resolve,
@@ -6758,7 +6759,6 @@ import {
6758
6759
  extname
6759
6760
  } from "node:path";
6760
6761
  import { fileURLToPath } from "node:url";
6761
- import * as fs from "node:fs";
6762
6762
  function safeExecuteAsync(fn, message) {
6763
6763
  return fn().catch((error2) => {
6764
6764
  throw new Error(
@@ -6771,8 +6771,8 @@ var init_PathResolver = __esm({
6771
6771
  "packages/core/config/utils/PathResolver.ts"() {
6772
6772
  "use strict";
6773
6773
  init_utils();
6774
- init_constants();
6775
6774
  import_fast_glob = __toESM(require_out4(), 1);
6775
+ init_constants();
6776
6776
  constants = {
6777
6777
  getGlobOptionsFor: getGlobOptionsFor || void 0,
6778
6778
  SCAN_PATTERNS: SCAN_PATTERNS || void 0,
@@ -8214,11 +8214,11 @@ var init_pathResolver = __esm({
8214
8214
  });
8215
8215
 
8216
8216
  // packages/tooling/src/bundler/utils.ts
8217
+ import { Buffer as Buffer2 } from "node:buffer";
8217
8218
  import { createRequire as createRequire3 } from "node:module";
8218
- import { fileURLToPath as fileURLToPath3 } from "node:url";
8219
8219
  import { dirname as dirname3, resolve as resolve3 } from "node:path";
8220
- import { Buffer as Buffer2 } from "node:buffer";
8221
8220
  import process from "node:process";
8221
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
8222
8222
  var require2, __filename, __dirname;
8223
8223
  var init_utils = __esm({
8224
8224
  "packages/tooling/src/bundler/utils.ts"() {
@@ -8294,8 +8294,8 @@ async function askForSelection(message, choices, defaultValue = 0) {
8294
8294
 
8295
8295
  // packages/tooling/src/utils/create-utils.ts
8296
8296
  init_utils();
8297
- init_pathResolver();
8298
8297
  init_cli_output();
8298
+ init_pathResolver();
8299
8299
  async function isTextFile(filePath) {
8300
8300
  const binaryExtensions = [
8301
8301
  ".png",
@@ -8997,9 +8997,37 @@ Happy coding!`,
8997
8997
  );
8998
8998
  }
8999
8999
  }
9000
- async function main() {
9000
+ async function main(options) {
9001
9001
  try {
9002
- await createApp();
9002
+ const hasCliOptions = options?.name || options?.builder !== void 0;
9003
+ if (hasCliOptions && options?.name) {
9004
+ const appName = options.name;
9005
+ const builder = options.builder || "vite";
9006
+ const includeFunctions = options.functions ?? false;
9007
+ if (!isValidFileName(appName)) {
9008
+ throw new Error(
9009
+ `Invalid app name "${appName}". Use only letters, numbers, dashes (-), and underscores (_).`
9010
+ );
9011
+ }
9012
+ if (isReservedAppName(appName)) {
9013
+ throw new Error(
9014
+ `App name "${appName}" is reserved for framework demos. Please choose a different name.`
9015
+ );
9016
+ }
9017
+ const appConfig = {
9018
+ template: builder === "next" ? "nextjs" : "vite",
9019
+ needsBackend: includeFunctions,
9020
+ backendPlatform: includeFunctions ? "firebase" : void 0,
9021
+ needsCRUD: true,
9022
+ selectedEntities: [],
9023
+ userAuth: "social",
9024
+ billing: true,
9025
+ features: []
9026
+ };
9027
+ await createApp(appName, appConfig);
9028
+ } else {
9029
+ await createApp();
9030
+ }
9003
9031
  } catch (error2) {
9004
9032
  log.error("\n\u274C Error creating app:", error2);
9005
9033
  throw error2;