Skip to content

Commit 2a3f34b

Browse files
committed
fix: fix formatted code generated
prettier was replacing the quotes with double quotes causing th checks to break.
1 parent 900f8d7 commit 2a3f34b

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/cli.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async function setupProgram() {
5454

5555
const options = program.opts<LimitedUserConfig>();
5656

57-
generate(options, version);
57+
await generate(options, version);
5858
}
5959

6060
setupProgram();

src/createExports.mts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ export const createExports = (service: Service) => {
66
const { klasses } = service;
77
const methods = klasses.map((k) => k.methods).flat();
88

9-
const allGet = methods.filter(
10-
(m) => m.httpMethodName.toUpperCase() === "'GET'"
9+
const allGet = methods.filter((m) =>
10+
m.httpMethodName.toUpperCase().includes("GET")
1111
);
12-
const allPost = methods.filter(
13-
(m) => m.httpMethodName.toUpperCase() === "'POST'"
12+
const allPost = methods.filter((m) =>
13+
m.httpMethodName.toUpperCase().includes("POST")
1414
);
15-
const allPut = methods.filter(
16-
(m) => m.httpMethodName.toUpperCase() === "'PUT'"
15+
const allPut = methods.filter((m) =>
16+
m.httpMethodName.toUpperCase().includes("PUT")
1717
);
18-
const allPatch = methods.filter(
19-
(m) => m.httpMethodName.toUpperCase() === "'PATCH'"
18+
const allPatch = methods.filter((m) =>
19+
m.httpMethodName.toUpperCase().includes("PATCH")
2020
);
21-
const allDelete = methods.filter(
22-
(m) => m.httpMethodName.toUpperCase() === "'DELETE'"
21+
const allDelete = methods.filter((m) =>
22+
m.httpMethodName.toUpperCase().includes("DELETE")
2323
);
2424

2525
const allGetQueries = allGet.map((m) => createUseQuery(m));

0 commit comments

Comments
 (0)