@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.
- package/dist/index.d.mts +33 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -0
- package/dist/json-schema.d.mts +48 -0
- package/dist/json-schema.d.mts.map +1 -0
- package/dist/json-schema.mjs +92 -0
- package/dist/json-schema.mjs.map +1 -0
- package/dist/schemas-CH5VdN4I.mjs +220 -0
- package/dist/schemas-CH5VdN4I.mjs.map +1 -0
- package/dist/schemas-D8-YlD7-.d.mts +724 -0
- package/dist/schemas-D8-YlD7-.d.mts.map +1 -0
- package/dist/schemas.d.mts +2 -0
- package/dist/schemas.mjs +3 -0
- package/package.json +14 -9
- package/src/index.ts +0 -73
- package/src/json-schema.ts +0 -130
- package/src/schemas.ts +0 -216
- package/src/types.ts +0 -90
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type Database = z.infer<typeof DatabaseSchema>;
|
|
6
|
+
type ORM = z.infer<typeof ORMSchema>;
|
|
7
|
+
type Backend = z.infer<typeof BackendSchema>;
|
|
8
|
+
type Runtime = z.infer<typeof RuntimeSchema>;
|
|
9
|
+
type Frontend = z.infer<typeof FrontendSchema>;
|
|
10
|
+
type Addons = z.infer<typeof AddonsSchema>;
|
|
11
|
+
type Examples = z.infer<typeof ExamplesSchema>;
|
|
12
|
+
type PackageManager = z.infer<typeof PackageManagerSchema>;
|
|
13
|
+
type DatabaseSetup = z.infer<typeof DatabaseSetupSchema>;
|
|
14
|
+
type API = z.infer<typeof APISchema>;
|
|
15
|
+
type Auth = z.infer<typeof AuthSchema>;
|
|
16
|
+
type Payments = z.infer<typeof PaymentsSchema>;
|
|
17
|
+
type WebDeploy = z.infer<typeof WebDeploySchema>;
|
|
18
|
+
type ServerDeploy = z.infer<typeof ServerDeploySchema>;
|
|
19
|
+
type DirectoryConflict = z.infer<typeof DirectoryConflictSchema>;
|
|
20
|
+
type Template = z.infer<typeof TemplateSchema>;
|
|
21
|
+
type ProjectName = z.infer<typeof ProjectNameSchema>;
|
|
22
|
+
type CreateInput = z.infer<typeof CreateInputSchema>;
|
|
23
|
+
type AddInput = z.infer<typeof AddInputSchema>;
|
|
24
|
+
type CLIInput = z.infer<typeof CLIInputSchema>;
|
|
25
|
+
type ProjectConfig = z.infer<typeof ProjectConfigSchema>;
|
|
26
|
+
type BetterTStackConfig = z.infer<typeof BetterTStackConfigSchema>;
|
|
27
|
+
type InitResult = z.infer<typeof InitResultSchema>;
|
|
28
|
+
type WebFrontend = Extract<Frontend, "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "svelte" | "solid" | "none">;
|
|
29
|
+
type NativeFrontend = Extract<Frontend, "native-bare" | "native-uniwind" | "native-unistyles" | "none">;
|
|
30
|
+
type TechCategory = "api" | "webFrontend" | "nativeFrontend" | "runtime" | "backend" | "database" | "orm" | "dbSetup" | "webDeploy" | "serverDeploy" | "auth" | "payments" | "packageManager" | "addons" | "examples" | "git" | "install";
|
|
31
|
+
//#endregion
|
|
32
|
+
export { ADDONS_VALUES, type API, APISchema, API_VALUES, AUTH_VALUES, type AddInput, AddInputSchema, type Addons, AddonsSchema, type Auth, AuthSchema, BACKEND_VALUES, type Backend, BackendSchema, type BetterTStackConfig, BetterTStackConfigSchema, type CLIInput, CLIInputSchema, type CreateInput, CreateInputSchema, DATABASE_SETUP_VALUES, DATABASE_VALUES, DIRECTORY_CONFLICT_VALUES, type Database, DatabaseSchema, type DatabaseSetup, DatabaseSetupSchema, type DirectoryConflict, DirectoryConflictSchema, EXAMPLES_VALUES, type Examples, ExamplesSchema, FRONTEND_VALUES, type Frontend, FrontendSchema, type InitResult, InitResultSchema, type NativeFrontend, type ORM, ORMSchema, ORM_VALUES, PACKAGE_MANAGER_VALUES, PAYMENTS_VALUES, type PackageManager, PackageManagerSchema, type Payments, PaymentsSchema, type ProjectConfig, ProjectConfigSchema, type ProjectName, ProjectNameSchema, RUNTIME_VALUES, type Runtime, RuntimeSchema, SERVER_DEPLOY_VALUES, type ServerDeploy, ServerDeploySchema, TEMPLATE_VALUES, type TechCategory, type Template, TemplateSchema, WEB_DEPLOY_VALUES, type WebDeploy, WebDeploySchema, type WebFrontend };
|
|
33
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";;;;KA4BY,QAAA,GAAW,CAAA,CAAE,aAAa;KAC1B,GAAA,GAAM,CAAA,CAAE,aAAa;AADrB,KAEA,OAAA,GAAU,CAAA,CAAE,KAFc,CAAA,OAED,aAFZ,CAAK;AAClB,KAEA,OAAA,GAAU,CAAA,CAAE,KAFS,CAAA,OAEI,a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AA;AAClB,KAEA,UAAA,GAAa,CAAA,CAAE,KAFgB,CAAA,OAEH,gBAFV,CAAA;AAClB,KAIA,WAAA,GAAc,OAJI,CAK5B,QAL8C,EAAA,iBAAA,GAAf,cAAO,GAAA,gBAAA,GAAA,MAAA,GAAA,MAAA,GAAA,QAAA,GAAA,OAAA,GAAA,MAAA,CAAA;AAC5B,KAeA,cAAA,GAAiB,OAfW,CAgBtC,QAhBsC,EAAf,aAAO,GAAA,gBAAA,GAAA,kBAAA,GAAA,MAAA,CAAA;AAGpB,KAkBA,YAAA,GAlBW,KACrB,GAAA,aAD+B,GAAA,gBAAA,GAAA,SAAA,GAAA,SAAA,GAAA,UAAA,GAAA,KAAA,GAAA,SAAA,GAAA,WAAA,GAAA,cAAA,GAAA,MAAA,GAAA,UAAA,GAAA,gBAAA,GAAA,QAAA,GAAA,UAAA,GAAA,KAAA,GAAA,SAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -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 };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/json-schema.d.ts
|
|
4
|
+
declare function getDatabaseJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
5
|
+
declare function getORMJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
6
|
+
declare function getBackendJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
7
|
+
declare function getRuntimeJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
8
|
+
declare function getFrontendJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
9
|
+
declare function getAddonsJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
10
|
+
declare function getExamplesJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
11
|
+
declare function getPackageManagerJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
12
|
+
declare function getDatabaseSetupJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
13
|
+
declare function getAPIJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
14
|
+
declare function getAuthJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
15
|
+
declare function getPaymentsJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
16
|
+
declare function getWebDeployJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
17
|
+
declare function getServerDeployJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
18
|
+
declare function getDirectoryConflictJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
19
|
+
declare function getTemplateJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
20
|
+
declare function getCreateInputJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
21
|
+
declare function getProjectConfigJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
22
|
+
declare function getBetterTStackConfigJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
23
|
+
declare function getInitResultJsonSchema(): z.core.JSONSchema.JSONSchema;
|
|
24
|
+
declare function getAllJsonSchemas(): {
|
|
25
|
+
database: z.core.JSONSchema.JSONSchema;
|
|
26
|
+
orm: z.core.JSONSchema.JSONSchema;
|
|
27
|
+
backend: z.core.JSONSchema.JSONSchema;
|
|
28
|
+
runtime: z.core.JSONSchema.JSONSchema;
|
|
29
|
+
frontend: z.core.JSONSchema.JSONSchema;
|
|
30
|
+
addons: z.core.JSONSchema.JSONSchema;
|
|
31
|
+
examples: z.core.JSONSchema.JSONSchema;
|
|
32
|
+
packageManager: z.core.JSONSchema.JSONSchema;
|
|
33
|
+
databaseSetup: z.core.JSONSchema.JSONSchema;
|
|
34
|
+
api: z.core.JSONSchema.JSONSchema;
|
|
35
|
+
auth: z.core.JSONSchema.JSONSchema;
|
|
36
|
+
payments: z.core.JSONSchema.JSONSchema;
|
|
37
|
+
webDeploy: z.core.JSONSchema.JSONSchema;
|
|
38
|
+
serverDeploy: z.core.JSONSchema.JSONSchema;
|
|
39
|
+
directoryConflict: z.core.JSONSchema.JSONSchema;
|
|
40
|
+
template: z.core.JSONSchema.JSONSchema;
|
|
41
|
+
createInput: z.core.JSONSchema.JSONSchema;
|
|
42
|
+
projectConfig: z.core.JSONSchema.JSONSchema;
|
|
43
|
+
betterTStackConfig: z.core.JSONSchema.JSONSchema;
|
|
44
|
+
initResult: z.core.JSONSchema.JSONSchema;
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { getAPIJsonSchema, getAddonsJsonSchema, getAllJsonSchemas, getAuthJsonSchema, getBackendJsonSchema, getBetterTStackConfigJsonSchema, getCreateInputJsonSchema, getDatabaseJsonSchema, getDatabaseSetupJsonSchema, getDirectoryConflictJsonSchema, getExamplesJsonSchema, getFrontendJsonSchema, getInitResultJsonSchema, getORMJsonSchema, getPackageManagerJsonSchema, getPaymentsJsonSchema, getProjectConfigJsonSchema, getRuntimeJsonSchema, getServerDeployJsonSchema, getTemplateJsonSchema, getWebDeployJsonSchema };
|
|
48
|
+
//# sourceMappingURL=json-schema.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.d.mts","names":[],"sources":["../src/json-schema.ts"],"sourcesContent":[],"mappings":";;;iBAyBgB,qBAAA,CAAA,GAAqB,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA;iBAIrB,gBAAA,CAAA,GAAgB,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA;AAJhB,iBAQA,oBAAA,CAAA,CARqB,EAQD,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARC;AAIrB,iBAQA,oBAAA,CAAA,CARgB,EAQI,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARJ;AAIhB,iBAQA,qBAAA,CAAA,CARoB,EAQC,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARD;AAIpB,iBAQA,mBAAA,CAAA,CARoB,EAQD,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARC;AAIpB,iBAQA,qBAAA,CAAA,CARqB,EAQA,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARA;AAIrB,iBAQA,2BAAA,CAAA,CARmB,EAQQ,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARR;AAInB,iBAQA,0BAAA,CAAA,CARqB,EAQK,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARL;AAIrB,iBAQA,gBAAA,CAAA,CAR2B,EAQX,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARW;AAI3B,iBAQA,iBAAA,CAAA,CAR0B,EAQT,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARS;AAI1B,iBAQA,qBAAA,CAAA,CARgB,EAQK,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARL;AAIhB,iBAQA,sBAAA,CAAA,CARiB,EAQK,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARL;AAIjB,iBAQA,yBAAA,CAAA,CARqB,EAQI,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARJ;AAIrB,iBAQA,8BAAA,CAAA,CARsB,EAQQ,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARR;AAItB,iBAQA,qBAAA,CAAA,CARyB,EAQJ,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARI;AAIzB,iBAQA,wBAAA,CAAA,CAR8B,EAQN,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARM;AAI9B,iBAQA,0BAAA,CAAA,CARqB,EAQK,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARL;AAIrB,iBAQA,+BAAA,CAAA,CARwB,EAQO,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARP;AAIxB,iBAQA,uBAAA,CAAA,CAR0B,EAQH,CAAA,CAAA,IAAA,CAAA,UAAA,CAAA,UARG;AAI1B,iBASA,iBAAA,CAAA,CAT+B,EAAA;EAI/B,QAAA,8BAAuB;EAKvB,GAAA,8BAAiB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { A as ProjectConfigSchema, C as InitResultSchema, F as ServerDeploySchema, L as TemplateSchema, N as RuntimeSchema, O as PackageManagerSchema, S as FrontendSchema, _ as DatabaseSetupSchema, b as ExamplesSchema, f as CreateInputSchema, g as DatabaseSchema, k as PaymentsSchema, l as BackendSchema, n as APISchema, o as AddonsSchema, s as AuthSchema, u as BetterTStackConfigSchema, v as DirectoryConflictSchema, w as ORMSchema, z as WebDeploySchema } from "./schemas-CH5VdN4I.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/json-schema.ts
|
|
5
|
+
function getDatabaseJsonSchema() {
|
|
6
|
+
return z.toJSONSchema(DatabaseSchema);
|
|
7
|
+
}
|
|
8
|
+
function getORMJsonSchema() {
|
|
9
|
+
return z.toJSONSchema(ORMSchema);
|
|
10
|
+
}
|
|
11
|
+
function getBackendJsonSchema() {
|
|
12
|
+
return z.toJSONSchema(BackendSchema);
|
|
13
|
+
}
|
|
14
|
+
function getRuntimeJsonSchema() {
|
|
15
|
+
return z.toJSONSchema(RuntimeSchema);
|
|
16
|
+
}
|
|
17
|
+
function getFrontendJsonSchema() {
|
|
18
|
+
return z.toJSONSchema(FrontendSchema);
|
|
19
|
+
}
|
|
20
|
+
function getAddonsJsonSchema() {
|
|
21
|
+
return z.toJSONSchema(AddonsSchema);
|
|
22
|
+
}
|
|
23
|
+
function getExamplesJsonSchema() {
|
|
24
|
+
return z.toJSONSchema(ExamplesSchema);
|
|
25
|
+
}
|
|
26
|
+
function getPackageManagerJsonSchema() {
|
|
27
|
+
return z.toJSONSchema(PackageManagerSchema);
|
|
28
|
+
}
|
|
29
|
+
function getDatabaseSetupJsonSchema() {
|
|
30
|
+
return z.toJSONSchema(DatabaseSetupSchema);
|
|
31
|
+
}
|
|
32
|
+
function getAPIJsonSchema() {
|
|
33
|
+
return z.toJSONSchema(APISchema);
|
|
34
|
+
}
|
|
35
|
+
function getAuthJsonSchema() {
|
|
36
|
+
return z.toJSONSchema(AuthSchema);
|
|
37
|
+
}
|
|
38
|
+
function getPaymentsJsonSchema() {
|
|
39
|
+
return z.toJSONSchema(PaymentsSchema);
|
|
40
|
+
}
|
|
41
|
+
function getWebDeployJsonSchema() {
|
|
42
|
+
return z.toJSONSchema(WebDeploySchema);
|
|
43
|
+
}
|
|
44
|
+
function getServerDeployJsonSchema() {
|
|
45
|
+
return z.toJSONSchema(ServerDeploySchema);
|
|
46
|
+
}
|
|
47
|
+
function getDirectoryConflictJsonSchema() {
|
|
48
|
+
return z.toJSONSchema(DirectoryConflictSchema);
|
|
49
|
+
}
|
|
50
|
+
function getTemplateJsonSchema() {
|
|
51
|
+
return z.toJSONSchema(TemplateSchema);
|
|
52
|
+
}
|
|
53
|
+
function getCreateInputJsonSchema() {
|
|
54
|
+
return z.toJSONSchema(CreateInputSchema);
|
|
55
|
+
}
|
|
56
|
+
function getProjectConfigJsonSchema() {
|
|
57
|
+
return z.toJSONSchema(ProjectConfigSchema);
|
|
58
|
+
}
|
|
59
|
+
function getBetterTStackConfigJsonSchema() {
|
|
60
|
+
return z.toJSONSchema(BetterTStackConfigSchema);
|
|
61
|
+
}
|
|
62
|
+
function getInitResultJsonSchema() {
|
|
63
|
+
return z.toJSONSchema(InitResultSchema);
|
|
64
|
+
}
|
|
65
|
+
function getAllJsonSchemas() {
|
|
66
|
+
return {
|
|
67
|
+
database: getDatabaseJsonSchema(),
|
|
68
|
+
orm: getORMJsonSchema(),
|
|
69
|
+
backend: getBackendJsonSchema(),
|
|
70
|
+
runtime: getRuntimeJsonSchema(),
|
|
71
|
+
frontend: getFrontendJsonSchema(),
|
|
72
|
+
addons: getAddonsJsonSchema(),
|
|
73
|
+
examples: getExamplesJsonSchema(),
|
|
74
|
+
packageManager: getPackageManagerJsonSchema(),
|
|
75
|
+
databaseSetup: getDatabaseSetupJsonSchema(),
|
|
76
|
+
api: getAPIJsonSchema(),
|
|
77
|
+
auth: getAuthJsonSchema(),
|
|
78
|
+
payments: getPaymentsJsonSchema(),
|
|
79
|
+
webDeploy: getWebDeployJsonSchema(),
|
|
80
|
+
serverDeploy: getServerDeployJsonSchema(),
|
|
81
|
+
directoryConflict: getDirectoryConflictJsonSchema(),
|
|
82
|
+
template: getTemplateJsonSchema(),
|
|
83
|
+
createInput: getCreateInputJsonSchema(),
|
|
84
|
+
projectConfig: getProjectConfigJsonSchema(),
|
|
85
|
+
betterTStackConfig: getBetterTStackConfigJsonSchema(),
|
|
86
|
+
initResult: getInitResultJsonSchema()
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
export { getAPIJsonSchema, getAddonsJsonSchema, getAllJsonSchemas, getAuthJsonSchema, getBackendJsonSchema, getBetterTStackConfigJsonSchema, getCreateInputJsonSchema, getDatabaseJsonSchema, getDatabaseSetupJsonSchema, getDirectoryConflictJsonSchema, getExamplesJsonSchema, getFrontendJsonSchema, getInitResultJsonSchema, getORMJsonSchema, getPackageManagerJsonSchema, getPaymentsJsonSchema, getProjectConfigJsonSchema, getRuntimeJsonSchema, getServerDeployJsonSchema, getTemplateJsonSchema, getWebDeployJsonSchema };
|
|
92
|
+
//# sourceMappingURL=json-schema.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.mjs","names":[],"sources":["../src/json-schema.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n DatabaseSchema,\n ORMSchema,\n BackendSchema,\n RuntimeSchema,\n FrontendSchema,\n AddonsSchema,\n ExamplesSchema,\n PackageManagerSchema,\n DatabaseSetupSchema,\n APISchema,\n AuthSchema,\n PaymentsSchema,\n WebDeploySchema,\n ServerDeploySchema,\n DirectoryConflictSchema,\n TemplateSchema,\n CreateInputSchema,\n ProjectConfigSchema,\n BetterTStackConfigSchema,\n InitResultSchema,\n} from \"./schemas\";\n\n// Generate JSON schemas for each type\nexport function getDatabaseJsonSchema() {\n return z.toJSONSchema(DatabaseSchema);\n}\n\nexport function getORMJsonSchema() {\n return z.toJSONSchema(ORMSchema);\n}\n\nexport function getBackendJsonSchema() {\n return z.toJSONSchema(BackendSchema);\n}\n\nexport function getRuntimeJsonSchema() {\n return z.toJSONSchema(RuntimeSchema);\n}\n\nexport function getFrontendJsonSchema() {\n return z.toJSONSchema(FrontendSchema);\n}\n\nexport function getAddonsJsonSchema() {\n return z.toJSONSchema(AddonsSchema);\n}\n\nexport function getExamplesJsonSchema() {\n return z.toJSONSchema(ExamplesSchema);\n}\n\nexport function getPackageManagerJsonSchema() {\n return z.toJSONSchema(PackageManagerSchema);\n}\n\nexport function getDatabaseSetupJsonSchema() {\n return z.toJSONSchema(DatabaseSetupSchema);\n}\n\nexport function getAPIJsonSchema() {\n return z.toJSONSchema(APISchema);\n}\n\nexport function getAuthJsonSchema() {\n return z.toJSONSchema(AuthSchema);\n}\n\nexport function getPaymentsJsonSchema() {\n return z.toJSONSchema(PaymentsSchema);\n}\n\nexport function getWebDeployJsonSchema() {\n return z.toJSONSchema(WebDeploySchema);\n}\n\nexport function getServerDeployJsonSchema() {\n return z.toJSONSchema(ServerDeploySchema);\n}\n\nexport function getDirectoryConflictJsonSchema() {\n return z.toJSONSchema(DirectoryConflictSchema);\n}\n\nexport function getTemplateJsonSchema() {\n return z.toJSONSchema(TemplateSchema);\n}\n\nexport function getCreateInputJsonSchema() {\n return z.toJSONSchema(CreateInputSchema);\n}\n\nexport function getProjectConfigJsonSchema() {\n return z.toJSONSchema(ProjectConfigSchema);\n}\n\nexport function getBetterTStackConfigJsonSchema() {\n return z.toJSONSchema(BetterTStackConfigSchema);\n}\n\nexport function getInitResultJsonSchema() {\n return z.toJSONSchema(InitResultSchema);\n}\n\n// Get all JSON schemas as a single object\nexport function getAllJsonSchemas() {\n return {\n database: getDatabaseJsonSchema(),\n orm: getORMJsonSchema(),\n backend: getBackendJsonSchema(),\n runtime: getRuntimeJsonSchema(),\n frontend: getFrontendJsonSchema(),\n addons: getAddonsJsonSchema(),\n examples: getExamplesJsonSchema(),\n packageManager: getPackageManagerJsonSchema(),\n databaseSetup: getDatabaseSetupJsonSchema(),\n api: getAPIJsonSchema(),\n auth: getAuthJsonSchema(),\n payments: getPaymentsJsonSchema(),\n webDeploy: getWebDeployJsonSchema(),\n serverDeploy: getServerDeployJsonSchema(),\n directoryConflict: getDirectoryConflictJsonSchema(),\n template: getTemplateJsonSchema(),\n createInput: getCreateInputJsonSchema(),\n projectConfig: getProjectConfigJsonSchema(),\n betterTStackConfig: getBetterTStackConfigJsonSchema(),\n initResult: getInitResultJsonSchema(),\n };\n}\n"],"mappings":";;;;AAyBA,SAAgB,wBAAwB;AACtC,QAAO,EAAE,aAAa,eAAe;;AAGvC,SAAgB,mBAAmB;AACjC,QAAO,EAAE,aAAa,UAAU;;AAGlC,SAAgB,uBAAuB;AACrC,QAAO,EAAE,aAAa,cAAc;;AAGtC,SAAgB,uBAAuB;AACrC,QAAO,EAAE,aAAa,cAAc;;AAGtC,SAAgB,wBAAwB;AACtC,QAAO,EAAE,aAAa,eAAe;;AAGvC,SAAgB,sBAAsB;AACpC,QAAO,EAAE,aAAa,aAAa;;AAGrC,SAAgB,wBAAwB;AACtC,QAAO,EAAE,aAAa,eAAe;;AAGvC,SAAgB,8BAA8B;AAC5C,QAAO,EAAE,aAAa,qBAAqB;;AAG7C,SAAgB,6BAA6B;AAC3C,QAAO,EAAE,aAAa,oBAAoB;;AAG5C,SAAgB,mBAAmB;AACjC,QAAO,EAAE,aAAa,UAAU;;AAGlC,SAAgB,oBAAoB;AAClC,QAAO,EAAE,aAAa,WAAW;;AAGnC,SAAgB,wBAAwB;AACtC,QAAO,EAAE,aAAa,eAAe;;AAGvC,SAAgB,yBAAyB;AACvC,QAAO,EAAE,aAAa,gBAAgB;;AAGxC,SAAgB,4BAA4B;AAC1C,QAAO,EAAE,aAAa,mBAAmB;;AAG3C,SAAgB,iCAAiC;AAC/C,QAAO,EAAE,aAAa,wBAAwB;;AAGhD,SAAgB,wBAAwB;AACtC,QAAO,EAAE,aAAa,eAAe;;AAGvC,SAAgB,2BAA2B;AACzC,QAAO,EAAE,aAAa,kBAAkB;;AAG1C,SAAgB,6BAA6B;AAC3C,QAAO,EAAE,aAAa,oBAAoB;;AAG5C,SAAgB,kCAAkC;AAChD,QAAO,EAAE,aAAa,yBAAyB;;AAGjD,SAAgB,0BAA0B;AACxC,QAAO,EAAE,aAAa,iBAAiB;;AAIzC,SAAgB,oBAAoB;AAClC,QAAO;EACL,UAAU,uBAAuB;EACjC,KAAK,kBAAkB;EACvB,SAAS,sBAAsB;EAC/B,SAAS,sBAAsB;EAC/B,UAAU,uBAAuB;EACjC,QAAQ,qBAAqB;EAC7B,UAAU,uBAAuB;EACjC,gBAAgB,6BAA6B;EAC7C,eAAe,4BAA4B;EAC3C,KAAK,kBAAkB;EACvB,MAAM,mBAAmB;EACzB,UAAU,uBAAuB;EACjC,WAAW,wBAAwB;EACnC,cAAc,2BAA2B;EACzC,mBAAmB,gCAAgC;EACnD,UAAU,uBAAuB;EACjC,aAAa,0BAA0B;EACvC,eAAe,4BAA4B;EAC3C,oBAAoB,iCAAiC;EACrD,YAAY,yBAAyB;EACtC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/schemas.ts
|
|
4
|
+
const DatabaseSchema = z.enum([
|
|
5
|
+
"none",
|
|
6
|
+
"sqlite",
|
|
7
|
+
"postgres",
|
|
8
|
+
"mysql",
|
|
9
|
+
"mongodb"
|
|
10
|
+
]).describe("Database type");
|
|
11
|
+
const ORMSchema = z.enum([
|
|
12
|
+
"drizzle",
|
|
13
|
+
"prisma",
|
|
14
|
+
"mongoose",
|
|
15
|
+
"none"
|
|
16
|
+
]).describe("ORM type");
|
|
17
|
+
const BackendSchema = z.enum([
|
|
18
|
+
"hono",
|
|
19
|
+
"express",
|
|
20
|
+
"fastify",
|
|
21
|
+
"elysia",
|
|
22
|
+
"convex",
|
|
23
|
+
"self",
|
|
24
|
+
"none"
|
|
25
|
+
]).describe("Backend framework");
|
|
26
|
+
const RuntimeSchema = z.enum([
|
|
27
|
+
"bun",
|
|
28
|
+
"node",
|
|
29
|
+
"workers",
|
|
30
|
+
"none"
|
|
31
|
+
]).describe("Runtime environment");
|
|
32
|
+
const FrontendSchema = z.enum([
|
|
33
|
+
"tanstack-router",
|
|
34
|
+
"react-router",
|
|
35
|
+
"tanstack-start",
|
|
36
|
+
"next",
|
|
37
|
+
"nuxt",
|
|
38
|
+
"native-bare",
|
|
39
|
+
"native-uniwind",
|
|
40
|
+
"native-unistyles",
|
|
41
|
+
"svelte",
|
|
42
|
+
"solid",
|
|
43
|
+
"none"
|
|
44
|
+
]).describe("Frontend framework");
|
|
45
|
+
const AddonsSchema = z.enum([
|
|
46
|
+
"pwa",
|
|
47
|
+
"tauri",
|
|
48
|
+
"starlight",
|
|
49
|
+
"biome",
|
|
50
|
+
"husky",
|
|
51
|
+
"ruler",
|
|
52
|
+
"turborepo",
|
|
53
|
+
"fumadocs",
|
|
54
|
+
"ultracite",
|
|
55
|
+
"oxlint",
|
|
56
|
+
"none"
|
|
57
|
+
]).describe("Additional addons");
|
|
58
|
+
const ExamplesSchema = z.enum([
|
|
59
|
+
"todo",
|
|
60
|
+
"ai",
|
|
61
|
+
"none"
|
|
62
|
+
]).describe("Example templates to include");
|
|
63
|
+
const PackageManagerSchema = z.enum([
|
|
64
|
+
"npm",
|
|
65
|
+
"pnpm",
|
|
66
|
+
"bun"
|
|
67
|
+
]).describe("Package manager");
|
|
68
|
+
const DatabaseSetupSchema = z.enum([
|
|
69
|
+
"turso",
|
|
70
|
+
"neon",
|
|
71
|
+
"prisma-postgres",
|
|
72
|
+
"planetscale",
|
|
73
|
+
"mongodb-atlas",
|
|
74
|
+
"supabase",
|
|
75
|
+
"d1",
|
|
76
|
+
"docker",
|
|
77
|
+
"none"
|
|
78
|
+
]).describe("Database hosting setup");
|
|
79
|
+
const APISchema = z.enum([
|
|
80
|
+
"trpc",
|
|
81
|
+
"orpc",
|
|
82
|
+
"none"
|
|
83
|
+
]).describe("API type");
|
|
84
|
+
const AuthSchema = z.enum([
|
|
85
|
+
"better-auth",
|
|
86
|
+
"clerk",
|
|
87
|
+
"none"
|
|
88
|
+
]).describe("Authentication provider");
|
|
89
|
+
const PaymentsSchema = z.enum(["polar", "none"]).describe("Payments provider");
|
|
90
|
+
const WebDeploySchema = z.enum(["alchemy", "none"]).describe("Web deployment");
|
|
91
|
+
const ServerDeploySchema = z.enum(["alchemy", "none"]).describe("Server deployment");
|
|
92
|
+
const DirectoryConflictSchema = z.enum([
|
|
93
|
+
"merge",
|
|
94
|
+
"overwrite",
|
|
95
|
+
"increment",
|
|
96
|
+
"error"
|
|
97
|
+
]).describe("How to handle existing directory conflicts");
|
|
98
|
+
const TemplateSchema = z.enum([
|
|
99
|
+
"mern",
|
|
100
|
+
"pern",
|
|
101
|
+
"t3",
|
|
102
|
+
"uniwind",
|
|
103
|
+
"none"
|
|
104
|
+
]).describe("Predefined project template");
|
|
105
|
+
const ProjectNameSchema = z.string().min(1, "Project name cannot be empty").max(255, "Project name must be less than 255 characters").refine((name) => name === "." || !name.startsWith("."), "Project name cannot start with a dot (except for '.')").refine((name) => name === "." || !name.startsWith("-"), "Project name cannot start with a dash").refine((name) => {
|
|
106
|
+
return ![
|
|
107
|
+
"<",
|
|
108
|
+
">",
|
|
109
|
+
":",
|
|
110
|
+
"\"",
|
|
111
|
+
"|",
|
|
112
|
+
"?",
|
|
113
|
+
"*"
|
|
114
|
+
].some((char) => name.includes(char));
|
|
115
|
+
}, "Project name contains invalid characters").refine((name) => name.toLowerCase() !== "node_modules", "Project name is reserved").describe("Project name or path");
|
|
116
|
+
const CreateInputSchema = z.object({
|
|
117
|
+
projectName: z.string().optional(),
|
|
118
|
+
template: TemplateSchema.optional(),
|
|
119
|
+
yes: z.boolean().optional(),
|
|
120
|
+
yolo: z.boolean().optional(),
|
|
121
|
+
verbose: z.boolean().optional(),
|
|
122
|
+
database: DatabaseSchema.optional(),
|
|
123
|
+
orm: ORMSchema.optional(),
|
|
124
|
+
auth: AuthSchema.optional(),
|
|
125
|
+
payments: PaymentsSchema.optional(),
|
|
126
|
+
frontend: z.array(FrontendSchema).optional(),
|
|
127
|
+
addons: z.array(AddonsSchema).optional(),
|
|
128
|
+
examples: z.array(ExamplesSchema).optional(),
|
|
129
|
+
git: z.boolean().optional(),
|
|
130
|
+
packageManager: PackageManagerSchema.optional(),
|
|
131
|
+
install: z.boolean().optional(),
|
|
132
|
+
dbSetup: DatabaseSetupSchema.optional(),
|
|
133
|
+
backend: BackendSchema.optional(),
|
|
134
|
+
runtime: RuntimeSchema.optional(),
|
|
135
|
+
api: APISchema.optional(),
|
|
136
|
+
webDeploy: WebDeploySchema.optional(),
|
|
137
|
+
serverDeploy: ServerDeploySchema.optional(),
|
|
138
|
+
directoryConflict: DirectoryConflictSchema.optional(),
|
|
139
|
+
renderTitle: z.boolean().optional(),
|
|
140
|
+
disableAnalytics: z.boolean().optional(),
|
|
141
|
+
manualDb: z.boolean().optional()
|
|
142
|
+
});
|
|
143
|
+
const AddInputSchema = z.object({
|
|
144
|
+
addons: z.array(AddonsSchema).optional(),
|
|
145
|
+
webDeploy: WebDeploySchema.optional(),
|
|
146
|
+
serverDeploy: ServerDeploySchema.optional(),
|
|
147
|
+
projectDir: z.string().optional(),
|
|
148
|
+
install: z.boolean().optional(),
|
|
149
|
+
packageManager: PackageManagerSchema.optional()
|
|
150
|
+
});
|
|
151
|
+
const CLIInputSchema = CreateInputSchema.extend({ projectDirectory: z.string().optional() });
|
|
152
|
+
const ProjectConfigSchema = z.object({
|
|
153
|
+
projectName: z.string(),
|
|
154
|
+
projectDir: z.string(),
|
|
155
|
+
relativePath: z.string(),
|
|
156
|
+
database: DatabaseSchema,
|
|
157
|
+
orm: ORMSchema,
|
|
158
|
+
backend: BackendSchema,
|
|
159
|
+
runtime: RuntimeSchema,
|
|
160
|
+
frontend: z.array(FrontendSchema),
|
|
161
|
+
addons: z.array(AddonsSchema),
|
|
162
|
+
examples: z.array(ExamplesSchema),
|
|
163
|
+
auth: AuthSchema,
|
|
164
|
+
payments: PaymentsSchema,
|
|
165
|
+
git: z.boolean(),
|
|
166
|
+
packageManager: PackageManagerSchema,
|
|
167
|
+
install: z.boolean(),
|
|
168
|
+
dbSetup: DatabaseSetupSchema,
|
|
169
|
+
api: APISchema,
|
|
170
|
+
webDeploy: WebDeploySchema,
|
|
171
|
+
serverDeploy: ServerDeploySchema
|
|
172
|
+
});
|
|
173
|
+
const BetterTStackConfigSchema = z.object({
|
|
174
|
+
version: z.string(),
|
|
175
|
+
createdAt: z.string(),
|
|
176
|
+
database: DatabaseSchema,
|
|
177
|
+
orm: ORMSchema,
|
|
178
|
+
backend: BackendSchema,
|
|
179
|
+
runtime: RuntimeSchema,
|
|
180
|
+
frontend: z.array(FrontendSchema),
|
|
181
|
+
addons: z.array(AddonsSchema),
|
|
182
|
+
examples: z.array(ExamplesSchema),
|
|
183
|
+
auth: AuthSchema,
|
|
184
|
+
payments: PaymentsSchema,
|
|
185
|
+
packageManager: PackageManagerSchema,
|
|
186
|
+
dbSetup: DatabaseSetupSchema,
|
|
187
|
+
api: APISchema,
|
|
188
|
+
webDeploy: WebDeploySchema,
|
|
189
|
+
serverDeploy: ServerDeploySchema
|
|
190
|
+
});
|
|
191
|
+
const InitResultSchema = z.object({
|
|
192
|
+
success: z.boolean(),
|
|
193
|
+
projectConfig: ProjectConfigSchema,
|
|
194
|
+
reproducibleCommand: z.string(),
|
|
195
|
+
timeScaffolded: z.string(),
|
|
196
|
+
elapsedTimeMs: z.number(),
|
|
197
|
+
projectDirectory: z.string(),
|
|
198
|
+
relativePath: z.string(),
|
|
199
|
+
error: z.string().optional()
|
|
200
|
+
});
|
|
201
|
+
const DATABASE_VALUES = DatabaseSchema.options;
|
|
202
|
+
const ORM_VALUES = ORMSchema.options;
|
|
203
|
+
const BACKEND_VALUES = BackendSchema.options;
|
|
204
|
+
const RUNTIME_VALUES = RuntimeSchema.options;
|
|
205
|
+
const FRONTEND_VALUES = FrontendSchema.options;
|
|
206
|
+
const ADDONS_VALUES = AddonsSchema.options;
|
|
207
|
+
const EXAMPLES_VALUES = ExamplesSchema.options;
|
|
208
|
+
const PACKAGE_MANAGER_VALUES = PackageManagerSchema.options;
|
|
209
|
+
const DATABASE_SETUP_VALUES = DatabaseSetupSchema.options;
|
|
210
|
+
const API_VALUES = APISchema.options;
|
|
211
|
+
const AUTH_VALUES = AuthSchema.options;
|
|
212
|
+
const PAYMENTS_VALUES = PaymentsSchema.options;
|
|
213
|
+
const WEB_DEPLOY_VALUES = WebDeploySchema.options;
|
|
214
|
+
const SERVER_DEPLOY_VALUES = ServerDeploySchema.options;
|
|
215
|
+
const DIRECTORY_CONFLICT_VALUES = DirectoryConflictSchema.options;
|
|
216
|
+
const TEMPLATE_VALUES = TemplateSchema.options;
|
|
217
|
+
|
|
218
|
+
//#endregion
|
|
219
|
+
export { ProjectConfigSchema as A, InitResultSchema as C, PAYMENTS_VALUES as D, PACKAGE_MANAGER_VALUES as E, ServerDeploySchema as F, TEMPLATE_VALUES as I, TemplateSchema as L, RUNTIME_VALUES as M, RuntimeSchema as N, PackageManagerSchema as O, SERVER_DEPLOY_VALUES as P, WEB_DEPLOY_VALUES as R, FrontendSchema as S, ORM_VALUES as T, DatabaseSetupSchema as _, AddInputSchema as a, ExamplesSchema as b, BACKEND_VALUES as c, CLIInputSchema as d, CreateInputSchema as f, DatabaseSchema as g, DIRECTORY_CONFLICT_VALUES as h, AUTH_VALUES as i, ProjectNameSchema as j, PaymentsSchema as k, BackendSchema as l, DATABASE_VALUES as m, APISchema as n, AddonsSchema as o, DATABASE_SETUP_VALUES as p, API_VALUES as r, AuthSchema as s, ADDONS_VALUES as t, BetterTStackConfigSchema as u, DirectoryConflictSchema as v, ORMSchema as w, FRONTEND_VALUES as x, EXAMPLES_VALUES as y, WebDeploySchema as z };
|
|
220
|
+
//# sourceMappingURL=schemas-CH5VdN4I.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas-CH5VdN4I.mjs","names":[],"sources":["../src/schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// Base enum schemas\nexport const DatabaseSchema = z\n .enum([\"none\", \"sqlite\", \"postgres\", \"mysql\", \"mongodb\"])\n .describe(\"Database type\");\n\nexport const ORMSchema = z.enum([\"drizzle\", \"prisma\", \"mongoose\", \"none\"]).describe(\"ORM type\");\n\nexport const BackendSchema = z\n .enum([\"hono\", \"express\", \"fastify\", \"elysia\", \"convex\", \"self\", \"none\"])\n .describe(\"Backend framework\");\n\nexport const RuntimeSchema = z\n .enum([\"bun\", \"node\", \"workers\", \"none\"])\n .describe(\"Runtime environment\");\n\nexport const FrontendSchema = z\n .enum([\n \"tanstack-router\",\n \"react-router\",\n \"tanstack-start\",\n \"next\",\n \"nuxt\",\n \"native-bare\",\n \"native-uniwind\",\n \"native-unistyles\",\n \"svelte\",\n \"solid\",\n \"none\",\n ])\n .describe(\"Frontend framework\");\n\nexport const AddonsSchema = z\n .enum([\n \"pwa\",\n \"tauri\",\n \"starlight\",\n \"biome\",\n \"husky\",\n \"ruler\",\n \"turborepo\",\n \"fumadocs\",\n \"ultracite\",\n \"oxlint\",\n \"none\",\n ])\n .describe(\"Additional addons\");\n\nexport const ExamplesSchema = z\n .enum([\"todo\", \"ai\", \"none\"])\n .describe(\"Example templates to include\");\n\nexport const PackageManagerSchema = z.enum([\"npm\", \"pnpm\", \"bun\"]).describe(\"Package manager\");\n\nexport const DatabaseSetupSchema = z\n .enum([\n \"turso\",\n \"neon\",\n \"prisma-postgres\",\n \"planetscale\",\n \"mongodb-atlas\",\n \"supabase\",\n \"d1\",\n \"docker\",\n \"none\",\n ])\n .describe(\"Database hosting setup\");\n\nexport const APISchema = z.enum([\"trpc\", \"orpc\", \"none\"]).describe(\"API type\");\n\nexport const AuthSchema = z\n .enum([\"better-auth\", \"clerk\", \"none\"])\n .describe(\"Authentication provider\");\n\nexport const PaymentsSchema = z.enum([\"polar\", \"none\"]).describe(\"Payments provider\");\n\nexport const WebDeploySchema = z.enum([\"alchemy\", \"none\"]).describe(\"Web deployment\");\n\nexport const ServerDeploySchema = z.enum([\"alchemy\", \"none\"]).describe(\"Server deployment\");\n\nexport const DirectoryConflictSchema = z\n .enum([\"merge\", \"overwrite\", \"increment\", \"error\"])\n .describe(\"How to handle existing directory conflicts\");\n\nexport const TemplateSchema = z\n .enum([\"mern\", \"pern\", \"t3\", \"uniwind\", \"none\"])\n .describe(\"Predefined project template\");\n\nexport const ProjectNameSchema = z\n .string()\n .min(1, \"Project name cannot be empty\")\n .max(255, \"Project name must be less than 255 characters\")\n .refine(\n (name) => name === \".\" || !name.startsWith(\".\"),\n \"Project name cannot start with a dot (except for '.')\",\n )\n .refine((name) => name === \".\" || !name.startsWith(\"-\"), \"Project name cannot start with a dash\")\n .refine((name) => {\n const invalidChars = [\"<\", \">\", \":\", '\"', \"|\", \"?\", \"*\"];\n return !invalidChars.some((char) => name.includes(char));\n }, \"Project name contains invalid characters\")\n .refine((name) => name.toLowerCase() !== \"node_modules\", \"Project name is reserved\")\n .describe(\"Project name or path\");\n\n// Composite schemas\nexport const CreateInputSchema = z.object({\n projectName: z.string().optional(),\n template: TemplateSchema.optional(),\n yes: z.boolean().optional(),\n yolo: z.boolean().optional(),\n verbose: z.boolean().optional(),\n database: DatabaseSchema.optional(),\n orm: ORMSchema.optional(),\n auth: AuthSchema.optional(),\n payments: PaymentsSchema.optional(),\n frontend: z.array(FrontendSchema).optional(),\n addons: z.array(AddonsSchema).optional(),\n examples: z.array(ExamplesSchema).optional(),\n git: z.boolean().optional(),\n packageManager: PackageManagerSchema.optional(),\n install: z.boolean().optional(),\n dbSetup: DatabaseSetupSchema.optional(),\n backend: BackendSchema.optional(),\n runtime: RuntimeSchema.optional(),\n api: APISchema.optional(),\n webDeploy: WebDeploySchema.optional(),\n serverDeploy: ServerDeploySchema.optional(),\n directoryConflict: DirectoryConflictSchema.optional(),\n renderTitle: z.boolean().optional(),\n disableAnalytics: z.boolean().optional(),\n manualDb: z.boolean().optional(),\n});\n\nexport const AddInputSchema = z.object({\n addons: z.array(AddonsSchema).optional(),\n webDeploy: WebDeploySchema.optional(),\n serverDeploy: ServerDeploySchema.optional(),\n projectDir: z.string().optional(),\n install: z.boolean().optional(),\n packageManager: PackageManagerSchema.optional(),\n});\n\nexport const CLIInputSchema = CreateInputSchema.extend({\n projectDirectory: z.string().optional(),\n});\n\nexport const ProjectConfigSchema = z.object({\n projectName: z.string(),\n projectDir: z.string(),\n relativePath: z.string(),\n database: DatabaseSchema,\n orm: ORMSchema,\n backend: BackendSchema,\n runtime: RuntimeSchema,\n frontend: z.array(FrontendSchema),\n addons: z.array(AddonsSchema),\n examples: z.array(ExamplesSchema),\n auth: AuthSchema,\n payments: PaymentsSchema,\n git: z.boolean(),\n packageManager: PackageManagerSchema,\n install: z.boolean(),\n dbSetup: DatabaseSetupSchema,\n api: APISchema,\n webDeploy: WebDeploySchema,\n serverDeploy: ServerDeploySchema,\n});\n\nexport const BetterTStackConfigSchema = z.object({\n version: z.string(),\n createdAt: z.string(),\n database: DatabaseSchema,\n orm: ORMSchema,\n backend: BackendSchema,\n runtime: RuntimeSchema,\n frontend: z.array(FrontendSchema),\n addons: z.array(AddonsSchema),\n examples: z.array(ExamplesSchema),\n auth: AuthSchema,\n payments: PaymentsSchema,\n packageManager: PackageManagerSchema,\n dbSetup: DatabaseSetupSchema,\n api: APISchema,\n webDeploy: WebDeploySchema,\n serverDeploy: ServerDeploySchema,\n});\n\nexport const InitResultSchema = z.object({\n success: z.boolean(),\n projectConfig: ProjectConfigSchema,\n reproducibleCommand: z.string(),\n timeScaffolded: z.string(),\n elapsedTimeMs: z.number(),\n projectDirectory: z.string(),\n relativePath: z.string(),\n error: z.string().optional(),\n});\n\n// Extract enum values as arrays for runtime use\nexport const DATABASE_VALUES = DatabaseSchema.options;\nexport const ORM_VALUES = ORMSchema.options;\nexport const BACKEND_VALUES = BackendSchema.options;\nexport const RUNTIME_VALUES = RuntimeSchema.options;\nexport const FRONTEND_VALUES = FrontendSchema.options;\nexport const ADDONS_VALUES = AddonsSchema.options;\nexport const EXAMPLES_VALUES = ExamplesSchema.options;\nexport const PACKAGE_MANAGER_VALUES = PackageManagerSchema.options;\nexport const DATABASE_SETUP_VALUES = DatabaseSetupSchema.options;\nexport const API_VALUES = APISchema.options;\nexport const AUTH_VALUES = AuthSchema.options;\nexport const PAYMENTS_VALUES = PaymentsSchema.options;\nexport const WEB_DEPLOY_VALUES = WebDeploySchema.options;\nexport const SERVER_DEPLOY_VALUES = ServerDeploySchema.options;\nexport const DIRECTORY_CONFLICT_VALUES = DirectoryConflictSchema.options;\nexport const TEMPLATE_VALUES = TemplateSchema.options;\n"],"mappings":";;;AAGA,MAAa,iBAAiB,EAC3B,KAAK;CAAC;CAAQ;CAAU;CAAY;CAAS;CAAU,CAAC,CACxD,SAAS,gBAAgB;AAE5B,MAAa,YAAY,EAAE,KAAK;CAAC;CAAW;CAAU;CAAY;CAAO,CAAC,CAAC,SAAS,WAAW;AAE/F,MAAa,gBAAgB,EAC1B,KAAK;CAAC;CAAQ;CAAW;CAAW;CAAU;CAAU;CAAQ;CAAO,CAAC,CACxE,SAAS,oBAAoB;AAEhC,MAAa,gBAAgB,EAC1B,KAAK;CAAC;CAAO;CAAQ;CAAW;CAAO,CAAC,CACxC,SAAS,sBAAsB;AAElC,MAAa,iBAAiB,EAC3B,KAAK;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,CACD,SAAS,qBAAqB;AAEjC,MAAa,eAAe,EACzB,KAAK;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,CACD,SAAS,oBAAoB;AAEhC,MAAa,iBAAiB,EAC3B,KAAK;CAAC;CAAQ;CAAM;CAAO,CAAC,CAC5B,SAAS,+BAA+B;AAE3C,MAAa,uBAAuB,EAAE,KAAK;CAAC;CAAO;CAAQ;CAAM,CAAC,CAAC,SAAS,kBAAkB;AAE9F,MAAa,sBAAsB,EAChC,KAAK;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,CACD,SAAS,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