@kubb/plugin-zod 3.0.0-alpha.7 → 3.0.0-alpha.8

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.
@@ -2225,9 +2225,9 @@ import { File, Type, useApp } from "@kubb/react";
2225
2225
  import { Fragment, jsx, jsxs } from "@kubb/react/jsx-runtime";
2226
2226
  function Template({ name, typeName, api }) {
2227
2227
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2228
- /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, children: `export const ${name} = ${JSON.stringify(api, void 0, 2)} as const` }),
2228
+ /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: `export const ${name} = ${JSON.stringify(api, void 0, 2)} as const` }),
2229
2229
  /* @__PURE__ */ jsx("br", {}),
2230
- /* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `Infer<typeof ${name}>` }) })
2230
+ /* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `Infer<typeof ${name}>` }) })
2231
2231
  ] });
2232
2232
  }
2233
2233
  var defaultTemplates = { default: Template };
@@ -2565,10 +2565,10 @@ function Schema(props) {
2565
2565
  );
2566
2566
  return /* @__PURE__ */ jsxs2(import_react3.Fragment, { children: [
2567
2567
  enums.map(({ name: name2, nameNode, typeName: typeName2, typeNode }, index) => /* @__PURE__ */ jsxs2(import_react3.Fragment, { children: [
2568
- nameNode && /* @__PURE__ */ jsx2(File2.Source, { name: name2, isExportable: true, children: print(nameNode) }),
2569
- /* @__PURE__ */ jsx2(File2.Source, { name: typeName2, isExportable: ["enum", "asConst", "constEnum", "literal", void 0].includes(enumType), isTypeOnly: true, children: print(typeNode) })
2568
+ nameNode && /* @__PURE__ */ jsx2(File2.Source, { name: name2, isExportable: true, isIndexable: true, children: print(nameNode) }),
2569
+ /* @__PURE__ */ jsx2(File2.Source, { name: typeName2, isIndexable: true, isExportable: ["enum", "asConst", "constEnum", "literal", void 0].includes(enumType), isTypeOnly: true, children: print(typeNode) })
2570
2570
  ] }, [name2, nameNode].join("-"))),
2571
- enums.every((item) => item.typeName !== resolvedName) && /* @__PURE__ */ jsx2(File2.Source, { name: typeName, isTypeOnly: true, isExportable: true, children: print(typeNodes) })
2571
+ enums.every((item) => item.typeName !== resolvedName) && /* @__PURE__ */ jsx2(File2.Source, { name: typeName, isTypeOnly: true, isExportable: true, isIndexable: true, children: print(typeNodes) })
2572
2572
  ] });
2573
2573
  }
2574
2574
  Schema.File = function({}) {
@@ -2701,7 +2701,7 @@ OperationSchema.File = function({}) {
2701
2701
  const combinedSchemaName = operation.method === "get" ? `${factoryName}Query` : `${factoryName}Mutation`;
2702
2702
  return /* @__PURE__ */ jsxs3(File3, { baseName: file.baseName, path: file.path, meta: file.meta, children: [
2703
2703
  items.map(mapItem),
2704
- /* @__PURE__ */ jsx4(File3.Source, { name: combinedSchemaName, isExportable: true, isTypeOnly: true, children: printCombinedSchema({ name: combinedSchemaName, operation, schemas, pluginManager }) })
2704
+ /* @__PURE__ */ jsx4(File3.Source, { name: combinedSchemaName, isExportable: true, isIndexable: true, isTypeOnly: true, children: printCombinedSchema({ name: combinedSchemaName, operation, schemas, pluginManager }) })
2705
2705
  ] });
2706
2706
  };
2707
2707
 
@@ -3137,8 +3137,8 @@ function Template2({ operationsName, pathsName, operations }) {
3137
3137
  {}
3138
3138
  );
3139
3139
  return /* @__PURE__ */ jsxs4(Fragment3, { children: [
3140
- /* @__PURE__ */ jsx6(File4.Source, { name: operationsName, isExportable: true, children: /* @__PURE__ */ jsx6(Const, { export: true, name: operationsName, asConst: true, children: `{${transformers5.stringifyObject(operationsJSON)}}` }) }),
3141
- /* @__PURE__ */ jsx6(File4.Source, { name: pathsName, isExportable: true, children: /* @__PURE__ */ jsx6(Const, { export: true, name: pathsName, asConst: true, children: `{${transformers5.stringifyObject(pathsJSON)}}` }) })
3140
+ /* @__PURE__ */ jsx6(File4.Source, { name: operationsName, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx6(Const, { export: true, name: operationsName, asConst: true, children: `{${transformers5.stringifyObject(operationsJSON)}}` }) }),
3141
+ /* @__PURE__ */ jsx6(File4.Source, { name: pathsName, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx6(Const, { export: true, name: pathsName, asConst: true, children: `{${transformers5.stringifyObject(pathsJSON)}}` }) })
3142
3142
  ] });
3143
3143
  }
3144
3144
  function RootTemplate({ children }) {
@@ -3377,7 +3377,7 @@ function Schema2(props) {
3377
3377
  type: "type"
3378
3378
  });
3379
3379
  if (!tree.length) {
3380
- return /* @__PURE__ */ jsx9(File6.Source, { name: resolvedName, isExportable: true, children: /* @__PURE__ */ jsx9(
3380
+ return /* @__PURE__ */ jsx9(File6.Source, { name: resolvedName, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx9(
3381
3381
  Const2,
3382
3382
  {
3383
3383
  name: resolvedName,
@@ -3398,7 +3398,7 @@ function Schema2(props) {
3398
3398
  }).map((item) => parse2(void 0, item, { name, typeName, description, mapper, coercion, keysToOmit })).filter(Boolean).join("");
3399
3399
  const suffix = output.endsWith(".nullable()") ? ".unwrap().and" : ".and";
3400
3400
  return /* @__PURE__ */ jsxs6(Fragment4, { children: [
3401
- /* @__PURE__ */ jsx9(File6.Source, { name: resolvedName, isExportable: true, children: /* @__PURE__ */ jsx9(
3401
+ /* @__PURE__ */ jsx9(File6.Source, { name: resolvedName, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx9(
3402
3402
  Const2,
3403
3403
  {
3404
3404
  export: true,
@@ -3413,7 +3413,7 @@ function Schema2(props) {
3413
3413
  ].filter(Boolean).join("") || ""
3414
3414
  }
3415
3415
  ) }),
3416
- typedSchema && /* @__PURE__ */ jsx9(File6.Source, { name: resolvedTypeName, isExportable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx9(Type2, { export: true, name: resolvedTypeName, children: `z.infer<typeof ${resolvedName}>` }) })
3416
+ typedSchema && /* @__PURE__ */ jsx9(File6.Source, { name: resolvedTypeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx9(Type2, { export: true, name: resolvedTypeName, children: `z.infer<typeof ${resolvedName}>` }) })
3417
3417
  ] });
3418
3418
  }
3419
3419
  Schema2.File = function({}) {
@@ -3492,4 +3492,4 @@ react/cjs/react.development.js:
3492
3492
  * LICENSE file in the root directory of this source tree.
3493
3493
  *)
3494
3494
  */
3495
- //# sourceMappingURL=chunk-VSAW3SUC.js.map
3495
+ //# sourceMappingURL=chunk-CD3EZWBX.js.map