@kubb/plugin-zod 5.0.0-alpha.9 → 5.0.0-beta.4

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 (46) hide show
  1. package/LICENSE +17 -10
  2. package/README.md +1 -3
  3. package/dist/index.cjs +1061 -105
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.ts +369 -4
  6. package/dist/index.js +1053 -104
  7. package/dist/index.js.map +1 -1
  8. package/extension.yaml +502 -0
  9. package/package.json +44 -70
  10. package/src/components/Operations.tsx +25 -18
  11. package/src/components/Zod.tsx +21 -121
  12. package/src/constants.ts +5 -0
  13. package/src/generators/zodGenerator.tsx +174 -160
  14. package/src/index.ts +11 -2
  15. package/src/plugin.ts +67 -156
  16. package/src/printers/printerZod.ts +339 -0
  17. package/src/printers/printerZodMini.ts +295 -0
  18. package/src/resolvers/resolverZod.ts +57 -0
  19. package/src/types.ts +130 -115
  20. package/src/utils.ts +222 -0
  21. package/dist/components-B7zUFnAm.cjs +0 -890
  22. package/dist/components-B7zUFnAm.cjs.map +0 -1
  23. package/dist/components-eECfXVou.js +0 -842
  24. package/dist/components-eECfXVou.js.map +0 -1
  25. package/dist/components.cjs +0 -4
  26. package/dist/components.d.ts +0 -56
  27. package/dist/components.js +0 -2
  28. package/dist/generators-BjPDdJUz.cjs +0 -301
  29. package/dist/generators-BjPDdJUz.cjs.map +0 -1
  30. package/dist/generators-lTWPS6oN.js +0 -290
  31. package/dist/generators-lTWPS6oN.js.map +0 -1
  32. package/dist/generators.cjs +0 -4
  33. package/dist/generators.d.ts +0 -508
  34. package/dist/generators.js +0 -2
  35. package/dist/templates/ToZod.source.cjs +0 -7
  36. package/dist/templates/ToZod.source.cjs.map +0 -1
  37. package/dist/templates/ToZod.source.d.ts +0 -7
  38. package/dist/templates/ToZod.source.js +0 -6
  39. package/dist/templates/ToZod.source.js.map +0 -1
  40. package/dist/types-CoCoOc2u.d.ts +0 -172
  41. package/src/components/index.ts +0 -2
  42. package/src/generators/index.ts +0 -2
  43. package/src/generators/operationsGenerator.tsx +0 -50
  44. package/src/parser.ts +0 -909
  45. package/src/templates/ToZod.source.ts +0 -4
  46. package/templates/ToZod.ts +0 -61
@@ -1,290 +0,0 @@
1
- import "./chunk--u3MIqq1.js";
2
- import { n as Operations, t as Zod } from "./components-eECfXVou.js";
3
- import path from "node:path";
4
- import { SchemaGenerator, schemaKeywords } from "@kubb/plugin-oas";
5
- import { pluginTsName } from "@kubb/plugin-ts";
6
- import { useMode, usePluginDriver } from "@kubb/core/hooks";
7
- import { createReactGenerator } from "@kubb/plugin-oas/generators";
8
- import { useOas, useOperationManager, useSchemaManager } from "@kubb/plugin-oas/hooks";
9
- import { getBanner, getFooter, getImports } from "@kubb/plugin-oas/utils";
10
- import { File } from "@kubb/react-fabric";
11
- import { Fragment, jsx, jsxs } from "@kubb/react-fabric/jsx-runtime";
12
- //#region src/generators/operationsGenerator.tsx
13
- const operationsGenerator = createReactGenerator({
14
- name: "operations",
15
- Operations({ operations, generator, plugin }) {
16
- const { name: pluginName, options: { output, importPath } } = plugin;
17
- const driver = usePluginDriver();
18
- const oas = useOas();
19
- const { getFile, groupSchemasByName } = useOperationManager(generator);
20
- const name = "operations";
21
- const file = driver.getFile({
22
- name,
23
- extname: ".ts",
24
- pluginName
25
- });
26
- const transformedOperations = operations.map((operation) => ({
27
- operation,
28
- data: groupSchemasByName(operation, { type: "function" })
29
- }));
30
- const imports = Object.entries(transformedOperations).map(([key, { data, operation }]) => {
31
- const names = [
32
- data.request,
33
- ...Object.values(data.responses),
34
- ...Object.values(data.parameters)
35
- ].filter(Boolean);
36
- return /* @__PURE__ */ jsx(File.Import, {
37
- name: names,
38
- root: file.path,
39
- path: getFile(operation).path
40
- }, key);
41
- }).filter(Boolean);
42
- const isZodImport = importPath === "zod" || importPath === "zod/mini";
43
- return /* @__PURE__ */ jsxs(File, {
44
- baseName: file.baseName,
45
- path: file.path,
46
- meta: file.meta,
47
- banner: getBanner({
48
- oas,
49
- output,
50
- config: driver.config
51
- }),
52
- footer: getFooter({
53
- oas,
54
- output
55
- }),
56
- children: [
57
- /* @__PURE__ */ jsx(File.Import, {
58
- isTypeOnly: true,
59
- name: isZodImport ? "z" : ["z"],
60
- path: importPath,
61
- isNameSpace: isZodImport
62
- }),
63
- imports,
64
- /* @__PURE__ */ jsx(Operations, {
65
- name,
66
- operations: transformedOperations
67
- })
68
- ]
69
- });
70
- }
71
- });
72
- //#endregion
73
- //#region src/generators/zodGenerator.tsx
74
- const zodGenerator = createReactGenerator({
75
- name: "zod",
76
- Operation({ config, operation, generator, plugin }) {
77
- const { options, options: { coercion: globalCoercion, inferred, typed, mapper, wrapOutput, version, guidType, mini } } = plugin;
78
- const mode = useMode();
79
- const driver = usePluginDriver();
80
- const oas = useOas();
81
- const { getSchemas, getFile, getGroup } = useOperationManager(generator);
82
- const schemaManager = useSchemaManager();
83
- const file = getFile(operation);
84
- const schemas = getSchemas(operation);
85
- const schemaGenerator = new SchemaGenerator(options, {
86
- fabric: generator.context.fabric,
87
- oas,
88
- plugin,
89
- driver,
90
- events: generator.context.events,
91
- mode,
92
- override: options.override
93
- });
94
- const operationSchemas = [
95
- schemas.pathParams,
96
- schemas.queryParams,
97
- schemas.headerParams,
98
- schemas.statusCodes,
99
- schemas.request,
100
- schemas.response
101
- ].flat().filter(Boolean);
102
- const toZodPath = path.resolve(config.root, config.output.path, ".kubb/ToZod.ts");
103
- const mapOperationSchema = ({ name, schema: schemaOriginal, description, keysToOmit: keysToOmitOriginal, ...options }) => {
104
- let schemaObject = schemaOriginal;
105
- let keysToOmit = keysToOmitOriginal;
106
- if ((schemaOriginal.anyOf || schemaOriginal.oneOf) && keysToOmitOriginal && keysToOmitOriginal.length > 0) {
107
- schemaObject = structuredClone(schemaOriginal);
108
- delete schemaObject.$ref;
109
- for (const key of keysToOmitOriginal) delete schemaObject.properties?.[key];
110
- if (Array.isArray(schemaObject.required)) schemaObject.required = schemaObject.required.filter((key) => !keysToOmitOriginal.includes(key));
111
- keysToOmit = void 0;
112
- }
113
- const hasProperties = Object.keys(schemaObject || {}).length > 0;
114
- const hasDefaults = Object.values(schemaObject.properties || {}).some((prop) => prop && Object.hasOwn(prop, "default"));
115
- const optional = !(Array.isArray(schemaObject?.required) ? schemaObject.required.length > 0 : !!schemaObject?.required) && !hasDefaults && hasProperties && name.includes("Params");
116
- if (!optional && Array.isArray(schemaObject.required) && !schemaObject.required.length) schemaObject.required = Object.entries(schemaObject.properties || {}).filter(([_key, value]) => value && Object.hasOwn(value, "default")).map(([key]) => key);
117
- const tree = [...schemaGenerator.parse({
118
- schema: schemaObject,
119
- name,
120
- parentName: null
121
- }), optional ? { keyword: schemaKeywords.optional } : void 0].filter(Boolean);
122
- const imports = getImports(tree);
123
- const group = options.operation ? getGroup(options.operation) : void 0;
124
- const coercion = name.includes("Params") ? {
125
- numbers: true,
126
- strings: false,
127
- dates: true
128
- } : globalCoercion;
129
- const zod = {
130
- name: schemaManager.getName(name, { type: "function" }),
131
- inferTypeName: schemaManager.getName(name, { type: "type" }),
132
- file: schemaManager.getFile(name)
133
- };
134
- const type = {
135
- name: schemaManager.getName(name, {
136
- type: "type",
137
- pluginName: pluginTsName
138
- }),
139
- file: schemaManager.getFile(options.operationName || name, {
140
- pluginName: pluginTsName,
141
- group
142
- })
143
- };
144
- return /* @__PURE__ */ jsxs(Fragment, { children: [
145
- typed && /* @__PURE__ */ jsx(File.Import, {
146
- isTypeOnly: true,
147
- root: file.path,
148
- path: type.file.path,
149
- name: [type.name]
150
- }),
151
- imports.map((imp) => /* @__PURE__ */ jsx(File.Import, {
152
- root: file.path,
153
- path: imp.path,
154
- name: imp.name
155
- }, [
156
- imp.path,
157
- imp.name,
158
- imp.isTypeOnly
159
- ].join("-"))),
160
- /* @__PURE__ */ jsx(Zod, {
161
- name: zod.name,
162
- typeName: typed ? type.name : void 0,
163
- inferTypeName: inferred ? zod.inferTypeName : void 0,
164
- description,
165
- tree,
166
- schema: schemaObject,
167
- mapper,
168
- coercion,
169
- keysToOmit,
170
- wrapOutput,
171
- version: plugin.options.version,
172
- guidType,
173
- emptySchemaType: plugin.options.emptySchemaType,
174
- mini
175
- })
176
- ] });
177
- };
178
- const isZodImport = plugin.options.importPath === "zod" || plugin.options.importPath === "zod/mini";
179
- return /* @__PURE__ */ jsxs(File, {
180
- baseName: file.baseName,
181
- path: file.path,
182
- meta: file.meta,
183
- banner: getBanner({
184
- oas,
185
- output: plugin.options.output,
186
- config: driver.config
187
- }),
188
- footer: getFooter({
189
- oas,
190
- output: plugin.options.output
191
- }),
192
- children: [
193
- /* @__PURE__ */ jsx(File.Import, {
194
- name: isZodImport ? "z" : ["z"],
195
- path: plugin.options.importPath,
196
- isNameSpace: isZodImport
197
- }),
198
- typed && version === "3" && /* @__PURE__ */ jsx(File.Import, {
199
- name: ["ToZod"],
200
- isTypeOnly: true,
201
- root: file.path,
202
- path: toZodPath
203
- }),
204
- operationSchemas.map(mapOperationSchema)
205
- ]
206
- });
207
- },
208
- Schema({ config, schema, plugin }) {
209
- const { getName, getFile } = useSchemaManager();
210
- const { options: { output, emptySchemaType, coercion, inferred, typed, mapper, importPath, wrapOutput, version, guidType, mini } } = plugin;
211
- const driver = usePluginDriver();
212
- const oas = useOas();
213
- const imports = getImports(schema.tree);
214
- const zod = {
215
- name: getName(schema.name, { type: "function" }),
216
- inferTypeName: getName(schema.name, { type: "type" }),
217
- file: getFile(schema.name)
218
- };
219
- const type = {
220
- name: getName(schema.name, {
221
- type: "type",
222
- pluginName: pluginTsName
223
- }),
224
- file: getFile(schema.name, { pluginName: pluginTsName })
225
- };
226
- const isZodImport = importPath === "zod" || importPath === "zod/mini";
227
- const toZodPath = path.resolve(config.root, config.output.path, ".kubb/ToZod.ts");
228
- return /* @__PURE__ */ jsxs(File, {
229
- baseName: zod.file.baseName,
230
- path: zod.file.path,
231
- meta: zod.file.meta,
232
- banner: getBanner({
233
- oas,
234
- output,
235
- config: driver.config
236
- }),
237
- footer: getFooter({
238
- oas,
239
- output
240
- }),
241
- children: [
242
- /* @__PURE__ */ jsx(File.Import, {
243
- name: isZodImport ? "z" : ["z"],
244
- path: importPath,
245
- isNameSpace: isZodImport
246
- }),
247
- typed && /* @__PURE__ */ jsx(File.Import, {
248
- isTypeOnly: true,
249
- root: zod.file.path,
250
- path: type.file.path,
251
- name: [type.name]
252
- }),
253
- typed && version === "3" && /* @__PURE__ */ jsx(File.Import, {
254
- name: ["ToZod"],
255
- isTypeOnly: true,
256
- root: zod.file.path,
257
- path: toZodPath
258
- }),
259
- imports.map((imp) => /* @__PURE__ */ jsx(File.Import, {
260
- root: zod.file.path,
261
- path: imp.path,
262
- name: imp.name
263
- }, [
264
- imp.path,
265
- imp.name,
266
- imp.isTypeOnly
267
- ].join("-"))),
268
- /* @__PURE__ */ jsx(Zod, {
269
- name: zod.name,
270
- typeName: typed ? type.name : void 0,
271
- inferTypeName: inferred ? zod.inferTypeName : void 0,
272
- description: schema.value.description,
273
- tree: schema.tree,
274
- schema: schema.value,
275
- mapper,
276
- coercion,
277
- wrapOutput,
278
- version,
279
- guidType,
280
- emptySchemaType,
281
- mini
282
- })
283
- ]
284
- });
285
- }
286
- });
287
- //#endregion
288
- export { operationsGenerator as n, zodGenerator as t };
289
-
290
- //# sourceMappingURL=generators-lTWPS6oN.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generators-lTWPS6oN.js","names":[],"sources":["../src/generators/operationsGenerator.tsx","../src/generators/zodGenerator.tsx"],"sourcesContent":["import { usePluginDriver } from '@kubb/core/hooks'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File } from '@kubb/react-fabric'\nimport { Operations } from '../components/Operations.tsx'\nimport type { PluginZod } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginZod>({\n name: 'operations',\n Operations({ operations, generator, plugin }) {\n const {\n name: pluginName,\n options: { output, importPath },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getFile, groupSchemasByName } = useOperationManager(generator)\n\n const name = 'operations'\n const file = driver.getFile({ name, extname: '.ts', pluginName })\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 const isZodImport = importPath === 'zod' || importPath === 'zod/mini'\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import isTypeOnly name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {imports}\n <Operations name={name} operations={transformedOperations} />\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { useMode, usePluginDriver } from '@kubb/core/hooks'\nimport { type OperationSchema as OperationSchemaType, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager, useSchemaManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter, getImports } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File } from '@kubb/react-fabric'\nimport { Zod } from '../components'\nimport type { PluginZod } from '../types'\n\nexport const zodGenerator = createReactGenerator<PluginZod>({\n name: 'zod',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { coercion: globalCoercion, inferred, typed, mapper, wrapOutput, version, guidType, mini },\n } = plugin\n\n const mode = useMode()\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getSchemas, getFile, getGroup } = useOperationManager(generator)\n const schemaManager = useSchemaManager()\n\n const file = getFile(operation)\n const schemas = getSchemas(operation)\n const schemaGenerator = new SchemaGenerator(options, {\n fabric: generator.context.fabric,\n oas,\n plugin,\n driver,\n events: generator.context.events,\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 const toZodPath = path.resolve(config.root, config.output.path, '.kubb/ToZod.ts')\n\n const mapOperationSchema = ({ name, schema: schemaOriginal, description, keysToOmit: keysToOmitOriginal, ...options }: OperationSchemaType) => {\n let schemaObject = schemaOriginal\n let keysToOmit = keysToOmitOriginal\n\n if ((schemaOriginal.anyOf || schemaOriginal.oneOf) && keysToOmitOriginal && keysToOmitOriginal.length > 0) {\n schemaObject = structuredClone(schemaOriginal)\n\n // Remove $ref so the schema parser generates inline schema instead of a reference\n delete schemaObject.$ref\n\n for (const key of keysToOmitOriginal) {\n delete schemaObject.properties?.[key]\n }\n\n if (Array.isArray(schemaObject.required)) {\n schemaObject.required = schemaObject.required.filter((key) => !keysToOmitOriginal.includes(key))\n }\n\n keysToOmit = undefined\n }\n\n const hasProperties = Object.keys(schemaObject || {}).length > 0\n const hasDefaults = Object.values(schemaObject.properties || {}).some((prop) => prop && Object.hasOwn(prop, 'default'))\n\n const required = Array.isArray(schemaObject?.required) ? schemaObject.required.length > 0 : !!schemaObject?.required\n const optional = !required && !hasDefaults && hasProperties && name.includes('Params')\n\n if (!optional && Array.isArray(schemaObject.required) && !schemaObject.required.length) {\n schemaObject.required = Object.entries(schemaObject.properties || {})\n .filter(([_key, value]) => value && Object.hasOwn(value, 'default'))\n .map(([key]) => key)\n }\n\n const tree = [\n ...schemaGenerator.parse({ schema: schemaObject, name, parentName: null }),\n optional ? { keyword: schemaKeywords.optional } : undefined,\n ].filter(Boolean)\n const imports = getImports(tree)\n const group = options.operation ? getGroup(options.operation) : undefined\n\n const coercion = name.includes('Params') ? { numbers: true, strings: false, dates: true } : globalCoercion\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 pluginName: pluginTsName,\n }),\n file: schemaManager.getFile(options.operationName || name, {\n pluginName: pluginTsName,\n group,\n }),\n }\n\n return (\n <>\n {typed && <File.Import isTypeOnly root={file.path} path={type.file.path} name={[type.name]} />}\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} 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 schema={schemaObject}\n mapper={mapper}\n coercion={coercion}\n keysToOmit={keysToOmit}\n wrapOutput={wrapOutput}\n version={plugin.options.version}\n guidType={guidType}\n emptySchemaType={plugin.options.emptySchemaType}\n mini={mini}\n />\n </>\n )\n }\n\n const isZodImport = plugin.options.importPath === 'zod' || plugin.options.importPath === 'zod/mini'\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: driver.config })}\n footer={getFooter({ oas, output: plugin.options.output })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={plugin.options.importPath} isNameSpace={isZodImport} />\n {typed && version === '3' && <File.Import name={['ToZod']} isTypeOnly root={file.path} path={toZodPath} />}\n {operationSchemas.map(mapOperationSchema)}\n </File>\n )\n },\n Schema({ config, schema, plugin }) {\n const { getName, getFile } = useSchemaManager()\n const {\n options: { output, emptySchemaType, coercion, inferred, typed, mapper, importPath, wrapOutput, version, guidType, mini },\n } = plugin\n const driver = usePluginDriver()\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', pluginName: pluginTsName }),\n file: getFile(schema.name, { pluginName: pluginTsName }),\n }\n\n const isZodImport = importPath === 'zod' || importPath === 'zod/mini'\n const toZodPath = path.resolve(config.root, config.output.path, '.kubb/ToZod.ts')\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: driver.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={isZodImport ? 'z' : ['z']} path={importPath} isNameSpace={isZodImport} />\n {typed && <File.Import isTypeOnly root={zod.file.path} path={type.file.path} name={[type.name]} />}\n {typed && version === '3' && <File.Import name={['ToZod']} isTypeOnly root={zod.file.path} path={toZodPath} />}\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} 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 schema={schema.value}\n mapper={mapper}\n coercion={coercion}\n wrapOutput={wrapOutput}\n version={version}\n guidType={guidType}\n emptySchemaType={emptySchemaType}\n mini={mini}\n />\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;AAQA,MAAa,sBAAsB,qBAAgC;CACjE,MAAM;CACN,WAAW,EAAE,YAAY,WAAW,UAAU;EAC5C,MAAM,EACJ,MAAM,YACN,SAAS,EAAE,QAAQ,iBACjB;EACJ,MAAM,SAAS,iBAAiB;EAEhC,MAAM,MAAM,QAAQ;EACpB,MAAM,EAAE,SAAS,uBAAuB,oBAAoB,UAAU;EAEtE,MAAM,OAAO;EACb,MAAM,OAAO,OAAO,QAAQ;GAAE;GAAM,SAAS;GAAO;GAAY,CAAC;EAEjE,MAAM,wBAAwB,WAAW,KAAK,eAAe;GAAE;GAAW,MAAM,mBAAmB,WAAW,EAAE,MAAM,YAAY,CAAC;GAAE,EAAE;EAEvI,MAAM,UAAU,OAAO,QAAQ,sBAAsB,CAClD,KAAK,CAAC,KAAK,EAAE,MAAM,i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M,iBAAiB;AAEjF,SACE,qBAAC,MAAD;GACE,UAAU,IAAI,KAAK;GACnB,MAAM,IAAI,KAAK;GACf,MAAM,IAAI,KAAK;GACf,QAAQ,UAAU;IAAE;IAAK;IAAQ,QAAQ,OAAO;IAAQ,CAAC;GACzD,QAAQ,UAAU;IAAE;IAAK;IAAQ,CAAC;aALpC;IAOE,oBAAC,KAAK,QAAN;KAAa,MAAM,cAAc,MAAM,CAAC,IAAI;KAAE,MAAM;KAAY,aAAa;KAAe,CAAA;IAC3F,SAAS,oBAAC,KAAK,QAAN;KAAa,YAAA;KAAW,MAAM,IAAI,KAAK;KAAM,MAAM,KAAK,KAAK;KAAM,MAAM,CAAC,KAAK,KAAK;KAAI,CAAA;IACjG,SAAS,YAAY,OAAO,oBAAC,KAAK,QAAN;KAAa,MAAM,CAAC,QAAQ;KAAE,YAAA;KAAW,MAAM,IAAI,KAAK;KAAM,MAAM;KAAa,CAAA;IAC7G,QAAQ,KAAK,QACZ,oBAAC,KAAK,QAAN;KAAkE,MAAM,IAAI,KAAK;KAAM,MAAM,IAAI;KAAM,MAAM,IAAI;KAAQ,EAAvG;KAAC,IAAI;KAAM,IAAI;KAAM,IAAI;KAAW,CAAC,KAAK,IAAI,CAAyD,CACzH;IAEF,oBAAC,KAAD;KACE,MAAM,IAAI;KACV,UAAU,QAAQ,KAAK,OAAO,KAAA;KAC9B,eAAe,WAAW,IAAI,gBAAgB,KAAA;KAC9C,aAAa,OAAO,MAAM;KAC1B,MAAM,OAAO;KACb,QAAQ,OAAO;KACP;KACE;KACE;KACH;KACC;KACO;KACX;KACN,CAAA;IACG;;;CAGZ,CAAC"}
@@ -1,4 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_generators = require("./generators-BjPDdJUz.cjs");
3
- exports.operationsGenerator = require_generators.operationsGenerator;
4
- exports.zodGenerator = require_generators.zodGenerator;