@better-t-stack/template-generator 3.27.1 → 3.27.3
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/dist/core/template-reader.d.mts +16 -1
- package/dist/core/template-reader.d.mts.map +1 -1
- package/dist/core/template-reader.mjs +3 -4
- package/dist/fs-writer.d.mts +3 -3
- package/dist/fs-writer.d.mts.map +1 -1
- package/dist/fs-writer.mjs +2 -3
- package/dist/fs-writer.mjs.map +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +18 -79
- package/dist/index.mjs.map +1 -1
- package/dist/{is-binary-path-BN88l03c.mjs → is-binary-path-maAgJE_Q.mjs} +6 -14
- package/dist/is-binary-path-maAgJE_Q.mjs.map +1 -0
- package/dist/{template-reader-DOXCnctl.mjs → template-reader-C8MBRmk-.mjs} +532 -351
- package/dist/template-reader-C8MBRmk-.mjs.map +1 -0
- package/dist/{types-zSU486rU.d.mts → types-CzW_c7t0.d.mts} +3 -3
- package/dist/types-CzW_c7t0.d.mts.map +1 -0
- package/package.json +12 -12
- package/dist/is-binary-path-BN88l03c.mjs.map +0 -1
- package/dist/template-reader-DOXCnctl.mjs.map +0 -1
- package/dist/types-zSU486rU.d.mts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as isBinaryPath } from "./is-binary-path-
|
|
1
|
+
import { t as isBinaryPath } from "./is-binary-path-maAgJE_Q.mjs";
|
|
2
2
|
import { Result, TaggedError } from "better-result";
|
|
3
3
|
import { memfs } from "memfs";
|
|
4
4
|
import { dirname, extname, join, normalize } from "pathe";
|
|
@@ -6,13 +6,11 @@ import Handlebars from "handlebars";
|
|
|
6
6
|
import yaml from "yaml";
|
|
7
7
|
import { desktopWebFrontends } from "@better-t-stack/types";
|
|
8
8
|
import { IndentationText, Node, Project, QuoteKind, SyntaxKind } from "ts-morph";
|
|
9
|
-
|
|
10
9
|
//#region src/types.ts
|
|
11
10
|
/**
|
|
12
11
|
* Error class for template generation failures
|
|
13
12
|
*/
|
|
14
13
|
var GeneratorError = class extends TaggedError("GeneratorError")() {};
|
|
15
|
-
|
|
16
14
|
//#endregion
|
|
17
15
|
//#region src/core/virtual-fs.ts
|
|
18
16
|
var VirtualFileSystem = class {
|
|
@@ -183,7 +181,6 @@ var VirtualFileSystem = class {
|
|
|
183
181
|
return "/" + normalize(p).replace(/^\/+/, "");
|
|
184
182
|
}
|
|
185
183
|
};
|
|
186
|
-
|
|
187
184
|
//#endregion
|
|
188
185
|
//#region src/core/template-processor.ts
|
|
189
186
|
Handlebars.registerHelper("eq", (a, b) => a === b);
|
|
@@ -214,7 +211,6 @@ function processFileContent(filePath, content, context) {
|
|
|
214
211
|
}
|
|
215
212
|
return content;
|
|
216
213
|
}
|
|
217
|
-
|
|
218
214
|
//#endregion
|
|
219
215
|
//#region src/bts-config.ts
|
|
220
216
|
const BTS_CONFIG_FILE = "bts.jsonc";
|
|
@@ -260,7 +256,6 @@ function writeBtsConfigToVfs(vfs, projectConfig, version, reproducibleCommand) {
|
|
|
260
256
|
${jsonContent}`;
|
|
261
257
|
vfs.writeFile(BTS_CONFIG_FILE, finalContent);
|
|
262
258
|
}
|
|
263
|
-
|
|
264
259
|
//#endregion
|
|
265
260
|
//#region src/post-process/catalogs.ts
|
|
266
261
|
const PACKAGE_PATHS = [
|
|
@@ -384,7 +379,6 @@ function updatePackageJsonsWithCatalogs(vfs, packagesInfo, catalog) {
|
|
|
384
379
|
if (updated) vfs.writeJson(jsonPath, pkgJson);
|
|
385
380
|
}
|
|
386
381
|
}
|
|
387
|
-
|
|
388
382
|
//#endregion
|
|
389
383
|
//#region src/utils/db-scripts.ts
|
|
390
384
|
function getDbScriptSupport(config) {
|
|
@@ -406,7 +400,6 @@ function getDbScriptSupport(config) {
|
|
|
406
400
|
isD1Alchemy
|
|
407
401
|
};
|
|
408
402
|
}
|
|
409
|
-
|
|
410
403
|
//#endregion
|
|
411
404
|
//#region src/post-process/package-configs.ts
|
|
412
405
|
/**
|
|
@@ -497,7 +490,7 @@ function updateRootPackageJson(vfs, config) {
|
|
|
497
490
|
}
|
|
498
491
|
pkgJson.packageManager = `${packageManager}@latest`;
|
|
499
492
|
if (config.api === "orpc" && config.frontend.includes("nuxt")) pkgJson.overrides = {
|
|
500
|
-
...pkgJson.overrides
|
|
493
|
+
...pkgJson.overrides,
|
|
501
494
|
"@vue/devtools-api": "^8.0.7"
|
|
502
495
|
};
|
|
503
496
|
if (backend === "convex") {
|
|
@@ -535,7 +528,6 @@ function getPackageManagerConfig(packageManager, options) {
|
|
|
535
528
|
checkTypes: "npm run check-types --workspaces",
|
|
536
529
|
filter: (workspace, script) => `npm run ${script} --workspace ${workspace}`
|
|
537
530
|
};
|
|
538
|
-
case "bun":
|
|
539
531
|
default: return {
|
|
540
532
|
dev: "bun run --filter '*' dev",
|
|
541
533
|
build: "bun run --filter '*' build",
|
|
@@ -579,7 +571,6 @@ function getDesktopWebCommand(packageManager, options, script) {
|
|
|
579
571
|
switch (packageManager) {
|
|
580
572
|
case "npm": return `npm run ${script} --workspace web`;
|
|
581
573
|
case "pnpm": return `pnpm -w --filter web ${script}`;
|
|
582
|
-
case "bun":
|
|
583
574
|
default: return `bun run --filter web ${script}`;
|
|
584
575
|
}
|
|
585
576
|
}
|
|
@@ -587,7 +578,6 @@ function getLocalRunCommand(packageManager) {
|
|
|
587
578
|
switch (packageManager) {
|
|
588
579
|
case "npm": return "npm run";
|
|
589
580
|
case "pnpm": return "pnpm run";
|
|
590
|
-
case "bun":
|
|
591
581
|
default: return "bun run";
|
|
592
582
|
}
|
|
593
583
|
}
|
|
@@ -646,7 +636,7 @@ function updateEnvPackageJson(vfs, config) {
|
|
|
646
636
|
const pkgJson = vfs.readJson("packages/env/package.json");
|
|
647
637
|
if (!pkgJson) return;
|
|
648
638
|
pkgJson.name = `@${config.projectName}/env`;
|
|
649
|
-
const hasWebFrontend
|
|
639
|
+
const hasWebFrontend = config.frontend.some((f) => desktopWebFrontends.includes(f));
|
|
650
640
|
const hasNative = config.frontend.some((f) => [
|
|
651
641
|
"native-bare",
|
|
652
642
|
"native-uniwind",
|
|
@@ -655,7 +645,7 @@ function updateEnvPackageJson(vfs, config) {
|
|
|
655
645
|
const needsServerEnv = config.backend !== "none" && config.backend !== "convex";
|
|
656
646
|
const exports = {};
|
|
657
647
|
if (needsServerEnv) exports["./server"] = "./src/server.ts";
|
|
658
|
-
if (hasWebFrontend
|
|
648
|
+
if (hasWebFrontend) exports["./web"] = "./src/web.ts";
|
|
659
649
|
if (hasNative) exports["./native"] = "./src/native.ts";
|
|
660
650
|
pkgJson.exports = exports;
|
|
661
651
|
vfs.writeJson("packages/env/package.json", pkgJson);
|
|
@@ -700,11 +690,10 @@ function renameDevScriptsForAlchemy(vfs, config) {
|
|
|
700
690
|
}
|
|
701
691
|
}
|
|
702
692
|
}
|
|
703
|
-
|
|
704
693
|
//#endregion
|
|
705
694
|
//#region src/utils/add-deps.ts
|
|
706
695
|
const dependencyVersionMap = {
|
|
707
|
-
typescript: "^
|
|
696
|
+
typescript: "^6",
|
|
708
697
|
"better-auth": "1.5.5",
|
|
709
698
|
"@better-auth/expo": "1.5.5",
|
|
710
699
|
"@clerk/backend": "^3.2.1",
|
|
@@ -740,8 +729,8 @@ const dependencyVersionMap = {
|
|
|
740
729
|
"@vite-pwa/assets-generator": "^1.0.2",
|
|
741
730
|
"@tauri-apps/cli": "^2.4.0",
|
|
742
731
|
"@biomejs/biome": "^2.2.0",
|
|
743
|
-
oxlint: "^1.
|
|
744
|
-
oxfmt: "^0.
|
|
732
|
+
oxlint: "^1.61.0",
|
|
733
|
+
oxfmt: "^0.46.0",
|
|
745
734
|
husky: "^9.1.7",
|
|
746
735
|
lefthook: "^2.0.13",
|
|
747
736
|
"lint-staged": "^16.1.2",
|
|
@@ -810,7 +799,7 @@ const dependencyVersionMap = {
|
|
|
810
799
|
"@astrojs/node": "^10.0.0-beta.9",
|
|
811
800
|
alchemy: "^0.91.2",
|
|
812
801
|
dotenv: "^17.2.2",
|
|
813
|
-
tsdown: "^0.
|
|
802
|
+
tsdown: "^0.21.9",
|
|
814
803
|
zod: "^4.1.13",
|
|
815
804
|
"@t3-oss/env-core": "^0.13.1",
|
|
816
805
|
"@t3-oss/env-nextjs": "^0.13.1",
|
|
@@ -841,7 +830,6 @@ function addPackageDependency(options) {
|
|
|
841
830
|
for (const [dep, version] of Object.entries(customDevDependencies)) pkgJson.devDependencies[dep] = version;
|
|
842
831
|
vfs.writeJson(packagePath, pkgJson);
|
|
843
832
|
}
|
|
844
|
-
|
|
845
833
|
//#endregion
|
|
846
834
|
//#region src/processors/addons-deps.ts
|
|
847
835
|
function processAddonsDeps(vfs, config) {
|
|
@@ -899,7 +887,6 @@ function processAddonsDeps(vfs, config) {
|
|
|
899
887
|
}
|
|
900
888
|
}
|
|
901
889
|
}
|
|
902
|
-
|
|
903
890
|
//#endregion
|
|
904
891
|
//#region src/processors/alchemy-plugins.ts
|
|
905
892
|
function processAlchemyPlugins(vfs, config) {
|
|
@@ -1088,7 +1075,6 @@ function processAstroAlchemy(vfs) {
|
|
|
1088
1075
|
}
|
|
1089
1076
|
vfs.writeFile(astroConfigPath, sourceFile.getFullText());
|
|
1090
1077
|
}
|
|
1091
|
-
|
|
1092
1078
|
//#endregion
|
|
1093
1079
|
//#region src/processors/api-deps.ts
|
|
1094
1080
|
function getFrontendType(frontend) {
|
|
@@ -1338,7 +1324,6 @@ function addConvexDeps(vfs, frontend, frontendType) {
|
|
|
1338
1324
|
dependencies: ["convex"]
|
|
1339
1325
|
});
|
|
1340
1326
|
}
|
|
1341
|
-
|
|
1342
1327
|
//#endregion
|
|
1343
1328
|
//#region src/processors/auth-deps.ts
|
|
1344
1329
|
const CONVEX_BETTER_AUTH_VERSION = "1.5.3";
|
|
@@ -1468,7 +1453,7 @@ function processStandardAuthDeps(vfs, config) {
|
|
|
1468
1453
|
"native-uniwind",
|
|
1469
1454
|
"native-unistyles"
|
|
1470
1455
|
].includes(f));
|
|
1471
|
-
const hasWebFrontend
|
|
1456
|
+
const hasWebFrontend = frontend.some((f) => [
|
|
1472
1457
|
"react-router",
|
|
1473
1458
|
"tanstack-router",
|
|
1474
1459
|
"tanstack-start",
|
|
@@ -1560,7 +1545,7 @@ function processStandardAuthDeps(vfs, config) {
|
|
|
1560
1545
|
dependencies: ["@better-auth/expo"]
|
|
1561
1546
|
});
|
|
1562
1547
|
}
|
|
1563
|
-
if (hasWebFrontend
|
|
1548
|
+
if (hasWebFrontend && webExists) {
|
|
1564
1549
|
addPackageDependency({
|
|
1565
1550
|
vfs,
|
|
1566
1551
|
packagePath: webPath,
|
|
@@ -1593,7 +1578,6 @@ function processStandardAuthDeps(vfs, config) {
|
|
|
1593
1578
|
});
|
|
1594
1579
|
}
|
|
1595
1580
|
}
|
|
1596
|
-
|
|
1597
1581
|
//#endregion
|
|
1598
1582
|
//#region src/processors/auth-plugins.ts
|
|
1599
1583
|
function processAuthPlugins(vfs, config) {
|
|
@@ -1660,7 +1644,6 @@ function processAuthPlugins(vfs, config) {
|
|
|
1660
1644
|
}
|
|
1661
1645
|
vfs.writeFile(authIndexPath, sourceFile.getFullText());
|
|
1662
1646
|
}
|
|
1663
|
-
|
|
1664
1647
|
//#endregion
|
|
1665
1648
|
//#region src/processors/backend-deps.ts
|
|
1666
1649
|
function processBackendDeps(vfs, config) {
|
|
@@ -1703,7 +1686,6 @@ function processBackendDeps(vfs, config) {
|
|
|
1703
1686
|
devDependencies: devDeps
|
|
1704
1687
|
});
|
|
1705
1688
|
}
|
|
1706
|
-
|
|
1707
1689
|
//#endregion
|
|
1708
1690
|
//#region src/processors/db-deps.ts
|
|
1709
1691
|
function processDatabaseDeps(vfs, config) {
|
|
@@ -1801,7 +1783,6 @@ function processDrizzleDeps(vfs, config, dbPkgPath, webPkgPath, webExists) {
|
|
|
1801
1783
|
devDependencies: ["drizzle-kit"]
|
|
1802
1784
|
});
|
|
1803
1785
|
}
|
|
1804
|
-
|
|
1805
1786
|
//#endregion
|
|
1806
1787
|
//#region src/processors/deploy-deps.ts
|
|
1807
1788
|
function processDeployDeps(vfs, config) {
|
|
@@ -1880,7 +1861,6 @@ function processDeployDeps(vfs, config) {
|
|
|
1880
1861
|
});
|
|
1881
1862
|
}
|
|
1882
1863
|
}
|
|
1883
|
-
|
|
1884
1864
|
//#endregion
|
|
1885
1865
|
//#region src/processors/env-deps.ts
|
|
1886
1866
|
function processEnvDeps(vfs, config) {
|
|
@@ -1906,7 +1886,6 @@ function processEnvDeps(vfs, config) {
|
|
|
1906
1886
|
dependencies: deps
|
|
1907
1887
|
});
|
|
1908
1888
|
}
|
|
1909
|
-
|
|
1910
1889
|
//#endregion
|
|
1911
1890
|
//#region src/processors/env-vars.ts
|
|
1912
1891
|
function generateRandomString(length, charset) {
|
|
@@ -2247,7 +2226,6 @@ function processEnvVariables(vfs, config) {
|
|
|
2247
2226
|
}]);
|
|
2248
2227
|
}
|
|
2249
2228
|
}
|
|
2250
|
-
|
|
2251
2229
|
//#endregion
|
|
2252
2230
|
//#region src/processors/examples-deps.ts
|
|
2253
2231
|
function processExamplesDeps(vfs, config) {
|
|
@@ -2355,7 +2333,6 @@ function setupAIDependencies(vfs, config) {
|
|
|
2355
2333
|
dependencies: ["ai", "@ai-sdk/react"]
|
|
2356
2334
|
});
|
|
2357
2335
|
}
|
|
2358
|
-
|
|
2359
2336
|
//#endregion
|
|
2360
2337
|
//#region src/processors/frontend-deps.ts
|
|
2361
2338
|
function processFrontendDeps(vfs, config) {
|
|
@@ -2369,7 +2346,6 @@ function processFrontendDeps(vfs, config) {
|
|
|
2369
2346
|
dependencies: ["@astrojs/node"]
|
|
2370
2347
|
});
|
|
2371
2348
|
}
|
|
2372
|
-
|
|
2373
2349
|
//#endregion
|
|
2374
2350
|
//#region src/processors/infra-deps.ts
|
|
2375
2351
|
function processInfraDeps(vfs, config) {
|
|
@@ -2382,7 +2358,6 @@ function processInfraDeps(vfs, config) {
|
|
|
2382
2358
|
devDependencies: ["alchemy"]
|
|
2383
2359
|
});
|
|
2384
2360
|
}
|
|
2385
|
-
|
|
2386
2361
|
//#endregion
|
|
2387
2362
|
//#region src/processors/nx-generator.ts
|
|
2388
2363
|
function processNxConfig(vfs, config) {
|
|
@@ -2455,7 +2430,6 @@ function getDeployTargets() {
|
|
|
2455
2430
|
destroy: { cache: false }
|
|
2456
2431
|
};
|
|
2457
2432
|
}
|
|
2458
|
-
|
|
2459
2433
|
//#endregion
|
|
2460
2434
|
//#region src/processors/payments-deps.ts
|
|
2461
2435
|
function processPaymentsDeps(vfs, config) {
|
|
@@ -2487,7 +2461,6 @@ function processPaymentsDeps(vfs, config) {
|
|
|
2487
2461
|
}
|
|
2488
2462
|
}
|
|
2489
2463
|
}
|
|
2490
|
-
|
|
2491
2464
|
//#endregion
|
|
2492
2465
|
//#region src/processors/pwa-plugins.ts
|
|
2493
2466
|
function processPwaPlugins(vfs, config) {
|
|
@@ -2538,7 +2511,6 @@ function processPwaPlugins(vfs, config) {
|
|
|
2538
2511
|
}
|
|
2539
2512
|
vfs.writeFile(viteConfigPath, sourceFile.getFullText());
|
|
2540
2513
|
}
|
|
2541
|
-
|
|
2542
2514
|
//#endregion
|
|
2543
2515
|
//#region src/processors/readme-generator.ts
|
|
2544
2516
|
function getDesktopStaticBuildNote(frontend) {
|
|
@@ -3008,7 +2980,6 @@ function generateGitHooksSection(packageManagerRunCmd, addons) {
|
|
|
3008
2980
|
if (hasLinting) lines.push(`- Format and lint fix: \`${packageManagerRunCmd} check\``);
|
|
3009
2981
|
return `${lines.join("\n")}\n\n`;
|
|
3010
2982
|
}
|
|
3011
|
-
|
|
3012
2983
|
//#endregion
|
|
3013
2984
|
//#region src/processors/runtime-deps.ts
|
|
3014
2985
|
function processRuntimeDeps(vfs, config) {
|
|
@@ -3048,7 +3019,6 @@ function processRuntimeDeps(vfs, config) {
|
|
|
3048
3019
|
}
|
|
3049
3020
|
vfs.writeJson(serverPath, pkgJson);
|
|
3050
3021
|
}
|
|
3051
|
-
|
|
3052
3022
|
//#endregion
|
|
3053
3023
|
//#region src/processors/turbo-generator.ts
|
|
3054
3024
|
function processTurboConfig(vfs, config) {
|
|
@@ -3140,7 +3110,6 @@ function getDeployTasks() {
|
|
|
3140
3110
|
destroy: { cache: false }
|
|
3141
3111
|
};
|
|
3142
3112
|
}
|
|
3143
|
-
|
|
3144
3113
|
//#endregion
|
|
3145
3114
|
//#region src/processors/workspace-deps.ts
|
|
3146
3115
|
function processWorkspaceDeps(vfs, config) {
|
|
@@ -3289,7 +3258,6 @@ function getRuntimeDevDeps(runtime, backend) {
|
|
|
3289
3258
|
if (runtime === "bun") return ["@types/bun"];
|
|
3290
3259
|
return [];
|
|
3291
3260
|
}
|
|
3292
|
-
|
|
3293
3261
|
//#endregion
|
|
3294
3262
|
//#region src/processors/index.ts
|
|
3295
3263
|
function processDependencies(vfs, config) {
|
|
@@ -3309,7 +3277,6 @@ function processDependencies(vfs, config) {
|
|
|
3309
3277
|
processTurboConfig(vfs, config);
|
|
3310
3278
|
processNxConfig(vfs, config);
|
|
3311
3279
|
}
|
|
3312
|
-
|
|
3313
3280
|
//#endregion
|
|
3314
3281
|
//#region src/template-handlers/utils.ts
|
|
3315
3282
|
function hasTemplatesWithPrefix(templates, prefix) {
|
|
@@ -3342,13 +3309,11 @@ function processTemplatesFromPrefix(vfs, templates, prefix, destPrefix, config)
|
|
|
3342
3309
|
vfs.writeFile(destPath, processedContent, sourcePath);
|
|
3343
3310
|
}
|
|
3344
3311
|
}
|
|
3345
|
-
|
|
3346
3312
|
//#endregion
|
|
3347
3313
|
//#region src/template-handlers/base.ts
|
|
3348
3314
|
async function processBaseTemplate(vfs, templates, config) {
|
|
3349
3315
|
processTemplatesFromPrefix(vfs, templates, "base", "", config);
|
|
3350
3316
|
}
|
|
3351
|
-
|
|
3352
3317
|
//#endregion
|
|
3353
3318
|
//#region src/template-handlers/frontend.ts
|
|
3354
3319
|
async function processFrontendTemplates(vfs, templates, config) {
|
|
@@ -3389,7 +3354,6 @@ async function processFrontendTemplates(vfs, templates, config) {
|
|
|
3389
3354
|
if (!isConvex && (config.api === "trpc" || config.api === "orpc")) processTemplatesFromPrefix(vfs, templates, `api/${config.api}/native`, "apps/native", config);
|
|
3390
3355
|
}
|
|
3391
3356
|
}
|
|
3392
|
-
|
|
3393
3357
|
//#endregion
|
|
3394
3358
|
//#region src/template-handlers/backend.ts
|
|
3395
3359
|
async function processBackendTemplates(vfs, templates, config) {
|
|
@@ -3402,7 +3366,6 @@ async function processBackendTemplates(vfs, templates, config) {
|
|
|
3402
3366
|
processTemplatesFromPrefix(vfs, templates, "backend/server/base", "apps/server", config);
|
|
3403
3367
|
processTemplatesFromPrefix(vfs, templates, `backend/server/${config.backend}`, "apps/server", config);
|
|
3404
3368
|
}
|
|
3405
|
-
|
|
3406
3369
|
//#endregion
|
|
3407
3370
|
//#region src/template-handlers/database.ts
|
|
3408
3371
|
async function processDbTemplates(vfs, templates, config) {
|
|
@@ -3413,7 +3376,6 @@ async function processDbTemplates(vfs, templates, config) {
|
|
|
3413
3376
|
processTemplatesFromPrefix(vfs, templates, `db/${config.orm}/${config.database}`, "packages/db", config);
|
|
3414
3377
|
if (config.dbSetup === "docker") processTemplatesFromPrefix(vfs, templates, `db-setup/docker-compose/${config.database}`, "packages/db", config);
|
|
3415
3378
|
}
|
|
3416
|
-
|
|
3417
3379
|
//#endregion
|
|
3418
3380
|
//#region src/template-handlers/api.ts
|
|
3419
3381
|
async function processApiTemplates(vfs, templates, config) {
|
|
@@ -3450,14 +3412,13 @@ async function processApiTemplates(vfs, templates, config) {
|
|
|
3450
3412
|
if (config.backend === "self") processTemplatesFromPrefix(vfs, templates, `api/${config.api}/fullstack/astro`, "apps/web", config);
|
|
3451
3413
|
}
|
|
3452
3414
|
}
|
|
3453
|
-
|
|
3454
3415
|
//#endregion
|
|
3455
3416
|
//#region src/template-handlers/packages.ts
|
|
3456
3417
|
async function processConfigPackage(vfs, templates, config) {
|
|
3457
3418
|
processTemplatesFromPrefix(vfs, templates, "packages/config", "packages/config", config);
|
|
3458
3419
|
}
|
|
3459
3420
|
async function processEnvPackage(vfs, templates, config) {
|
|
3460
|
-
const hasWebFrontend
|
|
3421
|
+
const hasWebFrontend = config.frontend.some((f) => [
|
|
3461
3422
|
"tanstack-router",
|
|
3462
3423
|
"react-router",
|
|
3463
3424
|
"tanstack-start",
|
|
@@ -3472,10 +3433,10 @@ async function processEnvPackage(vfs, templates, config) {
|
|
|
3472
3433
|
"native-uniwind",
|
|
3473
3434
|
"native-unistyles"
|
|
3474
3435
|
].includes(f));
|
|
3475
|
-
if (!hasWebFrontend
|
|
3436
|
+
if (!hasWebFrontend && !hasNative && config.backend === "none") return;
|
|
3476
3437
|
processSingleTemplate(vfs, templates, "packages/env/package.json", "packages/env/package.json", config);
|
|
3477
3438
|
processSingleTemplate(vfs, templates, "packages/env/tsconfig.json", "packages/env/tsconfig.json", config);
|
|
3478
|
-
if (hasWebFrontend
|
|
3439
|
+
if (hasWebFrontend) processSingleTemplate(vfs, templates, "packages/env/src/web.ts", "packages/env/src/web.ts", config);
|
|
3479
3440
|
if (hasNative) processSingleTemplate(vfs, templates, "packages/env/src/native.ts", "packages/env/src/native.ts", config);
|
|
3480
3441
|
if (config.backend !== "none" && config.backend !== "convex") processSingleTemplate(vfs, templates, "packages/env/src/server.ts", "packages/env/src/server.ts", config);
|
|
3481
3442
|
}
|
|
@@ -3488,7 +3449,6 @@ async function processUiPackage(vfs, templates, config) {
|
|
|
3488
3449
|
].includes(f))) return;
|
|
3489
3450
|
processTemplatesFromPrefix(vfs, templates, "packages/ui", "packages/ui", config);
|
|
3490
3451
|
}
|
|
3491
|
-
|
|
3492
3452
|
//#endregion
|
|
3493
3453
|
//#region src/template-handlers/auth.ts
|
|
3494
3454
|
async function processAuthTemplates(vfs, templates, config) {
|
|
@@ -3585,7 +3545,6 @@ async function processAuthTemplates(vfs, templates, config) {
|
|
|
3585
3545
|
if (nativeFramework) processTemplatesFromPrefix(vfs, templates, `auth/${authProvider}/native/${nativeFramework}`, "apps/native", config);
|
|
3586
3546
|
}
|
|
3587
3547
|
}
|
|
3588
|
-
|
|
3589
3548
|
//#endregion
|
|
3590
3549
|
//#region src/template-handlers/payments.ts
|
|
3591
3550
|
async function processPaymentsTemplates(vfs, templates, config) {
|
|
@@ -3613,7 +3572,6 @@ async function processPaymentsTemplates(vfs, templates, config) {
|
|
|
3613
3572
|
else if (hasSvelteWeb) processTemplatesFromPrefix(vfs, templates, `payments/${config.payments}/web/svelte`, "apps/web", config);
|
|
3614
3573
|
else if (hasSolidWeb) processTemplatesFromPrefix(vfs, templates, `payments/${config.payments}/web/solid`, "apps/web", config);
|
|
3615
3574
|
}
|
|
3616
|
-
|
|
3617
3575
|
//#endregion
|
|
3618
3576
|
//#region src/template-handlers/addons.ts
|
|
3619
3577
|
async function processAddonTemplates(vfs, templates, config) {
|
|
@@ -3633,7 +3591,6 @@ async function processAddonTemplates(vfs, templates, config) {
|
|
|
3633
3591
|
processTemplatesFromPrefix(vfs, templates, `addons/${addon}`, "", config);
|
|
3634
3592
|
}
|
|
3635
3593
|
}
|
|
3636
|
-
|
|
3637
3594
|
//#endregion
|
|
3638
3595
|
//#region src/template-handlers/examples.ts
|
|
3639
3596
|
async function processExampleTemplates(vfs, templates, config) {
|
|
@@ -3685,7 +3642,6 @@ async function processExampleTemplates(vfs, templates, config) {
|
|
|
3685
3642
|
}
|
|
3686
3643
|
}
|
|
3687
3644
|
}
|
|
3688
|
-
|
|
3689
3645
|
//#endregion
|
|
3690
3646
|
//#region src/template-handlers/extras.ts
|
|
3691
3647
|
async function processExtrasTemplates(vfs, templates, config) {
|
|
@@ -3702,7 +3658,6 @@ async function processExtrasTemplates(vfs, templates, config) {
|
|
|
3702
3658
|
if (config.packageManager === "pnpm" && (hasNative || hasNuxt)) processTemplatesFromPrefix(vfs, templates, "extras/_npmrc", "", config);
|
|
3703
3659
|
if (config.serverDeploy === "cloudflare" || config.backend === "self" && config.webDeploy === "cloudflare") processSingleTemplate(vfs, templates, "extras/env.d.ts", "packages/env/env.d.ts", config);
|
|
3704
3660
|
}
|
|
3705
|
-
|
|
3706
3661
|
//#endregion
|
|
3707
3662
|
//#region src/template-handlers/deploy.ts
|
|
3708
3663
|
async function processDeployTemplates(vfs, templates, config) {
|
|
@@ -3722,7 +3677,6 @@ async function processDeployTemplates(vfs, templates, config) {
|
|
|
3722
3677
|
}
|
|
3723
3678
|
if (config.serverDeploy !== "none" && config.serverDeploy !== "cloudflare" && !isBackendSelf) processTemplatesFromPrefix(vfs, templates, `deploy/${config.serverDeploy}/server`, "apps/server", config);
|
|
3724
3679
|
}
|
|
3725
|
-
|
|
3726
3680
|
//#endregion
|
|
3727
3681
|
//#region src/utils/reproducible-command.ts
|
|
3728
3682
|
function normalizeMultiValues(values) {
|
|
@@ -3764,7 +3718,6 @@ function generateReproducibleCommand(config) {
|
|
|
3764
3718
|
flags.push(config.install ? "--install" : "--no-install");
|
|
3765
3719
|
return `${baseCommand}${config.relativePath ? ` ${config.relativePath}` : ""} ${flags.join(" ")}`;
|
|
3766
3720
|
}
|
|
3767
|
-
|
|
3768
3721
|
//#endregion
|
|
3769
3722
|
//#region src/generator.ts
|
|
3770
3723
|
/**
|
|
@@ -3832,7 +3785,6 @@ async function generate(options) {
|
|
|
3832
3785
|
}
|
|
3833
3786
|
});
|
|
3834
3787
|
}
|
|
3835
|
-
|
|
3836
3788
|
//#endregion
|
|
3837
3789
|
//#region src/templates.generated.ts
|
|
3838
3790
|
const EMBEDDED_TEMPLATES = new Map([
|
|
@@ -3984,7 +3936,7 @@ export default {
|
|
|
3984
3936
|
"devDependencies": {
|
|
3985
3937
|
"@types/bun": "^1.3.4",
|
|
3986
3938
|
"concurrently": "^9.1.0",
|
|
3987
|
-
"typescript": "^
|
|
3939
|
+
"typescript": "^6"
|
|
3988
3940
|
}
|
|
3989
3941
|
}
|
|
3990
3942
|
`],
|
|
@@ -4034,7 +3986,6 @@ console.log("Electrobun desktop shell started.");
|
|
|
4034
3986
|
"module": "ESNext",
|
|
4035
3987
|
"moduleResolution": "bundler",
|
|
4036
3988
|
"noEmit": true,
|
|
4037
|
-
"baseUrl": ".",
|
|
4038
3989
|
"paths": {
|
|
4039
3990
|
"@/*": ["./src/*"]
|
|
4040
3991
|
}
|
|
@@ -17151,8 +17102,7 @@ next-env.d.ts
|
|
|
17151
17102
|
"compilerOptions": {
|
|
17152
17103
|
"composite": true,
|
|
17153
17104
|
"outDir": "dist",
|
|
17154
|
-
"
|
|
17155
|
-
"paths": {
|
|
17105
|
+
"paths": {
|
|
17156
17106
|
"@/*": ["./src/*"]
|
|
17157
17107
|
},
|
|
17158
17108
|
"jsx": "react-jsx"{{#if (eq backend "hono")}},
|
|
@@ -27741,7 +27691,6 @@ export const darkTheme = {
|
|
|
27741
27691
|
"compilerOptions": {
|
|
27742
27692
|
"strict": true,
|
|
27743
27693
|
"jsx": "react-jsx",
|
|
27744
|
-
"baseUrl": ".",
|
|
27745
27694
|
"paths": {
|
|
27746
27695
|
"@/*": ["*"]
|
|
27747
27696
|
}
|
|
@@ -28701,7 +28650,6 @@ module.exports = uniwindConfig;
|
|
|
28701
28650
|
"extends": "expo/tsconfig.base",
|
|
28702
28651
|
"compilerOptions": {
|
|
28703
28652
|
"strict": true,
|
|
28704
|
-
"baseUrl": ".",
|
|
28705
28653
|
"paths": {
|
|
28706
28654
|
"@/*": ["./*"]
|
|
28707
28655
|
}
|
|
@@ -29062,8 +29010,7 @@ initOpenNextCloudflareForDev();
|
|
|
29062
29010
|
"@types/node": "^20",
|
|
29063
29011
|
"@types/react": "^19.2.10",
|
|
29064
29012
|
"@types/react-dom": "^19.2.3",
|
|
29065
|
-
"tailwindcss": "^4.1.18"
|
|
29066
|
-
"typescript": "^5"
|
|
29013
|
+
"tailwindcss": "^4.1.18"
|
|
29067
29014
|
}
|
|
29068
29015
|
}
|
|
29069
29016
|
`],
|
|
@@ -29401,7 +29348,6 @@ export function ThemeProvider({
|
|
|
29401
29348
|
"target": "ES2017",
|
|
29402
29349
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
29403
29350
|
"allowJs": true,
|
|
29404
|
-
"baseUrl": ".",
|
|
29405
29351
|
"skipLibCheck": true,
|
|
29406
29352
|
"strict": true,
|
|
29407
29353
|
"noEmit": true,
|
|
@@ -29472,7 +29418,6 @@ export function ThemeProvider({
|
|
|
29472
29418
|
"@types/react-dom": "^19.2.3",
|
|
29473
29419
|
"react-router-devtools": "^1.1.0",
|
|
29474
29420
|
"tailwindcss": "^4.2.2",
|
|
29475
|
-
"typescript": "^5.8.3",
|
|
29476
29421
|
"vite": "^8.0.8",
|
|
29477
29422
|
"vite-tsconfig-paths": "^6.1.1"
|
|
29478
29423
|
}
|
|
@@ -29945,7 +29890,6 @@ export default function Home() {
|
|
|
29945
29890
|
"moduleResolution": "bundler",
|
|
29946
29891
|
"jsx": "react-jsx",
|
|
29947
29892
|
"rootDirs": [".", "./.react-router/types"],
|
|
29948
|
-
"baseUrl": ".",
|
|
29949
29893
|
"paths": {
|
|
29950
29894
|
"@/*": ["./src/*"],
|
|
29951
29895
|
"@{{projectName}}/ui/*": ["../../packages/ui/src/*"]
|
|
@@ -30409,7 +30353,6 @@ function HomeComponent() {
|
|
|
30409
30353
|
"skipLibCheck": true,
|
|
30410
30354
|
"types": ["vite/client"],
|
|
30411
30355
|
"rootDirs": ["."],
|
|
30412
|
-
"baseUrl": ".",
|
|
30413
30356
|
"paths": {
|
|
30414
30357
|
"@/*": ["./src/*"],
|
|
30415
30358
|
"@{{projectName}}/ui/*": ["../../packages/ui/src/*"]
|
|
@@ -30994,7 +30937,6 @@ function HomeComponent() {
|
|
|
30994
30937
|
"noUnusedParameters": true,
|
|
30995
30938
|
"noFallthroughCasesInSwitch": true,
|
|
30996
30939
|
"noUncheckedSideEffectImports": true,
|
|
30997
|
-
"baseUrl": ".",
|
|
30998
30940
|
"paths": {
|
|
30999
30941
|
"@/*": ["./src/*"],
|
|
31000
30942
|
"@{{projectName}}/ui/*": ["../../packages/ui/src/*"]
|
|
@@ -31487,7 +31429,6 @@ body {
|
|
|
31487
31429
|
"noUncheckedSideEffectImports": true,
|
|
31488
31430
|
|
|
31489
31431
|
"rootDirs": ["."],
|
|
31490
|
-
"baseUrl": ".",
|
|
31491
31432
|
"paths": {
|
|
31492
31433
|
"@/*": ["./src/*"]
|
|
31493
31434
|
}
|
|
@@ -32574,8 +32515,7 @@ await app.finalize();
|
|
|
32574
32515
|
"devDependencies": {
|
|
32575
32516
|
"@types/react": "^19.2.10",
|
|
32576
32517
|
"@types/react-dom": "^19.2.3",
|
|
32577
|
-
"tailwindcss": "^4.1.18"
|
|
32578
|
-
"typescript": "^5.9.3"
|
|
32518
|
+
"tailwindcss": "^4.1.18"
|
|
32579
32519
|
},
|
|
32580
32520
|
"scripts": {
|
|
32581
32521
|
"check-types": "tsc --noEmit"
|
|
@@ -33297,7 +33237,6 @@ export function cn(...inputs: ClassValue[]) {
|
|
|
33297
33237
|
["packages/ui/tsconfig.json.hbs", `{
|
|
33298
33238
|
"extends": "@{{projectName}}/config/tsconfig.base.json",
|
|
33299
33239
|
"compilerOptions": {
|
|
33300
|
-
"baseUrl": ".",
|
|
33301
33240
|
"jsx": "react-jsx",
|
|
33302
33241
|
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
33303
33242
|
"paths": {
|
|
@@ -33453,7 +33392,7 @@ function SuccessPage() {
|
|
|
33453
33392
|
`]
|
|
33454
33393
|
]);
|
|
33455
33394
|
const TEMPLATE_COUNT = 462;
|
|
33456
|
-
|
|
33457
33395
|
//#endregion
|
|
33458
33396
|
export { EMBEDDED_TEMPLATES, GeneratorError, Handlebars, TEMPLATE_COUNT, VirtualFileSystem, dependencyVersionMap, generate, generateReproducibleCommand, isBinaryFile, processAddonTemplates, processAddonsDeps, processFileContent, processTemplateString, transformFilename, writeBtsConfigToVfs };
|
|
33397
|
+
|
|
33459
33398
|
//# sourceMappingURL=index.mjs.map
|