@povio/openapi-codegen-cli 4.0.0-rc.8 → 4.0.0-rc.9

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/README.md CHANGED
@@ -8,6 +8,8 @@
8
8
 
9
9
  Axios is required when using the Axios transport (the default) or the `/axios` entry point. Projects using the native transport can omit Axios: generate with `--restClient native` and import `NativeRestClient` from `@povio/openapi-codegen-cli/native`. The root exports remain available for compatibility and support tree-shaking in consumer bundles. For direct runtime imports without bundling, use `/native` and `/errors` to avoid loading the Axios client. The `/axios` entry point is also available for Axios-specific imports. CLI-only usage and the `/generator`, `/tiny`, `/vite`, and `/metro` entry points do not require Axios.
10
10
 
11
+ ACL features require `@casl/ability@^7.1.1` and `@casl/react@^7.1.0`. When migrating to CASL 7, regenerate the client so `AppAbility` uses `Ability` instead of `PureAbility`, and update any handwritten CASL types. The runtime continues to use `createMongoAbility` for condition matching. CASL 7 treats empty conditions (`{}`) as matching everything. The `Can` helper keeps its `use` tuple and `(isAllowed, ability)` render callback.
12
+
11
13
  Use this tool to generate code (Zod schemas, TypeScript types, API definitions, and React queries) from an OpenAPI v3 specification. API definitions use a REST client wrapper with either Axios or the native transport. React queries are generated in alignment with our code standards, without the need for explicit types.
12
14
 
13
15
  The tool partially leverages code from [openapi-zod-client](https://github.com/astahmer/openapi-zod-client) repository.
package/dist/acl.d.mts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { a as ErrorHandler } from "./error-handling-BpAQHWrU.mjs";
2
- import { PropsWithChildren } from "react";
3
- import { AbilityTuple, PureAbility, RawRuleOf, Subject } from "@casl/ability";
2
+ import { PropsWithChildren, ReactNode } from "react";
3
+ import { Ability, AbilityTuple, RawRuleOf, Subject } from "@casl/ability";
4
4
  import { PackRule } from "@casl/ability/extra";
5
- import { BoundCanProps } from "@casl/react";
5
+ import { CanProps } from "@casl/react";
6
6
  //#region src/lib/acl/appAbility.types.d.ts
7
7
  type AppAbilities = AbilityTuple<string, Subject>;
8
- type AppAbility = PureAbility<AppAbilities>;
8
+ type AppAbility = Ability<AppAbilities>;
9
9
  //#endregion
10
10
  //#region src/lib/acl/ability.context.d.ts
11
11
  declare namespace AbilityContext {
@@ -16,7 +16,7 @@ declare namespace AbilityContext {
16
16
  } | null;
17
17
  }
18
18
  export const Provider: ({ children }: PropsWithChildren<ProviderProps>) => import("react").JSX.Element;
19
- export const useAbility: <TAppAbilities extends AppAbilities = AppAbilities>() => PureAbility<TAppAbilities>;
19
+ export const useAbility: <TAppAbilities extends AppAbilities = AppAbilities>() => Ability<TAppAbilities>;
20
20
  export {};
21
21
  }
22
22
  //#endregion
@@ -28,11 +28,11 @@ interface AclGuardProps<TAppAbilities extends AppAbilities = AppAbilities> {
28
28
  declare const createAclGuard: <TAppAbilities extends AppAbilities = AppAbilities>() => ({ canUse, redirectTo, children }: PropsWithChildren<AclGuardProps<TAppAbilities>>) => import("react").ReactNode;
29
29
  //#endregion
30
30
  //#region src/lib/acl/Can.d.ts
31
- type CanAbility = PureAbility<AbilityTuple<AppAbilities[0], AppAbilities[1]>>;
32
- type CanProps<TAppAbilities extends AppAbilities = AppAbilities> = {
31
+ type CanProps$1<TAppAbilities extends AppAbilities = AppAbilities> = {
33
32
  use: TAppAbilities;
34
- } & Omit<BoundCanProps<CanAbility>, "do" | "I" | "on" | "a" | "an" | "this">;
35
- declare const Can: <TAppAbilities extends AppAbilities = AppAbilities>({ use, ...props }: CanProps<TAppAbilities>) => import("react").JSX.Element;
33
+ children: ReactNode | ((isAllowed: boolean, ability: AppAbility) => ReactNode);
34
+ } & Omit<CanProps<AppAbility>, "do" | "I" | "on" | "a" | "an" | "this" | "children">;
35
+ declare const Can: <TAppAbilities extends AppAbilities = AppAbilities>({ use, children, ...props }: CanProps$1<TAppAbilities>) => import("react").JSX.Element;
36
36
  //#endregion
37
37
  //#region src/lib/acl/useAclCheck.d.ts
38
38
  interface UseAclCheckProps {
package/dist/acl.mjs CHANGED
@@ -5,7 +5,7 @@ import { createContext, useCallback, useMemo } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { AbilityBuilder, createMongoAbility } from "@casl/ability";
7
7
  import { unpackRules } from "@casl/ability/extra";
8
- import { createContextualCan, useAbility } from "@casl/react";
8
+ import { AbilityProvider, Can as Can$1, useAbility } from "@casl/react";
9
9
  //#region src/lib/acl/ability.context.tsx
10
10
  let AbilityContext;
11
11
  (function(_AbilityContext) {
@@ -27,11 +27,14 @@ let AbilityContext;
27
27
  }, [user]);
28
28
  return /* @__PURE__ */ jsx(Context.Provider, {
29
29
  value: ability,
30
- children
30
+ children: /* @__PURE__ */ jsx(AbilityProvider, {
31
+ value: ability,
32
+ children
33
+ })
31
34
  });
32
35
  };
33
36
  _AbilityContext.useAbility = () => {
34
- return useAbility(Context);
37
+ return useAbility();
35
38
  };
36
39
  })(AbilityContext || (AbilityContext = {}));
37
40
  //#endregion
@@ -47,13 +50,13 @@ const createAclGuard = () => ({ canUse, redirectTo = "/", children }) => {
47
50
  };
48
51
  //#endregion
49
52
  //#region src/lib/acl/Can.tsx
50
- const ContextualCan = createContextualCan(AbilityContext.Consumer);
51
- const Can = ({ use, ...props }) => {
53
+ const Can = ({ use, children, ...props }) => {
52
54
  const [action, subject] = use;
53
- return /* @__PURE__ */ jsx(ContextualCan, {
55
+ return /* @__PURE__ */ jsx(Can$1, {
54
56
  ...props,
55
57
  do: action,
56
- on: subject
58
+ on: subject,
59
+ children: typeof children === "function" ? ({ isAllowed, ability }) => props.passThrough || isAllowed ? children(isAllowed, ability) : null : children
57
60
  });
58
61
  };
59
62
  //#endregion
@@ -1481,7 +1481,7 @@ async function runGenerate({ fileConfig, params, formatGeneratedFile, profiler =
1481
1481
  const nativeFiles = generateFilesFromNativeOpenAPI(nativeInput.source, nativeInput.yaml, config);
1482
1482
  if (nativeFiles) return nativeFiles;
1483
1483
  }
1484
- const { generateCodeFromOpenAPIDoc } = await import("./generateCodeFromOpenAPIDoc-C820Kywh.mjs").then((n) => n.n);
1484
+ const { generateCodeFromOpenAPIDoc } = await import("./generateCodeFromOpenAPIDoc-uswCSFZ_.mjs").then((n) => n.n);
1485
1485
  return generateCodeFromOpenAPIDoc(openApiDoc, config, profiler, {
1486
1486
  source: nativeInput.source,
1487
1487
  yaml: nativeInput.yaml
@@ -9,7 +9,7 @@ const ACL_APP_ABILITIES = "AppAbilities";
9
9
  const ACL_CHECK_HOOK = "useAclCheck";
10
10
  const CASL_ABILITY_BINDING = {
11
11
  abilityTuple: "AbilityTuple",
12
- pureAbility: "PureAbility",
12
+ ability: "Ability",
13
13
  forcedSubject: "ForcedSubject",
14
14
  subjectType: "Subject",
15
15
  subject: "subject"
@@ -17,7 +17,7 @@ const CASL_ABILITY_BINDING = {
17
17
  const CASL_ABILITY_IMPORT = {
18
18
  bindings: [
19
19
  CASL_ABILITY_BINDING.abilityTuple,
20
- CASL_ABILITY_BINDING.pureAbility,
20
+ CASL_ABILITY_BINDING.ability,
21
21
  CASL_ABILITY_BINDING.forcedSubject,
22
22
  CASL_ABILITY_BINDING.subjectType,
23
23
  CASL_ABILITY_BINDING.subject
@@ -2129,7 +2129,7 @@ function generateAppAcl({ resolver, data }) {
2129
2129
  const caslAbilityTupleImport = {
2130
2130
  bindings: [],
2131
2131
  typeBindings: [
2132
- CASL_ABILITY_BINDING.pureAbility,
2132
+ CASL_ABILITY_BINDING.ability,
2133
2133
  CASL_ABILITY_BINDING.abilityTuple,
2134
2134
  ...!appAbilitiesType ? [CASL_ABILITY_BINDING.subjectType] : [],
2135
2135
  ...hasAdditionalAbilityImports ? [CASL_ABILITY_BINDING.forcedSubject] : []
@@ -2146,7 +2146,7 @@ function generateAppAcl({ resolver, data }) {
2146
2146
  for (const [action, subjects] of Object.entries(appAbilitiesType)) lines.push(`| ${CASL_ABILITY_BINDING.abilityTuple}<"${action}", ${subjects.join(" | ")}>`);
2147
2147
  } else lines.push(`export type ${ACL_APP_ABILITIES} = ${CASL_ABILITY_BINDING.abilityTuple}<string, ${CASL_ABILITY_BINDING.subjectType}>;`);
2148
2148
  lines.push("");
2149
- lines.push(`export type AppAbility = PureAbility<${ACL_APP_ABILITIES}>;`);
2149
+ lines.push(`export type AppAbility = ${CASL_ABILITY_BINDING.ability}<${ACL_APP_ABILITIES}>;`);
2150
2150
  return lines.join("\n");
2151
2151
  }
2152
2152
  function renderImport$3(importData) {
@@ -1,5 +1,5 @@
1
- import { a as isQuery, i as isMutation, n as getDestructuredVariables, r as isInfiniteQuery, s as getZodSchemaRefs, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-DpynDOX1.mjs";
2
- import { $t as AXIOS_DEFAULT_IMPORT_NAME, A as getAbilityConditionType, B as getImportedZodSchemaInferedTypeName, C as getTagFileName, D as getImportPath, E as getEndpointsImports, Et as isParamMediaTypeAllowed, F as getAbilitySubjectTypes, G as getZodSchemaType, H as getZodSchemaDescription, I as getAclData, J as getUniqueArray, K as getSchemaDescriptions, L as getAppAbilitiesType, Lt as isReferenceObject, M as getAbilityDescription, N as getAbilityFunctionName, O as getModelsImports, P as getAbilitySubject, Pt as wrapWithQuotesIfNeeded, Qt as ZOD_IMPORT, R as hasAbilityConditions, Rt as isSchemaObject, S as getQueryTypesImportPath, T as getAclImports, U as getZodSchemaInferedTypeName, V as getImportedZodSchemaName, W as getZodSchemaPropertyDescriptions, X as invalidVariableNameCharactersToCamel, Y as DEFAULT_GENERATE_OPTIONS, _n as trimTrailingWhitespace, _t as getNamespaceName, an as NATIVE_RESPONSE_TYPE, at as APP_REST_CLIENT_FILE, b as getFileNameWithExtension, c as getEndpointBody, cn as getEndpointTag, ct as MUTATION_EFFECTS, d as getEndpointPath, dn as shouldInlineEndpointsForTag, dt as QUERY_OPTIONS_TYPES, en as AXIOS_IMPORT, f as getImportedEndpointName, fn as capitalize, ft as ZOD_EXTENDED, g as requiresBody, gn as snakeToCamel, gt as REST_PACKAGE_IMPORT_PATH, h as renderMediaUploadMutationBody, ht as NATIVE_PACKAGE_IMPORT_PATH, i as shouldUseNativeCodegen, it as isNamedZodSchema, j as getAbilityConditionsTypes, k as getAbilityAction, l as getEndpointConfig, lt as QUERY_MODULES_FILE, m as mapEndpointParamsToFunctionParams, mt as CONFIG_PACKAGE_IMPORT_PATH, nn as AXIOS_REQUEST_CONFIG_TYPE, o as getOutputFileName, on as getRequestConfigTypeName, ot as APP_REST_CLIENT_NAME, p as hasEndpointConfig, pt as AXIOS_PACKAGE_IMPORT_PATH, r as compileNativeData, rt as isEnumZodSchema, st as DOMAIN_ERRORS_FILE, tn as AXIOS_REQUEST_CONFIG_NAME, u as getEndpointName, ut as QUERY_MODULE_ENUM, vn as Profiler, w as getTagImportPath, x as getQueryModulesImportPath, y as getAppRestClientImportPath, z as renderAclCheckCall } from "./generate.runner-uogwMUwr.mjs";
1
+ import { a as isQuery, i as isMutation, n as getDestructuredVariables, r as isInfiniteQuery, s as getZodSchemaRefs, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-BPAbzWrC.mjs";
2
+ import { $t as AXIOS_DEFAULT_IMPORT_NAME, A as getAbilityConditionType, B as getImportedZodSchemaInferedTypeName, C as getTagFileName, D as getImportPath, E as getEndpointsImports, Et as isParamMediaTypeAllowed, F as getAbilitySubjectTypes, G as getZodSchemaType, H as getZodSchemaDescription, I as getAclData, J as getUniqueArray, K as getSchemaDescriptions, L as getAppAbilitiesType, Lt as isReferenceObject, M as getAbilityDescription, N as getAbilityFunctionName, O as getModelsImports, P as getAbilitySubject, Pt as wrapWithQuotesIfNeeded, Qt as ZOD_IMPORT, R as hasAbilityConditions, Rt as isSchemaObject, S as getQueryTypesImportPath, T as getAclImports, U as getZodSchemaInferedTypeName, V as getImportedZodSchemaName, W as getZodSchemaPropertyDescriptions, X as invalidVariableNameCharactersToCamel, Y as DEFAULT_GENERATE_OPTIONS, _n as trimTrailingWhitespace, _t as getNamespaceName, an as NATIVE_RESPONSE_TYPE, at as APP_REST_CLIENT_FILE, b as getFileNameWithExtension, c as getEndpointBody, cn as getEndpointTag, ct as MUTATION_EFFECTS, d as getEndpointPath, dn as shouldInlineEndpointsForTag, dt as QUERY_OPTIONS_TYPES, en as AXIOS_IMPORT, f as getImportedEndpointName, fn as capitalize, ft as ZOD_EXTENDED, g as requiresBody, gn as snakeToCamel, gt as REST_PACKAGE_IMPORT_PATH, h as renderMediaUploadMutationBody, ht as NATIVE_PACKAGE_IMPORT_PATH, i as shouldUseNativeCodegen, it as isNamedZodSchema, j as getAbilityConditionsTypes, k as getAbilityAction, l as getEndpointConfig, lt as QUERY_MODULES_FILE, m as mapEndpointParamsToFunctionParams, mt as CONFIG_PACKAGE_IMPORT_PATH, nn as AXIOS_REQUEST_CONFIG_TYPE, o as getOutputFileName, on as getRequestConfigTypeName, ot as APP_REST_CLIENT_NAME, p as hasEndpointConfig, pt as AXIOS_PACKAGE_IMPORT_PATH, r as compileNativeData, rt as isEnumZodSchema, st as DOMAIN_ERRORS_FILE, tn as AXIOS_REQUEST_CONFIG_NAME, u as getEndpointName, ut as QUERY_MODULE_ENUM, vn as Profiler, w as getTagImportPath, x as getQueryModulesImportPath, y as getAppRestClientImportPath, z as renderAclCheckCall } from "./generate.runner-CkDuXst9.mjs";
3
3
  import "node:module";
4
4
  //#region \0rolldown/runtime.js
5
5
  var __defProp = Object.defineProperty;
@@ -22,7 +22,7 @@ const ACL_APP_ABILITIES = "AppAbilities";
22
22
  const ACL_CHECK_HOOK = "useAclCheck";
23
23
  const CASL_ABILITY_BINDING = {
24
24
  abilityTuple: "AbilityTuple",
25
- pureAbility: "PureAbility",
25
+ ability: "Ability",
26
26
  forcedSubject: "ForcedSubject",
27
27
  subjectType: "Subject",
28
28
  subject: "subject"
@@ -30,7 +30,7 @@ const CASL_ABILITY_BINDING = {
30
30
  const CASL_ABILITY_IMPORT = {
31
31
  bindings: [
32
32
  CASL_ABILITY_BINDING.abilityTuple,
33
- CASL_ABILITY_BINDING.pureAbility,
33
+ CASL_ABILITY_BINDING.ability,
34
34
  CASL_ABILITY_BINDING.forcedSubject,
35
35
  CASL_ABILITY_BINDING.subjectType,
36
36
  CASL_ABILITY_BINDING.subject
@@ -118,7 +118,7 @@ function generateAppAcl({ resolver, data }) {
118
118
  const caslAbilityTupleImport = {
119
119
  bindings: [],
120
120
  typeBindings: [
121
- CASL_ABILITY_BINDING.pureAbility,
121
+ CASL_ABILITY_BINDING.ability,
122
122
  CASL_ABILITY_BINDING.abilityTuple,
123
123
  ...!appAbilitiesType ? [CASL_ABILITY_BINDING.subjectType] : [],
124
124
  ...hasAdditionalAbilityImports ? [CASL_ABILITY_BINDING.forcedSubject] : []
@@ -135,7 +135,7 @@ function generateAppAcl({ resolver, data }) {
135
135
  for (const [action, subjects] of Object.entries(appAbilitiesType)) lines.push(`| ${CASL_ABILITY_BINDING.abilityTuple}<"${action}", ${subjects.join(" | ")}>`);
136
136
  } else lines.push(`export type ${ACL_APP_ABILITIES} = ${CASL_ABILITY_BINDING.abilityTuple}<string, ${CASL_ABILITY_BINDING.subjectType}>;`);
137
137
  lines.push("");
138
- lines.push(`export type AppAbility = PureAbility<${ACL_APP_ABILITIES}>;`);
138
+ lines.push(`export type AppAbility = ${CASL_ABILITY_BINDING.ability}<${ACL_APP_ABILITIES}>;`);
139
139
  return lines.join("\n");
140
140
  }
141
141
  function renderImport$3(importData) {
@@ -1,6 +1,6 @@
1
- import { r as getQueryName, t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-C820Kywh.mjs";
2
- import { a as isQuery, i as isMutation, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-DpynDOX1.mjs";
3
- import { Et as isParamMediaTypeAllowed, Tt as isMediaTypeAllowed, X as invalidVariableNameCharactersToCamel, Y as DEFAULT_GENERATE_OPTIONS, _ as getSchemaTsMetaType, _t as getNamespaceName, sn as formatTag, t as getOpenApiDoc, v as getTsTypeBase, w as getTagImportPath } from "./generate.runner-uogwMUwr.mjs";
1
+ import { r as getQueryName, t as generateCodeFromOpenAPIDoc } from "./generateCodeFromOpenAPIDoc-uswCSFZ_.mjs";
2
+ import { a as isQuery, i as isMutation, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-BPAbzWrC.mjs";
3
+ import { Et as isParamMediaTypeAllowed, Tt as isMediaTypeAllowed, X as invalidVariableNameCharactersToCamel, Y as DEFAULT_GENERATE_OPTIONS, _ as getSchemaTsMetaType, _t as getNamespaceName, sn as formatTag, t as getOpenApiDoc, v as getTsTypeBase, w as getTagImportPath } from "./generate.runner-CkDuXst9.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 { $ as getParamZodSchemaName, At as pathParamToVariableName, Bt as ALLOWED_PATH_IN, Ct as isErrorStatus, Dt as isPathExcluded, Et as isParamMediaTypeAllowed, Ft as inferRequiredSchema, Gt as ENUM_SCHEMA, Ht as BLOB_SCHEMA, It as isArraySchemaObject, J as getUniqueArray, Jt as STRING_SCHEMA, Kt as INT_SCHEMA, Lt as isReferenceObject, Mt as replaceHyphenatedPath, Nt as unwrapQuotesIfNeeded, Ot as isPrimitiveType, Pt as wrapWithQuotesIfNeeded, Q as getEnumZodSchemaName, Rt as isSchemaObject, St as getSchemaRef, Tt as isMediaTypeAllowed, Ut as DATETIME_SCHEMA, Vt as ANY_SCHEMA, Wt as EMAIL_SCHEMA, X as invalidVariableNameCharactersToCamel, Xt as UUID_SCHEMA, Yt as URL_SCHEMA, Z as getBodyZodSchemaName, Zt as VOID_SCHEMA, _t as getNamespaceName, bt as getParameterEnumNames, cn as getEndpointTag, et as getResponseZodSchemaName, fn as capitalize, gn as snakeToCamel, hn as removeWord, in as JSON_APPLICATION_FORMAT, it as isNamedZodSchema, jt as pathToVariableName, kt as isSortingParameterObject, ln as getOperationTag, m as mapEndpointParamsToFunctionParams, mn as getMostCommonAdjacentCombinationSplit, nt as getZodSchemaOperationName, pn as decapitalize, q as iterateSchema, qt as NUMBER_SCHEMA, rn as BODY_PARAMETER_NAME, s as pick, sn as formatTag, tt as getZodSchemaName, un as isTagIncluded, vn as Profiler, vt as autocorrectRef, wt as isMainResponseStatus, xt as getSchemaNameByRef, yt as escapeControlCharacters, zt as ALLOWED_METHODS } from "./generate.runner-uogwMUwr.mjs";
1
+ import { $ as getParamZodSchemaName, At as pathParamToVariableName, Bt as ALLOWED_PATH_IN, Ct as isErrorStatus, Dt as isPathExcluded, Et as isParamMediaTypeAllowed, Ft as inferRequiredSchema, Gt as ENUM_SCHEMA, Ht as BLOB_SCHEMA, It as isArraySchemaObject, J as getUniqueArray, Jt as STRING_SCHEMA, Kt as INT_SCHEMA, Lt as isReferenceObject, Mt as replaceHyphenatedPath, Nt as unwrapQuotesIfNeeded, Ot as isPrimitiveType, Pt as wrapWithQuotesIfNeeded, Q as getEnumZodSchemaName, Rt as isSchemaObject, St as getSchemaRef, Tt as isMediaTypeAllowed, Ut as DATETIME_SCHEMA, Vt as ANY_SCHEMA, Wt as EMAIL_SCHEMA, X as invalidVariableNameCharactersToCamel, Xt as UUID_SCHEMA, Yt as URL_SCHEMA, Z as getBodyZodSchemaName, Zt as VOID_SCHEMA, _t as getNamespaceName, bt as getParameterEnumNames, cn as getEndpointTag, et as getResponseZodSchemaName, fn as capitalize, gn as snakeToCamel, hn as removeWord, in as JSON_APPLICATION_FORMAT, it as isNamedZodSchema, jt as pathToVariableName, kt as isSortingParameterObject, ln as getOperationTag, m as mapEndpointParamsToFunctionParams, mn as getMostCommonAdjacentCombinationSplit, nt as getZodSchemaOperationName, pn as decapitalize, q as iterateSchema, qt as NUMBER_SCHEMA, rn as BODY_PARAMETER_NAME, s as pick, sn as formatTag, tt as getZodSchemaName, un as isTagIncluded, vn as Profiler, vt as autocorrectRef, wt as isMainResponseStatus, xt as getSchemaNameByRef, yt as escapeControlCharacters, zt as ALLOWED_METHODS } from "./generate.runner-CkDuXst9.mjs";
2
2
  import { OpenAPIV3 } from "openapi-types";
3
3
  //#region src/generators/const/validation.const.ts
4
4
  const HTTP_STATUS_CODES = {
package/dist/metro.cjs CHANGED
@@ -107,7 +107,7 @@ async function runGenerate({ fileConfig, params, formatGeneratedFile, profiler =
107
107
  const nativeFiles = generateFilesFromNativeOpenAPI(nativeInput.source, nativeInput.yaml, config);
108
108
  if (nativeFiles) return nativeFiles;
109
109
  }
110
- const { generateCodeFromOpenAPIDoc } = await Promise.resolve().then(() => require("./generateCodeFromOpenAPIDoc-CbO_HdGQ.cjs"));
110
+ const { generateCodeFromOpenAPIDoc } = await Promise.resolve().then(() => require("./generateCodeFromOpenAPIDoc-BJb0sGXk.cjs"));
111
111
  return generateCodeFromOpenAPIDoc(openApiDoc, config, profiler, {
112
112
  source: nativeInput.source,
113
113
  yaml: nativeInput.yaml
package/dist/metro.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-C5hSAqn_.mjs";
1
+ import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-CZg1oKLX.mjs";
2
2
  import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-DPUNTduQ.mjs";
3
3
  import fs from "fs";
4
4
  import path from "path";
@@ -1,4 +1,4 @@
1
- import { n as runGenerate, vn as Profiler } from "./generate.runner-uogwMUwr.mjs";
1
+ import { n as runGenerate, vn as Profiler } from "./generate.runner-CkDuXst9.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 { c as VALIDATION_ERROR_TYPE_TITLE, o as groupByType, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-DpynDOX1.mjs";
3
- import { C as getTagFileName, a as resolveConfig, n as runGenerate, o as getOutputFileName, t as getOpenApiDoc, vn as Profiler } from "./generate.runner-uogwMUwr.mjs";
2
+ import { c as VALIDATION_ERROR_TYPE_TITLE, o as groupByType, t as getDataFromOpenAPIDoc } from "./getDataFromOpenAPIDoc-BPAbzWrC.mjs";
3
+ import { C as getTagFileName, a as resolveConfig, n as runGenerate, o as getOutputFileName, t as getOpenApiDoc, vn as Profiler } from "./generate.runner-CkDuXst9.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 "4.0.0-rc.8";
34
+ return "4.0.0-rc.9";
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-C5hSAqn_.mjs";
1
+ import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-CZg1oKLX.mjs";
2
2
  import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-DPUNTduQ.mjs";
3
3
  import path from "path";
4
4
  //#region src/vite/openapi-codegen.plugin.ts
package/package.json CHANGED
@@ -125,13 +125,14 @@
125
125
  "yargs": "^18.0.0"
126
126
  },
127
127
  "devDependencies": {
128
- "@casl/ability": "6.8.0",
129
- "@casl/react": "5.0.1",
128
+ "@casl/ability": "7.1.1",
129
+ "@casl/react": "7.1.0",
130
130
  "@tanstack/react-query": "~5.90.21",
131
131
  "@types/bun": "1.4.4",
132
132
  "@types/node": "^25.3.0",
133
133
  "@types/prompt-sync": "^4.2.3",
134
134
  "@types/react": "^19.2.14",
135
+ "@types/react-test-renderer": "^19.1.0",
135
136
  "@types/yargs": "^17.0.35",
136
137
  "@vitejs/plugin-react": "^5.1.4",
137
138
  "axios": "^1.13.1",
@@ -140,6 +141,7 @@
140
141
  "oxlint": "1.50.0",
141
142
  "oxlint-tsgolint": "^0.15.0",
142
143
  "react": "^19.2.4",
144
+ "react-test-renderer": "19.2.4",
143
145
  "tsdown": "^0.22.14",
144
146
  "tsrs": "0.18.0-ts7.1.0-dev.20260929",
145
147
  "type-fest": "^5.4.4",
@@ -150,8 +152,8 @@
150
152
  "zod": "^4.5.0"
151
153
  },
152
154
  "peerDependencies": {
153
- "@casl/ability": "^6.7.3",
154
- "@casl/react": "^5.0.0",
155
+ "@casl/ability": "^7.1.1",
156
+ "@casl/react": "^7.1.0",
155
157
  "@tanstack/react-query": "^5.90.21",
156
158
  "axios": "^1.13.1",
157
159
  "i18next": "^25.8.11",
@@ -187,5 +189,5 @@
187
189
  "node": ">= 18"
188
190
  },
189
191
  "packageManager": "bun@1.4.4",
190
- "version": "4.0.0-rc.8"
192
+ "version": "4.0.0-rc.9"
191
193
  }