better-ts-stack 1.1.4 → 2.0.0
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/README.md +113 -82
- package/dist/args.d.ts +12 -0
- package/dist/args.d.ts.map +1 -0
- package/dist/args.js +90 -0
- package/dist/args.js.map +1 -0
- package/dist/builder/configGenerator.d.ts.map +1 -1
- package/dist/builder/configGenerator.js +10 -3
- package/dist/builder/configGenerator.js.map +1 -1
- package/dist/builder/dependencyInstaller.d.ts.map +1 -1
- package/dist/builder/dependencyInstaller.js +8 -14
- package/dist/builder/dependencyInstaller.js.map +1 -1
- package/dist/builder/gitInitializer.d.ts.map +1 -1
- package/dist/builder/gitInitializer.js +8 -41
- package/dist/builder/gitInitializer.js.map +1 -1
- package/dist/builder/index.d.ts.map +1 -1
- package/dist/builder/index.js +24 -63
- package/dist/builder/index.js.map +1 -1
- package/dist/builder/moduleSelector.d.ts +1 -4
- package/dist/builder/moduleSelector.d.ts.map +1 -1
- package/dist/builder/moduleSelector.js +11 -15
- package/dist/builder/moduleSelector.js.map +1 -1
- package/dist/builder/templateContext.d.ts +2 -17
- package/dist/builder/templateContext.d.ts.map +1 -1
- package/dist/builder/templateContext.js +6 -5
- package/dist/builder/templateContext.js.map +1 -1
- package/dist/index.js +45 -20
- package/dist/index.js.map +1 -1
- package/dist/output/nextSteps.d.ts +1 -2
- package/dist/output/nextSteps.d.ts.map +1 -1
- package/dist/output/nextSteps.js +10 -19
- package/dist/output/nextSteps.js.map +1 -1
- package/dist/prompts/index.d.ts +3 -3
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +22 -58
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/stack.d.ts +3 -2
- package/dist/prompts/stack.d.ts.map +1 -1
- package/dist/prompts/stack.js +81 -70
- package/dist/prompts/stack.js.map +1 -1
- package/dist/types/index.d.ts +20 -42
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +40 -38
- package/dist/types/index.js.map +1 -1
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +19 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/messages.d.ts +9 -0
- package/dist/ui/messages.d.ts.map +1 -0
- package/dist/ui/messages.js +100 -0
- package/dist/ui/messages.js.map +1 -0
- package/dist/ui/prompts.d.ts +20 -0
- package/dist/ui/prompts.d.ts.map +1 -0
- package/dist/ui/prompts.js +71 -0
- package/dist/ui/prompts.js.map +1 -0
- package/dist/ui/theme.d.ts +9 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +24 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/validators/index.d.ts +1 -0
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +6 -0
- package/dist/validators/index.js.map +1 -1
- package/package.json +70 -66
- package/templates/backend/express/config.json +44 -44
- package/templates/backend/express/eslint.config.mjs +40 -40
- package/templates/backend/express/gitignore +36 -36
- package/templates/backend/express/src/index.ts +76 -76
- package/templates/backend/express/src/routes/health.ts +12 -12
- package/templates/backend/express/tsconfig.json +25 -25
- package/templates/backend/nestjs/.prettierignore +52 -0
- package/templates/backend/nestjs/.prettierrc +16 -0
- package/templates/backend/nestjs/config.json +44 -0
- package/templates/backend/nestjs/eslint.config.mjs +40 -0
- package/templates/backend/nestjs/gitignore +36 -0
- package/templates/backend/nestjs/nest-cli.json +9 -0
- package/templates/backend/nestjs/src/app.module.ts.hbs +34 -0
- package/templates/backend/nestjs/src/health/health.controller.ts +12 -0
- package/templates/backend/nestjs/src/main.ts +23 -0
- package/templates/backend/nestjs/tsconfig.eslint.json +9 -0
- package/templates/backend/nestjs/tsconfig.json +25 -0
- package/templates/frontend/nextjs/app/layout.tsx +13 -13
- package/templates/frontend/nextjs/app/page.tsx.hbs +97 -97
- package/templates/frontend/nextjs/components/ui/button.tsx +51 -51
- package/templates/frontend/nextjs/components/ui/card.tsx +60 -60
- package/templates/frontend/nextjs/components/ui/field.tsx +67 -67
- package/templates/frontend/nextjs/components/ui/input.tsx +18 -18
- package/templates/frontend/nextjs/components.json +19 -19
- package/templates/frontend/nextjs/config.json +38 -38
- package/templates/frontend/nextjs/eslint.config.mjs +11 -11
- package/templates/frontend/nextjs/gitignore +42 -42
- package/templates/frontend/nextjs/lib/utils.ts +6 -6
- package/templates/frontend/nextjs/next.config.ts.hbs +12 -12
- package/templates/frontend/nextjs/proxy.ts.hbs +24 -24
- package/templates/frontend/nextjs/tsconfig.json +34 -34
- package/templates/frontend/tanstack/config.json +48 -48
- package/templates/frontend/tanstack/src/routeTree.gen.ts +68 -68
- package/templates/frontend/tanstack/src/styles/app.css +85 -85
- package/templates/modules/auth/express/config.json +27 -26
- package/templates/modules/auth/express/src/controllers/authController.ts.hbs +116 -130
- package/templates/modules/auth/express/src/middleware/requireAuth.ts.hbs +26 -26
- package/templates/modules/auth/express/src/services/userStore.ts.hbs +117 -117
- package/templates/modules/auth/nestjs/config.json +24 -0
- package/templates/modules/auth/nestjs/src/auth/auth.controller.ts +46 -0
- package/templates/modules/auth/nestjs/src/auth/auth.guard.ts +36 -0
- package/templates/modules/auth/nestjs/src/auth/auth.module.ts.hbs +22 -0
- package/templates/modules/auth/nestjs/src/auth/auth.schemas.ts +35 -0
- package/templates/modules/auth/nestjs/src/auth/auth.service.ts +70 -0
- package/templates/modules/auth/nestjs/src/auth/jwt.ts +27 -0
- package/templates/modules/auth/nestjs/src/auth/users.service.ts.hbs +144 -0
- package/templates/modules/auth/nestjs/src/auth/zod-validation.pipe.ts +16 -0
- package/templates/modules/auth/nextjs/app/dashboard/page.tsx +96 -96
- package/templates/modules/auth/nextjs/app/sign-in/page.tsx +35 -35
- package/templates/modules/auth/nextjs/app/sign-up/page.tsx +35 -35
- package/templates/modules/auth/nextjs/components/auth/sign-in-form.tsx +132 -132
- package/templates/modules/auth/nextjs/components/auth/sign-out-button.tsx +50 -50
- package/templates/modules/auth/nextjs/components/auth/sign-up-form.tsx +152 -152
- package/templates/modules/auth/nextjs/config.json +31 -31
- package/templates/modules/auth/nextjs/lib/auth-schema.ts +39 -39
- package/templates/modules/auth/nextjs/lib/auth.ts.hbs +37 -37
- package/templates/modules/auth/tanstack/src/lib/auth-functions.ts +4 -4
- package/templates/modules/auth/tanstack/src/routeTree.gen.ts +140 -140
- package/templates/modules/docker/.dockerignore +14 -14
- package/templates/modules/docker/Dockerfile.hbs +137 -133
- package/templates/modules/docker/config.json +19 -19
- package/templates/modules/docker/docker-compose.yml.hbs +9 -9
- package/templates/modules/drizzle/express/config.json +27 -27
- package/templates/modules/drizzle/express/drizzle.config.ts +13 -13
- package/templates/modules/drizzle/express/src/lib/db.ts +13 -13
- package/templates/modules/drizzle/express/src/lib/schema.ts +10 -10
- package/templates/modules/drizzle/nestjs/config.json +27 -0
- package/templates/modules/drizzle/nestjs/drizzle.config.ts +13 -0
- package/templates/modules/drizzle/nestjs/src/database/database.module.ts +30 -0
- package/templates/modules/drizzle/nestjs/src/database/schema.ts +10 -0
- package/templates/modules/drizzle/nextjs/config.json +29 -29
- package/templates/modules/drizzle/nextjs/lib/db.ts +13 -13
- package/templates/modules/drizzle/nextjs/lib/schema.ts.hbs +84 -84
- package/templates/modules/mongoose/express/config.json +16 -16
- package/templates/modules/mongoose/nestjs/config.json +16 -0
- package/templates/modules/mongoose/nestjs/src/users/user.schema.ts +21 -0
- package/templates/modules/mongoose/nextjs/config.json +16 -16
- package/templates/modules/mongoose/nextjs/lib/db.ts +36 -36
- package/templates/modules/mongoose/tanstack/config.json +17 -17
- package/templates/modules/mongoose/tanstack/src/lib/db.ts +37 -37
- package/templates/modules/prisma/express/config.json +28 -28
- package/templates/modules/prisma/express/prisma/schema.prisma +1 -1
- package/templates/modules/prisma/express/prisma.config.ts +12 -12
- package/templates/modules/prisma/express/src/lib/prisma.ts +24 -24
- package/templates/modules/prisma/nestjs/config.json +28 -0
- package/templates/modules/prisma/nestjs/prisma/schema.prisma +23 -0
- package/templates/modules/prisma/nestjs/prisma.config.ts +12 -0
- package/templates/modules/prisma/nestjs/src/prisma/prisma.module.ts +11 -0
- package/templates/modules/prisma/nestjs/src/prisma/prisma.service.ts +17 -0
- package/templates/modules/prisma/nextjs/config.json +29 -29
- package/templates/modules/prisma/nextjs/prisma/schema.prisma.hbs +91 -91
- package/templates/modules/prisma/tanstack/config.json +5 -5
- package/dist/intro.d.ts +0 -2
- package/dist/intro.d.ts.map +0 -1
- package/dist/intro.js +0 -27
- package/dist/intro.js.map +0 -1
- package/templates/backend/express/.eslintrc.js +0 -24
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface SelectOption<T> {
|
|
2
|
+
value: T;
|
|
3
|
+
label: string;
|
|
4
|
+
hint?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function text(options: {
|
|
7
|
+
message: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
validate: (value: string | undefined) => string | undefined;
|
|
10
|
+
}): Promise<string | symbol>;
|
|
11
|
+
export declare function select<T>(options: {
|
|
12
|
+
message: string;
|
|
13
|
+
options: SelectOption<T>[];
|
|
14
|
+
initialValue: T;
|
|
15
|
+
}): Promise<T | symbol>;
|
|
16
|
+
export declare function confirm(options: {
|
|
17
|
+
message: string;
|
|
18
|
+
initialValue: boolean;
|
|
19
|
+
}): Promise<boolean | symbol>;
|
|
20
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/ui/prompts.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAYD,wBAAgB,IAAI,CAAC,OAAO,EAAE;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC;CAC7D,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAkB3B;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,YAAY,EAAE,CAAC,CAAC;CACjB,GAAG,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,CAqBtB;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;CACvB,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAmB5B"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.text = text;
|
|
4
|
+
exports.select = select;
|
|
5
|
+
exports.confirm = confirm;
|
|
6
|
+
// Prompts built on @clack/core, which handles the keyboard while the render
|
|
7
|
+
// functions below draw each state
|
|
8
|
+
const core_1 = require("@clack/core");
|
|
9
|
+
const theme_1 = require("./theme");
|
|
10
|
+
// A prompt waiting for input: "$ Project name"
|
|
11
|
+
const question = (message) => `${(0, theme_1.lime)("$")} ${(0, theme_1.bold)(message)}`;
|
|
12
|
+
// An answered prompt, collapsed to one line: "✓ Project name my-app". The
|
|
13
|
+
// trailing newline leaves a blank line before the next prompt
|
|
14
|
+
const answered = (message, answer) => `${(0, theme_1.lime)("✓")} ${(0, theme_1.dim)(message)} ${answer}\n`;
|
|
15
|
+
const cancelled = (message) => `${(0, theme_1.red)("×")} ${(0, theme_1.dim)(message)}`;
|
|
16
|
+
function text(options) {
|
|
17
|
+
const { message, placeholder } = options;
|
|
18
|
+
return new core_1.TextPrompt({
|
|
19
|
+
validate: options.validate,
|
|
20
|
+
render() {
|
|
21
|
+
if (this.state === "submit")
|
|
22
|
+
return answered(message, this.value ?? "");
|
|
23
|
+
if (this.state === "cancel")
|
|
24
|
+
return cancelled(message);
|
|
25
|
+
// The inverse first character stands in for the cursor on an empty input
|
|
26
|
+
const input = this.userInput
|
|
27
|
+
? this.userInputWithCursor
|
|
28
|
+
: (0, theme_1.inverse)(placeholder[0]) + (0, theme_1.dim)(placeholder.slice(1));
|
|
29
|
+
const error = this.state === "error" ? `\n ${(0, theme_1.red)(this.error)}` : "";
|
|
30
|
+
return `${question(message)}\n ${input}${error}\n`;
|
|
31
|
+
},
|
|
32
|
+
}).prompt();
|
|
33
|
+
}
|
|
34
|
+
function select(options) {
|
|
35
|
+
const { message } = options;
|
|
36
|
+
return new core_1.SelectPrompt({
|
|
37
|
+
options: options.options,
|
|
38
|
+
initialValue: options.initialValue,
|
|
39
|
+
render() {
|
|
40
|
+
if (this.state === "submit")
|
|
41
|
+
return answered(message, this.options[this.cursor].label);
|
|
42
|
+
if (this.state === "cancel")
|
|
43
|
+
return cancelled(message);
|
|
44
|
+
const rows = this.options.map((option, index) => {
|
|
45
|
+
const hint = option.hint ? ` ${(0, theme_1.dim)(option.hint)}` : "";
|
|
46
|
+
return index === this.cursor
|
|
47
|
+
? ` ${(0, theme_1.lime)("›")} ${option.label}${hint}`
|
|
48
|
+
: ` ${(0, theme_1.dim)(option.label)}`;
|
|
49
|
+
});
|
|
50
|
+
return `${question(message)}\n${rows.join("\n")}\n`;
|
|
51
|
+
},
|
|
52
|
+
}).prompt();
|
|
53
|
+
}
|
|
54
|
+
function confirm(options) {
|
|
55
|
+
const { message } = options;
|
|
56
|
+
return new core_1.ConfirmPrompt({
|
|
57
|
+
active: "Yes",
|
|
58
|
+
inactive: "No",
|
|
59
|
+
initialValue: options.initialValue,
|
|
60
|
+
render() {
|
|
61
|
+
if (this.state === "submit")
|
|
62
|
+
return answered(message, this.value ? "Yes" : "No");
|
|
63
|
+
if (this.state === "cancel")
|
|
64
|
+
return cancelled(message);
|
|
65
|
+
// Both choices keep their column; only the marker and color move
|
|
66
|
+
const choice = (label, isActive) => isActive ? (0, theme_1.lime)(`› ${label}`) : (0, theme_1.dim)(` ${label}`);
|
|
67
|
+
return `${question(message)}\n ${choice("Yes", this.value === true)} ${choice("No", this.value === false)}\n`;
|
|
68
|
+
},
|
|
69
|
+
}).prompt();
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/ui/prompts.ts"],"names":[],"mappings":";;AAsBA,oBAsBC;AAED,wBAyBC;AAED,0BAsBC;AA/FD,4EAA4E;AAC5E,kCAAkC;AAClC,sCAAsE;AAEtE,mCAAwD;AAQxD,+CAA+C;AAC/C,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,GAAG,IAAA,YAAI,EAAC,GAAG,CAAC,IAAI,IAAA,YAAI,EAAC,OAAO,CAAC,EAAE,CAAC;AAEtE,2EAA2E;AAC3E,8DAA8D;AAC9D,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAE,MAAc,EAAE,EAAE,CACnD,GAAG,IAAA,YAAI,EAAC,GAAG,CAAC,IAAI,IAAA,WAAG,EAAC,OAAO,CAAC,KAAK,MAAM,IAAI,CAAC;AAE9C,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,GAAG,IAAA,WAAG,EAAC,GAAG,CAAC,IAAI,IAAA,WAAG,EAAC,OAAO,CAAC,EAAE,CAAC;AAErE,SAAgB,IAAI,CAAC,OAIpB;IACC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAEzC,OAAO,IAAI,iBAAU,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM;YACJ,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ;gBAAE,OAAO,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,K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AC,KAAK,EAAE,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC;QACnH,CAAC;KACF,CAAC,CAAC,MAAM,EAA+B,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const amber: (text: string) => string;
|
|
2
|
+
export declare const lavender: (text: string) => string;
|
|
3
|
+
export declare const lime: (text: string) => string;
|
|
4
|
+
export declare const pink: (text: string) => string;
|
|
5
|
+
export declare const red: (text: string) => string;
|
|
6
|
+
export declare const bold: (text: string) => string;
|
|
7
|
+
export declare const dim: (text: string) => string;
|
|
8
|
+
export declare const inverse: (text: string) => string;
|
|
9
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,KAAK,SAJF,MAAM,WAIS,CAAC;AAChC,eAAO,MAAM,QAAQ,SALL,MAAM,WAKY,CAAC;AACnC,eAAO,MAAM,IAAI,SAND,MAAM,WAMQ,CAAC;AAC/B,eAAO,MAAM,IAAI,SAPD,MAAM,WAOQ,CAAC;AAC/B,eAAO,MAAM,GAAG,SARA,MAAM,WAQO,CAAC;AAE9B,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,WAA4B,CAAC;AAC9D,eAAO,MAAM,GAAG,GAAI,MAAM,MAAM,WAA2B,CAAC;AAC5D,eAAO,MAAM,OAAO,GAAI,MAAM,MAAM,WAA+B,CAAC"}
|
package/dist/ui/theme.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inverse = exports.dim = exports.bold = exports.red = exports.pink = exports.lime = exports.lavender = exports.amber = void 0;
|
|
4
|
+
// Colors and text styles shared by every piece of CLI output
|
|
5
|
+
const node_util_1 = require("node:util");
|
|
6
|
+
// Plain text is used when the output is piped, NO_COLOR is set, or the
|
|
7
|
+
// terminal has fewer than 256 colors
|
|
8
|
+
const hasColors = process.stdout.isTTY && process.stdout.hasColors(256);
|
|
9
|
+
// Wraps text in a color from the 256-color palette
|
|
10
|
+
function color(code) {
|
|
11
|
+
return (text) => hasColors ? `\x1b[38;5;${code}m${text}\x1b[39m` : text;
|
|
12
|
+
}
|
|
13
|
+
exports.amber = color(214); // Brand: wordmark and headings
|
|
14
|
+
exports.lavender = color(183); // Tagline
|
|
15
|
+
exports.lime = color(148); // Prompts, success, and commands to run
|
|
16
|
+
exports.pink = color(211); // Labels
|
|
17
|
+
exports.red = color(203); // Errors
|
|
18
|
+
const bold = (text) => (0, node_util_1.styleText)("bold", text);
|
|
19
|
+
exports.bold = bold;
|
|
20
|
+
const dim = (text) => (0, node_util_1.styleText)("dim", text);
|
|
21
|
+
exports.dim = dim;
|
|
22
|
+
const inverse = (text) => (0, node_util_1.styleText)("inverse", text);
|
|
23
|
+
exports.inverse = inverse;
|
|
24
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/ui/theme.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AAC7D,yCAAsC;AAEtC,uEAAuE;AACvE,qCAAqC;AACrC,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAExE,mDAAmD;AACnD,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,IAAY,EAAE,EAAE,CACtB,SAAS,CAAC,CAAC,CAAC,aAAa,IAAI,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC;AAEY,QAAA,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,+BAA+B;AACnD,QAAA,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU;AACjC,QAAA,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,wCAAwC;AAC3D,QAAA,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;AAC5B,QAAA,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;AAEjC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAA,qBAAS,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAAjD,QAAA,IAAI,QAA6C;AACvD,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAA,qBAAS,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAA/C,QAAA,GAAG,OAA4C;AACrD,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAA,qBAAS,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAAvD,QAAA,OAAO,WAAgD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const projectNameSchema: z.ZodString;
|
|
3
3
|
export declare function validateProjectName(name: string): string | undefined;
|
|
4
|
+
export declare function validateProjectPath(projectPath: string): string | undefined;
|
|
4
5
|
export declare function validateDirectoryEmpty(dirPath: string): Promise<string | null>;
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB,aAc3B,CAAC;AAGJ,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUpE;AAGD,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,0BAgB3D"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB,aAc3B,CAAC;AAGJ,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAUpE;AAID,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3E;AAGD,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,0BAgB3D"}
|
package/dist/validators/index.js
CHANGED
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.projectNameSchema = void 0;
|
|
37
37
|
exports.validateProjectName = validateProjectName;
|
|
38
|
+
exports.validateProjectPath = validateProjectPath;
|
|
38
39
|
exports.validateDirectoryEmpty = validateDirectoryEmpty;
|
|
39
40
|
const fs = __importStar(require("fs-extra"));
|
|
40
41
|
const path = __importStar(require("path"));
|
|
@@ -56,6 +57,11 @@ function validateProjectName(name) {
|
|
|
56
57
|
const firstError = result.error.issues[0];
|
|
57
58
|
return firstError.message;
|
|
58
59
|
}
|
|
60
|
+
// Checks a project path such as "my-app", "apps/api", or "."; the last folder
|
|
61
|
+
// name becomes the package name
|
|
62
|
+
function validateProjectPath(projectPath) {
|
|
63
|
+
return validateProjectName(path.basename(path.resolve(projectPath)));
|
|
64
|
+
}
|
|
59
65
|
// Ensures a directory is empty or does not exist before starting build
|
|
60
66
|
async function validateDirectoryEmpty(dirPath) {
|
|
61
67
|
const exists = await fs.pathExists(dirPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;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CAAC;AACvE,CAAC;AAED,uEAAuE;AAChE,KAAK,UAAU,sBAAsB,CAAC,OAAe;IAC1D,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAE5C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAErC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;QACzB,OAAO,SAAS,OAAO,iCAAiC,CAAC;IAC3D,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEpC,OAAO,cAAc,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,mCAAmC,CAAC;AACjF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,66 +1,70 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "better-ts-stack",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A
|
|
5
|
-
"keywords": [
|
|
6
|
-
"cli",
|
|
7
|
-
"builder",
|
|
8
|
-
"backend",
|
|
9
|
-
"typescript",
|
|
10
|
-
"express",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"eslint": "
|
|
58
|
-
"prettier": "
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "better-ts-stack",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "A CLI that scaffolds Express, NestJS, Next.js, and TanStack Start projects with a database, authentication, and Docker already set up.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"builder",
|
|
8
|
+
"backend",
|
|
9
|
+
"typescript",
|
|
10
|
+
"express",
|
|
11
|
+
"nestjs",
|
|
12
|
+
"nextjs",
|
|
13
|
+
"tanstack-start",
|
|
14
|
+
"prisma",
|
|
15
|
+
"drizzle",
|
|
16
|
+
"mongoose",
|
|
17
|
+
"template"
|
|
18
|
+
],
|
|
19
|
+
"homepage": "https://better-ts-stack.abdullahtech.me",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/Abdullah-dev0/better-ts-stack/issues"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/Abdullah-dev0/better-ts-stack.git"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"author": "Abdullah",
|
|
29
|
+
"type": "commonjs",
|
|
30
|
+
"main": "dist/index.js",
|
|
31
|
+
"bin": {
|
|
32
|
+
"better-ts-stack": "dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"templates"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"dev": "tsx src/index.ts",
|
|
40
|
+
"build": "tsc",
|
|
41
|
+
"postbuild": "node -e \"const fs=require('fs');const p='dist/index.js';fs.writeFileSync(p,'#!/usr/bin/env node\\n'+fs.readFileSync(p,'utf8'))\"",
|
|
42
|
+
"prepack": "npm run build",
|
|
43
|
+
"start": "node dist/index.js",
|
|
44
|
+
"lint": "eslint src",
|
|
45
|
+
"lint:fix": "eslint src --fix",
|
|
46
|
+
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md,mdx,css}\"",
|
|
47
|
+
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md,mdx,css}\"",
|
|
48
|
+
"type:check": "tsc --noEmit"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@clack/core": "^1.4.3",
|
|
52
|
+
"fs-extra": "^11.4.0",
|
|
53
|
+
"handlebars": "^4.7.9",
|
|
54
|
+
"zod": "^4.5.4"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@better-ts-stack/eslint-config": "*",
|
|
58
|
+
"@better-ts-stack/prettier-config": "*",
|
|
59
|
+
"@types/fs-extra": "^11.0.4",
|
|
60
|
+
"@types/node": "^24.13.3",
|
|
61
|
+
"eslint": "^10.10.0",
|
|
62
|
+
"prettier": "^3.9.6",
|
|
63
|
+
"tsx": "^4.23.13",
|
|
64
|
+
"typescript": "^6.0.3"
|
|
65
|
+
},
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=24.0.0"
|
|
68
|
+
},
|
|
69
|
+
"prettier": "@better-ts-stack/prettier-config"
|
|
70
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "express",
|
|
3
|
-
"name": "Express Base",
|
|
4
|
-
"description": "Base Express server with TypeScript,
|
|
5
|
-
"type": "base",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "cross-env NODE_ENV=development {{#if (eq packageManager 'bun')}}bun --watch src/index.ts{{else}}tsx watch src/index.ts{{/if}}",
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"start": "cross-env NODE_ENV=production {{runner}} dist/index.js",
|
|
10
|
-
"lint": "eslint src",
|
|
11
|
-
"lint:fix": "eslint src --fix",
|
|
12
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
13
|
-
"type:check": "tsc --noEmit"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"express": "^5.2.1",
|
|
17
|
-
"dotenv": "^17.4.2",
|
|
18
|
-
"cors": "^2.8.6",
|
|
19
|
-
"cross-env": "^10.1.0",
|
|
20
|
-
"helmet": "^8.3.0",
|
|
21
|
-
"morgan": "^1.12.0"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@eslint/js": "^10.0.1",
|
|
25
|
-
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
26
|
-
"@types/cors": "^2.8.19",
|
|
27
|
-
"@types/express": "^5.0.6",
|
|
28
|
-
"@types/morgan": "^1.9.10",
|
|
29
|
-
"@types/node": "^24.13.3",
|
|
30
|
-
"eslint": "^10.10.0",
|
|
31
|
-
"eslint-config-prettier": "^10.1.8",
|
|
32
|
-
"prettier": "^3.9.6",
|
|
33
|
-
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
34
|
-
"tsx": "^4.23.13",
|
|
35
|
-
"typescript": "^6.0.3",
|
|
36
|
-
"typescript-eslint": "^8.69.0"
|
|
37
|
-
},
|
|
38
|
-
"envVars": {
|
|
39
|
-
"PORT": "3000"
|
|
40
|
-
},
|
|
41
|
-
"templateFiles": [
|
|
42
|
-
"src/index.ts"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "express",
|
|
3
|
+
"name": "Express Base",
|
|
4
|
+
"description": "Base Express server with TypeScript, security headers, and a health check",
|
|
5
|
+
"type": "base",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "cross-env NODE_ENV=development {{#if (eq packageManager 'bun')}}bun --watch src/index.ts{{else}}tsx watch src/index.ts{{/if}}",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "cross-env NODE_ENV=production {{runner}} dist/index.js",
|
|
10
|
+
"lint": "eslint src",
|
|
11
|
+
"lint:fix": "eslint src --fix",
|
|
12
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
13
|
+
"type:check": "tsc --noEmit"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"express": "^5.2.1",
|
|
17
|
+
"dotenv": "^17.4.2",
|
|
18
|
+
"cors": "^2.8.6",
|
|
19
|
+
"cross-env": "^10.1.0",
|
|
20
|
+
"helmet": "^8.3.0",
|
|
21
|
+
"morgan": "^1.12.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@eslint/js": "^10.0.1",
|
|
25
|
+
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
26
|
+
"@types/cors": "^2.8.19",
|
|
27
|
+
"@types/express": "^5.0.6",
|
|
28
|
+
"@types/morgan": "^1.9.10",
|
|
29
|
+
"@types/node": "^24.13.3",
|
|
30
|
+
"eslint": "^10.10.0",
|
|
31
|
+
"eslint-config-prettier": "^10.1.8",
|
|
32
|
+
"prettier": "^3.9.6",
|
|
33
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
34
|
+
"tsx": "^4.23.13",
|
|
35
|
+
"typescript": "^6.0.3",
|
|
36
|
+
"typescript-eslint": "^8.69.0"
|
|
37
|
+
},
|
|
38
|
+
"envVars": {
|
|
39
|
+
"PORT": "3000"
|
|
40
|
+
},
|
|
41
|
+
"templateFiles": [
|
|
42
|
+
"src/index.ts"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import eslint from "@eslint/js";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import tseslint from "typescript-eslint";
|
|
5
|
-
|
|
6
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
-
const __dirname = path.dirname(__filename);
|
|
8
|
-
|
|
9
|
-
export default tseslint.config(
|
|
10
|
-
{
|
|
11
|
-
ignores: [
|
|
12
|
-
"dist",
|
|
13
|
-
"node_modules",
|
|
14
|
-
"templates/**/*",
|
|
15
|
-
"bin/**/*",
|
|
16
|
-
"src/generated/**",
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
eslint.configs.recommended,
|
|
20
|
-
...tseslint.configs.recommended,
|
|
21
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
22
|
-
{
|
|
23
|
-
languageOptions: {
|
|
24
|
-
parserOptions: {
|
|
25
|
-
project: "./tsconfig.eslint.json",
|
|
26
|
-
tsconfigRootDir: __dirname,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
rules: {
|
|
30
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
31
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
32
|
-
"@typescript-eslint/no-unused-vars": [
|
|
33
|
-
"error",
|
|
34
|
-
{ argsIgnorePattern: "^_" },
|
|
35
|
-
],
|
|
36
|
-
"@typescript-eslint/no-floating-promises": "error",
|
|
37
|
-
"no-console": "off",
|
|
38
|
-
},
|
|
39
|
-
}
|
|
40
|
-
);
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import tseslint from "typescript-eslint";
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
|
|
9
|
+
export default tseslint.config(
|
|
10
|
+
{
|
|
11
|
+
ignores: [
|
|
12
|
+
"dist",
|
|
13
|
+
"node_modules",
|
|
14
|
+
"templates/**/*",
|
|
15
|
+
"bin/**/*",
|
|
16
|
+
"src/generated/**",
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
eslint.configs.recommended,
|
|
20
|
+
...tseslint.configs.recommended,
|
|
21
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
22
|
+
{
|
|
23
|
+
languageOptions: {
|
|
24
|
+
parserOptions: {
|
|
25
|
+
project: "./tsconfig.eslint.json",
|
|
26
|
+
tsconfigRootDir: __dirname,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
rules: {
|
|
30
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
31
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
32
|
+
"@typescript-eslint/no-unused-vars": [
|
|
33
|
+
"error",
|
|
34
|
+
{ argsIgnorePattern: "^_" },
|
|
35
|
+
],
|
|
36
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
37
|
+
"no-console": "off",
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
);
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
# Dependencies
|
|
2
|
-
node_modules/
|
|
3
|
-
|
|
4
|
-
# Build output
|
|
5
|
-
dist/
|
|
6
|
-
build/
|
|
7
|
-
|
|
8
|
-
# Environment variables
|
|
9
|
-
.env
|
|
10
|
-
.env.local
|
|
11
|
-
.env.*.local
|
|
12
|
-
|
|
13
|
-
# Logs
|
|
14
|
-
logs/
|
|
15
|
-
*.log
|
|
16
|
-
npm-debug.log*
|
|
17
|
-
yarn-debug.log*
|
|
18
|
-
yarn-error.log*
|
|
19
|
-
|
|
20
|
-
# IDE
|
|
21
|
-
.vscode/
|
|
22
|
-
.idea/
|
|
23
|
-
*.swp
|
|
24
|
-
*.swo
|
|
25
|
-
*~
|
|
26
|
-
|
|
27
|
-
# OS
|
|
28
|
-
.DS_Store
|
|
29
|
-
Thumbs.db
|
|
30
|
-
|
|
31
|
-
# Testing
|
|
32
|
-
coverage/
|
|
33
|
-
.nyc_output/
|
|
34
|
-
|
|
35
|
-
# Misc
|
|
36
|
-
*.tsbuildinfo
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build output
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
|
|
8
|
+
# Environment variables
|
|
9
|
+
.env
|
|
10
|
+
.env.local
|
|
11
|
+
.env.*.local
|
|
12
|
+
|
|
13
|
+
# Logs
|
|
14
|
+
logs/
|
|
15
|
+
*.log
|
|
16
|
+
npm-debug.log*
|
|
17
|
+
yarn-debug.log*
|
|
18
|
+
yarn-error.log*
|
|
19
|
+
|
|
20
|
+
# IDE
|
|
21
|
+
.vscode/
|
|
22
|
+
.idea/
|
|
23
|
+
*.swp
|
|
24
|
+
*.swo
|
|
25
|
+
*~
|
|
26
|
+
|
|
27
|
+
# OS
|
|
28
|
+
.DS_Store
|
|
29
|
+
Thumbs.db
|
|
30
|
+
|
|
31
|
+
# Testing
|
|
32
|
+
coverage/
|
|
33
|
+
.nyc_output/
|
|
34
|
+
|
|
35
|
+
# Misc
|
|
36
|
+
*.tsbuildinfo
|