Skip to content

Commit bd13679

Browse files
cli: update deps
1 parent fcc1da8 commit bd13679

File tree

235 files changed

+22411
-63
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+22411
-63
lines changed

apps/cli/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,15 @@
6262
"handlebars": "^4.7.8",
6363
"jsonc-parser": "^3.3.1",
6464
"picocolors": "^1.1.1",
65-
"posthog-node": "^5.1.1",
66-
"trpc-cli": "^0.9.2",
67-
"ts-morph": "^26.0.0"
65+
"posthog-node": "^5.5.0",
66+
"trpc-cli": "^0.10.0",
67+
"ts-morph": "^26.0.0",
68+
"zod": "^4.0.5"
6869
},
6970
"devDependencies": {
7071
"@types/fs-extra": "^11.0.4",
71-
"@types/node": "^24.0.3",
72-
"tsdown": "^0.12.8",
72+
"@types/node": "^24.0.13",
73+
"tsdown": "^0.12.9",
7374
"typescript": "^5.8.3"
7475
}
7576
}

apps/cli/src/helpers/project-generation/add-addons.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ export async function addAddonsToProject(
7272
}
7373

7474
log.info(
75-
pc.green(
76-
`Adding ${input.addons.join(", ")} to ${config.frontend.join("/")}`,
77-
),
75+
`Adding ${input.addons.join(", ")} to ${config.frontend.join("/")}`,
7876
);
7977

8078
await setupAddonsTemplate(projectDir, config);

apps/cli/src/helpers/project-generation/command-handlers.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,11 @@ export async function addAddonsHandler(input: AddInput): Promise<void> {
209209
});
210210
} else {
211211
log.info(
212-
pc.yellow(
213-
`Run ${pc.bold(`${packageManager} install`)} to install dependencies`,
214-
),
212+
`Run ${pc.bold(`${packageManager} install`)} to install dependencies`,
215213
);
216214
}
217215

218-
outro(pc.green("Add command completed successfully!"));
216+
outro("Add command completed successfully!");
219217
} catch (error) {
220218
console.error(error);
221219
process.exit(1);

apps/cli/src/index.ts

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { intro, log } from "@clack/prompts";
22
import { consola } from "consola";
33
import pc from "picocolors";
4-
import { createCli, trpcServer, zod as z } from "trpc-cli";
4+
import { createCli, trpcServer } from "trpc-cli";
5+
import z from "zod";
56
import {
67
addAddonsHandler,
78
createProjectHandler,
@@ -32,34 +33,32 @@ const router = t.router({
3233
.meta({
3334
description: "Create a new Better-T Stack project",
3435
default: true,
36+
negateBooleans: true,
3537
})
3638
.input(
3739
z.tuple([
3840
ProjectNameSchema.optional(),
39-
z
40-
.object({
41-
yes: z
42-
.boolean()
43-
.optional()
44-
.default(false)
45-
.describe("Use default configuration"),
46-
database: DatabaseSchema.optional(),
47-
orm: ORMSchema.optional(),
48-
auth: z.boolean().optional(),
49-
frontend: z.array(FrontendSchema).optional(),
50-
addons: z.array(AddonsSchema).optional(),
51-
examples: z.array(ExamplesSchema).optional(),
52-
git: z.boolean().optional(),
53-
packageManager: PackageManagerSchema.optional(),
54-
install: z.boolean().optional(),
55-
dbSetup: DatabaseSetupSchema.optional(),
56-
backend: BackendSchema.optional(),
57-
runtime: RuntimeSchema.optional(),
58-
api: APISchema.optional(),
59-
webDeploy: WebDeploySchema.optional(),
60-
})
61-
.optional()
62-
.default({}),
41+
z.object({
42+
yes: z
43+
.boolean()
44+
.optional()
45+
.default(false)
46+
.describe("Use default configuration"),
47+
database: DatabaseSchema.optional(),
48+
orm: ORMSchema.optional(),
49+
auth: z.boolean().optional(),
50+
frontend: z.array(FrontendSchema).optional(),
51+
addons: z.array(AddonsSchema).optional(),
52+
examples: z.array(ExamplesSchema).optional(),
53+
git: z.boolean().optional(),
54+
packageManager: PackageManagerSchema.optional(),
55+
install: z.boolean().optional(),
56+
dbSetup: DatabaseSetupSchema.optional(),
57+
backend: BackendSchema.optional(),
58+
runtime: RuntimeSchema.optional(),
59+
api: APISchema.optional(),
60+
webDeploy: WebDeploySchema.optional(),
61+
}),
6362
]),
6463
)
6564
.mutation(async ({ input }) => {
@@ -77,22 +76,17 @@ const router = t.router({
7776
})
7877
.input(
7978
z.tuple([
80-
z
81-
.object({
82-
addons: z.array(AddonsSchema).optional().default([]),
83-
webDeploy: WebDeploySchema.optional(),
84-
projectDir: z.string().optional(),
85-
install: z
86-
.boolean()
87-
.optional()
88-
.default(false)
89-
.describe(
90-
"Install dependencies after adding addons or deployment",
91-
),
92-
packageManager: PackageManagerSchema.optional(),
93-
})
94-
.optional()
95-
.default({}),
79+
z.object({
80+
addons: z.array(AddonsSchema).optional().default([]),
81+
webDeploy: WebDeploySchema.optional(),
82+
projectDir: z.string().optional(),
83+
install: z
84+
.boolean()
85+
.optional()
86+
.default(false)
87+
.describe("Install dependencies after adding addons or deployment"),
88+
packageManager: PackageManagerSchema.optional(),
89+
}),
9690
]),
9791
)
9892
.mutation(async ({ input }) => {

apps/cli/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { z } from "zod";
1+
import z from "zod";
22

33
export const DatabaseSchema = z
44
.enum(["none", "sqlite", "postgres", "mysql", "mongodb"])

0 commit comments

Comments
 (0)