@better-t-stack/types 3.7.3-canary.3bd96a3b → 3.7.3-canary.7ab22822

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas-D8-YlD7-.d.mts","names":[],"sources":["../src/schemas.ts"],"sourcesContent":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import { A as ProjectConfigSchema, C as InitResultSchema, D as PAYMENTS_VALUES, E as PACKAGE_MANAGER_VALUES, F as ServerDeploySchema, I as TEMPLATE_VALUES, L as TemplateSchema, M as RUNTIME_VALUES, N as RuntimeSchema, O as PackageManagerSchema, P as SERVER_DEPLOY_VALUES, R as WEB_DEPLOY_VALUES, S as FrontendSchema, T as ORM_VALUES, _ as DatabaseSetupSchema, a as AddInputSchema, b as ExamplesSchema, c as BACKEND_VALUES, d as CLIInputSchema, f as CreateInputSchema, g as DatabaseSchema, h as DIRECTORY_CONFLICT_VALUES, i as AUTH_VALUES, j as ProjectNameSchema, k as PaymentsSchema, l as BackendSchema, m as DATABASE_VALUES, n as APISchema, o as AddonsSchema, p as DATABASE_SETUP_VALUES, r as API_VALUES, s as AuthSchema, t as ADDONS_VALUES, u as BetterTStackConfigSchema, v as DirectoryConflictSchema, w as ORMSchema, x as FRONTEND_VALUES, y as EXAMPLES_VALUES, z as WebDeploySchema } from "./schemas-D8-YlD7-.mjs";
2
+ export { ADDONS_VALUES, APISchema, API_VALUES, AUTH_VALUES, AddInputSchema, AddonsSchema, AuthSchema, BACKEND_VALUES, BackendSchema, BetterTStackConfigSchema, CLIInputSchema, CreateInputSchema, DATABASE_SETUP_VALUES, DATABASE_VALUES, DIRECTORY_CONFLICT_VALUES, DatabaseSchema, DatabaseSetupSchema, DirectoryConflictSchema, EXAMPLES_VALUES, ExamplesSchema, FRONTEND_VALUES, FrontendSchema, InitResultSchema, ORMSchema, ORM_VALUES, PACKAGE_MANAGER_VALUES, PAYMENTS_VALUES, PackageManagerSchema, PaymentsSchema, ProjectConfigSchema, ProjectNameSchema, RUNTIME_VALUES, RuntimeSchema, SERVER_DEPLOY_VALUES, ServerDeploySchema, TEMPLATE_VALUES, TemplateSchema, WEB_DEPLOY_VALUES, WebDeploySchema };
@@ -0,0 +1,3 @@
1
+ import { A as ProjectConfigSchema, C as InitResultSchema, D as PAYMENTS_VALUES, E as PACKAGE_MANAGER_VALUES, F as ServerDeploySchema, I as TEMPLATE_VALUES, L as TemplateSchema, M as RUNTIME_VALUES, N as RuntimeSchema, O as PackageManagerSchema, P as SERVER_DEPLOY_VALUES, R as WEB_DEPLOY_VALUES, S as FrontendSchema, T as ORM_VALUES, _ as DatabaseSetupSchema, a as AddInputSchema, b as ExamplesSchema, c as BACKEND_VALUES, d as CLIInputSchema, f as CreateInputSchema, g as DatabaseSchema, h as DIRECTORY_CONFLICT_VALUES, i as AUTH_VALUES, j as ProjectNameSchema, k as PaymentsSchema, l as BackendSchema, m as DATABASE_VALUES, n as APISchema, o as AddonsSchema, p as DATABASE_SETUP_VALUES, r as API_VALUES, s as AuthSchema, t as ADDONS_VALUES, u as BetterTStackConfigSchema, v as DirectoryConflictSchema, w as ORMSchema, x as FRONTEND_VALUES, y as EXAMPLES_VALUES, z as WebDeploySchema } from "./schemas-CH5VdN4I.mjs";
2
+
3
+ export { ADDONS_VALUES, APISchema, API_VALUES, AUTH_VALUES, AddInputSchema, AddonsSchema, AuthSchema, BACKEND_VALUES, BackendSchema, BetterTStackConfigSchema, CLIInputSchema, CreateInputSchema, DATABASE_SETUP_VALUES, DATABASE_VALUES, DIRECTORY_CONFLICT_VALUES, DatabaseSchema, DatabaseSetupSchema, DirectoryConflictSchema, EXAMPLES_VALUES, ExamplesSchema, FRONTEND_VALUES, FrontendSchema, InitResultSchema, ORMSchema, ORM_VALUES, PACKAGE_MANAGER_VALUES, PAYMENTS_VALUES, PackageManagerSchema, PaymentsSchema, ProjectConfigSchema, ProjectNameSchema, RUNTIME_VALUES, RuntimeSchema, SERVER_DEPLOY_VALUES, ServerDeploySchema, TEMPLATE_VALUES, TemplateSchema, WEB_DEPLOY_VALUES, WebDeploySchema };
package/package.json CHANGED
@@ -1,26 +1,30 @@
1
1
  {
2
2
  "name": "@better-t-stack/types",
3
- "version": "3.7.3-canary.3bd96a3b",
3
+ "version": "3.7.3-canary.7ab22822",
4
4
  "description": "TypeScript types and schemas for create-better-t-stack CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Aman Varshney",
8
+ "scripts": {
9
+ "build": "tsdown",
10
+ "prepublishOnly": "bun run build"
11
+ },
8
12
  "exports": {
9
13
  ".": {
10
- "types": "./src/index.ts",
11
- "default": "./src/index.ts"
14
+ "types": "./dist/index.d.mts",
15
+ "default": "./dist/index.mjs"
12
16
  },
13
17
  "./schemas": {
14
- "types": "./src/schemas.ts",
15
- "default": "./src/schemas.ts"
18
+ "types": "./dist/schemas.d.mts",
19
+ "default": "./dist/schemas.mjs"
16
20
  },
17
21
  "./json-schema": {
18
- "types": "./src/json-schema.ts",
19
- "default": "./src/json-schema.ts"
22
+ "types": "./dist/json-schema.d.mts",
23
+ "default": "./dist/json-schema.mjs"
20
24
  }
21
25
  },
22
26
  "files": [
23
- "src"
27
+ "dist"
24
28
  ],
25
29
  "keywords": [
26
30
  "better-t-stack",
@@ -42,6 +46,7 @@
42
46
  "zod": "^4.1.13"
43
47
  },
44
48
  "devDependencies": {
45
- "typescript": "^5.8.2"
49
+ "tsdown": "^0.17.2",
50
+ "typescript": "^5.9.3"
46
51
  }
47
52
  }
package/src/index.ts DELETED
@@ -1,73 +0,0 @@
1
- // Re-export all schemas
2
- export {
3
- DatabaseSchema,
4
- ORMSchema,
5
- BackendSchema,
6
- RuntimeSchema,
7
- FrontendSchema,
8
- AddonsSchema,
9
- ExamplesSchema,
10
- PackageManagerSchema,
11
- DatabaseSetupSchema,
12
- APISchema,
13
- AuthSchema,
14
- PaymentsSchema,
15
- WebDeploySchema,
16
- ServerDeploySchema,
17
- DirectoryConflictSchema,
18
- TemplateSchema,
19
- ProjectNameSchema,
20
- CreateInputSchema,
21
- AddInputSchema,
22
- CLIInputSchema,
23
- ProjectConfigSchema,
24
- BetterTStackConfigSchema,
25
- InitResultSchema,
26
- // Enum value arrays
27
- DATABASE_VALUES,
28
- ORM_VALUES,
29
- BACKEND_VALUES,
30
- RUNTIME_VALUES,
31
- FRONTEND_VALUES,
32
- ADDONS_VALUES,
33
- EXAMPLES_VALUES,
34
- PACKAGE_MANAGER_VALUES,
35
- DATABASE_SETUP_VALUES,
36
- API_VALUES,
37
- AUTH_VALUES,
38
- PAYMENTS_VALUES,
39
- WEB_DEPLOY_VALUES,
40
- SERVER_DEPLOY_VALUES,
41
- DIRECTORY_CONFLICT_VALUES,
42
- TEMPLATE_VALUES,
43
- } from "./schemas";
44
-
45
- // Re-export all types
46
- export type {
47
- Database,
48
- ORM,
49
- Backend,
50
- Runtime,
51
- Frontend,
52
- Addons,
53
- Examples,
54
- PackageManager,
55
- DatabaseSetup,
56
- API,
57
- Auth,
58
- Payments,
59
- WebDeploy,
60
- ServerDeploy,
61
- DirectoryConflict,
62
- Template,
63
- ProjectName,
64
- CreateInput,
65
- AddInput,
66
- CLIInput,
67
- ProjectConfig,
68
- BetterTStackConfig,
69
- InitResult,
70
- WebFrontend,
71
- NativeFrontend,
72
- TechCategory,
73
- } from "./types";
@@ -1,130 +0,0 @@
1
- import { z } from "zod";
2
- import {
3
- DatabaseSchema,
4
- ORMSchema,
5
- BackendSchema,
6
- RuntimeSchema,
7
- FrontendSchema,
8
- AddonsSchema,
9
- ExamplesSchema,
10
- PackageManagerSchema,
11
- DatabaseSetupSchema,
12
- APISchema,
13
- AuthSchema,
14
- PaymentsSchema,
15
- WebDeploySchema,
16
- ServerDeploySchema,
17
- DirectoryConflictSchema,
18
- TemplateSchema,
19
- CreateInputSchema,
20
- ProjectConfigSchema,
21
- BetterTStackConfigSchema,
22
- InitResultSchema,
23
- } from "./schemas";
24
-
25
- // Generate JSON schemas for each type
26
- export function getDatabaseJsonSchema() {
27
- return z.toJSONSchema(DatabaseSchema);
28
- }
29
-
30
- export function getORMJsonSchema() {
31
- return z.toJSONSchema(ORMSchema);
32
- }
33
-
34
- export function getBackendJsonSchema() {
35
- return z.toJSONSchema(BackendSchema);
36
- }
37
-
38
- export function getRuntimeJsonSchema() {
39
- return z.toJSONSchema(RuntimeSchema);
40
- }
41
-
42
- export function getFrontendJsonSchema() {
43
- return z.toJSONSchema(FrontendSchema);
44
- }
45
-
46
- export function getAddonsJsonSchema() {
47
- return z.toJSONSchema(AddonsSchema);
48
- }
49
-
50
- export function getExamplesJsonSchema() {
51
- return z.toJSONSchema(ExamplesSchema);
52
- }
53
-
54
- export function getPackageManagerJsonSchema() {
55
- return z.toJSONSchema(PackageManagerSchema);
56
- }
57
-
58
- export function getDatabaseSetupJsonSchema() {
59
- return z.toJSONSchema(DatabaseSetupSchema);
60
- }
61
-
62
- export function getAPIJsonSchema() {
63
- return z.toJSONSchema(APISchema);
64
- }
65
-
66
- export function getAuthJsonSchema() {
67
- return z.toJSONSchema(AuthSchema);
68
- }
69
-
70
- export function getPaymentsJsonSchema() {
71
- return z.toJSONSchema(PaymentsSchema);
72
- }
73
-
74
- export function getWebDeployJsonSchema() {
75
- return z.toJSONSchema(WebDeploySchema);
76
- }
77
-
78
- export function getServerDeployJsonSchema() {
79
- return z.toJSONSchema(ServerDeploySchema);
80
- }
81
-
82
- export function getDirectoryConflictJsonSchema() {
83
- return z.toJSONSchema(DirectoryConflictSchema);
84
- }
85
-
86
- export function getTemplateJsonSchema() {
87
- return z.toJSONSchema(TemplateSchema);
88
- }
89
-
90
- export function getCreateInputJsonSchema() {
91
- return z.toJSONSchema(CreateInputSchema);
92
- }
93
-
94
- export function getProjectConfigJsonSchema() {
95
- return z.toJSONSchema(ProjectConfigSchema);
96
- }
97
-
98
- export function getBetterTStackConfigJsonSchema() {
99
- return z.toJSONSchema(BetterTStackConfigSchema);
100
- }
101
-
102
- export function getInitResultJsonSchema() {
103
- return z.toJSONSchema(InitResultSchema);
104
- }
105
-
106
- // Get all JSON schemas as a single object
107
- export function getAllJsonSchemas() {
108
- return {
109
- database: getDatabaseJsonSchema(),
110
- orm: getORMJsonSchema(),
111
- backend: getBackendJsonSchema(),
112
- runtime: getRuntimeJsonSchema(),
113
- frontend: getFrontendJsonSchema(),
114
- addons: getAddonsJsonSchema(),
115
- examples: getExamplesJsonSchema(),
116
- packageManager: getPackageManagerJsonSchema(),
117
- databaseSetup: getDatabaseSetupJsonSchema(),
118
- api: getAPIJsonSchema(),
119
- auth: getAuthJsonSchema(),
120
- payments: getPaymentsJsonSchema(),
121
- webDeploy: getWebDeployJsonSchema(),
122
- serverDeploy: getServerDeployJsonSchema(),
123
- directoryConflict: getDirectoryConflictJsonSchema(),
124
- template: getTemplateJsonSchema(),
125
- createInput: getCreateInputJsonSchema(),
126
- projectConfig: getProjectConfigJsonSchema(),
127
- betterTStackConfig: getBetterTStackConfigJsonSchema(),
128
- initResult: getInitResultJsonSchema(),
129
- };
130
- }
package/src/schemas.ts DELETED
@@ -1,216 +0,0 @@
1
- import { z } from "zod";
2
-
3
- // Base enum schemas
4
- export const DatabaseSchema = z
5
- .enum(["none", "sqlite", "postgres", "mysql", "mongodb"])
6
- .describe("Database type");
7
-
8
- export const ORMSchema = z.enum(["drizzle", "prisma", "mongoose", "none"]).describe("ORM type");
9
-
10
- export const BackendSchema = z
11
- .enum(["hono", "express", "fastify", "elysia", "convex", "self", "none"])
12
- .describe("Backend framework");
13
-
14
- export const RuntimeSchema = z
15
- .enum(["bun", "node", "workers", "none"])
16
- .describe("Runtime environment");
17
-
18
- export const FrontendSchema = z
19
- .enum([
20
- "tanstack-router",
21
- "react-router",
22
- "tanstack-start",
23
- "next",
24
- "nuxt",
25
- "native-bare",
26
- "native-uniwind",
27
- "native-unistyles",
28
- "svelte",
29
- "solid",
30
- "none",
31
- ])
32
- .describe("Frontend framework");
33
-
34
- export const AddonsSchema = z
35
- .enum([
36
- "pwa",
37
- "tauri",
38
- "starlight",
39
- "biome",
40
- "husky",
41
- "ruler",
42
- "turborepo",
43
- "fumadocs",
44
- "ultracite",
45
- "oxlint",
46
- "none",
47
- ])
48
- .describe("Additional addons");
49
-
50
- export const ExamplesSchema = z
51
- .enum(["todo", "ai", "none"])
52
- .describe("Example templates to include");
53
-
54
- export const PackageManagerSchema = z.enum(["npm", "pnpm", "bun"]).describe("Package manager");
55
-
56
- export const DatabaseSetupSchema = z
57
- .enum([
58
- "turso",
59
- "neon",
60
- "prisma-postgres",
61
- "planetscale",
62
- "mongodb-atlas",
63
- "supabase",
64
- "d1",
65
- "docker",
66
- "none",
67
- ])
68
- .describe("Database hosting setup");
69
-
70
- export const APISchema = z.enum(["trpc", "orpc", "none"]).describe("API type");
71
-
72
- export const AuthSchema = z
73
- .enum(["better-auth", "clerk", "none"])
74
- .describe("Authentication provider");
75
-
76
- export const PaymentsSchema = z.enum(["polar", "none"]).describe("Payments provider");
77
-
78
- export const WebDeploySchema = z.enum(["alchemy", "none"]).describe("Web deployment");
79
-
80
- export const ServerDeploySchema = z.enum(["alchemy", "none"]).describe("Server deployment");
81
-
82
- export const DirectoryConflictSchema = z
83
- .enum(["merge", "overwrite", "increment", "error"])
84
- .describe("How to handle existing directory conflicts");
85
-
86
- export const TemplateSchema = z
87
- .enum(["mern", "pern", "t3", "uniwind", "none"])
88
- .describe("Predefined project template");
89
-
90
- export const ProjectNameSchema = z
91
- .string()
92
- .min(1, "Project name cannot be empty")
93
- .max(255, "Project name must be less than 255 characters")
94
- .refine(
95
- (name) => name === "." || !name.startsWith("."),
96
- "Project name cannot start with a dot (except for '.')",
97
- )
98
- .refine((name) => name === "." || !name.startsWith("-"), "Project name cannot start with a dash")
99
- .refine((name) => {
100
- const invalidChars = ["<", ">", ":", '"', "|", "?", "*"];
101
- return !invalidChars.some((char) => name.includes(char));
102
- }, "Project name contains invalid characters")
103
- .refine((name) => name.toLowerCase() !== "node_modules", "Project name is reserved")
104
- .describe("Project name or path");
105
-
106
- // Composite schemas
107
- export const CreateInputSchema = z.object({
108
- projectName: z.string().optional(),
109
- template: TemplateSchema.optional(),
110
- yes: z.boolean().optional(),
111
- yolo: z.boolean().optional(),
112
- verbose: z.boolean().optional(),
113
- database: DatabaseSchema.optional(),
114
- orm: ORMSchema.optional(),
115
- auth: AuthSchema.optional(),
116
- payments: PaymentsSchema.optional(),
117
- frontend: z.array(FrontendSchema).optional(),
118
- addons: z.array(AddonsSchema).optional(),
119
- examples: z.array(ExamplesSchema).optional(),
120
- git: z.boolean().optional(),
121
- packageManager: PackageManagerSchema.optional(),
122
- install: z.boolean().optional(),
123
- dbSetup: DatabaseSetupSchema.optional(),
124
- backend: BackendSchema.optional(),
125
- runtime: RuntimeSchema.optional(),
126
- api: APISchema.optional(),
127
- webDeploy: WebDeploySchema.optional(),
128
- serverDeploy: ServerDeploySchema.optional(),
129
- directoryConflict: DirectoryConflictSchema.optional(),
130
- renderTitle: z.boolean().optional(),
131
- disableAnalytics: z.boolean().optional(),
132
- manualDb: z.boolean().optional(),
133
- });
134
-
135
- export const AddInputSchema = z.object({
136
- addons: z.array(AddonsSchema).optional(),
137
- webDeploy: WebDeploySchema.optional(),
138
- serverDeploy: ServerDeploySchema.optional(),
139
- projectDir: z.string().optional(),
140
- install: z.boolean().optional(),
141
- packageManager: PackageManagerSchema.optional(),
142
- });
143
-
144
- export const CLIInputSchema = CreateInputSchema.extend({
145
- projectDirectory: z.string().optional(),
146
- });
147
-
148
- export const ProjectConfigSchema = z.object({
149
- projectName: z.string(),
150
- projectDir: z.string(),
151
- relativePath: z.string(),
152
- database: DatabaseSchema,
153
- orm: ORMSchema,
154
- backend: BackendSchema,
155
- runtime: RuntimeSchema,
156
- frontend: z.array(FrontendSchema),
157
- addons: z.array(AddonsSchema),
158
- examples: z.array(ExamplesSchema),
159
- auth: AuthSchema,
160
- payments: PaymentsSchema,
161
- git: z.boolean(),
162
- packageManager: PackageManagerSchema,
163
- install: z.boolean(),
164
- dbSetup: DatabaseSetupSchema,
165
- api: APISchema,
166
- webDeploy: WebDeploySchema,
167
- serverDeploy: ServerDeploySchema,
168
- });
169
-
170
- export const BetterTStackConfigSchema = z.object({
171
- version: z.string(),
172
- createdAt: z.string(),
173
- database: DatabaseSchema,
174
- orm: ORMSchema,
175
- backend: BackendSchema,
176
- runtime: RuntimeSchema,
177
- frontend: z.array(FrontendSchema),
178
- addons: z.array(AddonsSchema),
179
- examples: z.array(ExamplesSchema),
180
- auth: AuthSchema,
181
- payments: PaymentsSchema,
182
- packageManager: PackageManagerSchema,
183
- dbSetup: DatabaseSetupSchema,
184
- api: APISchema,
185
- webDeploy: WebDeploySchema,
186
- serverDeploy: ServerDeploySchema,
187
- });
188
-
189
- export const InitResultSchema = z.object({
190
- success: z.boolean(),
191
- projectConfig: ProjectConfigSchema,
192
- reproducibleCommand: z.string(),
193
- timeScaffolded: z.string(),
194
- elapsedTimeMs: z.number(),
195
- projectDirectory: z.string(),
196
- relativePath: z.string(),
197
- error: z.string().optional(),
198
- });
199
-
200
- // Extract enum values as arrays for runtime use
201
- export const DATABASE_VALUES = DatabaseSchema.options;
202
- export const ORM_VALUES = ORMSchema.options;
203
- export const BACKEND_VALUES = BackendSchema.options;
204
- export const RUNTIME_VALUES = RuntimeSchema.options;
205
- export const FRONTEND_VALUES = FrontendSchema.options;
206
- export const ADDONS_VALUES = AddonsSchema.options;
207
- export const EXAMPLES_VALUES = ExamplesSchema.options;
208
- export const PACKAGE_MANAGER_VALUES = PackageManagerSchema.options;
209
- export const DATABASE_SETUP_VALUES = DatabaseSetupSchema.options;
210
- export const API_VALUES = APISchema.options;
211
- export const AUTH_VALUES = AuthSchema.options;
212
- export const PAYMENTS_VALUES = PaymentsSchema.options;
213
- export const WEB_DEPLOY_VALUES = WebDeploySchema.options;
214
- export const SERVER_DEPLOY_VALUES = ServerDeploySchema.options;
215
- export const DIRECTORY_CONFLICT_VALUES = DirectoryConflictSchema.options;
216
- export const TEMPLATE_VALUES = TemplateSchema.options;
package/src/types.ts DELETED
@@ -1,90 +0,0 @@
1
- import type { z } from "zod";
2
- import type {
3
- DatabaseSchema,
4
- ORMSchema,
5
- BackendSchema,
6
- RuntimeSchema,
7
- FrontendSchema,
8
- AddonsSchema,
9
- ExamplesSchema,
10
- PackageManagerSchema,
11
- DatabaseSetupSchema,
12
- APISchema,
13
- AuthSchema,
14
- PaymentsSchema,
15
- WebDeploySchema,
16
- ServerDeploySchema,
17
- DirectoryConflictSchema,
18
- TemplateSchema,
19
- ProjectNameSchema,
20
- CreateInputSchema,
21
- AddInputSchema,
22
- CLIInputSchema,
23
- ProjectConfigSchema,
24
- BetterTStackConfigSchema,
25
- InitResultSchema,
26
- } from "./schemas";
27
-
28
- // Inferred types from Zod schemas
29
- export type Database = z.infer<typeof DatabaseSchema>;
30
- export type ORM = z.infer<typeof ORMSchema>;
31
- export type Backend = z.infer<typeof BackendSchema>;
32
- export type Runtime = z.infer<typeof RuntimeSchema>;
33
- export type Frontend = z.infer<typeof FrontendSchema>;
34
- export type Addons = z.infer<typeof AddonsSchema>;
35
- export type Examples = z.infer<typeof ExamplesSchema>;
36
- export type PackageManager = z.infer<typeof PackageManagerSchema>;
37
- export type DatabaseSetup = z.infer<typeof DatabaseSetupSchema>;
38
- export type API = z.infer<typeof APISchema>;
39
- export type Auth = z.infer<typeof AuthSchema>;
40
- export type Payments = z.infer<typeof PaymentsSchema>;
41
- export type WebDeploy = z.infer<typeof WebDeploySchema>;
42
- export type ServerDeploy = z.infer<typeof ServerDeploySchema>;
43
- export type DirectoryConflict = z.infer<typeof DirectoryConflictSchema>;
44
- export type Template = z.infer<typeof TemplateSchema>;
45
- export type ProjectName = z.infer<typeof ProjectNameSchema>;
46
-
47
- export type CreateInput = z.infer<typeof CreateInputSchema>;
48
- export type AddInput = z.infer<typeof AddInputSchema>;
49
- export type CLIInput = z.infer<typeof CLIInputSchema>;
50
- export type ProjectConfig = z.infer<typeof ProjectConfigSchema>;
51
- export type BetterTStackConfig = z.infer<typeof BetterTStackConfigSchema>;
52
- export type InitResult = z.infer<typeof InitResultSchema>;
53
-
54
- // Web frontend specific types (for filtering)
55
- export type WebFrontend = Extract<
56
- Frontend,
57
- | "tanstack-router"
58
- | "react-router"
59
- | "tanstack-start"
60
- | "next"
61
- | "nuxt"
62
- | "svelte"
63
- | "solid"
64
- | "none"
65
- >;
66
-
67
- export type NativeFrontend = Extract<
68
- Frontend,
69
- "native-bare" | "native-uniwind" | "native-unistyles" | "none"
70
- >;
71
-
72
- // Tech category type for web UI
73
- export type TechCategory =
74
- | "api"
75
- | "webFrontend"
76
- | "nativeFrontend"
77
- | "runtime"
78
- | "backend"
79
- | "database"
80
- | "orm"
81
- | "dbSetup"
82
- | "webDeploy"
83
- | "serverDeploy"
84
- | "auth"
85
- | "payments"
86
- | "packageManager"
87
- | "addons"
88
- | "examples"
89
- | "git"
90
- | "install";