create-better-t-stack 3.18.0 → 3.19.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.mjs +1 -1
- package/dist/index.d.mts +64 -1
- package/dist/index.mjs +2 -2
- package/dist/{src-R2RWz37j.mjs → src-_XtvURoM.mjs} +2813 -2151
- package/package.json +4 -3
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -25,6 +25,14 @@ interface CreateProjectResult {
|
|
|
25
25
|
error?: string;
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
|
+
//#region src/helpers/core/add-handler.d.ts
|
|
29
|
+
interface AddResult {
|
|
30
|
+
success: boolean;
|
|
31
|
+
addedAddons: types_d_exports.Addons[];
|
|
32
|
+
projectDir: string;
|
|
33
|
+
error?: string;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
28
36
|
//#region src/utils/errors.d.ts
|
|
29
37
|
declare const UserCancelledError_base: better_result0.TaggedErrorClass<"UserCancelledError", {
|
|
30
38
|
message: string;
|
|
@@ -180,6 +188,7 @@ declare const router: {
|
|
|
180
188
|
oxlint: "oxlint";
|
|
181
189
|
opentui: "opentui";
|
|
182
190
|
wxt: "wxt";
|
|
191
|
+
skills: "skills";
|
|
183
192
|
}>>>;
|
|
184
193
|
examples: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
185
194
|
none: "none";
|
|
@@ -245,6 +254,37 @@ declare const router: {
|
|
|
245
254
|
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>>;
|
|
246
255
|
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>>;
|
|
247
256
|
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>>;
|
|
257
|
+
add: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, z.ZodObject<{
|
|
258
|
+
addons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
259
|
+
none: "none";
|
|
260
|
+
pwa: "pwa";
|
|
261
|
+
tauri: "tauri";
|
|
262
|
+
starlight: "starlight";
|
|
263
|
+
biome: "biome";
|
|
264
|
+
lefthook: "lefthook";
|
|
265
|
+
husky: "husky";
|
|
266
|
+
ruler: "ruler";
|
|
267
|
+
turborepo: "turborepo";
|
|
268
|
+
fumadocs: "fumadocs";
|
|
269
|
+
ultracite: "ultracite";
|
|
270
|
+
oxlint: "oxlint";
|
|
271
|
+
opentui: "opentui";
|
|
272
|
+
wxt: "wxt";
|
|
273
|
+
skills: "skills";
|
|
274
|
+
}>>>;
|
|
275
|
+
install: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
276
|
+
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
277
|
+
bun: "bun";
|
|
278
|
+
npm: "npm";
|
|
279
|
+
pnpm: "pnpm";
|
|
280
|
+
}>>;
|
|
281
|
+
projectDir: z.ZodOptional<z.ZodString>;
|
|
282
|
+
}, z.core.$strip>, _orpc_server0.Schema<void, void>, _orpc_server0.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
283
|
+
history: _orpc_server0.Procedure<_orpc_server0.MergedInitialContext<Record<never, never>, Record<never, never>, Record<never, never>>, Record<never, never>, z.ZodObject<{
|
|
284
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
285
|
+
clear: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
286
|
+
json: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
287
|
+
}, z.core.$strip>, _orpc_server0.Schema<void, void>, _orpc_server0.MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
248
288
|
};
|
|
249
289
|
declare function createBtsCli(): trpc_cli0.TrpcCli;
|
|
250
290
|
/**
|
|
@@ -304,6 +344,29 @@ declare function builder(): Promise<void>;
|
|
|
304
344
|
* ```
|
|
305
345
|
*/
|
|
306
346
|
declare function createVirtual(options: Partial<Omit<types_d_exports.ProjectConfig, "projectDir" | "relativePath">>): Promise<Result$1<VirtualFileTree$1, GeneratorError$1>>;
|
|
347
|
+
/**
|
|
348
|
+
* Programmatic API to add addons to an existing Better-T-Stack project.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```typescript
|
|
352
|
+
* import { add } from "create-better-t-stack";
|
|
353
|
+
*
|
|
354
|
+
* const result = await add({
|
|
355
|
+
* addons: ["biome", "husky"],
|
|
356
|
+
* install: true,
|
|
357
|
+
* });
|
|
358
|
+
*
|
|
359
|
+
* if (result?.success) {
|
|
360
|
+
* console.log(`Added: ${result.addedAddons.join(", ")}`);
|
|
361
|
+
* }
|
|
362
|
+
* ```
|
|
363
|
+
*/
|
|
364
|
+
declare function add(options?: {
|
|
365
|
+
addons?: types_d_exports.Addons[];
|
|
366
|
+
install?: boolean;
|
|
367
|
+
packageManager?: types_d_exports.PackageManager;
|
|
368
|
+
projectDir?: string;
|
|
369
|
+
}): Promise<AddResult | undefined>;
|
|
307
370
|
type API = import__better_t_stack_types.API;
|
|
308
371
|
type Addons = import__better_t_stack_types.Addons;
|
|
309
372
|
type Auth = import__better_t_stack_types.Auth;
|
|
@@ -323,4 +386,4 @@ type Runtime = import__better_t_stack_types.Runtime;
|
|
|
323
386
|
type ServerDeploy = import__better_t_stack_types.ServerDeploy;
|
|
324
387
|
type Template = import__better_t_stack_types.Template;
|
|
325
388
|
type WebDeploy = import__better_t_stack_types.WebDeploy;
|
|
326
|
-
export { type API, type Addons, type Auth, type Backend, type BetterTStackConfig, CLIError, CompatibilityError, CreateError, type CreateInput, type Database, type DatabaseSetup, DatabaseSetupError, type DirectoryConflict, DirectoryConflictError, EMBEDDED_TEMPLATES, type Examples, type Frontend, GeneratorError, type GeneratorOptions, type InitResult, type ORM, type PackageManager, type Payments, ProjectCreationError, Result, type Runtime, type ServerDeploy, TEMPLATE_COUNT, type Template, UserCancelledError, ValidationError, type VirtualDirectory, type VirtualFile, VirtualFileSystem, type VirtualFileTree, type VirtualNode, type WebDeploy, builder, create, createBtsCli, createVirtual, docs, generate, router, sponsors };
|
|
389
|
+
export { type API, type AddResult, type Addons, type Auth, type Backend, type BetterTStackConfig, CLIError, CompatibilityError, CreateError, type CreateInput, type Database, type DatabaseSetup, DatabaseSetupError, type DirectoryConflict, DirectoryConflictError, EMBEDDED_TEMPLATES, type Examples, type Frontend, GeneratorError, type GeneratorOptions, type InitResult, type ORM, type PackageManager, type Payments, ProjectCreationError, Result, type Runtime, type ServerDeploy, TEMPLATE_COUNT, type Template, UserCancelledError, ValidationError, type VirtualDirectory, type VirtualFile, VirtualFileSystem, type VirtualFileTree, type VirtualNode, type WebDeploy, add, builder, create, createBtsCli, createVirtual, docs, generate, router, sponsors };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { _ as
|
|
2
|
+
import { _ as DatabaseSetupError, a as VirtualFileSystem, b as UserCancelledError, c as create, d as docs, f as generate, g as CompatibilityError, h as CLIError, i as TEMPLATE_COUNT, l as createBtsCli, m as sponsors, n as GeneratorError, o as add, p as router, r as Result, s as builder, t as EMBEDDED_TEMPLATES, u as createVirtual, v as DirectoryConflictError, x as ValidationError, y as ProjectCreationError } from "./src-_XtvURoM.mjs";
|
|
3
3
|
|
|
4
|
-
export { CLIError, CompatibilityError, DatabaseSetupError, DirectoryConflictError, EMBEDDED_TEMPLATES, GeneratorError, ProjectCreationError, Result, TEMPLATE_COUNT, UserCancelledError, ValidationError, VirtualFileSystem, builder, create, createBtsCli, createVirtual, docs, generate, router, sponsors };
|
|
4
|
+
export { CLIError, CompatibilityError, DatabaseSetupError, DirectoryConflictError, EMBEDDED_TEMPLATES, GeneratorError, ProjectCreationError, Result, TEMPLATE_COUNT, UserCancelledError, ValidationError, VirtualFileSystem, add, builder, create, createBtsCli, createVirtual, docs, generate, router, sponsors };
|