Skip to content

Commit fcf78a3

Browse files
authored
Fix to not use "no-" prefix in options
It seems an option with "no-" prefix will be treated as special case. unjs/citty#176 (comment)
1 parent bf2ba07 commit fcf78a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ const generateCommand = defineCommand({
135135
description: "generate type definitions for API routes",
136136
default: codeGenBaseConfig.generateRouteTypes,
137137
},
138-
"no-client": {
138+
"client": {
139139
type: "boolean",
140-
description: "do not generate an API class",
141-
default: false,
140+
description: "generate an API class",
141+
default: true,
142142
},
143143
"enum-names-as-values": {
144144
type: "boolean",
@@ -316,7 +316,7 @@ const generateCommand = defineCommand({
316316
extractResponseError: args["extract-response-error"],
317317
extractResponses: args["extract-responses"],
318318
fileName: args.name,
319-
generateClient: !args["no-client"],
319+
generateClient: args.client,
320320
generateResponses: args.responses,
321321
generateRouteTypes: args["route-types"],
322322
generateUnionEnums: args["union-enums"],

0 commit comments

Comments
 (0)