@kubb/plugin-zod 3.0.0-alpha.11 → 3.0.0-alpha.13
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 +13 -0
- package/dist/{chunk-Z5LNW4XC.js → chunk-47JK5TES.js} +16 -16
- package/dist/chunk-47JK5TES.js.map +1 -0
- package/dist/{chunk-WDPKVCXH.cjs → chunk-VGFXQMG5.cjs} +16 -16
- package/dist/chunk-VGFXQMG5.cjs.map +1 -0
- package/dist/components.cjs +5 -5
- package/dist/components.js +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.js +2 -2
- package/package.json +12 -12
- package/dist/chunk-WDPKVCXH.cjs.map +0 -1
- package/dist/chunk-Z5LNW4XC.js.map +0 -1
|
@@ -65,9 +65,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
65
65
|
mod
|
|
66
66
|
));
|
|
67
67
|
|
|
68
|
-
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.
|
|
68
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.3__@swc+core@1.7.22_jiti@1.21.6__q6jifymg5im2tak6rw3ojokwte/node_modules/tsup/assets/cjs_shims.js
|
|
69
69
|
var init_cjs_shims = __esm({
|
|
70
|
-
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.
|
|
70
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.3__@swc+core@1.7.22_jiti@1.21.6__q6jifymg5im2tak6rw3ojokwte/node_modules/tsup/assets/cjs_shims.js"() {
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
|
|
@@ -2563,8 +2563,8 @@ function Schema(props) {
|
|
|
2563
2563
|
);
|
|
2564
2564
|
return /* @__PURE__ */ jsxRuntime.jsxs(import_react3.Fragment, { children: [
|
|
2565
2565
|
enums.map(({ name: name2, nameNode, typeName: typeName2, typeNode }, index) => /* @__PURE__ */ jsxRuntime.jsxs(import_react3.Fragment, { children: [
|
|
2566
|
-
nameNode && /* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name: name2, isExportable: true, isIndexable: true, children: parserTs.print(nameNode) }),
|
|
2567
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name: typeName2, isIndexable: true, isExportable: ["enum", "asConst", "constEnum", "literal", void 0].includes(enumType), isTypeOnly: true, children: parserTs.print(typeNode) })
|
|
2566
|
+
nameNode && /* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name: name2, isExportable: true, isIndexable: true, children: parserTs.print([nameNode]) }),
|
|
2567
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name: typeName2, isIndexable: true, isExportable: ["enum", "asConst", "constEnum", "literal", void 0].includes(enumType), isTypeOnly: true, children: parserTs.print([typeNode]) })
|
|
2568
2568
|
] }, [name2, nameNode].join("-"))),
|
|
2569
2569
|
enums.every((item) => item.typeName !== resolvedName) && /* @__PURE__ */ jsxRuntime.jsx(react.File.Source, { name: typeName, isTypeOnly: true, isExportable: true, isIndexable: true, children: parserTs.print(typeNodes) })
|
|
2570
2570
|
] });
|
|
@@ -2581,9 +2581,9 @@ var SchemaGenerator2 = class extends pluginOas.SchemaGenerator {
|
|
|
2581
2581
|
logger: pluginManager.logger
|
|
2582
2582
|
});
|
|
2583
2583
|
const tree = this.parse({ schema, name });
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
);
|
|
2584
|
+
const Component = () => /* @__PURE__ */ jsxRuntime.jsx(react.App, { pluginManager, plugin: { ...plugin, options }, mode, children: /* @__PURE__ */ jsxRuntime.jsx(components.Oas, { oas, children: /* @__PURE__ */ jsxRuntime.jsx(components.Oas.Schema, { name, value: schema, tree, children: /* @__PURE__ */ jsxRuntime.jsx(Schema.File, {}) }) }) });
|
|
2585
|
+
Component.displayName = transformers4.pascalCase(name);
|
|
2586
|
+
root.render(/* @__PURE__ */ jsxRuntime.jsx(Component, {}));
|
|
2587
2587
|
return root.files;
|
|
2588
2588
|
}
|
|
2589
2589
|
};
|
|
@@ -2662,7 +2662,7 @@ function printCombinedSchema({
|
|
|
2662
2662
|
),
|
|
2663
2663
|
modifiers: [factory__namespace.modifiers.export]
|
|
2664
2664
|
});
|
|
2665
|
-
return parserTs.print(namespaceNode);
|
|
2665
|
+
return parserTs.print([namespaceNode]);
|
|
2666
2666
|
}
|
|
2667
2667
|
function OperationSchema({ keysToOmit, description }) {
|
|
2668
2668
|
return /* @__PURE__ */ jsxRuntime.jsx(Schema, { keysToOmit, description });
|
|
@@ -2702,9 +2702,9 @@ var OperationGenerator = class extends pluginOas.OperationGenerator {
|
|
|
2702
2702
|
const root = react.createRoot({
|
|
2703
2703
|
logger: pluginManager.logger
|
|
2704
2704
|
});
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
);
|
|
2705
|
+
const Component = () => /* @__PURE__ */ jsxRuntime.jsx(react.App, { pluginManager, plugin, mode, children: /* @__PURE__ */ jsxRuntime.jsx(components.Oas, { oas, operations, generator: this, children: plugin.options.oasType && /* @__PURE__ */ jsxRuntime.jsx(OasType.File, { name: "oas", typeName: "Oas" }) }) });
|
|
2706
|
+
Component.displayName = transformers4.pascalCase("operations");
|
|
2707
|
+
root.render(/* @__PURE__ */ jsxRuntime.jsx(Component, {}));
|
|
2708
2708
|
return root.files;
|
|
2709
2709
|
}
|
|
2710
2710
|
async operation(operation, options) {
|
|
@@ -2712,9 +2712,9 @@ var OperationGenerator = class extends pluginOas.OperationGenerator {
|
|
|
2712
2712
|
const root = react.createRoot({
|
|
2713
2713
|
logger: pluginManager.logger
|
|
2714
2714
|
});
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
);
|
|
2715
|
+
const Component = () => /* @__PURE__ */ jsxRuntime.jsx(react.App, { pluginManager, plugin: { ...plugin, options }, mode, children: /* @__PURE__ */ jsxRuntime.jsx(components.Oas, { oas, operations: [operation], generator: this, children: /* @__PURE__ */ jsxRuntime.jsx(components.Oas.Operation, { operation, children: /* @__PURE__ */ jsxRuntime.jsx(OperationSchema.File, {}) }) }) });
|
|
2716
|
+
Component.displayName = transformers4.pascalCase(operation.getOperationId());
|
|
2717
|
+
root.render(/* @__PURE__ */ jsxRuntime.jsx(Component, {}));
|
|
2718
2718
|
return root.files;
|
|
2719
2719
|
}
|
|
2720
2720
|
};
|
|
@@ -3458,5 +3458,5 @@ exports.Schema = Schema2;
|
|
|
3458
3458
|
exports.init_cjs_shims = init_cjs_shims;
|
|
3459
3459
|
exports.pluginZod = pluginZod;
|
|
3460
3460
|
exports.pluginZodName = pluginZodName;
|
|
3461
|
-
//# sourceMappingURL=chunk-
|
|
3462
|
-
//# sourceMappingURL=chunk-
|
|
3461
|
+
//# sourceMappingURL=chunk-VGFXQMG5.cjs.map
|
|
3462
|
+
//# sourceMappingURL=chunk-VGFXQMG5.cjs.map
|