create-better-t-stack 3.7.3-canary.1bf365d5 → 3.7.3-canary.3bd96a3b

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 @@
1
+ export { };
package/dist/cli.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { n as createBtsCli } from "./src-yXf02Wox.js";
3
+
4
+ //#region src/cli.ts
5
+ createBtsCli().run();
6
+
7
+ //#endregion
8
+ export { };
@@ -0,0 +1,347 @@
1
+ #!/usr/bin/env node
2
+ import * as _orpc_server0 from "@orpc/server";
3
+ import * as trpc_cli0 from "trpc-cli";
4
+ import z from "zod";
5
+ import { API, AddInput, Addons, Backend, BetterTStackConfig, CreateInput, Database, DatabaseSetup, DirectoryConflict, Examples, Frontend, InitResult, ORM, PackageManager, ProjectConfig, Runtime, ServerDeploy, Template, WebDeploy } from "@better-t-stack/types";
6
+
7
+ //#region src/index.d.ts
8
+ declare const router: {
9
+ init: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, z.ZodTuple<[z.ZodOptional<z.ZodString>, z.ZodObject<{
10
+ template: z.ZodOptional<z.ZodEnum<{
11
+ mern: "mern";
12
+ pern: "pern";
13
+ t3: "t3";
14
+ uniwind: "uniwind";
15
+ none: "none";
16
+ }>>;
17
+ yes: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
18
+ yolo: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
+ verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
20
+ database: z.ZodOptional<z.ZodEnum<{
21
+ none: "none";
22
+ sqlite: "sqlite";
23
+ postgres: "postgres";
24
+ mysql: "mysql";
25
+ mongodb: "mongodb";
26
+ }>>;
27
+ orm: z.ZodOptional<z.ZodEnum<{
28
+ none: "none";
29
+ drizzle: "drizzle";
30
+ prisma: "prisma";
31
+ mongoose: "mongoose";
32
+ }>>;
33
+ auth: z.ZodOptional<z.ZodEnum<{
34
+ none: "none";
35
+ "better-auth": "better-auth";
36
+ clerk: "clerk";
37
+ }>>;
38
+ payments: z.ZodOptional<z.ZodEnum<{
39
+ none: "none";
40
+ polar: "polar";
41
+ }>>;
42
+ frontend: z.ZodOptional<z.ZodArray<z.ZodEnum<{
43
+ none: "none";
44
+ "tanstack-router": "tanstack-router";
45
+ "react-router": "react-router";
46
+ "tanstack-start": "tanstack-start";
47
+ next: "next";
48
+ nuxt: "nuxt";
49
+ "native-bare": "native-bare";
50
+ "native-uniwind": "native-uniwind";
51
+ "native-unistyles": "native-unistyles";
52
+ svelte: "svelte";
53
+ solid: "solid";
54
+ }>>>;
55
+ addons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
56
+ none: "none";
57
+ pwa: "pwa";
58
+ tauri: "tauri";
59
+ starlight: "starlight";
60
+ biome: "biome";
61
+ husky: "husky";
62
+ ruler: "ruler";
63
+ turborepo: "turborepo";
64
+ fumadocs: "fumadocs";
65
+ ultracite: "ultracite";
66
+ oxlint: "oxlint";
67
+ }>>>;
68
+ examples: z.ZodOptional<z.ZodArray<z.ZodEnum<{
69
+ none: "none";
70
+ todo: "todo";
71
+ ai: "ai";
72
+ }>>>;
73
+ git: z.ZodOptional<z.ZodBoolean>;
74
+ packageManager: z.ZodOptional<z.ZodEnum<{
75
+ npm: "npm";
76
+ pnpm: "pnpm";
77
+ bun: "bun";
78
+ }>>;
79
+ install: z.ZodOptional<z.ZodBoolean>;
80
+ dbSetup: z.ZodOptional<z.ZodEnum<{
81
+ none: "none";
82
+ turso: "turso";
83
+ neon: "neon";
84
+ "prisma-postgres": "prisma-postgres";
85
+ planetscale: "planetscale";
86
+ "mongodb-atlas": "mongodb-atlas";
87
+ supabase: "supabase";
88
+ d1: "d1";
89
+ docker: "docker";
90
+ }>>;
91
+ backend: z.ZodOptional<z.ZodEnum<{
92
+ none: "none";
93
+ hono: "hono";
94
+ express: "express";
95
+ fastify: "fastify";
96
+ elysia: "elysia";
97
+ convex: "convex";
98
+ self: "self";
99
+ }>>;
100
+ runtime: z.ZodOptional<z.ZodEnum<{
101
+ none: "none";
102
+ bun: "bun";
103
+ node: "node";
104
+ workers: "workers";
105
+ }>>;
106
+ api: z.ZodOptional<z.ZodEnum<{
107
+ none: "none";
108
+ trpc: "trpc";
109
+ orpc: "orpc";
110
+ }>>;
111
+ webDeploy: z.ZodOptional<z.ZodEnum<{
112
+ none: "none";
113
+ alchemy: "alchemy";
114
+ }>>;
115
+ serverDeploy: z.ZodOptional<z.ZodEnum<{
116
+ none: "none";
117
+ alchemy: "alchemy";
118
+ }>>;
119
+ directoryConflict: z.ZodOptional<z.ZodEnum<{
120
+ error: "error";
121
+ merge: "merge";
122
+ overwrite: "overwrite";
123
+ increment: "increment";
124
+ }>>;
125
+ renderTitle: z.ZodOptional<z.ZodBoolean>;
126
+ disableAnalytics: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
127
+ manualDb: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
128
+ }, z.core.$strip>], null>, _orpc_server0.Schema<{
129
+ success: boolean;
130
+ projectConfig: {
131
+ projectName: string;
132
+ projectDir: string;
133
+ relativePath: string;
134
+ database: "none";
135
+ orm: "none";
136
+ backend: "none";
137
+ runtime: "none";
138
+ frontend: never[];
139
+ addons: never[];
140
+ examples: never[];
141
+ auth: "none";
142
+ payments: "none";
143
+ git: false;
144
+ packageManager: "npm";
145
+ install: false;
146
+ dbSetup: "none";
147
+ api: "none";
148
+ webDeploy: "none";
149
+ serverDeploy: "none";
150
+ };
151
+ reproducibleCommand: string;
152
+ timeScaffolded: string;
153
+ elapsedTimeMs: number;
154
+ projectDirectory: string;
155
+ relativePath: string;
156
+ error: string;
157
+ } | {
158
+ success: boolean;
159
+ projectConfig: {
160
+ projectName: string;
161
+ projectDir: string;
162
+ relativePath: string;
163
+ database: "none" | "sqlite" | "postgres" | "mysql" | "mongodb";
164
+ orm: "none" | "drizzle" | "prisma" | "mongoose";
165
+ backend: "none" | "hono" | "express" | "fastify" | "elysia" | "convex" | "self";
166
+ runtime: "none" | "bun" | "node" | "workers";
167
+ frontend: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-bare" | "native-uniwind" | "native-unistyles" | "svelte" | "solid")[];
168
+ addons: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "husky" | "ruler" | "turborepo" | "fumadocs" | "ultracite" | "oxlint")[];
169
+ examples: ("none" | "todo" | "ai")[];
170
+ auth: "none" | "better-auth" | "clerk";
171
+ payments: "none" | "polar";
172
+ git: boolean;
173
+ packageManager: "npm" | "pnpm" | "bun";
174
+ install: boolean;
175
+ dbSetup: "none" | "turso" | "neon" | "prisma-postgres" | "planetscale" | "mongodb-atlas" | "supabase" | "d1" | "docker";
176
+ api: "none" | "trpc" | "orpc";
177
+ webDeploy: "none" | "alchemy";
178
+ serverDeploy: "none" | "alchemy";
179
+ };
180
+ reproducibleCommand: string;
181
+ timeScaffolded: string;
182
+ elapsedTimeMs: number;
183
+ projectDirectory: string;
184
+ relativePath: string;
185
+ error?: undefined;
186
+ } | undefined, {
187
+ success: boolean;
188
+ projectConfig: {
189
+ projectName: string;
190
+ projectDir: string;
191
+ relativePath: string;
192
+ database: "none";
193
+ orm: "none";
194
+ backend: "none";
195
+ runtime: "none";
196
+ frontend: never[];
197
+ addons: never[];
198
+ examples: never[];
199
+ auth: "none";
200
+ payments: "none";
201
+ git: false;
202
+ packageManager: "npm";
203
+ install: false;
204
+ dbSetup: "none";
205
+ api: "none";
206
+ webDeploy: "none";
207
+ serverDeploy: "none";
208
+ };
209
+ reproducibleCommand: string;
210
+ timeScaffolded: string;
211
+ elapsedTimeMs: number;
212
+ projectDirectory: string;
213
+ relativePath: string;
214
+ error: string;
215
+ } | {
216
+ success: boolean;
217
+ projectConfig: {
218
+ projectName: string;
219
+ projectDir: string;
220
+ relativePath: string;
221
+ database: "none" | "sqlite" | "postgres" | "mysql" | "mongodb";
222
+ orm: "none" | "drizzle" | "prisma" | "mongoose";
223
+ backend: "none" | "hono" | "express" | "fastify" | "elysia" | "convex" | "self";
224
+ runtime: "none" | "bun" | "node" | "workers";
225
+ frontend: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-bare" | "native-uniwind" | "native-unistyles" | "svelte" | "solid")[];
226
+ addons: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "husky" | "ruler" | "turborepo" | "fumadocs" | "ultracite" | "oxlint")[];
227
+ examples: ("none" | "todo" | "ai")[];
228
+ auth: "none" | "better-auth" | "clerk";
229
+ payments: "none" | "polar";
230
+ git: boolean;
231
+ packageManager: "npm" | "pnpm" | "bun";
232
+ install: boolean;
233
+ dbSetup: "none" | "turso" | "neon" | "prisma-postgres" | "planetscale" | "mongodb-atlas" | "supabase" | "d1" | "docker";
234
+ api: "none" | "trpc" | "orpc";
235
+ webDeploy: "none" | "alchemy";
236
+ serverDeploy: "none" | "alchemy";
237
+ };
238
+ reproducibleCommand: string;
239
+ timeScaffolded: string;
240
+ elapsedTimeMs: number;
241
+ projectDirectory: string;
242
+ relativePath: string;
243
+ error?: undefined;
244
+ } | undefined>, _orpc_server0.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
245
+ add: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, z.ZodTuple<[z.ZodObject<{
246
+ addons: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<{
247
+ none: "none";
248
+ pwa: "pwa";
249
+ tauri: "tauri";
250
+ starlight: "starlight";
251
+ biome: "biome";
252
+ husky: "husky";
253
+ ruler: "ruler";
254
+ turborepo: "turborepo";
255
+ fumadocs: "fumadocs";
256
+ ultracite: "ultracite";
257
+ oxlint: "oxlint";
258
+ }>>>>;
259
+ webDeploy: z.ZodOptional<z.ZodEnum<{
260
+ none: "none";
261
+ alchemy: "alchemy";
262
+ }>>;
263
+ serverDeploy: z.ZodOptional<z.ZodEnum<{
264
+ none: "none";
265
+ alchemy: "alchemy";
266
+ }>>;
267
+ projectDir: z.ZodOptional<z.ZodString>;
268
+ install: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
269
+ packageManager: z.ZodOptional<z.ZodEnum<{
270
+ npm: "npm";
271
+ pnpm: "pnpm";
272
+ bun: "bun";
273
+ }>>;
274
+ }, z.core.$strip>], null>, _orpc_server0.Schema<void, void>, _orpc_server0.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
275
+ sponsors: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, _orpc_server0.Schema<unknown, unknown>, _orpc_server0.Schema<void, void>, _orpc_server0.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
276
+ docs: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, _orpc_server0.Schema<unknown, unknown>, _orpc_server0.Schema<void, void>, _orpc_server0.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
277
+ builder: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, _orpc_server0.Schema<unknown, unknown>, _orpc_server0.Schema<void, void>, _orpc_server0.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
278
+ };
279
+ declare function createBtsCli(): trpc_cli0.TrpcCli;
280
+ /**
281
+ * Initialize a new Better-T-Stack project
282
+ *
283
+ * @example CLI usage:
284
+ * ```bash
285
+ * npx create-better-t-stack my-app --yes
286
+ * ```
287
+ *
288
+ * @example Programmatic usage (always returns structured data):
289
+ * ```typescript
290
+ * import { init } from "create-better-t-stack";
291
+ *
292
+ * const result = await init("my-app", {
293
+ * yes: true,
294
+ * frontend: ["tanstack-router"],
295
+ * backend: "hono",
296
+ * database: "sqlite",
297
+ * orm: "drizzle",
298
+ * auth: "better-auth",
299
+ * addons: ["biome", "turborepo"],
300
+ * packageManager: "bun",
301
+ * install: false,
302
+ * directoryConflict: "increment", // auto-handle conflicts
303
+ * disableAnalytics: true, // disable analytics
304
+ * });
305
+ *
306
+ * if (result.success) {
307
+ * console.log(`Project created at: ${result.projectDirectory}`);
308
+ * console.log(`Reproducible command: ${result.reproducibleCommand}`);
309
+ * console.log(`Time taken: ${result.elapsedTimeMs}ms`);
310
+ * }
311
+ * ```
312
+ */
313
+ declare function init(projectName?: string, options?: CreateInput): Promise<{
314
+ success: boolean;
315
+ projectConfig: {
316
+ projectName: string;
317
+ projectDir: string;
318
+ relativePath: string;
319
+ database: "none" | "sqlite" | "postgres" | "mysql" | "mongodb";
320
+ orm: "none" | "drizzle" | "prisma" | "mongoose";
321
+ backend: "none" | "hono" | "express" | "fastify" | "elysia" | "convex" | "self";
322
+ runtime: "none" | "bun" | "node" | "workers";
323
+ frontend: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-bare" | "native-uniwind" | "native-unistyles" | "svelte" | "solid")[];
324
+ addons: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "husky" | "ruler" | "turborepo" | "fumadocs" | "ultracite" | "oxlint")[];
325
+ examples: ("none" | "todo" | "ai")[];
326
+ auth: "none" | "better-auth" | "clerk";
327
+ payments: "none" | "polar";
328
+ git: boolean;
329
+ packageManager: "npm" | "pnpm" | "bun";
330
+ install: boolean;
331
+ dbSetup: "none" | "turso" | "neon" | "prisma-postgres" | "planetscale" | "mongodb-atlas" | "supabase" | "d1" | "docker";
332
+ api: "none" | "trpc" | "orpc";
333
+ webDeploy: "none" | "alchemy";
334
+ serverDeploy: "none" | "alchemy";
335
+ };
336
+ reproducibleCommand: string;
337
+ timeScaffolded: string;
338
+ elapsedTimeMs: number;
339
+ projectDirectory: string;
340
+ relativePath: string;
341
+ error?: string | undefined;
342
+ }>;
343
+ declare function sponsors(): Promise<void>;
344
+ declare function docs(): Promise<void>;
345
+ declare function builder(): Promise<void>;
346
+ //#endregion
347
+ 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 ServerDeploy, type Template, type WebDeploy, builder, createBtsCli, docs, init, router, sponsors };
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-yXf02Wox.js";
3
+
4
+ export { builder, createBtsCli, docs, init, router, sponsors };