@povio/openapi-codegen-cli 3.2.0-rc.3 → 3.2.0-rc.5

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.
package/dist/acl.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as SharedErrorHandler } from "./error-handling-DDIXMA-R.mjs";
2
2
  import { n as OpenApiRouter, t as AuthContext } from "./auth.context-YFWzkwoN.mjs";
3
- import { createContext, useCallback, useEffect, useState } from "react";
3
+ import { createContext, useCallback, useMemo } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { AbilityBuilder, createMongoAbility } from "@casl/ability";
6
6
  import { unpackRules } from "@casl/ability/extra";
@@ -14,16 +14,15 @@ let AbilityContext;
14
14
  const { Consumer } = Context;
15
15
  _AbilityContext.Consumer = Consumer;
16
16
  _AbilityContext.Provider = ({ children }) => {
17
- const [ability, setAbility] = useState(initialAppAbility);
18
17
  const { user } = AuthContext.useAuth();
19
- useEffect(() => {
20
- if (!user || !("aclRules" in user)) return;
18
+ const ability = useMemo(() => {
19
+ if (!user || !("aclRules" in user)) return initialAppAbility;
21
20
  const { can, build } = createAppAbilityBuilder();
22
21
  const packedRules = user.aclRules;
23
22
  unpackRules(packedRules).forEach(({ action, subject, conditions }) => {
24
23
  can(action, subject, conditions);
25
24
  });
26
- setAbility(build());
25
+ return build();
27
26
  }, [user]);
28
27
  return /* @__PURE__ */ jsx(Context.Provider, {
29
28
  value: ability,
@@ -1585,7 +1585,7 @@ async function runGenerate({ fileConfig, params, formatGeneratedFile, profiler =
1585
1585
  const nativeFiles = generateFilesFromNativeOpenAPI(nativeInput.source, nativeInput.yaml, config);
1586
1586
  if (nativeFiles) return nativeFiles;
1587
1587
  }
1588
- const { generateCodeFromOpenAPIDoc } = await import("./generateCodeFromOpenAPIDoc-C_DFpWCZ.mjs").then((n) => n.n);
1588
+ const { generateCodeFromOpenAPIDoc } = await import("./generateCodeFromOpenAPIDoc-BOuCcW6U.mjs").then((n) => n.n);
1589
1589
  return generateCodeFromOpenAPIDoc(openApiDoc, config, profiler, {
1590
1590
  source: nativeInput.source,
1591
1591
  yaml: nativeInput.yaml
@@ -3343,26 +3343,28 @@ function renderInfiniteQueryOptions({ resolver, endpoint, inlineEndpoints }) {
3343
3343
  return lines.join("\n");
3344
3344
  }
3345
3345
  function renderPrefetchQuery({ resolver, endpoint }) {
3346
- const hasAxiosRequestConfig = resolver.options.axiosRequestConfig;
3346
+ const hasRequestConfigParam = resolver.options.axiosRequestConfig || endpoint.method === "get";
3347
3347
  const endpointParams = renderEndpointParams(resolver, endpoint, { modelNamespaceTag: require_generate_utils.getEndpointTag(endpoint, resolver.options) });
3348
3348
  const endpointArgs = renderEndpointArgs(resolver, endpoint, {});
3349
3349
  const lines = [];
3350
- lines.push(`export const ${require_generate_utils.getPrefetchQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}${hasAxiosRequestConfig ? `${require_generate_utils.AXIOS_REQUEST_CONFIG_NAME}: ${require_generate_utils.AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}options?: Omit<Parameters<QueryClient["prefetchQuery"]>[0], "queryKey" | "queryFn">) => {`);
3351
- lines.push(` return queryClient.prefetchQuery({ ...${require_generate_utils.getQueryOptionsName(endpoint)}(${endpointParams ? `{ ${endpointArgs} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${require_generate_utils.AXIOS_REQUEST_CONFIG_NAME}` : ""}), ...options });`);
3350
+ lines.push(`export const ${require_generate_utils.getPrefetchQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}options?: Omit<Parameters<QueryClient["prefetchQuery"]>[0], "queryKey" | "queryFn">, ${hasRequestConfigParam ? `${require_generate_utils.AXIOS_REQUEST_CONFIG_NAME}?: ${require_generate_utils.AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}throwOnError = false) => {`);
3351
+ lines.push(` const queryOptions = { ...${require_generate_utils.getQueryOptionsName(endpoint)}(${endpointParams ? `{ ${endpointArgs} }` : ""}${hasRequestConfigParam ? `${endpointParams ? ", " : ""}${require_generate_utils.AXIOS_REQUEST_CONFIG_NAME}` : ""}), ...options };`);
3352
+ lines.push(` return throwOnError ? queryClient.fetchQuery(queryOptions) : queryClient.prefetchQuery(queryOptions);`);
3352
3353
  lines.push("};");
3353
3354
  return lines.join("\n");
3354
3355
  }
3355
3356
  function renderPrefetchInfiniteQuery({ resolver, endpoint }) {
3356
- const hasAxiosRequestConfig = resolver.options.axiosRequestConfig;
3357
+ const hasRequestConfigParam = resolver.options.axiosRequestConfig || endpoint.method === "get";
3357
3358
  const endpointParams = renderEndpointParams(resolver, endpoint, {
3358
3359
  excludePageParam: true,
3359
3360
  modelNamespaceTag: require_generate_utils.getEndpointTag(endpoint, resolver.options)
3360
3361
  });
3361
3362
  const endpointArgs = renderEndpointArgs(resolver, endpoint, { excludePageParam: true });
3362
- const optionsArgs = `${endpointParams ? `{ ${endpointArgs} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${require_generate_utils.AXIOS_REQUEST_CONFIG_NAME}` : ""}`;
3363
+ const optionsArgs = `${endpointParams ? `{ ${endpointArgs} }` : ""}${hasRequestConfigParam ? `${endpointParams ? ", " : ""}${require_generate_utils.AXIOS_REQUEST_CONFIG_NAME}` : ""}`;
3363
3364
  const lines = [];
3364
- lines.push(`export const ${require_generate_utils.getPrefetchInfiniteQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}${hasAxiosRequestConfig ? `${require_generate_utils.AXIOS_REQUEST_CONFIG_NAME}: ${require_generate_utils.AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}options?: Omit<Parameters<QueryClient["prefetchInfiniteQuery"]>[0], "queryKey" | "queryFn" | "initialPageParam" | "getNextPageParam">) => {`);
3365
- lines.push(` return queryClient.prefetchInfiniteQuery({ ...${require_generate_utils.getInfiniteQueryOptionsName(endpoint)}(${optionsArgs}), ...(options as {}) });`);
3365
+ lines.push(`export const ${require_generate_utils.getPrefetchInfiniteQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}options?: Omit<Parameters<QueryClient["prefetchInfiniteQuery"]>[0], "queryKey" | "queryFn" | "initialPageParam" | "getNextPageParam">, ${hasRequestConfigParam ? `${require_generate_utils.AXIOS_REQUEST_CONFIG_NAME}?: ${require_generate_utils.AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}throwOnError = false) => {`);
3366
+ lines.push(` const queryOptions = { ...${require_generate_utils.getInfiniteQueryOptionsName(endpoint)}(${optionsArgs}), ...(options as {}) };`);
3367
+ lines.push(` return throwOnError ? queryClient.fetchInfiniteQuery(queryOptions) : queryClient.prefetchInfiniteQuery(queryOptions);`);
3366
3368
  lines.push("};");
3367
3369
  return lines.join("\n");
3368
3370
  }
@@ -1,5 +1,5 @@
1
- import { r as getZodSchemaRefs, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-Dm8V5UY9.mjs";
2
- import { $ as getImportedAbilityFunctionName, $t as isParamMediaTypeAllowed, A as getEndpointsImports, B as getPrefetchInfiniteQueryName, Bt as QUERY_MODULE_ENUM, C as getAppRestClientImportPath, Ct as isReadEndpoint, D as getTagFileName, Dn as AXIOS_IMPORT, E as getQueryTypesImportPath, En as AXIOS_DEFAULT_IMPORT_NAME, F as mergeImports, Ft as APP_REST_CLIENT_NAME, G as getAbilityConditionType, H as getQueryName, Ht as ZOD_EXTENDED, I as getImportedInfiniteQueryName, In as shouldInlineEndpointsForTag, It as BUILDERS_UTILS, J as getAbilityFunctionName, K as getAbilityConditionsTypes, L as getImportedQueryName, Ln as camelToSpaceSeparated, Lt as DOMAIN_ERRORS_FILE, M as getInfiniteQueriesImports, Mt as isEnumZodSchema, N as getModelsImports, Nn as getEndpointTag, Nt as isNamedZodSchema, O as getTagImportPath, On as AXIOS_REQUEST_CONFIG_NAME, P as getQueriesImports, Pt as APP_REST_CLIENT_FILE, Q as getAppAbilitiesType, R as getInfiniteQueryName, Rn as capitalize, Rt as MUTATION_EFFECTS, St as isReadAllEndpoint, T as getQueryModulesImportPath, Tn as ZOD_IMPORT, Tt as invalidVariableNameCharactersToCamel, U as getQueryOptionsName, Ut as PACKAGE_IMPORT_PATH, V as getPrefetchQueryName, Vn as kebabToCamel, Vt as QUERY_OPTIONS_TYPES, W as getAbilityAction, Wn as Profiler, Wt as getNamespaceName, X as getAbilitySubjectTypes, Y as getAbilitySubject, Z as getAclData, _ as hasEndpointConfig, _t as getPathSegments, at as getZodSchemaInferedTypeName, b as requiresBody, bt as isDeleteEndpoint, c as getDestructuredVariables, ct as getSchemaDescriptions, d as isQuery, dn as isSchemaObject, dt as DEFAULT_GENERATE_OPTIONS, et as hasAbilityConditions, f as getEndpointBody, ft as ACL_APP_ABILITIES, g as getImportedEndpointName, gt as CASL_ABILITY_IMPORT, h as getEndpointPath, ht as CASL_ABILITY_BINDING, i as shouldUseNativeCodegen, it as getZodSchemaDescription, j as getImportPath, jn as JSON_APPLICATION_FORMAT, k as getAclImports, kn as AXIOS_REQUEST_CONFIG_TYPE, l as isInfiniteQuery, m as getEndpointName, mn as ANY_SCHEMA, mt as ACL_CHECK_HOOK, nt as getImportedZodSchemaInferedTypeName, o as getOutputFileName, ot as getZodSchemaPropertyDescriptions, p as getEndpointConfig, pt as ACL_APP_ABILITY_FILE, q as getAbilityDescription, r as compileNativeData, rt as getImportedZodSchemaName, st as getZodSchemaType, tt as renderAclCheckCall, u as isMutation, un as isReferenceObject, ut as getUniqueArray, v as mapEndpointParamsToFunctionParams, vt as isBulkDeleteEndpoint, w as getFileNameWithExtension, wt as isUpdateEndpoint, xt as isPathSegmentParam, y as renderMediaUploadMutationBody, yt as isCreateEndpoint, z as getInfiniteQueryOptionsName, zt as QUERY_MODULES_FILE } from "./generate.runner-wLYGEefS.mjs";
1
+ import { r as getZodSchemaRefs, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-CkIfezoI.mjs";
2
+ import { $ as getImportedAbilityFunctionName, $t as isParamMediaTypeAllowed, A as getEndpointsImports, B as getPrefetchInfiniteQueryName, Bt as QUERY_MODULE_ENUM, C as getAppRestClientImportPath, Ct as isReadEndpoint, D as getTagFileName, Dn as AXIOS_IMPORT, E as getQueryTypesImportPath, En as AXIOS_DEFAULT_IMPORT_NAME, F as mergeImports, Ft as APP_REST_CLIENT_NAME, G as getAbilityConditionType, H as getQueryName, Ht as ZOD_EXTENDED, I as getImportedInfiniteQueryName, In as shouldInlineEndpointsForTag, It as BUILDERS_UTILS, J as getAbilityFunctionName, K as getAbilityConditionsTypes, L as getImportedQueryName, Ln as camelToSpaceSeparated, Lt as DOMAIN_ERRORS_FILE, M as getInfiniteQueriesImports, Mt as isEnumZodSchema, N as getModelsImports, Nn as getEndpointTag, Nt as isNamedZodSchema, O as getTagImportPath, On as AXIOS_REQUEST_CONFIG_NAME, P as getQueriesImports, Pt as APP_REST_CLIENT_FILE, Q as getAppAbilitiesType, R as getInfiniteQueryName, Rn as capitalize, Rt as MUTATION_EFFECTS, St as isReadAllEndpoint, T as getQueryModulesImportPath, Tn as ZOD_IMPORT, Tt as invalidVariableNameCharactersToCamel, U as getQueryOptionsName, Ut as PACKAGE_IMPORT_PATH, V as getPrefetchQueryName, Vn as kebabToCamel, Vt as QUERY_OPTIONS_TYPES, W as getAbilityAction, Wn as Profiler, Wt as getNamespaceName, X as getAbilitySubjectTypes, Y as getAbilitySubject, Z as getAclData, _ as hasEndpointConfig, _t as getPathSegments, at as getZodSchemaInferedTypeName, b as requiresBody, bt as isDeleteEndpoint, c as getDestructuredVariables, ct as getSchemaDescriptions, d as isQuery, dn as isSchemaObject, dt as DEFAULT_GENERATE_OPTIONS, et as hasAbilityConditions, f as getEndpointBody, ft as ACL_APP_ABILITIES, g as getImportedEndpointName, gt as CASL_ABILITY_IMPORT, h as getEndpointPath, ht as CASL_ABILITY_BINDING, i as shouldUseNativeCodegen, it as getZodSchemaDescription, j as getImportPath, jn as JSON_APPLICATION_FORMAT, k as getAclImports, kn as AXIOS_REQUEST_CONFIG_TYPE, l as isInfiniteQuery, m as getEndpointName, mn as ANY_SCHEMA, mt as ACL_CHECK_HOOK, nt as getImportedZodSchemaInferedTypeName, o as getOutputFileName, ot as getZodSchemaPropertyDescriptions, p as getEndpointConfig, pt as ACL_APP_ABILITY_FILE, q as getAbilityDescription, r as compileNativeData, rt as getImportedZodSchemaName, st as getZodSchemaType, tt as renderAclCheckCall, u as isMutation, un as isReferenceObject, ut as getUniqueArray, v as mapEndpointParamsToFunctionParams, vt as isBulkDeleteEndpoint, w as getFileNameWithExtension, wt as isUpdateEndpoint, xt as isPathSegmentParam, y as renderMediaUploadMutationBody, yt as isCreateEndpoint, z as getInfiniteQueryOptionsName, zt as QUERY_MODULES_FILE } from "./generate.runner-BxdZdYX4.mjs";
3
3
  import "node:module";
4
4
  //#region \0rolldown/runtime.js
5
5
  var __defProp = Object.defineProperty;
@@ -1365,26 +1365,28 @@ function renderInfiniteQueryOptions({ resolver, endpoint, inlineEndpoints }) {
1365
1365
  return lines.join("\n");
1366
1366
  }
1367
1367
  function renderPrefetchQuery({ resolver, endpoint }) {
1368
- const hasAxiosRequestConfig = resolver.options.axiosRequestConfig;
1368
+ const hasRequestConfigParam = resolver.options.axiosRequestConfig || endpoint.method === "get";
1369
1369
  const endpointParams = renderEndpointParams(resolver, endpoint, { modelNamespaceTag: getEndpointTag(endpoint, resolver.options) });
1370
1370
  const endpointArgs = renderEndpointArgs(resolver, endpoint, {});
1371
1371
  const lines = [];
1372
- 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">) => {`);
1373
- lines.push(` return queryClient.prefetchQuery({ ...${getQueryOptionsName(endpoint)}(${endpointParams ? `{ ${endpointArgs} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}), ...options });`);
1372
+ lines.push(`export const ${getPrefetchQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}options?: Omit<Parameters<QueryClient["prefetchQuery"]>[0], "queryKey" | "queryFn">, ${hasRequestConfigParam ? `${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}throwOnError = false) => {`);
1373
+ lines.push(` const queryOptions = { ...${getQueryOptionsName(endpoint)}(${endpointParams ? `{ ${endpointArgs} }` : ""}${hasRequestConfigParam ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}), ...options };`);
1374
+ lines.push(` return throwOnError ? queryClient.fetchQuery(queryOptions) : queryClient.prefetchQuery(queryOptions);`);
1374
1375
  lines.push("};");
1375
1376
  return lines.join("\n");
1376
1377
  }
1377
1378
  function renderPrefetchInfiniteQuery({ resolver, endpoint }) {
1378
- const hasAxiosRequestConfig = resolver.options.axiosRequestConfig;
1379
+ const hasRequestConfigParam = resolver.options.axiosRequestConfig || endpoint.method === "get";
1379
1380
  const endpointParams = renderEndpointParams(resolver, endpoint, {
1380
1381
  excludePageParam: true,
1381
1382
  modelNamespaceTag: getEndpointTag(endpoint, resolver.options)
1382
1383
  });
1383
1384
  const endpointArgs = renderEndpointArgs(resolver, endpoint, { excludePageParam: true });
1384
- const optionsArgs = `${endpointParams ? `{ ${endpointArgs} }` : ""}${hasAxiosRequestConfig ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}`;
1385
+ const optionsArgs = `${endpointParams ? `{ ${endpointArgs} }` : ""}${hasRequestConfigParam ? `${endpointParams ? ", " : ""}${AXIOS_REQUEST_CONFIG_NAME}` : ""}`;
1385
1386
  const lines = [];
1386
- 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">) => {`);
1387
- lines.push(` return queryClient.prefetchInfiniteQuery({ ...${getInfiniteQueryOptionsName(endpoint)}(${optionsArgs}), ...(options as {}) });`);
1387
+ lines.push(`export const ${getPrefetchInfiniteQueryName(endpoint)} = (queryClient: QueryClient, ${endpointParams ? `{ ${endpointArgs} }: { ${endpointParams} }, ` : ""}options?: Omit<Parameters<QueryClient["prefetchInfiniteQuery"]>[0], "queryKey" | "queryFn" | "initialPageParam" | "getNextPageParam">, ${hasRequestConfigParam ? `${AXIOS_REQUEST_CONFIG_NAME}?: ${AXIOS_REQUEST_CONFIG_TYPE}, ` : ""}throwOnError = false) => {`);
1388
+ lines.push(` const queryOptions = { ...${getInfiniteQueryOptionsName(endpoint)}(${optionsArgs}), ...(options as {}) };`);
1389
+ lines.push(` return throwOnError ? queryClient.fetchInfiniteQuery(queryOptions) : queryClient.prefetchInfiniteQuery(queryOptions);`);
1388
1390
  lines.push("};");
1389
1391
  return lines.join("\n");
1390
1392
  }
@@ -1,6 +1,6 @@
1
- import { t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-C_DFpWCZ.mjs";
2
- import { t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-Dm8V5UY9.mjs";
3
- import { $t as isParamMediaTypeAllowed, H as getQueryName, Mn as formatTag, O as getTagImportPath, Qt as isMediaTypeAllowed, S as getTsTypeBase, Tt as invalidVariableNameCharactersToCamel, Wt as getNamespaceName, d as isQuery, dt as DEFAULT_GENERATE_OPTIONS, t as getOpenApiDoc, u as isMutation, x as getSchemaTsMetaType } from "./generate.runner-wLYGEefS.mjs";
1
+ import { t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-BOuCcW6U.mjs";
2
+ import { t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-CkIfezoI.mjs";
3
+ import { $t as isParamMediaTypeAllowed, H as getQueryName, Mn as formatTag, O as getTagImportPath, Qt as isMediaTypeAllowed, S as getTsTypeBase, Tt as invalidVariableNameCharactersToCamel, Wt as getNamespaceName, d as isQuery, dt as DEFAULT_GENERATE_OPTIONS, t as getOpenApiDoc, u as isMutation, x as getSchemaTsMetaType } from "./generate.runner-BxdZdYX4.mjs";
4
4
  //#region src/generators/core/getMetadataFromOpenAPIDoc.ts
5
5
  async function getMetadataFromOpenAPIDoc(openApiDoc, options) {
6
6
  const { resolver, data } = await getDataFromOpenAPIDoc(openApiDoc, options);
@@ -1,4 +1,4 @@
1
- import { $t as isParamMediaTypeAllowed, An as BODY_PARAMETER_NAME, At as getZodSchemaName, Bn as getMostCommonAdjacentCombinationSplit, Cn as UUID_SCHEMA, Dt as getEnumZodSchemaName, Et as getBodyZodSchemaName, Fn as isTagIncluded, Gt as autocorrectRef, Hn as removeWord, Jt as getSchemaNameByRef, Kt as escapeControlCharacters, Mn as formatTag, Nn as getEndpointTag, Nt as isNamedZodSchema, Ot as getParamZodSchemaName, Pn as getOperationTag, Qt as isMediaTypeAllowed, Rn as capitalize, Sn as URL_SCHEMA, Tt as invalidVariableNameCharactersToCamel, Un as snakeToCamel, Wn as Profiler, Wt as getNamespaceName, Xt as isErrorStatus, Yt as getSchemaRef, Zt as isMainResponseStatus, _n as EMAIL_SCHEMA, an as replaceHyphenatedPath, bn as NUMBER_SCHEMA, cn as inferRequiredSchema, d as isQuery, dn as isSchemaObject, en as isPathExcluded, fn as ALLOWED_METHODS, gn as DATETIME_SCHEMA, hn as BLOB_SCHEMA, in as pathToVariableName, jn as JSON_APPLICATION_FORMAT, jt as getZodSchemaOperationName, kt as getResponseZodSchemaName, ln as isArraySchemaObject, lt as iterateSchema, mn as ANY_SCHEMA, nn as isSortingParameterObject, on as unwrapQuotesIfNeeded, pn as ALLOWED_PATH_IN, qt as getParameterEnumNames, rn as pathParamToVariableName, s as pick, sn as wrapWithQuotesIfNeeded, tn as isPrimitiveType, un as isReferenceObject, ut as getUniqueArray, vn as ENUM_SCHEMA, wn as VOID_SCHEMA, xn as STRING_SCHEMA, yn as INT_SCHEMA, zn as decapitalize } from "./generate.runner-wLYGEefS.mjs";
1
+ import { $t as isParamMediaTypeAllowed, An as BODY_PARAMETER_NAME, At as getZodSchemaName, Bn as getMostCommonAdjacentCombinationSplit, Cn as UUID_SCHEMA, Dt as getEnumZodSchemaName, Et as getBodyZodSchemaName, Fn as isTagIncluded, Gt as autocorrectRef, Hn as removeWord, Jt as getSchemaNameByRef, Kt as escapeControlCharacters, Mn as formatTag, Nn as getEndpointTag, Nt as isNamedZodSchema, Ot as getParamZodSchemaName, Pn as getOperationTag, Qt as isMediaTypeAllowed, Rn as capitalize, Sn as URL_SCHEMA, Tt as invalidVariableNameCharactersToCamel, Un as snakeToCamel, Wn as Profiler, Wt as getNamespaceName, Xt as isErrorStatus, Yt as getSchemaRef, Zt as isMainResponseStatus, _n as EMAIL_SCHEMA, an as replaceHyphenatedPath, bn as NUMBER_SCHEMA, cn as inferRequiredSchema, d as isQuery, dn as isSchemaObject, en as isPathExcluded, fn as ALLOWED_METHODS, gn as DATETIME_SCHEMA, hn as BLOB_SCHEMA, in as pathToVariableName, jn as JSON_APPLICATION_FORMAT, jt as getZodSchemaOperationName, kt as getResponseZodSchemaName, ln as isArraySchemaObject, lt as iterateSchema, mn as ANY_SCHEMA, nn as isSortingParameterObject, on as unwrapQuotesIfNeeded, pn as ALLOWED_PATH_IN, qt as getParameterEnumNames, rn as pathParamToVariableName, s as pick, sn as wrapWithQuotesIfNeeded, tn as isPrimitiveType, un as isReferenceObject, ut as getUniqueArray, vn as ENUM_SCHEMA, wn as VOID_SCHEMA, xn as STRING_SCHEMA, yn as INT_SCHEMA, zn as decapitalize } from "./generate.runner-BxdZdYX4.mjs";
2
2
  //#region src/generators/const/validation.const.ts
3
3
  const HTTP_STATUS_CODES = {
4
4
  "100": "Continue",
package/dist/metro.cjs CHANGED
@@ -97,7 +97,7 @@ async function runGenerate({ fileConfig, params, formatGeneratedFile, profiler =
97
97
  const nativeFiles = generateFilesFromNativeOpenAPI(nativeInput.source, nativeInput.yaml, config);
98
98
  if (nativeFiles) return nativeFiles;
99
99
  }
100
- const { generateCodeFromOpenAPIDoc } = await Promise.resolve().then(() => require("./generateCodeFromOpenAPIDoc-wCGWkmv1.cjs"));
100
+ const { generateCodeFromOpenAPIDoc } = await Promise.resolve().then(() => require("./generateCodeFromOpenAPIDoc-5VZFVFK1.cjs"));
101
101
  return generateCodeFromOpenAPIDoc(openApiDoc, config, profiler, {
102
102
  source: nativeInput.source,
103
103
  yaml: nativeInput.yaml
package/dist/metro.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-Bd03hQJd.mjs";
1
+ import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-fS_gOezd.mjs";
2
2
  import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-BZ6ZLgRO.mjs";
3
3
  import fs from "fs";
4
4
  import path from "path";
@@ -1,4 +1,4 @@
1
- import { Wn as Profiler, n as runGenerate } from "./generate.runner-wLYGEefS.mjs";
1
+ import { Wn as Profiler, n as runGenerate } from "./generate.runner-BxdZdYX4.mjs";
2
2
  import path from "path";
3
3
  //#region src/plugins/openapi-codegen.runner.ts
4
4
  function createOpenApiCodegenRunner(config, options = {}) {
package/dist/sh.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
- import { i as VALIDATION_ERROR_TYPE_TITLE, n as groupByType, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-Dm8V5UY9.mjs";
3
- import { D as getTagFileName, Wn as Profiler, a as resolveConfig, n as runGenerate, o as getOutputFileName, t as getOpenApiDoc } from "./generate.runner-wLYGEefS.mjs";
2
+ import { i as VALIDATION_ERROR_TYPE_TITLE, n as groupByType, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-CkIfezoI.mjs";
3
+ import { D as getTagFileName, Wn as Profiler, a as resolveConfig, n as runGenerate, o as getOutputFileName, t as getOpenApiDoc } from "./generate.runner-BxdZdYX4.mjs";
4
4
  import yargs from "yargs";
5
5
  import { hideBin } from "yargs/helpers";
6
6
  import { styleText } from "node:util";
@@ -31,7 +31,7 @@ function logBanner(message) {
31
31
  * Fetch the version from package.json
32
32
  */
33
33
  function getVersion() {
34
- return "3.2.0-rc.3";
34
+ return "3.2.0-rc.5";
35
35
  }
36
36
  //#endregion
37
37
  //#region src/helpers/yargs.helper.ts
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-Bd03hQJd.mjs";
1
+ import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-fS_gOezd.mjs";
2
2
  import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-BZ6ZLgRO.mjs";
3
3
  import path from "path";
4
4
  //#region src/vite/openapi-codegen.plugin.ts
package/package.json CHANGED
@@ -141,5 +141,5 @@
141
141
  "node": ">= 18"
142
142
  },
143
143
  "packageManager": "bun@1.3.14",
144
- "version": "3.2.0-rc.3"
144
+ "version": "3.2.0-rc.5"
145
145
  }