create-better-t-stack 2.31.0 → 2.32.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/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createBtsCli } from "./src-BEEshIQf.js";
3
+
4
+ //#region src/cli.ts
5
+ createBtsCli().run();
6
+
7
+ //#endregion
8
+ export { };
@@ -0,0 +1,279 @@
1
+ #!/usr/bin/env node
2
+ import * as trpc_cli0 from "trpc-cli";
3
+ import { trpcServer } from "trpc-cli";
4
+ import z from "zod";
5
+
6
+ //#region src/types.d.ts
7
+ declare const DatabaseSchema: z.ZodEnum<{
8
+ none: "none";
9
+ sqlite: "sqlite";
10
+ postgres: "postgres";
11
+ mysql: "mysql";
12
+ mongodb: "mongodb";
13
+ }>;
14
+ type Database = z.infer<typeof DatabaseSchema>;
15
+ declare const ORMSchema: z.ZodEnum<{
16
+ none: "none";
17
+ drizzle: "drizzle";
18
+ prisma: "prisma";
19
+ mongoose: "mongoose";
20
+ }>;
21
+ type ORM = z.infer<typeof ORMSchema>;
22
+ declare const BackendSchema: z.ZodEnum<{
23
+ none: "none";
24
+ next: "next";
25
+ hono: "hono";
26
+ express: "express";
27
+ fastify: "fastify";
28
+ elysia: "elysia";
29
+ convex: "convex";
30
+ }>;
31
+ type Backend = z.infer<typeof BackendSchema>;
32
+ declare const RuntimeSchema: z.ZodEnum<{
33
+ none: "none";
34
+ bun: "bun";
35
+ node: "node";
36
+ workers: "workers";
37
+ }>;
38
+ type Runtime = z.infer<typeof RuntimeSchema>;
39
+ declare const FrontendSchema: z.ZodEnum<{
40
+ none: "none";
41
+ "tanstack-router": "tanstack-router";
42
+ "react-router": "react-router";
43
+ "tanstack-start": "tanstack-start";
44
+ next: "next";
45
+ nuxt: "nuxt";
46
+ "native-nativewind": "native-nativewind";
47
+ "native-unistyles": "native-unistyles";
48
+ svelte: "svelte";
49
+ solid: "solid";
50
+ }>;
51
+ type Frontend = z.infer<typeof FrontendSchema>;
52
+ declare const AddonsSchema: z.ZodEnum<{
53
+ none: "none";
54
+ pwa: "pwa";
55
+ tauri: "tauri";
56
+ starlight: "starlight";
57
+ biome: "biome";
58
+ husky: "husky";
59
+ "vibe-rules": "vibe-rules";
60
+ turborepo: "turborepo";
61
+ fumadocs: "fumadocs";
62
+ ultracite: "ultracite";
63
+ oxlint: "oxlint";
64
+ }>;
65
+ type Addons = z.infer<typeof AddonsSchema>;
66
+ declare const ExamplesSchema: z.ZodEnum<{
67
+ none: "none";
68
+ todo: "todo";
69
+ ai: "ai";
70
+ }>;
71
+ type Examples = z.infer<typeof ExamplesSchema>;
72
+ declare const PackageManagerSchema: z.ZodEnum<{
73
+ npm: "npm";
74
+ pnpm: "pnpm";
75
+ bun: "bun";
76
+ }>;
77
+ type PackageManager = z.infer<typeof PackageManagerSchema>;
78
+ declare const DatabaseSetupSchema: z.ZodEnum<{
79
+ none: "none";
80
+ turso: "turso";
81
+ neon: "neon";
82
+ "prisma-postgres": "prisma-postgres";
83
+ "mongodb-atlas": "mongodb-atlas";
84
+ supabase: "supabase";
85
+ d1: "d1";
86
+ docker: "docker";
87
+ }>;
88
+ type DatabaseSetup = z.infer<typeof DatabaseSetupSchema>;
89
+ declare const APISchema: z.ZodEnum<{
90
+ none: "none";
91
+ trpc: "trpc";
92
+ orpc: "orpc";
93
+ }>;
94
+ type API = z.infer<typeof APISchema>;
95
+ declare const WebDeploySchema: z.ZodEnum<{
96
+ none: "none";
97
+ workers: "workers";
98
+ }>;
99
+ type WebDeploy = z.infer<typeof WebDeploySchema>;
100
+ declare const DirectoryConflictSchema: z.ZodEnum<{
101
+ error: "error";
102
+ merge: "merge";
103
+ overwrite: "overwrite";
104
+ increment: "increment";
105
+ }>;
106
+ type DirectoryConflict = z.infer<typeof DirectoryConflictSchema>;
107
+ type CreateInput = {
108
+ projectName?: string;
109
+ yes?: boolean;
110
+ yolo?: boolean;
111
+ verbose?: boolean;
112
+ database?: Database;
113
+ orm?: ORM;
114
+ auth?: boolean;
115
+ frontend?: Frontend[];
116
+ addons?: Addons[];
117
+ examples?: Examples[];
118
+ git?: boolean;
119
+ packageManager?: PackageManager;
120
+ install?: boolean;
121
+ dbSetup?: DatabaseSetup;
122
+ backend?: Backend;
123
+ runtime?: Runtime;
124
+ api?: API;
125
+ webDeploy?: WebDeploy;
126
+ directoryConflict?: DirectoryConflict;
127
+ renderTitle?: boolean;
128
+ };
129
+ type AddInput = {
130
+ addons?: Addons[];
131
+ webDeploy?: WebDeploy;
132
+ projectDir?: string;
133
+ install?: boolean;
134
+ packageManager?: PackageManager;
135
+ };
136
+ interface ProjectConfig {
137
+ projectName: string;
138
+ projectDir: string;
139
+ relativePath: string;
140
+ database: Database;
141
+ orm: ORM;
142
+ backend: Backend;
143
+ runtime: Runtime;
144
+ frontend: Frontend[];
145
+ addons: Addons[];
146
+ examples: Examples[];
147
+ auth: boolean;
148
+ git: boolean;
149
+ packageManager: PackageManager;
150
+ install: boolean;
151
+ dbSetup: DatabaseSetup;
152
+ api: API;
153
+ webDeploy: WebDeploy;
154
+ }
155
+ interface BetterTStackConfig {
156
+ version: string;
157
+ createdAt: string;
158
+ database: Database;
159
+ orm: ORM;
160
+ backend: Backend;
161
+ runtime: Runtime;
162
+ frontend: Frontend[];
163
+ addons: Addons[];
164
+ examples: Examples[];
165
+ auth: boolean;
166
+ packageManager: PackageManager;
167
+ dbSetup: DatabaseSetup;
168
+ api: API;
169
+ webDeploy: WebDeploy;
170
+ }
171
+ interface InitResult {
172
+ success: boolean;
173
+ projectConfig: ProjectConfig;
174
+ reproducibleCommand: string;
175
+ timeScaffolded: string;
176
+ elapsedTimeMs: number;
177
+ projectDirectory: string;
178
+ relativePath: string;
179
+ error?: string;
180
+ }
181
+ //#endregion
182
+ //#region src/index.d.ts
183
+ declare const router: trpcServer.TRPCBuiltRouter<{
184
+ ctx: object;
185
+ meta: object;
186
+ errorShape: trpcServer.TRPCDefaultErrorShape;
187
+ transformer: false;
188
+ }, trpcServer.TRPCDecorateCreateRouterOptions<{
189
+ init: trpcServer.TRPCMutationProcedure<{
190
+ input: [string | undefined, {
191
+ yes?: boolean | undefined;
192
+ yolo?: boolean | undefined;
193
+ verbose?: boolean | undefined;
194
+ database?: "none" | "sqlite" | "postgres" | "mysql" | "mongodb" | undefined;
195
+ orm?: "none" | "drizzle" | "prisma" | "mongoose" | undefined;
196
+ auth?: boolean | undefined;
197
+ frontend?: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-nativewind" | "native-unistyles" | "svelte" | "solid")[] | undefined;
198
+ addons?: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "husky" | "vibe-rules" | "turborepo" | "fumadocs" | "ultracite" | "oxlint")[] | undefined;
199
+ examples?: ("none" | "todo" | "ai")[] | undefined;
200
+ git?: boolean | undefined;
201
+ packageManager?: "npm" | "pnpm" | "bun" | undefined;
202
+ install?: boolean | undefined;
203
+ dbSetup?: "none" | "turso" | "neon" | "prisma-postgres" | "mongodb-atlas" | "supabase" | "d1" | "docker" | undefined;
204
+ backend?: "none" | "next" | "hono" | "express" | "fastify" | "elysia" | "convex" | undefined;
205
+ runtime?: "none" | "bun" | "node" | "workers" | undefined;
206
+ api?: "none" | "trpc" | "orpc" | undefined;
207
+ webDeploy?: "none" | "workers" | undefined;
208
+ directoryConflict?: "error" | "merge" | "overwrite" | "increment" | undefined;
209
+ renderTitle?: boolean | undefined;
210
+ }];
211
+ output: InitResult | undefined;
212
+ meta: object;
213
+ }>;
214
+ add: trpcServer.TRPCMutationProcedure<{
215
+ input: [{
216
+ addons?: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "husky" | "vibe-rules" | "turborepo" | "fumadocs" | "ultracite" | "oxlint")[] | undefined;
217
+ webDeploy?: "none" | "workers" | undefined;
218
+ projectDir?: string | undefined;
219
+ install?: boolean | undefined;
220
+ packageManager?: "npm" | "pnpm" | "bun" | undefined;
221
+ }];
222
+ output: void;
223
+ meta: object;
224
+ }>;
225
+ sponsors: trpcServer.TRPCMutationProcedure<{
226
+ input: void;
227
+ output: void;
228
+ meta: object;
229
+ }>;
230
+ docs: trpcServer.TRPCMutationProcedure<{
231
+ input: void;
232
+ output: void;
233
+ meta: object;
234
+ }>;
235
+ builder: trpcServer.TRPCMutationProcedure<{
236
+ input: void;
237
+ output: void;
238
+ meta: object;
239
+ }>;
240
+ }>>;
241
+ declare function createBtsCli(): trpc_cli0.TrpcCli;
242
+ /**
243
+ * Initialize a new Better-T Stack project
244
+ *
245
+ * @example CLI usage:
246
+ * ```bash
247
+ * npx create-better-t-stack my-app --yes
248
+ * ```
249
+ *
250
+ * @example Programmatic usage (always returns structured data):
251
+ * ```typescript
252
+ * import { init } from "create-better-t-stack";
253
+ *
254
+ * const result = await init("my-app", {
255
+ * yes: true,
256
+ * frontend: ["tanstack-router"],
257
+ * backend: "hono",
258
+ * database: "sqlite",
259
+ * orm: "drizzle",
260
+ * auth: true,
261
+ * addons: ["biome", "turborepo"],
262
+ * packageManager: "bun",
263
+ * install: false,
264
+ * directoryConflict: "increment", // auto-handle conflicts
265
+ * });
266
+ *
267
+ * if (result.success) {
268
+ * console.log(`Project created at: ${result.projectDirectory}`);
269
+ * console.log(`Reproducible command: ${result.reproducibleCommand}`);
270
+ * console.log(`Time taken: ${result.elapsedTimeMs}ms`);
271
+ * }
272
+ * ```
273
+ */
274
+ declare function init(projectName?: string, options?: CreateInput): Promise<InitResult>;
275
+ declare function sponsors(): Promise<void>;
276
+ declare function docs(): Promise<void>;
277
+ declare function builder(): Promise<void>;
278
+ //#endregion
279
+ export { type API, type AddInput, type Addons, type Backend, type BetterTStackConfig, type CreateInput, type Database, type DatabaseSetup, type DirectoryConflict, type Examples, type Frontend, type InitResult, type ORM, type PackageManager, type ProjectConfig, type Runtime, type WebDeploy, builder, createBtsCli, docs, init, router, sponsors };