Skip to content

Commit de72535

Browse files
committed
Fixes
1 parent e4468e7 commit de72535

38 files changed

Lines changed: 6 additions & 1280 deletions

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@povio/openapi-codegen-cli",
3-
"version": "2.0.8-rc.13",
3+
"version": "2.0.8-rc.14",
44
"keywords": [
55
"codegen",
66
"openapi",
@@ -21,8 +21,7 @@
2121
"files": [
2222
"README.md",
2323
"dist/*",
24-
"src/assets/**",
25-
"src/generators/templates/**"
24+
"src/assets/**"
2625
],
2726
"type": "module",
2827
"main": "./dist/index.mjs",
@@ -69,7 +68,6 @@
6968
},
7069
"dependencies": {
7170
"@apidevtools/swagger-parser": "^10.1.0",
72-
"handlebars": "^4.7.8",
7371
"i18next": "^25.8.13",
7472
"import-fresh": "^3.3.1",
7573
"prompt-sync": "^4.2.0",

pnpm-lock.yaml

Lines changed: 0 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generators/generate/generateQueries.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ export function generateQueries(params: GenerateTypeParams) {
9090
const queryImport: Import = {
9191
bindings: [
9292
...(queryEndpoints.length > 0 ? [QUERY_HOOKS.query] : []),
93+
...(queryEndpoints.length > 0 ? ["UseQueryResult"] : []),
9394
...(resolver.options.infiniteQueries && infiniteQueryEndpoints.length > 0 ? [QUERY_HOOKS.infiniteQuery] : []),
95+
...(resolver.options.infiniteQueries && infiniteQueryEndpoints.length > 0 ? ["UseInfiniteQueryResult"] : []),
9496
...(mutationEndpoints.length > 0 ? [QUERY_HOOKS.mutation] : []),
97+
...(mutationEndpoints.length > 0 ? ["UseMutationResult"] : []),
9598
],
9699
from: QUERY_IMPORT.from,
97100
};
@@ -802,6 +805,7 @@ function renderMutation({
802805
}
803806

804807
lines.push(" ...options,");
808+
lines.push(" onError: options?.onError ?? queryConfig.onError,");
805809
if (hasMutationEffects) {
806810
lines.push(" onSuccess: async (resData, variables, onMutateResult, context) => {");
807811
if (updateQueryEndpoints.length > 0) {

src/generators/templates/acl-check.hbs

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/generators/templates/acl.hbs

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/generators/templates/app-acl.hbs

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/generators/templates/app-rest-client.hbs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/generators/templates/configs.hbs

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/generators/templates/endpoints.hbs

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/generators/templates/models.hbs

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)