@kubb/plugin-zod 0.0.0-canary-20250413120605 → 0.0.0-canary-20250414193247

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.
Files changed (71) hide show
  1. package/dist/{chunk-PQF3NNR6.js → chunk-3KBN4WTO.js} +26 -23
  2. package/dist/chunk-3KBN4WTO.js.map +1 -0
  3. package/dist/{chunk-HQATWJUR.cjs → chunk-7GPORWCL.cjs} +26 -23
  4. package/dist/chunk-7GPORWCL.cjs.map +1 -0
  5. package/dist/{chunk-DIGN4QBD.cjs → chunk-F3XH7OGO.cjs} +50 -29
  6. package/dist/chunk-F3XH7OGO.cjs.map +1 -0
  7. package/dist/{chunk-BHV2NKDE.js → chunk-WS5LFZBH.js} +49 -28
  8. package/dist/chunk-WS5LFZBH.js.map +1 -0
  9. package/dist/components.cjs +3 -3
  10. package/dist/components.js +1 -1
  11. package/dist/generators.cjs +4 -4
  12. package/dist/generators.js +2 -2
  13. package/dist/index.cjs +3 -3
  14. package/dist/index.js +2 -2
  15. package/dist/utils.d.cts +1 -1
  16. package/dist/utils.d.ts +1 -1
  17. package/package.json +13 -13
  18. package/src/components/Zod.tsx +12 -11
  19. package/src/generators/__snapshots__/anyof.ts +4 -0
  20. package/src/generators/__snapshots__/coercion.ts +4 -0
  21. package/src/generators/__snapshots__/coercionDates.ts +4 -0
  22. package/src/generators/__snapshots__/coercionNumbers.ts +4 -0
  23. package/src/generators/__snapshots__/coercionStrings.ts +4 -0
  24. package/src/generators/__snapshots__/createPet.ts +4 -0
  25. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +4 -0
  26. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown_wrapOutput.ts +4 -0
  27. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown_wrapOutput_entire_.ts +4 -0
  28. package/src/generators/__snapshots__/createPet_wrapOutput.ts +4 -0
  29. package/src/generators/__snapshots__/deletePet.ts +4 -0
  30. package/src/generators/__snapshots__/deletePet_wrapOutput.ts +4 -0
  31. package/src/generators/__snapshots__/discriminator.ts +4 -0
  32. package/src/generators/__snapshots__/enumBooleanLiteral.ts +4 -0
  33. package/src/generators/__snapshots__/enumNamesType.ts +4 -0
  34. package/src/generators/__snapshots__/enumNullable.ts +4 -0
  35. package/src/generators/__snapshots__/enumSingleLiteral.ts +4 -0
  36. package/src/generators/__snapshots__/enumVarNamesType.ts +4 -0
  37. package/src/generators/__snapshots__/example.ts +4 -0
  38. package/src/generators/__snapshots__/getPets.ts +4 -0
  39. package/src/generators/__snapshots__/getPets_wrapOutput.ts +4 -0
  40. package/src/generators/__snapshots__/mixedValueTypeConst.ts +4 -0
  41. package/src/generators/__snapshots__/nullableString.ts +4 -0
  42. package/src/generators/__snapshots__/nullableStringUuid.ts +4 -0
  43. package/src/generators/__snapshots__/nullableStringWithAnyOf.ts +4 -0
  44. package/src/generators/__snapshots__/numberValueConst.ts +4 -0
  45. package/src/generators/__snapshots__/oneof.ts +4 -0
  46. package/src/generators/__snapshots__/operations.ts +4 -0
  47. package/src/generators/__snapshots__/optionalPetInfer.ts +4 -0
  48. package/src/generators/__snapshots__/optionalPetTyped.ts +4 -0
  49. package/src/generators/__snapshots__/order.ts +4 -0
  50. package/src/generators/__snapshots__/orderDateTypeFalse.ts +4 -0
  51. package/src/generators/__snapshots__/orderDateTypeString.ts +4 -0
  52. package/src/generators/__snapshots__/pet.ts +4 -0
  53. package/src/generators/__snapshots__/petArray.ts +4 -0
  54. package/src/generators/__snapshots__/petCoercion.ts +4 -0
  55. package/src/generators/__snapshots__/petTupleObject.ts +4 -0
  56. package/src/generators/__snapshots__/petWithMapper.ts +4 -0
  57. package/src/generators/__snapshots__/pets.ts +4 -0
  58. package/src/generators/__snapshots__/recursive.ts +4 -0
  59. package/src/generators/__snapshots__/showPetById.ts +4 -0
  60. package/src/generators/__snapshots__/showPetById_wrapOutput.ts +4 -0
  61. package/src/generators/__snapshots__/stringValueConst.ts +4 -0
  62. package/src/generators/__snapshots__/toy.ts +4 -0
  63. package/src/generators/__snapshots__/uuidSchema.ts +4 -0
  64. package/src/generators/operationsGenerator.tsx +7 -1
  65. package/src/generators/zodGenerator.tsx +9 -2
  66. package/src/parser.ts +10 -10
  67. package/src/utils/ToZod.ts +1 -2
  68. package/dist/chunk-BHV2NKDE.js.map +0 -1
  69. package/dist/chunk-DIGN4QBD.cjs.map +0 -1
  70. package/dist/chunk-HQATWJUR.cjs.map +0 -1
  71. package/dist/chunk-PQF3NNR6.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Zod, Operations } from './chunk-PQF3NNR6.js';
1
+ import { Zod, Operations } from './chunk-3KBN4WTO.js';
2
2
  import { createReactGenerator, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas';
3
3
  import { Oas } from '@kubb/plugin-oas/components';
4
4
  import { useSchemaManager, useOas, useOperationManager } from '@kubb/plugin-oas/hooks';
@@ -73,7 +73,7 @@ var zodGenerator = createReactGenerator({
73
73
  baseName: file.baseName,
74
74
  path: file.path,
75
75
  meta: file.meta,
76
- banner: getBanner({ oas, output: plugin.options.output }),
76
+ banner: getBanner({ oas, output: plugin.options.output, config: pluginManager.config }),
77
77
  footer: getFooter({ oas, output: plugin.options.output }),
78
78
  children: [
79
79
  /* @__PURE__ */ jsx(File.Import, { name: ["z"], path: plugin.options.importPath }),
@@ -86,6 +86,7 @@ var zodGenerator = createReactGenerator({
86
86
  const { coercion, inferred, typed, mapper, importPath, wrapOutput } = options;
87
87
  const { getName, getFile, getImports } = useSchemaManager();
88
88
  const {
89
+ pluginManager,
89
90
  plugin: {
90
91
  options: { output }
91
92
  }
@@ -101,26 +102,36 @@ var zodGenerator = createReactGenerator({
101
102
  name: getName(schema.name, { type: "type", pluginKey: [pluginTsName] }),
102
103
  file: getFile(schema.name, { pluginKey: [pluginTsName] })
103
104
  };
104
- return /* @__PURE__ */ jsxs(File, { baseName: zod.file.baseName, path: zod.file.path, meta: zod.file.meta, banner: getBanner({ oas, output }), footer: getFooter({ oas, output }), children: [
105
- /* @__PURE__ */ jsx(File.Import, { name: ["z"], path: importPath }),
106
- typed && /* @__PURE__ */ jsx(File.Import, { isTypeOnly: true, root: zod.file.path, path: type.file.path, name: [type.name] }),
107
- typed && /* @__PURE__ */ jsx(File.Import, { isTypeOnly: true, path: "@kubb/plugin-zod/utils", name: ["ToZod"] }),
108
- imports.map((imp, index) => /* @__PURE__ */ jsx(File.Import, { root: zod.file.path, path: imp.path, name: imp.name }, index)),
109
- /* @__PURE__ */ jsx(
110
- Zod,
111
- {
112
- name: zod.name,
113
- typeName: typed ? type.name : void 0,
114
- inferTypeName: inferred ? zod.inferTypeName : void 0,
115
- description: schema.value.description,
116
- tree: schema.tree,
117
- rawSchema: schema.value,
118
- mapper,
119
- coercion,
120
- wrapOutput
121
- }
122
- )
123
- ] });
105
+ return /* @__PURE__ */ jsxs(
106
+ File,
107
+ {
108
+ baseName: zod.file.baseName,
109
+ path: zod.file.path,
110
+ meta: zod.file.meta,
111
+ banner: getBanner({ oas, output, config: pluginManager.config }),
112
+ footer: getFooter({ oas, output }),
113
+ children: [
114
+ /* @__PURE__ */ jsx(File.Import, { name: ["z"], path: importPath }),
115
+ typed && /* @__PURE__ */ jsx(File.Import, { isTypeOnly: true, root: zod.file.path, path: type.file.path, name: [type.name] }),
116
+ typed && /* @__PURE__ */ jsx(File.Import, { isTypeOnly: true, path: "@kubb/plugin-zod/utils", name: ["ToZod"] }),
117
+ imports.map((imp, index) => /* @__PURE__ */ jsx(File.Import, { root: zod.file.path, path: imp.path, name: imp.name }, index)),
118
+ /* @__PURE__ */ jsx(
119
+ Zod,
120
+ {
121
+ name: zod.name,
122
+ typeName: typed ? type.name : void 0,
123
+ inferTypeName: inferred ? zod.inferTypeName : void 0,
124
+ description: schema.value.description,
125
+ tree: schema.tree,
126
+ rawSchema: schema.value,
127
+ mapper,
128
+ coercion,
129
+ wrapOutput
130
+ }
131
+ )
132
+ ]
133
+ }
134
+ );
124
135
  }
125
136
  });
126
137
  var operationsGenerator = createReactGenerator({
@@ -142,13 +153,23 @@ var operationsGenerator = createReactGenerator({
142
153
  const names = [data.request, ...Object.values(data.responses), ...Object.values(data.parameters)].filter(Boolean);
143
154
  return /* @__PURE__ */ jsx(File.Import, { name: names, root: file.path, path: getFile(operation).path }, key);
144
155
  }).filter(Boolean);
145
- return /* @__PURE__ */ jsxs(File, { baseName: file.baseName, path: file.path, meta: file.meta, banner: getBanner({ oas, output }), footer: getFooter({ oas, output }), children: [
146
- imports,
147
- /* @__PURE__ */ jsx(Operations, { name, operations: transformedOperations })
148
- ] });
156
+ return /* @__PURE__ */ jsxs(
157
+ File,
158
+ {
159
+ baseName: file.baseName,
160
+ path: file.path,
161
+ meta: file.meta,
162
+ banner: getBanner({ oas, output, config: pluginManager.config }),
163
+ footer: getFooter({ oas, output }),
164
+ children: [
165
+ imports,
166
+ /* @__PURE__ */ jsx(Operations, { name, operations: transformedOperations })
167
+ ]
168
+ }
169
+ );
149
170
  }
150
171
  });
151
172
 
152
173
  export { operationsGenerator, zodGenerator };
153
- //# sourceMappingURL=chunk-BHV2NKDE.js.map
154
- //# sourceMappingURL=chunk-BHV2NKDE.js.map
174
+ //# sourceMappingURL=chunk-WS5LFZBH.js.map
175
+ //# sourceMappingURL=chunk-WS5LFZBH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/generators/zodGenerator.tsx","../src/generators/operationsGenerator.tsx"],"names":["options","createReactGenerator","useApp","useOas","useOperationManager","jsx","File","jsxs","getBanner","getFooter"],"mappings":";;;;;;;;;AASO,IAAM,eAAe,oBAAgC,CAAA;AAAA,EAC1D,IAAM,EAAA,KAAA;AAAA,EACN,SAAU,CAAA,EAAE,SAAW,EAAA,OAAA,EAAW,EAAA;AAChC,IAAA,MAAM,EAAE,QAAU,EAAA,QAAA,EAAU,KAAO,EAAA,MAAA,EAAQ,YAAe,GAAA,OAAA;AAE1D,IAAA,MAAM,EAAE,MAAA,EAAQ,aAAe,EAAA,IAAA,K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SAAS,CAAA,CAAE,QAA5D,GAAkE,CAAA;AAAA,KAC5F,CACA,CAAA,MAAA,CAAO,OAAO,CAAA;AAEjB,IAAA,uBACEC,IAAAA;AAAA,MAACD,IAAAA;AAAA,MAAA;AAAA,QACC,UAAU,IAAK,CAAA,QAAA;AAAA,QACf,MAAM,IAAK,CAAA,IAAA;AAAA,QACX,MAAM,IAAK,CAAA,IAAA;AAAA,QACX,MAAA,EAAQE,UAAU,EAAE,GAAA,EAAK,QAAQ,MAAQ,EAAA,aAAA,CAAc,QAAQ,CAAA;AAAA,QAC/D,MAAQC,EAAAA,SAAAA,CAAU,EAAE,GAAA,EAAK,QAAQ,CAAA;AAAA,QAEhC,QAAA,EAAA;AAAA,UAAA,OAAA;AAAA,0BACDJ,GAAAA,CAAC,UAAW,EAAA,EAAA,IAAA,EAAY,YAAY,qBAAuB,EAAA;AAAA;AAAA;AAAA,KAC7D;AAAA;AAGN,CAAC","file":"chunk-WS5LFZBH.js","sourcesContent":["import { type OperationSchema as OperationSchemaType, SchemaGenerator, createReactGenerator, schemaKeywords } from '@kubb/plugin-oas'\nimport { Oas } from '@kubb/plugin-oas/components'\nimport { useOas, useOperationManager, useSchemaManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, useApp } from '@kubb/react'\nimport { Zod } from '../components'\nimport type { PluginZod } from '../types'\n\nexport const zodGenerator = createReactGenerator<PluginZod>({\n name: 'zod',\n Operation({ operation, options }) {\n const { coercion, inferred, typed, mapper, wrapOutput } = options\n\n const { plugin, pluginManager, mode } = useApp<PluginZod>()\n const oas = useOas()\n const { getSchemas, getFile, getGroup } = useOperationManager()\n const schemaManager = useSchemaManager()\n\n const file = getFile(operation)\n const schemas = getSchemas(operation)\n const schemaGenerator = new SchemaGenerator(options, {\n oas,\n plugin,\n pluginManager,\n mode,\n override: options.override,\n })\n\n const operationSchemas = [schemas.pathParams, schemas.queryParams, schemas.headerParams, schemas.statusCodes, schemas.request, schemas.response]\n .flat()\n .filter(Boolean)\n\n const mapOperationSchema = ({ name, schema, description, keysToOmit, ...options }: OperationSchemaType, i: number) => {\n // hack so Params can be optional when needed\n const required = Array.isArray(schema?.required) ? !!schema.required.length : !!schema?.required\n const optional = !required && name.includes('Params')\n const tree = [...schemaGenerator.parse({ schema, name }), optional ? { keyword: schemaKeywords.optional } : undefined].filter(Boolean)\n const imports = schemaManager.getImports(tree)\n const group = options.operation ? getGroup(options.operation) : undefined\n\n const zod = {\n name: schemaManager.getName(name, { type: 'function' }),\n inferTypeName: schemaManager.getName(name, { type: 'type' }),\n file: schemaManager.getFile(name),\n }\n\n const type = {\n name: schemaManager.getName(name, {\n type: 'type',\n pluginKey: [pluginTsName],\n }),\n file: schemaManager.getFile(options.operationName || name, {\n pluginKey: [pluginTsName],\n group,\n }),\n }\n\n return (\n <Oas.Schema key={i} name={name} value={schema} tree={tree}>\n {typed && <File.Import isTypeOnly root={file.path} path={type.file.path} name={[type.name]} />}\n {typed && <File.Import isTypeOnly path={'@kubb/plugin-zod/utils'} name={['ToZod']} />}\n {imports.map((imp, index) => (\n <File.Import key={index} root={file.path} path={imp.path} name={imp.name} />\n ))}\n <Zod\n name={zod.name}\n typeName={typed ? type.name : undefined}\n inferTypeName={inferred ? zod.inferTypeName : undefined}\n description={description}\n tree={tree}\n rawSchema={schema}\n mapper={mapper}\n coercion={coercion}\n keysToOmit={keysToOmit}\n wrapOutput={wrapOutput}\n />\n </Oas.Schema>\n )\n }\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: plugin.options.output, config: pluginManager.config })}\n footer={getFooter({ oas, output: plugin.options.output })}\n >\n <File.Import name={['z']} path={plugin.options.importPath} />\n {operationSchemas.map(mapOperationSchema)}\n </File>\n )\n },\n Schema({ schema, options }) {\n const { coercion, inferred, typed, mapper, importPath, wrapOutput } = options\n\n const { getName, getFile, getImports } = useSchemaManager()\n const {\n pluginManager,\n plugin: {\n options: { output },\n },\n } = useApp<PluginZod>()\n const oas = useOas()\n\n const imports = getImports(schema.tree)\n\n const zod = {\n name: getName(schema.name, { type: 'function' }),\n inferTypeName: getName(schema.name, { type: 'type' }),\n file: getFile(schema.name),\n }\n\n const type = {\n name: getName(schema.name, { type: 'type', pluginKey: [pluginTsName] }),\n file: getFile(schema.name, { pluginKey: [pluginTsName] }),\n }\n\n return (\n <File\n baseName={zod.file.baseName}\n path={zod.file.path}\n meta={zod.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={['z']} path={importPath} />\n {typed && <File.Import isTypeOnly root={zod.file.path} path={type.file.path} name={[type.name]} />}\n {typed && <File.Import isTypeOnly path={'@kubb/plugin-zod/utils'} name={['ToZod']} />}\n {imports.map((imp, index) => (\n <File.Import key={index} root={zod.file.path} path={imp.path} name={imp.name} />\n ))}\n\n <Zod\n name={zod.name}\n typeName={typed ? type.name : undefined}\n inferTypeName={inferred ? zod.inferTypeName : undefined}\n description={schema.value.description}\n tree={schema.tree}\n rawSchema={schema.value}\n mapper={mapper}\n coercion={coercion}\n wrapOutput={wrapOutput}\n />\n </File>\n )\n },\n})\n","import { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, useApp } from '@kubb/react'\nimport { Operations } from '../components/Operations'\nimport type { PluginZod } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginZod>({\n name: 'operations',\n Operations({ operations }) {\n const {\n pluginManager,\n plugin: {\n key: pluginKey,\n options: { output },\n },\n } = useApp<PluginZod>()\n const oas = useOas()\n const { getFile, groupSchemasByName } = useOperationManager()\n\n const name = 'operations'\n const file = pluginManager.getFile({ name, extname: '.ts', pluginKey })\n\n const transformedOperations = operations.map((operation) => ({ operation, data: groupSchemasByName(operation, { type: 'function' }) }))\n\n const imports = Object.entries(transformedOperations)\n .map(([key, { data, operation }]) => {\n const names = [data.request, ...Object.values(data.responses), ...Object.values(data.parameters)].filter(Boolean)\n\n return <File.Import key={key} name={names} root={file.path} path={getFile(operation).path} />\n })\n .filter(Boolean)\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {imports}\n <Operations name={name} operations={transformedOperations} />\n </File>\n )\n },\n})\n"]}
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkHQATWJUR_cjs = require('./chunk-HQATWJUR.cjs');
3
+ var chunk7GPORWCL_cjs = require('./chunk-7GPORWCL.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Operations", {
8
8
  enumerable: true,
9
- get: function () { return chunkHQATWJUR_cjs.Operations; }
9
+ get: function () { return chunk7GPORWCL_cjs.Operations; }
10
10
  });
11
11
  Object.defineProperty(exports, "Zod", {
12
12
  enumerable: true,
13
- get: function () { return chunkHQATWJUR_cjs.Zod; }
13
+ get: function () { return chunk7GPORWCL_cjs.Zod; }
14
14
  });
15
15
  //# sourceMappingURL=components.cjs.map
16
16
  //# sourceMappingURL=components.cjs.map
@@ -1,3 +1,3 @@
1
- export { Operations, Zod } from './chunk-PQF3NNR6.js';
1
+ export { Operations, Zod } from './chunk-3KBN4WTO.js';
2
2
  //# sourceMappingURL=components.js.map
3
3
  //# sourceMappingURL=components.js.map
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkDIGN4QBD_cjs = require('./chunk-DIGN4QBD.cjs');
4
- require('./chunk-HQATWJUR.cjs');
3
+ var chunkF3XH7OGO_cjs = require('./chunk-F3XH7OGO.cjs');
4
+ require('./chunk-7GPORWCL.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "operationsGenerator", {
9
9
  enumerable: true,
10
- get: function () { return chunkDIGN4QBD_cjs.operationsGenerator; }
10
+ get: function () { return chunkF3XH7OGO_cjs.operationsGenerator; }
11
11
  });
12
12
  Object.defineProperty(exports, "zodGenerator", {
13
13
  enumerable: true,
14
- get: function () { return chunkDIGN4QBD_cjs.zodGenerator; }
14
+ get: function () { return chunkF3XH7OGO_cjs.zodGenerator; }
15
15
  });
16
16
  //# sourceMappingURL=generators.cjs.map
17
17
  //# sourceMappingURL=generators.cjs.map
@@ -1,4 +1,4 @@
1
- export { operationsGenerator, zodGenerator } from './chunk-BHV2NKDE.js';
2
- import './chunk-PQF3NNR6.js';
1
+ export { operationsGenerator, zodGenerator } from './chunk-WS5LFZBH.js';
2
+ import './chunk-3KBN4WTO.js';
3
3
  //# sourceMappingURL=generators.js.map
4
4
  //# sourceMappingURL=generators.js.map
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkDIGN4QBD_cjs = require('./chunk-DIGN4QBD.cjs');
4
- require('./chunk-HQATWJUR.cjs');
3
+ var chunkF3XH7OGO_cjs = require('./chunk-F3XH7OGO.cjs');
4
+ require('./chunk-7GPORWCL.cjs');
5
5
  var path = require('path');
6
6
  var core = require('@kubb/core');
7
7
  var transformers = require('@kubb/core/transformers');
@@ -29,7 +29,7 @@ var pluginZod = core.createPlugin((options) => {
29
29
  importPath = "zod",
30
30
  coercion = false,
31
31
  inferred = false,
32
- generators = [chunkDIGN4QBD_cjs.zodGenerator, operations ? chunkDIGN4QBD_cjs.operationsGenerator : void 0].filter(Boolean),
32
+ generators = [chunkF3XH7OGO_cjs.zodGenerator, operations ? chunkF3XH7OGO_cjs.operationsGenerator : void 0].filter(Boolean),
33
33
  wrapOutput = void 0,
34
34
  contentType
35
35
  } = options;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { zodGenerator, operationsGenerator } from './chunk-BHV2NKDE.js';
2
- import './chunk-PQF3NNR6.js';
1
+ import { zodGenerator, operationsGenerator } from './chunk-WS5LFZBH.js';
2
+ import './chunk-3KBN4WTO.js';
3
3
  import path from 'node:path';
4
4
  import { createPlugin, PluginManager, FileManager } from '@kubb/core';
5
5
  import { camelCase, pascalCase } from '@kubb/core/transformers';
package/dist/utils.d.cts CHANGED
@@ -24,7 +24,7 @@ type ToZod<T> = {
24
24
  date: z.ZodDate;
25
25
  object: z.ZodObject<{
26
26
  [K in keyof T]: T[K];
27
- }, 'passthrough', z.ZodTypeAny, T>;
27
+ }, 'passthrough', unknown, T>;
28
28
  rest: z.ZodType<T>;
29
29
  }[zodKey<T>];
30
30
  type ZodShape<T> = {
package/dist/utils.d.ts CHANGED
@@ -24,7 +24,7 @@ type ToZod<T> = {
24
24
  date: z.ZodDate;
25
25
  object: z.ZodObject<{
26
26
  [K in keyof T]: T[K];
27
- }, 'passthrough', z.ZodTypeAny, T>;
27
+ }, 'passthrough', unknown, T>;
28
28
  rest: z.ZodType<T>;
29
29
  }[zodKey<T>];
30
30
  type ZodShape<T> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-zod",
3
- "version": "0.0.0-canary-20250413120605",
3
+ "version": "0.0.0-canary-20250414193247",
4
4
  "description": "Generator plugin-zod",
5
5
  "keywords": [
6
6
  "typescript",
@@ -12,11 +12,11 @@
12
12
  ],
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "git://github.com/kubb-labs/kubb.git",
15
+ "url": "https://github.com/kubb-labs/kubb.git",
16
16
  "directory": "packages/plugin-zod"
17
17
  },
18
18
  "license": "MIT",
19
- "author": "Stijn Van Hulle <stijn@stijnvanhulle.be",
19
+ "author": "stijnvanhulle",
20
20
  "sideEffects": false,
21
21
  "type": "module",
22
22
  "exports": {
@@ -66,24 +66,24 @@
66
66
  "!/**/__tests__/**"
67
67
  ],
68
68
  "dependencies": {
69
- "@kubb/core": "0.0.0-canary-20250413120605",
70
- "@kubb/fs": "0.0.0-canary-20250413120605",
71
- "@kubb/oas": "0.0.0-canary-20250413120605",
72
- "@kubb/parser-ts": "0.0.0-canary-20250413120605",
73
- "@kubb/plugin-oas": "0.0.0-canary-20250413120605",
74
- "@kubb/plugin-ts": "0.0.0-canary-20250413120605",
75
- "@kubb/react": "0.0.0-canary-20250413120605"
69
+ "@kubb/core": "0.0.0-canary-20250414193247",
70
+ "@kubb/fs": "0.0.0-canary-20250414193247",
71
+ "@kubb/oas": "0.0.0-canary-20250414193247",
72
+ "@kubb/parser-ts": "0.0.0-canary-20250414193247",
73
+ "@kubb/plugin-oas": "0.0.0-canary-20250414193247",
74
+ "@kubb/plugin-ts": "0.0.0-canary-20250414193247",
75
+ "@kubb/react": "0.0.0-canary-20250414193247"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@asteasolutions/zod-to-openapi": "^7.3.0",
79
79
  "@hono/zod-openapi": "0.19.2",
80
80
  "tsup": "^8.4.0",
81
81
  "zod": "~3.24.2",
82
- "@kubb/config-ts": "0.0.0-canary-20250413120605",
83
- "@kubb/config-tsup": "0.0.0-canary-20250413120605"
82
+ "@kubb/config-ts": "0.0.0-canary-20250414193247",
83
+ "@kubb/config-tsup": "0.0.0-canary-20250414193247"
84
84
  },
85
85
  "peerDependencies": {
86
- "@kubb/react": "0.0.0-canary-20250413120605"
86
+ "@kubb/react": "0.0.0-canary-20250414193247"
87
87
  },
88
88
  "engines": {
89
89
  "node": ">=20"
@@ -21,16 +21,15 @@ type Props = {
21
21
 
22
22
  export function Zod({ name, typeName, tree, rawSchema, inferTypeName, mapper, coercion, keysToOmit, description, wrapOutput }: Props) {
23
23
  const hasTuple = tree.some((item) => isKeyword(item, schemaKeywords.tuple))
24
+ const schemas = parserZod.sort(tree).filter((item) => {
25
+ if (hasTuple && (isKeyword(item, schemaKeywords.min) || isKeyword(item, schemaKeywords.max))) {
26
+ return false
27
+ }
24
28
 
25
- const output = parserZod
26
- .sort(tree)
27
- .filter((item) => {
28
- if (hasTuple && (isKeyword(item, schemaKeywords.min) || isKeyword(item, schemaKeywords.max))) {
29
- return false
30
- }
29
+ return true
30
+ })
31
31
 
32
- return true
33
- })
32
+ const output = schemas
34
33
  .map((schema, _index, siblings) =>
35
34
  parserZod.parse({ parent: undefined, current: schema, siblings }, { name, keysToOmit, typeName, description, mapper, coercion, wrapOutput, rawSchema }),
36
35
  )
@@ -38,15 +37,17 @@ export function Zod({ name, typeName, tree, rawSchema, inferTypeName, mapper, co
38
37
  .join('')
39
38
 
40
39
  let suffix = ''
40
+ const firstSchema = schemas.at(0)
41
+ const lastSchema = schemas.at(-1)
41
42
 
42
- if (output.endsWith('.nullable()')) {
43
- if (output.startsWith('z.lazy')) {
43
+ if (lastSchema && isKeyword(lastSchema, schemaKeywords.nullable)) {
44
+ if (firstSchema && isKeyword(firstSchema, schemaKeywords.ref)) {
44
45
  suffix = '.unwrap().schema.unwrap()'
45
46
  } else {
46
47
  suffix = '.unwrap()'
47
48
  }
48
49
  } else {
49
- if (output.startsWith('z.lazy')) {
50
+ if (firstSchema && isKeyword(firstSchema, schemaKeywords.ref)) {
50
51
  suffix = '.schema'
51
52
  }
52
53
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const test = z.union([
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const pet = z.object({
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const pet = z.object({
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const pet = z.object({
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const pet = z.object({
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from '@hono/zod-openapi'
2
6
 
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from '@hono/zod-openapi'
2
6
 
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from '@hono/zod-openapi'
2
6
 
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const deletePetsPetidMutationResponse = z.any()
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from '@hono/zod-openapi'
2
6
 
3
7
  export const deletePetsPetidMutationResponse = z.any()
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const advanced = z.union([
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const enumBooleanLiteral = z.union([z.literal(true), z.literal(false)])
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const enumNamesType = z.enum(['0', '1'])
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const enumNullable = z.enum(['Pending', 'Received']).nullable()
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const enumSingleLiteral = z.literal(0)
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const enumVarNamesType = z.union([z.literal(0), z.literal(1)])
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const example = z.object({
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const listPetsQueryParams = z
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from '@hono/zod-openapi'
2
6
 
3
7
  export const listPetsQueryParams = z
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const nullableString = z.string().nullable()
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const nullableStringUuid = z.string().uuid().nullable()
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const nullableStringWithAnyOf = z.union([z.string(), z.null()])
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const test = z.union([
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import {
2
6
  listPets200,
3
7
  listPetsQueryResponse,
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const optionalPet = z.object({
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import type { ToZod } from '@kubb/plugin-zod/utils'
2
6
  import { z } from 'zod'
3
7
 
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Generated by Kubb (https://kubb.dev/).
3
+ * Do not edit manually.
4
+ */
1
5
  import { z } from 'zod'
2
6
 
3
7
  export const order = z.object({