@donotdev/cli 0.0.5 → 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.
- package/dependencies-matrix.json +76 -34
- package/dist/bin/commands/build.js +165 -161
- package/dist/bin/commands/bump.js +172 -160
- package/dist/bin/commands/cacheout.js +163 -157
- package/dist/bin/commands/create-app.js +205 -163
- package/dist/bin/commands/create-project.js +176 -161
- package/dist/bin/commands/deploy.js +480 -472
- package/dist/bin/commands/dev.js +164 -158
- package/dist/bin/commands/emu.js +164 -158
- package/dist/bin/commands/format.js +163 -157
- package/dist/bin/commands/lint.js +166 -157
- package/dist/bin/commands/make-admin.d.ts +11 -0
- package/dist/bin/commands/make-admin.d.ts.map +1 -0
- package/dist/bin/commands/make-admin.js +12 -0
- package/dist/bin/commands/make-admin.js.map +1 -0
- package/dist/bin/commands/preview.js +164 -158
- package/dist/bin/commands/sync-secrets.js +164 -158
- package/dist/bin/commands/wai.d.ts +11 -0
- package/dist/bin/commands/wai.d.ts.map +1 -0
- package/dist/bin/commands/wai.js +12 -0
- package/dist/bin/commands/wai.js.map +1 -0
- package/dist/bin/dndev.js +24 -8
- package/dist/bin/donotdev.js +24 -8
- package/dist/index.js +557 -514
- package/package.json +1 -1
- package/templates/app-demo/index.html.example +4 -0
- package/templates/app-demo/src/App.tsx.example +28 -10
- package/templates/app-demo/src/config/app.ts.example +68 -0
- package/templates/app-next/src/app/ClientLayout.tsx.example +4 -3
- package/templates/app-next/src/app/layout.tsx.example +17 -25
- package/templates/app-next/src/config/app.ts.example +75 -48
- package/templates/app-next/src/globals.css.example +10 -7
- package/templates/app-next/src/locales/dndev_en.json.example +68 -0
- package/templates/app-next/src/pages/locales/example_en.json.example +5 -0
- package/templates/app-vite/index.html.example +71 -34
- package/templates/app-vite/src/config/app.ts.example +75 -47
- package/templates/app-vite/src/globals.css.example +14 -6
- package/templates/app-vite/src/locales/dndev_en.json.example +68 -0
- package/templates/app-vite/src/pages/FormPageExample.tsx.example +152 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +81 -134
- package/templates/app-vite/src/pages/ListPageExample.tsx.example +88 -0
- package/templates/functions-firebase/README.md.example +25 -0
- package/templates/functions-firebase/build.mjs.example +8 -1
- package/templates/functions-firebase/functions-firebase/build.mjs.example +8 -1
- package/templates/functions-firebase/functions-firebase/src/index.ts.example +19 -25
- package/templates/functions-firebase/functions.config.js.example +35 -0
- package/templates/functions-firebase/tsconfig.json.example +3 -13
- package/templates/functions-vercel/tsconfig.json.example +1 -13
- package/templates/root-consumer/entities/ExampleEntity.ts.example +223 -0
- package/templates/root-consumer/entities/demo.ts.example +562 -0
- package/templates/root-consumer/entities/index.ts.example +15 -0
- package/templates/root-consumer/firebase.json.example +1 -1
- package/templates/root-consumer/guides/{AGENT_START_HERE.md.example → dndev/AGENT_START_HERE.md.example} +22 -0
- package/templates/root-consumer/guides/{COMPONENTS_ADV.md.example → dndev/COMPONENTS_ADV.md.example} +456 -360
- package/templates/root-consumer/guides/{COMPONENTS_ATOMIC.md.example → dndev/COMPONENTS_ATOMIC.md.example} +42 -0
- package/templates/root-consumer/guides/dndev/COMPONENTS_CRUD.md.example +231 -0
- package/templates/root-consumer/guides/{INDEX.md.example → dndev/INDEX.md.example} +3 -0
- package/templates/root-consumer/guides/{SETUP_APP_CONFIG.md.example → dndev/SETUP_APP_CONFIG.md.example} +5 -2
- package/templates/root-consumer/guides/{SETUP_AUTH.md.example → dndev/SETUP_AUTH.md.example} +30 -0
- package/templates/root-consumer/guides/{SETUP_BILLING.md.example → dndev/SETUP_BILLING.md.example} +44 -4
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +473 -0
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +116 -0
- package/templates/root-consumer/guides/{SETUP_PAGES.md.example → dndev/SETUP_PAGES.md.example} +17 -0
- package/templates/root-consumer/guides/dndev/SETUP_PWA.md.example +213 -0
- package/templates/root-consumer/guides/dndev/USE_ROUTING.md.example +503 -0
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +404 -0
- package/templates/root-consumer/guides/wai-way/agents/architect.md.example +78 -0
- package/templates/root-consumer/guides/wai-way/agents/builder.md.example +87 -0
- package/templates/root-consumer/guides/wai-way/agents/extractor.md.example +325 -0
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +100 -0
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +281 -0
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +77 -0
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +104 -0
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +124 -0
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +165 -0
- package/templates/root-consumer/guides/wai-way/context_map.json.example +95 -0
- package/templates/root-consumer/guides/wai-way/entity_patterns.md.example +840 -0
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +686 -0
- package/templates/root-consumer/guides/wai-way/presets_guide.md.example +217 -0
- package/templates/root-consumer/guides/wai-way/spec_template.md.example +312 -0
- package/templates/root-consumer/vercel.json.example +315 -20
- package/templates/app-demo/src/Routes.tsx.example +0 -20
- package/templates/app-vite/src/Routes.tsx.example +0 -16
- package/templates/app-vite/src/pages/locales/README.md.example +0 -1
- package/templates/functions-firebase/functions-firebase/src/crud/createEntity.ts.example +0 -19
- package/templates/functions-firebase/functions-firebase/src/crud/deleteEntity.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/crud/getEntity.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/crud/index.ts.example +0 -12
- package/templates/functions-firebase/functions-firebase/src/crud/listEntities.ts.example +0 -14
- package/templates/functions-firebase/functions-firebase/src/crud/updateEntity.ts.example +0 -14
- package/templates/root-consumer/guides/COMPONENTS_CRUD.md.example +0 -70
- package/templates/root-consumer/guides/SETUP_FUNCTIONS.md.example +0 -62
- /package/templates/root-consumer/guides/{COMPONENTS_UI.md.example → dndev/COMPONENTS_UI.md.example} +0 -0
- /package/templates/root-consumer/guides/{ENV_SETUP.md.example → dndev/ENV_SETUP.md.example} +0 -0
- /package/templates/root-consumer/guides/{SETUP_I18N.md.example → dndev/SETUP_I18N.md.example} +0 -0
- /package/templates/root-consumer/guides/{SETUP_LAYOUTS.md.example → dndev/SETUP_LAYOUTS.md.example} +0 -0
- /package/templates/root-consumer/guides/{SETUP_OAUTH.md.example → dndev/SETUP_OAUTH.md.example} +0 -0
- /package/templates/root-consumer/guides/{SETUP_THEMES.md.example → dndev/SETUP_THEMES.md.example} +0 -0
- /package/templates/root-consumer/guides/{advanced → dndev/advanced}/APP_CHECK.md.example +0 -0
- /package/templates/root-consumer/guides/{advanced → dndev/advanced}/COOKIE_REFERENCE.md.example +0 -0
- /package/templates/root-consumer/guides/{advanced → dndev/advanced}/EMULATORS.md.example +0 -0
- /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,
|
|
@@ -7687,11 +7687,17 @@ var init_PathResolver = __esm({
|
|
|
7687
7687
|
/**
|
|
7688
7688
|
* Get path to empty.js module for optional dependency aliasing
|
|
7689
7689
|
* Used by Vite and Turbopack to alias missing optional deps
|
|
7690
|
-
* @returns
|
|
7690
|
+
* @param returnPackageSpecifier - If true, returns package specifier '@donotdev/core/empty' for Turbopack. If false, returns absolute path for Vite.
|
|
7691
|
+
* @returns Package specifier or absolute path to empty.js
|
|
7691
7692
|
*/
|
|
7692
|
-
getEmptyModulePath() {
|
|
7693
|
+
getEmptyModulePath(returnPackageSpecifier = false) {
|
|
7694
|
+
if (returnPackageSpecifier) {
|
|
7695
|
+
return "@donotdev/core/empty";
|
|
7696
|
+
}
|
|
7697
|
+
const resolved = this.resolvePackage("@donotdev/core/empty");
|
|
7698
|
+
if (resolved) return resolved;
|
|
7693
7699
|
const thisDir = dirname(fileURLToPath(import.meta.url));
|
|
7694
|
-
return this.normalizePath(join(thisDir, "../
|
|
7700
|
+
return this.normalizePath(join(thisDir, "../empty.js"));
|
|
7695
7701
|
}
|
|
7696
7702
|
// === PRIVATE METHODS ===
|
|
7697
7703
|
/**
|
|
@@ -8208,11 +8214,11 @@ var init_pathResolver = __esm({
|
|
|
8208
8214
|
});
|
|
8209
8215
|
|
|
8210
8216
|
// packages/tooling/src/bundler/utils.ts
|
|
8217
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
8211
8218
|
import { createRequire as createRequire3 } from "node:module";
|
|
8212
|
-
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
8213
8219
|
import { dirname as dirname3, resolve as resolve3 } from "node:path";
|
|
8214
|
-
import { Buffer as Buffer2 } from "node:buffer";
|
|
8215
8220
|
import process from "node:process";
|
|
8221
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
8216
8222
|
var require2, __filename, __dirname;
|
|
8217
8223
|
var init_utils = __esm({
|
|
8218
8224
|
"packages/tooling/src/bundler/utils.ts"() {
|
|
@@ -8288,8 +8294,8 @@ async function askForSelection(message, choices, defaultValue = 0) {
|
|
|
8288
8294
|
|
|
8289
8295
|
// packages/tooling/src/utils/create-utils.ts
|
|
8290
8296
|
init_utils();
|
|
8291
|
-
init_pathResolver();
|
|
8292
8297
|
init_cli_output();
|
|
8298
|
+
init_pathResolver();
|
|
8293
8299
|
async function copyTemplateFiles(sourceDir, destDir, replacements) {
|
|
8294
8300
|
if (!pathExists(sourceDir)) {
|
|
8295
8301
|
log.warn(`Warning: Template directory does not exist: ${sourceDir}`);
|
|
@@ -8776,7 +8782,7 @@ function generateScripts(templateName, options) {
|
|
|
8776
8782
|
const scripts = {};
|
|
8777
8783
|
if (templateName.includes("vite")) {
|
|
8778
8784
|
scripts.dev = "vite";
|
|
8779
|
-
scripts.build = "
|
|
8785
|
+
scripts.build = "vite build";
|
|
8780
8786
|
scripts.preview = "vite preview";
|
|
8781
8787
|
scripts.lint = "eslint src/";
|
|
8782
8788
|
scripts["type-check"] = "tsc --noEmit";
|
|
@@ -8812,7 +8818,9 @@ function generateScripts(templateName, options) {
|
|
|
8812
8818
|
function generatePackageJson(templateName, mode, options = {}) {
|
|
8813
8819
|
const matrixResult = loadMatrix(mode);
|
|
8814
8820
|
if (!matrixResult) {
|
|
8815
|
-
throw new Error(
|
|
8821
|
+
throw new Error(
|
|
8822
|
+
"dependencies-matrix.json not found. This command requires the matrix file."
|
|
8823
|
+
);
|
|
8816
8824
|
}
|
|
8817
8825
|
const { matrix, cliVersion } = matrixResult;
|
|
8818
8826
|
const template = matrix.templateMapping?.[templateName];
|
|
@@ -8872,6 +8880,11 @@ function generatePackageJson(templateName, mode, options = {}) {
|
|
|
8872
8880
|
result.main = "./index.ts";
|
|
8873
8881
|
result.types = "./index.ts";
|
|
8874
8882
|
}
|
|
8883
|
+
if (templateName.includes("vite") || templateName.includes("nextjs") || templateName.includes("functions")) {
|
|
8884
|
+
if (!dependencies.entities) {
|
|
8885
|
+
dependencies.entities = "workspace:*";
|
|
8886
|
+
}
|
|
8887
|
+
}
|
|
8875
8888
|
if (templateName.includes("functions")) {
|
|
8876
8889
|
result.engines = { node: "20" };
|
|
8877
8890
|
if (options.appName) {
|
|
@@ -8994,7 +9007,8 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
|
|
|
8994
9007
|
firebaseProjectId: appName.toLowerCase(),
|
|
8995
9008
|
firebaseSecretName: appName.toUpperCase().replace(/-/g, "_"),
|
|
8996
9009
|
monorepoRelativePath: "../../packages/tooling",
|
|
8997
|
-
appTemplate
|
|
9010
|
+
appTemplate,
|
|
9011
|
+
isNextjs: appTemplate === "nextjs"
|
|
8998
9012
|
};
|
|
8999
9013
|
const templateSourceDir = joinPath(templatesRoot, templateDir);
|
|
9000
9014
|
const templateFiles = await glob("**/*", {
|
|
@@ -9087,7 +9101,7 @@ async function createApp(appName, appConfig, workspaceRoot, templatesRoot) {
|
|
|
9087
9101
|
await replacePlaceholders(firebaseJsonDest, replacements);
|
|
9088
9102
|
}
|
|
9089
9103
|
}
|
|
9090
|
-
if (appConfig.needsBackend && appConfig.backendPlatform === "vercel") {
|
|
9104
|
+
if (appTemplate === "nextjs" || appConfig.needsBackend && appConfig.backendPlatform === "vercel") {
|
|
9091
9105
|
const vercelJsonSource = joinPath(
|
|
9092
9106
|
deploymentTemplateDir,
|
|
9093
9107
|
"vercel.json.example"
|
|
@@ -9460,6 +9474,7 @@ async function main(options) {
|
|
|
9460
9474
|
setupGithubActions: false,
|
|
9461
9475
|
monorepoRelativePath: relativeMonorepoPath,
|
|
9462
9476
|
appTemplate: "vite",
|
|
9477
|
+
isNextjs: false,
|
|
9463
9478
|
firebaseProjectId: projectName.toLowerCase(),
|
|
9464
9479
|
firebaseSecretName: projectName.toUpperCase().replace(/-/g, "_"),
|
|
9465
9480
|
needsAuth,
|