@kubb/plugin-zod 3.0.0-alpha.17 → 3.0.0-alpha.18
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 +0 -4
- package/dist/{chunk-Q7F7N57F.cjs → chunk-G5M2ERLS.cjs} +4 -4
- package/dist/{chunk-Q7F7N57F.cjs.map → chunk-G5M2ERLS.cjs.map} +1 -1
- package/dist/{chunk-35K4FTRK.js → chunk-UPICPEOA.js} +4 -4
- package/dist/{chunk-35K4FTRK.js.map → chunk-UPICPEOA.js.map} +1 -1
- package/dist/{chunk-ORFIAMY6.js → chunk-Y7E62IFJ.js} +3 -3
- package/dist/{chunk-ORFIAMY6.js.map → chunk-Y7E62IFJ.js.map} +1 -1
- package/dist/{chunk-HH7DZZUF.cjs → chunk-ZVLPHBJB.cjs} +26 -26
- package/dist/{chunk-HH7DZZUF.cjs.map → chunk-ZVLPHBJB.cjs.map} +1 -1
- package/dist/components.cjs +3 -3
- package/dist/components.js +1 -1
- package/dist/generators.cjs +4 -4
- package/dist/generators.js +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.js +2 -2
- package/package.json +10 -15
- package/src/generators/__snapshots__/anyof.ts +2 -2
- package/src/generators/__snapshots__/createPet.ts +7 -7
- package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +7 -7
- package/src/generators/__snapshots__/deletePet.ts +2 -2
- package/src/generators/__snapshots__/enumNamesType.ts +2 -2
- package/src/generators/__snapshots__/enumNullable.ts +2 -2
- package/src/generators/__snapshots__/enumVarNamesType.ts +2 -2
- package/src/generators/__snapshots__/example.ts +2 -2
- package/src/generators/__snapshots__/getPets.ts +8 -8
- package/src/generators/__snapshots__/mixedValueTypeConst.ts +3 -3
- package/src/generators/__snapshots__/nullableString.ts +2 -2
- package/src/generators/__snapshots__/nullableStringUuid.ts +2 -2
- package/src/generators/__snapshots__/nullableStringWithAnyOf.ts +2 -2
- package/src/generators/__snapshots__/numberValueConst.ts +3 -3
- package/src/generators/__snapshots__/oneof.ts +2 -2
- package/src/generators/__snapshots__/operations.ts +44 -58
- package/src/generators/__snapshots__/optionalPetInfer.ts +3 -3
- package/src/generators/__snapshots__/optionalPetTyped.ts +2 -2
- package/src/generators/__snapshots__/order.ts +2 -9
- package/src/generators/__snapshots__/orderDateTypeFalse.ts +2 -9
- package/src/generators/__snapshots__/orderDateTypeString.ts +2 -9
- package/src/generators/__snapshots__/pet.ts +2 -2
- package/src/generators/__snapshots__/petArray.ts +3 -7
- package/src/generators/__snapshots__/petCoercion.ts +2 -7
- package/src/generators/__snapshots__/petTupleObject.ts +3 -3
- package/src/generators/__snapshots__/petWithMapper.ts +2 -2
- package/src/generators/__snapshots__/pets.ts +2 -2
- package/src/generators/__snapshots__/recursive.ts +2 -2
- package/src/generators/__snapshots__/showPetById.ts +8 -11
- package/src/generators/__snapshots__/stringValueConst.ts +3 -3
- package/src/generators/__snapshots__/uuidSchema.ts +2 -2
- package/src/parser/index.ts +1 -1
- package/src/types.ts +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkG5M2ERLS_cjs = require('./chunk-G5M2ERLS.cjs');
|
|
4
4
|
var pluginOas = require('@kubb/plugin-oas');
|
|
5
5
|
var components = require('@kubb/plugin-oas/components');
|
|
6
6
|
var hooks = require('@kubb/plugin-oas/hooks');
|
|
@@ -38,9 +38,9 @@ var transformers2__default = /*#__PURE__*/_interopDefault(transformers2);
|
|
|
38
38
|
var factory__namespace = /*#__PURE__*/_interopNamespace(factory);
|
|
39
39
|
|
|
40
40
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
|
|
41
|
-
var require_react_production_min =
|
|
41
|
+
var require_react_production_min = chunkG5M2ERLS_cjs.__commonJS({
|
|
42
42
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js"(exports) {
|
|
43
|
-
|
|
43
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
44
44
|
var l = Symbol.for("react.element");
|
|
45
45
|
var n = Symbol.for("react.portal");
|
|
46
46
|
var p = Symbol.for("react.fragment");
|
|
@@ -311,9 +311,9 @@ var require_react_production_min = chunkQ7F7N57F_cjs.__commonJS({
|
|
|
311
311
|
});
|
|
312
312
|
|
|
313
313
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js
|
|
314
|
-
var require_react_development =
|
|
314
|
+
var require_react_development = chunkG5M2ERLS_cjs.__commonJS({
|
|
315
315
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js"(exports, module) {
|
|
316
|
-
|
|
316
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
317
317
|
if (process.env.NODE_ENV !== "production") {
|
|
318
318
|
(function() {
|
|
319
319
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
@@ -2184,9 +2184,9 @@ var require_react_development = chunkQ7F7N57F_cjs.__commonJS({
|
|
|
2184
2184
|
});
|
|
2185
2185
|
|
|
2186
2186
|
// ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
|
2187
|
-
var require_react =
|
|
2187
|
+
var require_react = chunkG5M2ERLS_cjs.__commonJS({
|
|
2188
2188
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"(exports, module) {
|
|
2189
|
-
|
|
2189
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2190
2190
|
if (process.env.NODE_ENV === "production") {
|
|
2191
2191
|
module.exports = require_react_production_min();
|
|
2192
2192
|
} else {
|
|
@@ -2196,28 +2196,28 @@ var require_react = chunkQ7F7N57F_cjs.__commonJS({
|
|
|
2196
2196
|
});
|
|
2197
2197
|
|
|
2198
2198
|
// src/generators/index.ts
|
|
2199
|
-
|
|
2199
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2200
2200
|
|
|
2201
2201
|
// src/generators/zodGenerator.tsx
|
|
2202
|
-
|
|
2202
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2203
2203
|
|
|
2204
2204
|
// ../plugin-ts/src/index.ts
|
|
2205
|
-
|
|
2205
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2206
2206
|
|
|
2207
2207
|
// ../plugin-ts/src/plugin.ts
|
|
2208
|
-
|
|
2208
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2209
2209
|
|
|
2210
2210
|
// ../plugin-ts/src/generators/index.ts
|
|
2211
|
-
|
|
2211
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2212
2212
|
|
|
2213
2213
|
// ../plugin-ts/src/generators/typeGenerator.tsx
|
|
2214
|
-
|
|
2214
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2215
2215
|
|
|
2216
2216
|
// ../plugin-ts/src/components/index.ts
|
|
2217
|
-
|
|
2217
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2218
2218
|
|
|
2219
2219
|
// ../plugin-ts/src/components/OasType.tsx
|
|
2220
|
-
|
|
2220
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2221
2221
|
function OasType({ name, typeName, api }) {
|
|
2222
2222
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2223
2223
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name, isExportable: true, isIndexable: true, children: `export const ${name} = ${JSON.stringify(api, void 0, 2)} as const` }),
|
|
@@ -2227,11 +2227,11 @@ function OasType({ name, typeName, api }) {
|
|
|
2227
2227
|
}
|
|
2228
2228
|
|
|
2229
2229
|
// ../plugin-ts/src/components/Type.tsx
|
|
2230
|
-
|
|
2231
|
-
var import_react3 =
|
|
2230
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2231
|
+
var import_react3 = chunkG5M2ERLS_cjs.__toESM(require_react(), 1);
|
|
2232
2232
|
|
|
2233
2233
|
// ../plugin-ts/src/parser/index.ts
|
|
2234
|
-
|
|
2234
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2235
2235
|
var typeKeywordMapper = {
|
|
2236
2236
|
any: () => factory__namespace.keywordTypeNodes.any,
|
|
2237
2237
|
unknown: () => factory__namespace.keywordTypeNodes.unknown,
|
|
@@ -2653,7 +2653,7 @@ var typeGenerator = pluginOas.createReactGenerator({
|
|
|
2653
2653
|
});
|
|
2654
2654
|
|
|
2655
2655
|
// ../plugin-ts/src/generators/oasGenerator.tsx
|
|
2656
|
-
|
|
2656
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2657
2657
|
var oasGenerator = pluginOas.createReactGenerator({
|
|
2658
2658
|
name: "oas",
|
|
2659
2659
|
Operations() {
|
|
@@ -2805,7 +2805,7 @@ var zodGenerator = pluginOas.createReactGenerator({
|
|
|
2805
2805
|
typed && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { isTypeOnly: true, root: file.path, path: type.file.path, name: [type.name] }),
|
|
2806
2806
|
imports.map((imp, index) => /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { root: file.path, path: imp.path, name: imp.name }, index)),
|
|
2807
2807
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2808
|
-
|
|
2808
|
+
chunkG5M2ERLS_cjs.Zod,
|
|
2809
2809
|
{
|
|
2810
2810
|
name: zod.name,
|
|
2811
2811
|
typeName: typed ? type.name : void 0,
|
|
@@ -2842,7 +2842,7 @@ var zodGenerator = pluginOas.createReactGenerator({
|
|
|
2842
2842
|
typed && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { isTypeOnly: true, root: zod.file.path, path: type.file.path, name: [type.name] }),
|
|
2843
2843
|
imports.map((imp, index) => /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { root: zod.file.path, path: imp.path, name: imp.name }, index)),
|
|
2844
2844
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2845
|
-
|
|
2845
|
+
chunkG5M2ERLS_cjs.Zod,
|
|
2846
2846
|
{
|
|
2847
2847
|
name: zod.name,
|
|
2848
2848
|
typeName: typed ? type.name : void 0,
|
|
@@ -2858,10 +2858,10 @@ var zodGenerator = pluginOas.createReactGenerator({
|
|
|
2858
2858
|
});
|
|
2859
2859
|
|
|
2860
2860
|
// src/generators/operationsGenerator.tsx
|
|
2861
|
-
|
|
2861
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2862
2862
|
|
|
2863
2863
|
// src/plugin.ts
|
|
2864
|
-
|
|
2864
|
+
chunkG5M2ERLS_cjs.init_cjs_shims();
|
|
2865
2865
|
var pluginZodName = "plugin-zod";
|
|
2866
2866
|
var pluginZod = core.createPlugin((options) => {
|
|
2867
2867
|
const {
|
|
@@ -2986,7 +2986,7 @@ var operationsGenerator = pluginOas.createReactGenerator({
|
|
|
2986
2986
|
}).filter(Boolean);
|
|
2987
2987
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: file.baseName, path: file.path, meta: file.meta, children: [
|
|
2988
2988
|
imports,
|
|
2989
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2989
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkG5M2ERLS_cjs.Operations, { name, operations: transformedOperations })
|
|
2990
2990
|
] });
|
|
2991
2991
|
}
|
|
2992
2992
|
});
|
|
@@ -3019,5 +3019,5 @@ exports.operationsGenerator = operationsGenerator;
|
|
|
3019
3019
|
exports.pluginZod = pluginZod;
|
|
3020
3020
|
exports.pluginZodName = pluginZodName;
|
|
3021
3021
|
exports.zodGenerator = zodGenerator;
|
|
3022
|
-
//# sourceMappingURL=chunk-
|
|
3023
|
-
//# sourceMappingURL=chunk-
|
|
3022
|
+
//# sourceMappingURL=chunk-ZVLPHBJB.cjs.map
|
|
3023
|
+
//# sourceMappingURL=chunk-ZVLPHBJB.cjs.map
|