@better-t-stack/template-generator 3.27.2 → 3.27.4
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 +7 -7
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +13 -61
- 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 +11 -11
- 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
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
//#region ../../node_modules/.bun/is-binary-path@3.0.0/node_modules/is-binary-path/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
Check if a file path is a binary file.
|
|
2
4
|
|
|
5
|
+
@example
|
|
6
|
+
```
|
|
7
|
+
import isBinaryPath from 'is-binary-path';
|
|
8
|
+
|
|
9
|
+
isBinaryPath('source/unicorn.png');
|
|
10
|
+
//=> true
|
|
11
|
+
|
|
12
|
+
isBinaryPath('source/unicorn.txt');
|
|
13
|
+
//=> false
|
|
14
|
+
```
|
|
15
|
+
*/
|
|
16
|
+
declare function isBinaryPath(filePath: string): boolean;
|
|
17
|
+
//#endregion
|
|
3
18
|
//#region src/core/template-reader.d.ts
|
|
4
19
|
declare function getTemplatesRoot(): string;
|
|
5
20
|
declare function getBinaryTemplatesRoot(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-reader.d.mts","names":[],"sources":["../../src/core/template-reader.ts"],"
|
|
1
|
+
{"version":3,"file":"template-reader.d.mts","names":["isBinaryPath","filePath","default"],"sources":["../../../../node_modules/.bun/is-binary-path@3.0.0/node_modules/is-binary-path/index.d.ts","../../src/core/template-reader.ts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;ACUA;;;;;iBDIwBA,YAAAA,CAAaC,QAAAA;;;iBCJrB,gBAAA,CAAA;AAAA,iBAcA,sBAAA,CAAA;AAAA,iBAcM,aAAA,CAAc,MAAA,YAAkB,OAAA,CAAQ,GAAA;AAAA,iBA2B9C,YAAA,CAAa,YAAA;AAAA,iBAOP,aAAA,CAAc,MAAA,YAAkB,OAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { a as loadTemplates, i as loadTemplate, n as getTemplatesRoot, r as listTemplates, t as getBinaryTemplatesRoot } from "../template-reader-
|
|
2
|
-
import { t as isBinaryPath } from "../is-binary-path-
|
|
3
|
-
|
|
4
|
-
export { getTemplatesRoot as TEMPLATES_ROOT, getTemplatesRoot, getBinaryTemplatesRoot, isBinaryPath, listTemplates, loadTemplate, loadTemplates };
|
|
1
|
+
import { a as loadTemplates, i as loadTemplate, n as getTemplatesRoot, r as listTemplates, t as getBinaryTemplatesRoot } from "../template-reader-C8MBRmk-.mjs";
|
|
2
|
+
import { t as isBinaryPath } from "../is-binary-path-maAgJE_Q.mjs";
|
|
3
|
+
export { getTemplatesRoot as TEMPLATES_ROOT, getTemplatesRoot, getBinaryTemplatesRoot, isBinaryPath, listTemplates, loadTemplate, loadTemplates };
|
package/dist/fs-writer.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as VirtualFileTree } from "./types-
|
|
2
|
-
import * as better_result0 from "better-result";
|
|
1
|
+
import { a as VirtualFileTree } from "./types-CzW_c7t0.mjs";
|
|
2
|
+
import * as _$better_result0 from "better-result";
|
|
3
3
|
import { Result } from "better-result";
|
|
4
4
|
|
|
5
5
|
//#region src/fs-writer.d.ts
|
|
6
|
-
declare const FileWriteError_base: better_result0.TaggedErrorClass<"FileWriteError", {
|
|
6
|
+
declare const FileWriteError_base: _$better_result0.TaggedErrorClass<"FileWriteError", {
|
|
7
7
|
message: string;
|
|
8
8
|
path?: string;
|
|
9
9
|
cause?: unknown;
|
package/dist/fs-writer.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs-writer.d.mts","names":[],"sources":["../src/fs-writer.ts"],"
|
|
1
|
+
{"version":3,"file":"fs-writer.d.mts","names":[],"sources":["../src/fs-writer.ts"],"mappings":";;;;;cAM2F,mBAAA;;;;;;;;cAO9E,cAAA,SAAuB,mBAAA;;;;AAApC;iBAUsB,SAAA,CACpB,IAAA,EAAM,eAAA,EACN,OAAA,WACC,OAAA,CAAQ,MAAA,OAAa,cAAA;;;;AAHxB;iBAiDsB,aAAA,CACpB,IAAA,EAAM,eAAA,EACN,OAAA,UACA,MAAA,GAAS,QAAA,uBACR,OAAA,CAAQ,MAAA,WAAiB,cAAA"}
|
package/dist/fs-writer.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as getBinaryTemplatesRoot } from "./template-reader-
|
|
1
|
+
import { t as getBinaryTemplatesRoot } from "./template-reader-C8MBRmk-.mjs";
|
|
2
2
|
import { Result, TaggedError } from "better-result";
|
|
3
3
|
import { dirname, join } from "pathe";
|
|
4
4
|
import * as fs from "node:fs/promises";
|
|
5
|
-
|
|
6
5
|
//#region src/fs-writer.ts
|
|
7
6
|
const BINARY_FILE_MARKER = "[Binary file]";
|
|
8
7
|
/**
|
|
@@ -76,7 +75,7 @@ async function copyBinaryFile(templatePath, destPath) {
|
|
|
76
75
|
const sourcePath = join(getBinaryTemplatesRoot(), templatePath);
|
|
77
76
|
await fs.copyFile(sourcePath, destPath);
|
|
78
77
|
}
|
|
79
|
-
|
|
80
78
|
//#endregion
|
|
81
79
|
export { FileWriteError, writeSelected, writeTree };
|
|
80
|
+
|
|
82
81
|
//# sourceMappingURL=fs-writer.mjs.map
|
package/dist/fs-writer.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs-writer.mjs","names":[
|
|
1
|
+
{"version":3,"file":"fs-writer.mjs","names":[],"sources":["../src/fs-writer.ts"],"sourcesContent":["import * as fs from \"node:fs/promises\";\n\nimport { Result, TaggedError } from \"better-result\";\nimport { join, dirname } from \"pathe\";\n\nimport { getBinaryTemplatesRoot } from \"./core/template-reader\";\nimport type { VirtualFileTree, VirtualNode, VirtualFile, VirtualDirectory } from \"./types\";\n\nconst BINARY_FILE_MARKER = \"[Binary file]\";\n\n/**\n * Error class for filesystem write failures\n */\nexport class FileWriteError extends TaggedError(\"FileWriteError\")<{\n message: string;\n path?: string;\n cause?: unknown;\n}>() {}\n\n/**\n * Writes a virtual file tree to the filesystem.\n * Returns a Result type for type-safe error handling.\n */\nexport async function writeTree(\n tree: VirtualFileTree,\n destDir: string,\n): Promise<Result<void, FileWriteError>> {\n return Result.tryPromise({\n try: async () => {\n for (const child of tree.root.children) {\n await writeNodeInternal(child, destDir, \"\");\n }\n },\n catch: (e) => {\n if (FileWriteError.is(e)) return e;\n return new FileWriteError({\n message: e instanceof Error ? e.message : String(e),\n cause: e,\n });\n },\n });\n}\n\nasync function writeNodeInternal(\n node: VirtualNode,\n baseDir: string,\n relativePath: string,\n): Promise<void> {\n const fullPath = join(baseDir, relativePath, node.name);\n const nodePath = relativePath ? join(relativePath, node.name) : node.name;\n\n if (node.type === \"file\") {\n const fileNode = node as VirtualFile;\n await fs.mkdir(dirname(fullPath), { recursive: true });\n\n if (fileNode.content === BINARY_FILE_MARKER && fileNode.sourcePath) {\n await copyBinaryFile(fileNode.sourcePath, fullPath);\n } else if (fileNode.content !== BINARY_FILE_MARKER) {\n await fs.writeFile(fullPath, fileNode.content, \"utf-8\");\n }\n } else {\n await fs.mkdir(fullPath, { recursive: true });\n for (const child of (node as VirtualDirectory).children) {\n await writeNodeInternal(child, baseDir, nodePath);\n }\n }\n}\n\n/**\n * Writes selected files from a virtual file tree to the filesystem.\n * Returns a Result with the list of written file paths.\n */\nexport async function writeSelected(\n tree: VirtualFileTree,\n destDir: string,\n filter: (filePath: string) => boolean,\n): Promise<Result<string[], FileWriteError>> {\n return Result.tryPromise({\n try: async () => {\n const writtenFiles: string[] = [];\n await writeSelectedNodeInternal(tree.root, destDir, \"\", filter, writtenFiles);\n return writtenFiles;\n },\n catch: (e) => {\n if (FileWriteError.is(e)) return e;\n return new FileWriteError({\n message: e instanceof Error ? e.message : String(e),\n cause: e,\n });\n },\n });\n}\n\nasync function writeSelectedNodeInternal(\n node: VirtualNode,\n baseDir: string,\n relativePath: string,\n filter: (filePath: string) => boolean,\n writtenFiles: string[],\n): Promise<void> {\n const nodePath = relativePath ? `${relativePath}/${node.name}` : node.name;\n\n if (node.type === \"file\") {\n if (filter(nodePath)) {\n const fileNode = node as VirtualFile;\n await fs.mkdir(dirname(join(baseDir, nodePath)), { recursive: true });\n\n if (fileNode.content === BINARY_FILE_MARKER && fileNode.sourcePath) {\n await copyBinaryFile(fileNode.sourcePath, join(baseDir, nodePath));\n } else if (fileNode.content !== BINARY_FILE_MARKER) {\n await fs.writeFile(join(baseDir, nodePath), fileNode.content, \"utf-8\");\n }\n writtenFiles.push(nodePath);\n }\n } else {\n for (const child of (node as VirtualDirectory).children) {\n await writeSelectedNodeInternal(child, baseDir, nodePath, filter, writtenFiles);\n }\n }\n}\n\nasync function copyBinaryFile(templatePath: string, destPath: string): Promise<void> {\n const templatesRoot = getBinaryTemplatesRoot();\n const sourcePath = join(templatesRoot, templatePath);\n // Let errors propagate - they'll be caught by the Result wrapper\n await fs.copyFile(sourcePath, destPath);\n}\n"],"mappings":";;;;;AAQA,MAAM,qBAAqB;;;;AAK3B,IAAa,iBAAb,cAAoC,YAAY,iBAAiB,EAI7D,CAAC;;;;;AAML,eAAsB,UACpB,MACA,SACuC;AACvC,QAAO,OAAO,WAAW;EACvB,KAAK,YAAY;AACf,QAAK,MAAM,SAAS,KAAK,KAAK,SAC5B,OAAM,kBAAkB,OAAO,SAAS,GAAG;;EAG/C,QAAQ,MAAM;AACZ,OAAI,eAAe,GAAG,EAAE,CAAE,QAAO;AACjC,UAAO,IAAI,eAAe;IACxB,SAAS,aAAa,QAAQ,EAAE,UAAU,OAAO,EAAE;IACnD,OAAO;IACR,CAAC;;EAEL,CAAC;;AAGJ,eAAe,kBACb,MACA,SACA,cACe;CACf,MAAM,WAAW,KAAK,SAAS,cAAc,KAAK,KAAK;CACvD,MAAM,WAAW,eAAe,KAAK,cAAc,KAAK,KAAK,GAAG,KAAK;AAErE,KAAI,KAAK,SAAS,QAAQ;EACxB,MAAM,WAAW;AACjB,QAAM,GAAG,MAAM,QAAQ,SAAS,EAAE,EAAE,WAAW,MAAM,CAAC;AAEtD,MAAI,SAAS,YAAY,sBAAsB,SAAS,WACtD,OAAM,eAAe,SAAS,YAAY,SAAS;WAC1C,SAAS,YAAY,mBAC9B,OAAM,GAAG,UAAU,UAAU,SAAS,SAAS,QAAQ;QAEpD;AACL,QAAM,GAAG,MAAM,UAAU,EAAE,WAAW,MAAM,CAAC;AAC7C,OAAK,MAAM,SAAU,KAA0B,SAC7C,OAAM,kBAAkB,OAAO,SAAS,SAAS;;;;;;;AASvD,eAAsB,cACpB,MACA,SACA,QAC2C;AAC3C,QAAO,OAAO,WAAW;EACvB,KAAK,YAAY;GACf,MAAM,eAAyB,EAAE;AACjC,SAAM,0BAA0B,KAAK,MAAM,SAAS,IAAI,QAAQ,aAAa;AAC7E,UAAO;;EAET,QAAQ,MAAM;AACZ,OAAI,eAAe,GAAG,EAAE,CAAE,QAAO;AACjC,UAAO,IAAI,eAAe;IACxB,SAAS,aAAa,QAAQ,EAAE,UAAU,OAAO,EAAE;IACnD,OAAO;IACR,CAAC;;EAEL,CAAC;;AAGJ,eAAe,0BACb,MACA,SACA,cACA,QACA,cACe;CACf,MAAM,WAAW,eAAe,GAAG,aAAa,GAAG,KAAK,SAAS,KAAK;AAEtE,KAAI,KAAK,SAAS;MACZ,OAAO,SAAS,EAAE;GACpB,MAAM,WAAW;AACjB,SAAM,GAAG,MAAM,QAAQ,KAAK,SAAS,SAAS,CAAC,EAAE,EAAE,WAAW,MAAM,CAAC;AAErE,OAAI,SAAS,YAAY,sBAAsB,SAAS,WACtD,OAAM,eAAe,SAAS,YAAY,KAAK,SAAS,SAAS,CAAC;YACzD,SAAS,YAAY,mBAC9B,OAAM,GAAG,UAAU,KAAK,SAAS,SAAS,EAAE,SAAS,SAAS,QAAQ;AAExE,gBAAa,KAAK,SAAS;;OAG7B,MAAK,MAAM,SAAU,KAA0B,SAC7C,OAAM,0BAA0B,OAAO,SAAS,UAAU,QAAQ,aAAa;;AAKrF,eAAe,eAAe,cAAsB,UAAiC;CAEnF,MAAM,aAAa,KADG,wBAAwB,EACP,aAAa;AAEpD,OAAM,GAAG,SAAS,YAAY,SAAS"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as VirtualFileTree, i as VirtualFile, n as GeneratorOptions, o as VirtualNode, r as VirtualDirectory, t as GeneratorError } from "./types-
|
|
1
|
+
import { a as VirtualFileTree, i as VirtualFile, n as GeneratorOptions, o as VirtualNode, r as VirtualDirectory, t as GeneratorError } from "./types-CzW_c7t0.mjs";
|
|
2
2
|
import { Result } from "better-result";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _$memfs from "memfs";
|
|
4
4
|
import Handlebars from "handlebars";
|
|
5
5
|
import { ProjectConfig } from "@better-t-stack/types";
|
|
6
6
|
|
|
@@ -26,8 +26,8 @@ declare class VirtualFileSystem {
|
|
|
26
26
|
getDirectoryCount(): number;
|
|
27
27
|
toTree(rootName?: string): VirtualDirectory;
|
|
28
28
|
clear(): void;
|
|
29
|
-
getVolume():
|
|
30
|
-
getFs():
|
|
29
|
+
getVolume(): _$memfs.Volume;
|
|
30
|
+
getFs(): _$memfs.IFs;
|
|
31
31
|
private walkDir;
|
|
32
32
|
private buildTree;
|
|
33
33
|
private sortChildren;
|
|
@@ -114,8 +114,8 @@ declare const dependencyVersionMap: {
|
|
|
114
114
|
readonly "@vite-pwa/assets-generator": "^1.0.2";
|
|
115
115
|
readonly "@tauri-apps/cli": "^2.4.0";
|
|
116
116
|
readonly "@biomejs/biome": "^2.2.0";
|
|
117
|
-
readonly oxlint: "^1.
|
|
118
|
-
readonly oxfmt: "^0.
|
|
117
|
+
readonly oxlint: "^1.61.0";
|
|
118
|
+
readonly oxfmt: "^0.46.0";
|
|
119
119
|
readonly husky: "^9.1.7";
|
|
120
120
|
readonly lefthook: "^2.0.13";
|
|
121
121
|
readonly "lint-staged": "^16.1.2";
|
|
@@ -184,7 +184,7 @@ declare const dependencyVersionMap: {
|
|
|
184
184
|
readonly "@astrojs/node": "^10.0.0-beta.9";
|
|
185
185
|
readonly alchemy: "^0.91.2";
|
|
186
186
|
readonly dotenv: "^17.2.2";
|
|
187
|
-
readonly tsdown: "^0.
|
|
187
|
+
readonly tsdown: "^0.21.9";
|
|
188
188
|
readonly zod: "^4.1.13";
|
|
189
189
|
readonly "@t3-oss/env-core": "^0.13.1";
|
|
190
190
|
readonly "@t3-oss/env-nextjs": "^0.13.1";
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/core/virtual-fs.ts","../src/core/template-processor.ts","../src/template-handlers/utils.ts","../src/template-handlers/addons.ts","../src/generator.ts","../src/processors/addons-deps.ts","../src/bts-config.ts","../src/templates.generated.ts","../src/utils/add-deps.ts","../src/utils/reproducible-command.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/core/virtual-fs.ts","../src/core/template-processor.ts","../src/template-handlers/utils.ts","../src/template-handlers/addons.ts","../src/generator.ts","../src/processors/addons-deps.ts","../src/bts-config.ts","../src/templates.generated.ts","../src/utils/add-deps.ts","../src/utils/reproducible-command.ts"],"mappings":";;;;;;;cAOa,iBAAA;EAAA,QACH,GAAA;EAAA,QACA,IAAA;EAAA,QACA,cAAA;;EAQR,SAAA,CAAU,QAAA,UAAkB,OAAA,UAAiB,UAAA;EAY7C,QAAA,CAAS,QAAA;EAQT,MAAA,CAAO,IAAA;EASP,UAAA,CAAW,QAAA;EAQX,eAAA,CAAgB,OAAA;EAQhB,KAAA,CAAM,OAAA;EAIN,UAAA,CAAW,QAAA;EASX,OAAA,CAAQ,OAAA;EAQR,QAAA,aAAA,CAAsB,QAAA,WAAmB,CAAA;EAUzC,SAAA,CAAU,QAAA,UAAkB,IAAA,WAAe,MAAA;EAI3C,WAAA,CAAA;EAMA,iBAAA,CAAA;EAMA,YAAA,CAAA;EAIA,iBAAA,CAAA;EAIA,MAAA,CAAO,QAAA,YAAuB,gBAAA;EAO9B,KAAA,CAAA;EAOA,SAAA,CAAA,GAd8C,OAAA,CAcrC,MAAA;EAGT,KAAA,CAAA,GAHS,OAAA,CAGJ,GAAA;EAAA,QAIG,OAAA;EAAA,QAeA,SAAA;EAAA,QAiCA,YAAA;EAAA,QAWA,aAAA;AAAA;;;iBC5LM,qBAAA,CAAsB,OAAA,UAAiB,OAAA,EAAS,aAAA;AAAA,iBAIhD,YAAA,CAAa,QAAA;AAAA,iBAIb,iBAAA,CAAkB,QAAA;AAAA,iBAUlB,kBAAA,CACd,QAAA,UACA,OAAA,UACA,OAAA,EAAS,aAAA;;;KC1BC,YAAA,GAAe,GAAA;;;iBCAL,qBAAA,CACpB,GAAA,EAAK,iBAAA,EACL,SAAA,EAAW,YAAA,EACX,MAAA,EAAQ,aAAA,GACP,OAAA;;;;;AHFH;;;;;;;;;;;iBI0CsB,QAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,MAAA,CAAO,eAAA,EAAiB,cAAA;;;iBCrCnB,iBAAA,CAAkB,GAAA,EAAK,iBAAA,EAAmB,MAAA,EAAQ,aAAA;;;;;;;iBCJlD,mBAAA,CACd,GAAA,EAAK,iBAAA,EACL,aAAA,EAAe,aAAA,EACf,OAAA,UACA,mBAAA;;;cCXW,kBAAA,EAAoB,GAAA;AAAA,cAq65BpB,cAAA;;;cC355BA,oBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsJD,qBAAA,gBAAqC,oBAAA;;;iBCxIjC,2BAAA,CAA4B,MAAA,EAAQ,aAAA"}
|
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,7 +690,6 @@ 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 = {
|
|
@@ -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([
|
|
@@ -33440,7 +33392,7 @@ function SuccessPage() {
|
|
|
33440
33392
|
`]
|
|
33441
33393
|
]);
|
|
33442
33394
|
const TEMPLATE_COUNT = 462;
|
|
33443
|
-
|
|
33444
33395
|
//#endregion
|
|
33445
33396
|
export { EMBEDDED_TEMPLATES, GeneratorError, Handlebars, TEMPLATE_COUNT, VirtualFileSystem, dependencyVersionMap, generate, generateReproducibleCommand, isBinaryFile, processAddonTemplates, processAddonsDeps, processFileContent, processTemplateString, transformFilename, writeBtsConfigToVfs };
|
|
33397
|
+
|
|
33446
33398
|
//# sourceMappingURL=index.mjs.map
|