create-better-t-stack 2.31.0 → 2.32.1
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 +2 -0
- package/dist/cli.js +8 -0
- package/dist/index.d.ts +282 -0
- package/dist/index.js +2 -5374
- package/dist/src-DJffJtr1.js +5536 -0
- package/package.json +15 -7
- package/templates/addons/biome/biome.json.hbs +1 -0
- package/templates/addons/ultracite/biome.json.hbs +1 -0
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
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
|
+
disableAnalytics?: boolean;
|
|
129
|
+
};
|
|
130
|
+
type AddInput = {
|
|
131
|
+
addons?: Addons[];
|
|
132
|
+
webDeploy?: WebDeploy;
|
|
133
|
+
projectDir?: string;
|
|
134
|
+
install?: boolean;
|
|
135
|
+
packageManager?: PackageManager;
|
|
136
|
+
};
|
|
137
|
+
interface ProjectConfig {
|
|
138
|
+
projectName: string;
|
|
139
|
+
projectDir: string;
|
|
140
|
+
relativePath: string;
|
|
141
|
+
database: Database;
|
|
142
|
+
orm: ORM;
|
|
143
|
+
backend: Backend;
|
|
144
|
+
runtime: Runtime;
|
|
145
|
+
frontend: Frontend[];
|
|
146
|
+
addons: Addons[];
|
|
147
|
+
examples: Examples[];
|
|
148
|
+
auth: boolean;
|
|
149
|
+
git: boolean;
|
|
150
|
+
packageManager: PackageManager;
|
|
151
|
+
install: boolean;
|
|
152
|
+
dbSetup: DatabaseSetup;
|
|
153
|
+
api: API;
|
|
154
|
+
webDeploy: WebDeploy;
|
|
155
|
+
}
|
|
156
|
+
interface BetterTStackConfig {
|
|
157
|
+
version: string;
|
|
158
|
+
createdAt: string;
|
|
159
|
+
database: Database;
|
|
160
|
+
orm: ORM;
|
|
161
|
+
backend: Backend;
|
|
162
|
+
runtime: Runtime;
|
|
163
|
+
frontend: Frontend[];
|
|
164
|
+
addons: Addons[];
|
|
165
|
+
examples: Examples[];
|
|
166
|
+
auth: boolean;
|
|
167
|
+
packageManager: PackageManager;
|
|
168
|
+
dbSetup: DatabaseSetup;
|
|
169
|
+
api: API;
|
|
170
|
+
webDeploy: WebDeploy;
|
|
171
|
+
}
|
|
172
|
+
interface InitResult {
|
|
173
|
+
success: boolean;
|
|
174
|
+
projectConfig: ProjectConfig;
|
|
175
|
+
reproducibleCommand: string;
|
|
176
|
+
timeScaffolded: string;
|
|
177
|
+
elapsedTimeMs: number;
|
|
178
|
+
projectDirectory: string;
|
|
179
|
+
relativePath: string;
|
|
180
|
+
error?: string;
|
|
181
|
+
}
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/index.d.ts
|
|
184
|
+
declare const router: trpcServer.TRPCBuiltRouter<{
|
|
185
|
+
ctx: object;
|
|
186
|
+
meta: object;
|
|
187
|
+
errorShape: trpcServer.TRPCDefaultErrorShape;
|
|
188
|
+
transformer: false;
|
|
189
|
+
}, trpcServer.TRPCDecorateCreateRouterOptions<{
|
|
190
|
+
init: trpcServer.TRPCMutationProcedure<{
|
|
191
|
+
input: [string | undefined, {
|
|
192
|
+
yes?: boolean | undefined;
|
|
193
|
+
yolo?: boolean | undefined;
|
|
194
|
+
verbose?: boolean | undefined;
|
|
195
|
+
database?: "none" | "sqlite" | "postgres" | "mysql" | "mongodb" | undefined;
|
|
196
|
+
orm?: "none" | "drizzle" | "prisma" | "mongoose" | undefined;
|
|
197
|
+
auth?: boolean | undefined;
|
|
198
|
+
frontend?: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-nativewind" | "native-unistyles" | "svelte" | "solid")[] | undefined;
|
|
199
|
+
addons?: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "husky" | "vibe-rules" | "turborepo" | "fumadocs" | "ultracite" | "oxlint")[] | undefined;
|
|
200
|
+
examples?: ("none" | "todo" | "ai")[] | undefined;
|
|
201
|
+
git?: boolean | undefined;
|
|
202
|
+
packageManager?: "npm" | "pnpm" | "bun" | undefined;
|
|
203
|
+
install?: boolean | undefined;
|
|
204
|
+
dbSetup?: "none" | "turso" | "neon" | "prisma-postgres" | "mongodb-atlas" | "supabase" | "d1" | "docker" | undefined;
|
|
205
|
+
backend?: "none" | "next" | "hono" | "express" | "fastify" | "elysia" | "convex" | undefined;
|
|
206
|
+
runtime?: "none" | "bun" | "node" | "workers" | undefined;
|
|
207
|
+
api?: "none" | "trpc" | "orpc" | undefined;
|
|
208
|
+
webDeploy?: "none" | "workers" | undefined;
|
|
209
|
+
directoryConflict?: "error" | "merge" | "overwrite" | "increment" | undefined;
|
|
210
|
+
renderTitle?: boolean | undefined;
|
|
211
|
+
disableAnalytics?: boolean | undefined;
|
|
212
|
+
}];
|
|
213
|
+
output: InitResult | undefined;
|
|
214
|
+
meta: object;
|
|
215
|
+
}>;
|
|
216
|
+
add: trpcServer.TRPCMutationProcedure<{
|
|
217
|
+
input: [{
|
|
218
|
+
addons?: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "husky" | "vibe-rules" | "turborepo" | "fumadocs" | "ultracite" | "oxlint")[] | undefined;
|
|
219
|
+
webDeploy?: "none" | "workers" | undefined;
|
|
220
|
+
projectDir?: string | undefined;
|
|
221
|
+
install?: boolean | undefined;
|
|
222
|
+
packageManager?: "npm" | "pnpm" | "bun" | undefined;
|
|
223
|
+
}];
|
|
224
|
+
output: void;
|
|
225
|
+
meta: object;
|
|
226
|
+
}>;
|
|
227
|
+
sponsors: trpcServer.TRPCMutationProcedure<{
|
|
228
|
+
input: void;
|
|
229
|
+
output: void;
|
|
230
|
+
meta: object;
|
|
231
|
+
}>;
|
|
232
|
+
docs: trpcServer.TRPCMutationProcedure<{
|
|
233
|
+
input: void;
|
|
234
|
+
output: void;
|
|
235
|
+
meta: object;
|
|
236
|
+
}>;
|
|
237
|
+
builder: trpcServer.TRPCMutationProcedure<{
|
|
238
|
+
input: void;
|
|
239
|
+
output: void;
|
|
240
|
+
meta: object;
|
|
241
|
+
}>;
|
|
242
|
+
}>>;
|
|
243
|
+
declare function createBtsCli(): trpc_cli0.TrpcCli;
|
|
244
|
+
/**
|
|
245
|
+
* Initialize a new Better-T Stack project
|
|
246
|
+
*
|
|
247
|
+
* @example CLI usage:
|
|
248
|
+
* ```bash
|
|
249
|
+
* npx create-better-t-stack my-app --yes
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
* @example Programmatic usage (always returns structured data):
|
|
253
|
+
* ```typescript
|
|
254
|
+
* import { init } from "create-better-t-stack";
|
|
255
|
+
*
|
|
256
|
+
* const result = await init("my-app", {
|
|
257
|
+
* yes: true,
|
|
258
|
+
* frontend: ["tanstack-router"],
|
|
259
|
+
* backend: "hono",
|
|
260
|
+
* database: "sqlite",
|
|
261
|
+
* orm: "drizzle",
|
|
262
|
+
* auth: true,
|
|
263
|
+
* addons: ["biome", "turborepo"],
|
|
264
|
+
* packageManager: "bun",
|
|
265
|
+
* install: false,
|
|
266
|
+
* directoryConflict: "increment", // auto-handle conflicts
|
|
267
|
+
* disableAnalytics: true, // disable analytics
|
|
268
|
+
* });
|
|
269
|
+
*
|
|
270
|
+
* if (result.success) {
|
|
271
|
+
* console.log(`Project created at: ${result.projectDirectory}`);
|
|
272
|
+
* console.log(`Reproducible command: ${result.reproducibleCommand}`);
|
|
273
|
+
* console.log(`Time taken: ${result.elapsedTimeMs}ms`);
|
|
274
|
+
* }
|
|
275
|
+
* ```
|
|
276
|
+
*/
|
|
277
|
+
declare function init(projectName?: string, options?: CreateInput): Promise<InitResult>;
|
|
278
|
+
declare function sponsors(): Promise<void>;
|
|
279
|
+
declare function docs(): Promise<void>;
|
|
280
|
+
declare function builder(): Promise<void>;
|
|
281
|
+
//#endregion
|
|
282
|
+
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 };
|