@povio/openapi-codegen-cli 2.0.8-rc.20 → 2.0.8-rc.21

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.
@@ -1,4 +1,4 @@
1
- import { a as deepMerge, p as DEFAULT_GENERATE_OPTIONS, r as writeGenerateFileData, t as generateCodeFromOpenAPIDoc, x as Profiler } from "./generateCodeFromOpenAPIDoc-DZ5swy4U.mjs";
1
+ import { a as deepMerge, p as DEFAULT_GENERATE_OPTIONS, r as writeGenerateFileData, t as generateCodeFromOpenAPIDoc, x as Profiler } from "./generateCodeFromOpenAPIDoc-DteSSs_I.mjs";
2
2
  import fs from "fs";
3
3
  import path from "path";
4
4
  import SwaggerParser from "@apidevtools/swagger-parser";
@@ -201,7 +201,8 @@ const AXIOS_REQUEST_CONFIG_NAME = "config";
201
201
  const AXIOS_REQUEST_CONFIG_TYPE = "AxiosRequestConfig";
202
202
  const AXIOS_IMPORT = {
203
203
  defaultImport: AXIOS_DEFAULT_IMPORT_NAME,
204
- bindings: [AXIOS_REQUEST_CONFIG_TYPE],
204
+ bindings: [],
205
+ typeBindings: [AXIOS_REQUEST_CONFIG_TYPE],
205
206
  from: "axios"
206
207
  };
207
208
 
@@ -941,7 +942,10 @@ function getModelsImports({ resolver, tag, zodSchemas = [], zodSchemasAsTypes =
941
942
  getTag,
942
943
  getEntityName: (zodSchema) => getZodSchemaInferedTypeName(zodSchema, resolver.options),
943
944
  options: resolver.options
944
- });
945
+ }).map((importData) => ({
946
+ ...importData,
947
+ ...resolver.options.tsNamespaces ? {} : { typeOnly: true }
948
+ }));
945
949
  return mergeImports(resolver.options, zodSchemaImports, zodSchemaTypeImports);
946
950
  }
947
951
  function getEndpointsImports({ tag, endpoints, options }) {
@@ -1018,13 +1022,28 @@ function mergeImports(options, ...importArrs) {
1018
1022
  const merged = /* @__PURE__ */ new Map();
1019
1023
  importArrs.forEach((imports) => {
1020
1024
  imports.forEach((importItem) => {
1021
- if (!merged.has(importItem.from)) merged.set(importItem.from, importItem);
1022
- else if (!options.tsNamespaces) merged.get(importItem.from).bindings.push(...importItem.bindings);
1025
+ if (!merged.has(importItem.from)) merged.set(importItem.from, {
1026
+ ...importItem,
1027
+ bindings: importItem.typeOnly ? [] : [...importItem.bindings],
1028
+ typeBindings: [...importItem.typeBindings ?? [], ...importItem.typeOnly ? importItem.bindings : []]
1029
+ });
1030
+ else {
1031
+ const existing = merged.get(importItem.from);
1032
+ if (!options.tsNamespaces && !importItem.typeOnly) existing.bindings.push(...importItem.bindings);
1033
+ existing.typeBindings = [
1034
+ ...existing.typeBindings ?? [],
1035
+ ...importItem.typeBindings ?? [],
1036
+ ...importItem.typeOnly ? importItem.bindings : []
1037
+ ];
1038
+ existing.typeOnly = false;
1039
+ }
1023
1040
  });
1024
1041
  });
1025
1042
  return Array.from(merged.values()).map((importItem) => ({
1026
1043
  ...importItem,
1027
- bindings: getUniqueArray(importItem.bindings)
1044
+ bindings: getUniqueArray(importItem.bindings),
1045
+ typeBindings: getUniqueArray(importItem.typeBindings ?? []).filter((binding) => !importItem.bindings.includes(binding)),
1046
+ typeOnly: Boolean(importItem.typeOnly && importItem.bindings.length === 0 && (importItem.typeBindings?.length ?? 0) > 0)
1028
1047
  }));
1029
1048
  }
1030
1049
 
@@ -3051,7 +3070,8 @@ function generateAcl({ resolver, data, tag }) {
3051
3070
  if (!aclData) return;
3052
3071
  const { hasAdditionalAbilityImports, modelsImports, endpoints } = aclData;
3053
3072
  const caslAbilityTupleImport = {
3054
- bindings: [CASL_ABILITY_BINDING.abilityTuple, ...hasAdditionalAbilityImports ? [CASL_ABILITY_BINDING.forcedSubject, CASL_ABILITY_BINDING.subject] : []],
3073
+ bindings: [...hasAdditionalAbilityImports ? [CASL_ABILITY_BINDING.forcedSubject, CASL_ABILITY_BINDING.subject] : []],
3074
+ typeBindings: [CASL_ABILITY_BINDING.abilityTuple],
3055
3075
  from: CASL_ABILITY_IMPORT.from
3056
3076
  };
3057
3077
  const lines = [];
@@ -3076,13 +3096,15 @@ function generateAppAcl({ resolver, data }) {
3076
3096
  data
3077
3097
  });
3078
3098
  const caslAbilityTupleImport = {
3079
- bindings: [
3099
+ bindings: [],
3100
+ typeBindings: [
3080
3101
  CASL_ABILITY_BINDING.pureAbility,
3081
3102
  CASL_ABILITY_BINDING.abilityTuple,
3082
3103
  ...!appAbilitiesType ? [CASL_ABILITY_BINDING.subjectType] : [],
3083
3104
  ...hasAdditionalAbilityImports ? [CASL_ABILITY_BINDING.forcedSubject] : []
3084
3105
  ],
3085
- from: CASL_ABILITY_IMPORT.from
3106
+ from: CASL_ABILITY_IMPORT.from,
3107
+ typeOnly: true
3086
3108
  };
3087
3109
  const lines = [];
3088
3110
  lines.push(renderImport$4(caslAbilityTupleImport));
@@ -3097,7 +3119,9 @@ function generateAppAcl({ resolver, data }) {
3097
3119
  return lines.join("\n");
3098
3120
  }
3099
3121
  function renderImport$4(importData) {
3100
- return `import ${[...importData.defaultImport ? [importData.defaultImport] : [], ...importData.bindings ? [`{ ${importData.bindings.join(", ")} }`] : []].join(", ")} from "${importData.from}";`;
3122
+ const namedImports = [...importData.bindings, ...(importData.typeBindings ?? []).map((binding) => importData.typeOnly ? binding : `type ${binding}`)];
3123
+ const names = [...importData.defaultImport ? [importData.defaultImport] : [], ...namedImports.length > 0 ? [`{ ${namedImports.join(", ")} }`] : []].join(", ");
3124
+ return `import${importData.typeOnly ? " type" : ""} ${names} from "${importData.from}";`;
3101
3125
  }
3102
3126
  function renderAbilityFunction(endpoint) {
3103
3127
  const abilityConditionsTypes = getAbilityConditionsTypes(endpoint) ?? [];
@@ -3372,7 +3396,9 @@ function generateConfigs(generateTypeParams) {
3372
3396
  return lines.join("\n").trimEnd() + "\n";
3373
3397
  }
3374
3398
  function renderImport$3(importData) {
3375
- return `import ${[...importData.defaultImport ? [importData.defaultImport] : [], ...importData.bindings ? [`{ ${importData.bindings.join(", ")} }`] : []].join(", ")} from "${importData.from}";`;
3399
+ const namedImports = [...importData.bindings, ...(importData.typeBindings ?? []).map((binding) => importData.typeOnly ? binding : `type ${binding}`)];
3400
+ const names = [...importData.defaultImport ? [importData.defaultImport] : [], ...namedImports.length > 0 ? [`{ ${namedImports.join(", ")} }`] : []].join(", ");
3401
+ return `import${importData.typeOnly ? " type" : ""} ${names} from "${importData.from}";`;
3376
3402
  }
3377
3403
  function renderInputsConfig(inputsConfig) {
3378
3404
  const lines = [];
@@ -3464,7 +3490,8 @@ function generateEndpoints({ resolver, data, tag }) {
3464
3490
  const hasAxiosRequestConfig = resolver.options.axiosRequestConfig;
3465
3491
  const hasAxiosImport = hasAxiosRequestConfig;
3466
3492
  const axiosImport = {
3467
- bindings: hasAxiosRequestConfig ? [AXIOS_REQUEST_CONFIG_TYPE] : [],
3493
+ bindings: [],
3494
+ typeBindings: hasAxiosRequestConfig ? [AXIOS_REQUEST_CONFIG_TYPE] : [],
3468
3495
  from: AXIOS_IMPORT.from
3469
3496
  };
3470
3497
  const generateParse = resolver.options.parseRequestParams;
@@ -3516,7 +3543,9 @@ function generateEndpoints({ resolver, data, tag }) {
3516
3543
  return lines.join("\n").trimEnd() + "\n";
3517
3544
  }
3518
3545
  function renderImport$2(importData) {
3519
- return `import ${[...importData.defaultImport ? [importData.defaultImport] : [], ...importData.bindings ? [`{ ${importData.bindings.join(", ")} }`] : []].join(", ")} from "${importData.from}";`;
3546
+ const namedImports = [...importData.bindings, ...(importData.typeBindings ?? []).map((binding) => importData.typeOnly ? binding : `type ${binding}`)];
3547
+ const names = [...importData.defaultImport ? [importData.defaultImport] : [], ...namedImports.length > 0 ? [`{ ${namedImports.join(", ")} }`] : []].join(", ");
3548
+ return `import${importData.typeOnly ? " type" : ""} ${names} from "${importData.from}";`;
3520
3549
  }
3521
3550
  function renderEndpointParams$1(resolver, endpoint, options) {
3522
3551
  return mapEndpointParamsToFunctionParams(resolver, endpoint, options).map((param) => `${param.name}${param.required ? "" : "?"}: ${param.type}, `).join("");
@@ -3678,7 +3707,9 @@ function getUsedSchemaNames({ resolver, endpoints }) {
3678
3707
  return Array.from(usedSchemaNames);
3679
3708
  }
3680
3709
  function renderImport$1(importData) {
3681
- return `import ${[...importData.defaultImport ? [importData.defaultImport] : [], ...importData.bindings ? [`{ ${importData.bindings.join(", ")} }`] : []].join(", ")} from "${importData.from}";`;
3710
+ const namedImports = [...importData.bindings, ...(importData.typeBindings ?? []).map((binding) => importData.typeOnly ? binding : `type ${binding}`)];
3711
+ const names = [...importData.defaultImport ? [importData.defaultImport] : [], ...namedImports.length > 0 ? [`{ ${namedImports.join(", ")} }`] : []].join(", ");
3712
+ return `import${importData.typeOnly ? " type" : ""} ${names} from "${importData.from}";`;
3682
3713
  }
3683
3714
  function renderModelJsDocs({ name, zodSchema, tag, resolver }) {
3684
3715
  const lines = [
@@ -3725,7 +3756,8 @@ function generateQueries(params) {
3725
3756
  const hasAxiosImport = hasAxiosRequestConfig || hasAxiosDefaultImport;
3726
3757
  const axiosImport = {
3727
3758
  defaultImport: hasAxiosDefaultImport ? AXIOS_DEFAULT_IMPORT_NAME : void 0,
3728
- bindings: hasAxiosRequestConfig ? [AXIOS_REQUEST_CONFIG_TYPE] : [],
3759
+ bindings: [],
3760
+ typeBindings: hasAxiosRequestConfig ? [AXIOS_REQUEST_CONFIG_TYPE] : [],
3729
3761
  from: AXIOS_IMPORT.from
3730
3762
  };
3731
3763
  const { queryEndpoints, infiniteQueryEndpoints, mutationEndpoints, aclEndpoints } = endpointGroups;
@@ -3745,7 +3777,8 @@ function generateQueries(params) {
3745
3777
  };
3746
3778
  const hasMutationEffectsImport = hasMutationEffects && mutationEndpoints.length > 0;
3747
3779
  const mutationEffectsImport = {
3748
- bindings: [...mutationEndpoints.length > 0 ? [MUTATION_EFFECTS.optionsType, MUTATION_EFFECTS.hookName] : []],
3780
+ bindings: [...mutationEndpoints.length > 0 ? [MUTATION_EFFECTS.hookName] : []],
3781
+ typeBindings: [...mutationEndpoints.length > 0 ? [MUTATION_EFFECTS.optionsType] : []],
3749
3782
  from: PACKAGE_IMPORT_PATH
3750
3783
  };
3751
3784
  const hasAclCheck = resolver.options.checkAcl && aclEndpoints.length > 0;
@@ -3754,8 +3787,8 @@ function generateQueries(params) {
3754
3787
  from: ACL_PACKAGE_IMPORT_PATH
3755
3788
  };
3756
3789
  const queryTypesImport = {
3757
- bindings: [
3758
- "OpenApiQueryConfig",
3790
+ bindings: ["OpenApiQueryConfig"],
3791
+ typeBindings: [
3759
3792
  ...queryEndpoints.length > 0 ? [QUERY_OPTIONS_TYPES.query] : [],
3760
3793
  ...resolver.options.infiniteQueries && infiniteQueryEndpoints.length > 0 ? [QUERY_OPTIONS_TYPES.infiniteQuery] : [],
3761
3794
  ...mutationEndpoints.length > 0 ? [QUERY_OPTIONS_TYPES.mutation] : []
@@ -3913,7 +3946,9 @@ function getEndpointParamMapping(resolver, endpoint, options) {
3913
3946
  return computed;
3914
3947
  }
3915
3948
  function renderImport(importData) {
3916
- return `import ${[...importData.defaultImport ? [importData.defaultImport] : [], ...importData.bindings ? [`{ ${importData.bindings.join(", ")} }`] : []].join(", ")} from "${importData.from}";`;
3949
+ const namedImports = [...importData.bindings, ...(importData.typeBindings ?? []).map((binding) => importData.typeOnly ? binding : `type ${binding}`)];
3950
+ const names = [...importData.defaultImport ? [importData.defaultImport] : [], ...namedImports.length > 0 ? [`{ ${namedImports.join(", ")} }`] : []].join(", ");
3951
+ return `import${importData.typeOnly ? " type" : ""} ${names} from "${importData.from}";`;
3917
3952
  }
3918
3953
  function renderEndpointParams(resolver, endpoint, options) {
3919
3954
  return getEndpointParamMapping(resolver, endpoint, options).map((param) => `${param.name}${param.required ? "" : "?"}: ${param.type}`).join(", ");
@@ -4070,7 +4105,7 @@ function renderQueryOptions({ resolver, endpoint, inlineEndpoints }) {
4070
4105
  const endpointArgs = renderEndpointArgs(resolver, endpoint, {});
4071
4106
  const endpointFunction = inlineEndpoints ? getEndpointName(endpoint) : getImportedEndpointName(endpoint, resolver.options);
4072
4107
  const lines = [];
4073
- lines.push(`export const ${getQueryOptionsName(endpoint)} = (${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}` : ""}) => ({`);
4108
+ lines.push(`const ${getQueryOptionsName(endpoint)} = (${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}` : ""}) => ({`);
4074
4109
  lines.push(` queryKey: keys.${getEndpointName(endpoint)}(${endpointArgs}),`);
4075
4110
  lines.push(` queryFn: () => ${endpointFunction}(${endpointArgs}${hasAxiosRequestConfig ? `${endpointArgs ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}),`);
4076
4111
  lines.push("});");
@@ -4086,7 +4121,7 @@ function renderInfiniteQueryOptions({ resolver, endpoint, inlineEndpoints }) {
4086
4121
  const endpointArgsWithPage = renderEndpointArgs(resolver, endpoint, { replacePageParam: true });
4087
4122
  const endpointFunction = inlineEndpoints ? getEndpointName(endpoint) : getImportedEndpointName(endpoint, resolver.options);
4088
4123
  const lines = [];
4089
- lines.push(`export const ${getInfiniteQueryOptionsName(endpoint)} = (${endpointParams ? `{ ${endpointArgsWithoutPage} }: { ${endpointParams} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}` : ""}) => ({`);
4124
+ lines.push(`const ${getInfiniteQueryOptionsName(endpoint)} = (${endpointParams ? `{ ${endpointArgsWithoutPage} }: { ${endpointParams} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}` : ""}) => ({`);
4090
4125
  lines.push(` queryKey: keys.${getEndpointName(endpoint)}Infinite(${endpointArgsWithoutPage}),`);
4091
4126
  lines.push(` queryFn: ({ pageParam }: { pageParam: number }) => ${endpointFunction}(${endpointArgsWithPage}${hasAxiosRequestConfig ? `, ${AXIOS_REQUEST_CONFIG_NAME}` : ""}),`);
4092
4127
  lines.push(" initialPageParam: 1,");
@@ -4102,8 +4137,8 @@ function renderPrefetchQuery({ resolver, endpoint }) {
4102
4137
  const endpointParams = renderEndpointParams(resolver, endpoint, { modelNamespaceTag: getEndpointTag(endpoint, resolver.options) });
4103
4138
  const endpointArgs = renderEndpointArgs(resolver, endpoint, {});
4104
4139
  const lines = [];
4105
- lines.push(`export const ${getPrefetchQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}${hasAxiosRequestConfig ? `${AXIOS_REQUEST_CONFIG_NAME}: ${AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}options?: Omit<Parameters<QueryClient["prefetchQuery"]>[0], "queryKey" | "queryFn">) => {`);
4106
- lines.push(` return queryClient.prefetchQuery({ ...${getQueryOptionsName(endpoint)}(${endpointParams ? `{ ${endpointArgs} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}), ...options });`);
4140
+ lines.push(`export const ${getPrefetchQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}${hasAxiosRequestConfig ? `${AXIOS_REQUEST_CONFIG_NAME}: ${AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}options?: Omit<Parameters<QueryClient["prefetchQuery"]>[0], "queryKey" | "queryFn">): void => {`);
4141
+ lines.push(` void queryClient.prefetchQuery({ ...${getQueryOptionsName(endpoint)}(${endpointParams ? `{ ${endpointArgs} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}), ...options });`);
4107
4142
  lines.push("};");
4108
4143
  return lines.join("\n");
4109
4144
  }
@@ -4115,8 +4150,8 @@ function renderPrefetchInfiniteQuery({ resolver, endpoint }) {
4115
4150
  });
4116
4151
  const endpointArgs = renderEndpointArgs(resolver, endpoint, { excludePageParam: true });
4117
4152
  const lines = [];
4118
- lines.push(`export const ${getPrefetchInfiniteQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}${hasAxiosRequestConfig ? `${AXIOS_REQUEST_CONFIG_NAME}: ${AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}options?: Omit<Parameters<QueryClient["prefetchInfiniteQuery"]>[0], "queryKey" | "queryFn" | "initialPageParam" | "getNextPageParam">) => {`);
4119
- lines.push(` return queryClient.prefetchInfiniteQuery({ ...${getInfiniteQueryOptionsName(endpoint)}(${endpointParams ? `{ ${endpointArgs} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}), ...options });`);
4153
+ lines.push(`export const ${getPrefetchInfiniteQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}${hasAxiosRequestConfig ? `${AXIOS_REQUEST_CONFIG_NAME}: ${AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}options?: Omit<Parameters<QueryClient["prefetchInfiniteQuery"]>[0], "queryKey" | "queryFn" | "initialPageParam" | "getNextPageParam">): void => {`);
4154
+ lines.push(` void queryClient.prefetchInfiniteQuery({ ...${getInfiniteQueryOptionsName(endpoint)}(${endpointParams ? `{ ${endpointArgs} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}), ...options });`);
4120
4155
  lines.push("};");
4121
4156
  return lines.join("\n");
4122
4157
  }
@@ -4142,7 +4177,6 @@ function renderQuery({ resolver, endpoint, inlineEndpoints }) {
4142
4177
  tag
4143
4178
  }));
4144
4179
  lines.push(`export const ${getQueryName(endpoint)} = <TData>(${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}options?: AppQueryOptions<typeof ${inlineEndpoints ? getEndpointName(endpoint) : getImportedEndpointName(endpoint, resolver.options)}, TData>${hasAxiosRequestConfig ? `, ${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}` : ""}) => {`);
4145
- lines.push(" const queryConfig = OpenApiQueryConfig.useConfig();");
4146
4180
  if (hasAclCheck) lines.push(` const { checkAcl } = ${ACL_CHECK_HOOK}();`);
4147
4181
  lines.push(...renderWorkspaceParamResolutions({
4148
4182
  replacements: workspaceParamReplacements,
@@ -4158,7 +4192,6 @@ function renderQuery({ resolver, endpoint, inlineEndpoints }) {
4158
4192
  lines.push(" },");
4159
4193
  }
4160
4194
  lines.push(" ...options,");
4161
- lines.push(" onError: options?.onError ?? queryConfig.onError,");
4162
4195
  lines.push(" });");
4163
4196
  lines.push("};");
4164
4197
  return lines.join("\n");
@@ -4306,7 +4339,6 @@ function renderInfiniteQuery({ resolver, endpoint, inlineEndpoints }) {
4306
4339
  tag
4307
4340
  }));
4308
4341
  lines.push(`export const ${getInfiniteQueryName(endpoint)} = <TData>(${endpointParams ? `{ ${endpointArgsWithoutPage} }: { ${endpointParams} }, ` : ""}options?: AppInfiniteQueryOptions<typeof ${inlineEndpoints ? getEndpointName(endpoint) : getImportedEndpointName(endpoint, resolver.options)}, TData>${hasAxiosRequestConfig ? `, ${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}` : ""}) => {`);
4309
- lines.push(" const queryConfig = OpenApiQueryConfig.useConfig();");
4310
4342
  if (hasAclCheck) lines.push(` const { checkAcl } = ${ACL_CHECK_HOOK}();`);
4311
4343
  lines.push(...renderWorkspaceParamResolutions({
4312
4344
  replacements: workspaceParamReplacements,
@@ -4322,7 +4354,6 @@ function renderInfiniteQuery({ resolver, endpoint, inlineEndpoints }) {
4322
4354
  lines.push(" },");
4323
4355
  }
4324
4356
  lines.push(" ...options,");
4325
- lines.push(" onError: options?.onError ?? queryConfig.onError,");
4326
4357
  lines.push(" });");
4327
4358
  lines.push("};");
4328
4359
  return lines.join("\n");
@@ -1,4 +1,4 @@
1
- import { _ as isMediaTypeAllowed, b as formatTag, c as getSchemaTsMetaType, d as getTagImportPath, f as getQueryName, h as GenerateType, i as getDataFromOpenAPIDoc, l as getTsTypeBase, m as getNamespaceName, o as isMutation, p as DEFAULT_GENERATE_OPTIONS, s as isQuery, t as generateCodeFromOpenAPIDoc, v as isParamMediaTypeAllowed, y as invalidVariableNameCharactersToCamel } from "./generateCodeFromOpenAPIDoc-DZ5swy4U.mjs";
1
+ import { _ as isMediaTypeAllowed, b as formatTag, c as getSchemaTsMetaType, d as getTagImportPath, f as getQueryName, h as GenerateType, i as getDataFromOpenAPIDoc, l as getTsTypeBase, m as getNamespaceName, o as isMutation, p as DEFAULT_GENERATE_OPTIONS, s as isQuery, t as generateCodeFromOpenAPIDoc, v as isParamMediaTypeAllowed, y as invalidVariableNameCharactersToCamel } from "./generateCodeFromOpenAPIDoc-DteSSs_I.mjs";
2
2
  import SwaggerParser from "@apidevtools/swagger-parser";
3
3
 
4
4
  //#region src/generators/core/getMetadataFromOpenAPIDoc.ts
package/dist/sh.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { S as VALIDATION_ERROR_TYPE_TITLE, g as groupByType, h as GenerateType, i as getDataFromOpenAPIDoc, n as getOutputFileName, u as getTagFileName, x as Profiler } from "./generateCodeFromOpenAPIDoc-DZ5swy4U.mjs";
3
- import { n as resolveConfig, t as runGenerate } from "./generate.runner-DmZ5LVHf.mjs";
2
+ import { S as VALIDATION_ERROR_TYPE_TITLE, g as groupByType, h as GenerateType, i as getDataFromOpenAPIDoc, n as getOutputFileName, u as getTagFileName, x as Profiler } from "./generateCodeFromOpenAPIDoc-DteSSs_I.mjs";
3
+ import { n as resolveConfig, t as runGenerate } from "./generate.runner-Dm1etvum.mjs";
4
4
  import { createRequire } from "node:module";
5
5
  import yargs from "yargs";
6
6
  import { hideBin } from "yargs/helpers";
@@ -39,7 +39,7 @@ function logBanner(message) {
39
39
  * Fetch the version from package.json
40
40
  */
41
41
  function getVersion() {
42
- return "2.0.8-rc.20";
42
+ return "2.0.8-rc.21";
43
43
  }
44
44
 
45
45
  //#endregion
package/dist/vite.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { x as Profiler } from "./generateCodeFromOpenAPIDoc-DZ5swy4U.mjs";
2
- import { t as runGenerate } from "./generate.runner-DmZ5LVHf.mjs";
1
+ import { x as Profiler } from "./generateCodeFromOpenAPIDoc-DteSSs_I.mjs";
2
+ import { t as runGenerate } from "./generate.runner-Dm1etvum.mjs";
3
3
  import path from "path";
4
4
 
5
5
  //#region src/vite/openapi-codegen.plugin.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/openapi-codegen-cli",
3
- "version": "2.0.8-rc.20",
3
+ "version": "2.0.8-rc.21",
4
4
  "keywords": [
5
5
  "codegen",
6
6
  "openapi",