@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 CHANGED
@@ -28,6 +28,19 @@
28
28
  </h4>
29
29
  </div>
30
30
 
31
+ ## Supporting Kubb
32
+
33
+ Kubb uses an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
34
+
35
+ - [Become a Sponsor on GitHub](https://github.com/sponsors/stijnvanhulle)
36
+
37
+ <p align="center">
38
+ <a href="https://github.com/sponsors/stijnvanhulle">
39
+ <img src="https://raw.githubusercontent.com/stijnvanhulle/sponsors/main/sponsors.svg" alt="My sponsors" />
40
+ </a>
41
+ </p>
42
+
43
+
31
44
  <!-- Badges -->
32
45
 
33
46
  [npm-version-src]: https://img.shields.io/npm/v/@kubb/plugin-zod?flat&colorA=18181B&colorB=f58517
@@ -39,9 +39,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  mod
40
40
  ));
41
41
 
42
- // ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.2__@swc+core@1.7.22_jiti@1.21.6__vls2oipdlkyfowb7gcil3cs6ye/node_modules/tsup/assets/esm_shims.js
42
+ // ../../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/esm_shims.js
43
43
  var init_esm_shims = __esm({
44
- "../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.47.7_@types+node@20.16.2__@swc+core@1.7.22_jiti@1.21.6__vls2oipdlkyfowb7gcil3cs6ye/node_modules/tsup/assets/esm_shims.js"() {
44
+ "../../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/esm_shims.js"() {
45
45
  }
46
46
  });
47
47
 
@@ -2537,8 +2537,8 @@ function Schema(props) {
2537
2537
  );
2538
2538
  return /* @__PURE__ */ jsxs(import_react3.Fragment, { children: [
2539
2539
  enums.map(({ name: name2, nameNode, typeName: typeName2, typeNode }, index) => /* @__PURE__ */ jsxs(import_react3.Fragment, { children: [
2540
- nameNode && /* @__PURE__ */ jsx(File.Source, { name: name2, isExportable: true, isIndexable: true, children: print(nameNode) }),
2541
- /* @__PURE__ */ jsx(File.Source, { name: typeName2, isIndexable: true, isExportable: ["enum", "asConst", "constEnum", "literal", void 0].includes(enumType), isTypeOnly: true, children: print(typeNode) })
2540
+ nameNode && /* @__PURE__ */ jsx(File.Source, { name: name2, isExportable: true, isIndexable: true, children: print([nameNode]) }),
2541
+ /* @__PURE__ */ jsx(File.Source, { name: typeName2, isIndexable: true, isExportable: ["enum", "asConst", "constEnum", "literal", void 0].includes(enumType), isTypeOnly: true, children: print([typeNode]) })
2542
2542
  ] }, [name2, nameNode].join("-"))),
2543
2543
  enums.every((item) => item.typeName !== resolvedName) && /* @__PURE__ */ jsx(File.Source, { name: typeName, isTypeOnly: true, isExportable: true, isIndexable: true, children: print(typeNodes) })
2544
2544
  ] });
@@ -2555,9 +2555,9 @@ var SchemaGenerator2 = class extends SchemaGenerator {
2555
2555
  logger: pluginManager.logger
2556
2556
  });
2557
2557
  const tree = this.parse({ schema, name });
2558
- root.render(
2559
- /* @__PURE__ */ jsx(App, { pluginManager, plugin: { ...plugin, options }, mode, children: /* @__PURE__ */ jsx(Oas, { oas, children: /* @__PURE__ */ jsx(Oas.Schema, { name, value: schema, tree, children: /* @__PURE__ */ jsx(Schema.File, {}) }) }) })
2560
- );
2558
+ const Component = () => /* @__PURE__ */ jsx(App, { pluginManager, plugin: { ...plugin, options }, mode, children: /* @__PURE__ */ jsx(Oas, { oas, children: /* @__PURE__ */ jsx(Oas.Schema, { name, value: schema, tree, children: /* @__PURE__ */ jsx(Schema.File, {}) }) }) });
2559
+ Component.displayName = pascalCase(name);
2560
+ root.render(/* @__PURE__ */ jsx(Component, {}));
2561
2561
  return root.files;
2562
2562
  }
2563
2563
  };
@@ -2636,7 +2636,7 @@ function printCombinedSchema({
2636
2636
  ),
2637
2637
  modifiers: [factory.modifiers.export]
2638
2638
  });
2639
- return print(namespaceNode);
2639
+ return print([namespaceNode]);
2640
2640
  }
2641
2641
  function OperationSchema({ keysToOmit, description }) {
2642
2642
  return /* @__PURE__ */ jsx(Schema, { keysToOmit, description });
@@ -2676,9 +2676,9 @@ var OperationGenerator = class extends OperationGenerator$1 {
2676
2676
  const root = createRoot({
2677
2677
  logger: pluginManager.logger
2678
2678
  });
2679
- root.render(
2680
- /* @__PURE__ */ jsx(App, { pluginManager, plugin, mode, children: /* @__PURE__ */ jsx(Oas, { oas, operations, generator: this, children: plugin.options.oasType && /* @__PURE__ */ jsx(OasType.File, { name: "oas", typeName: "Oas" }) }) })
2681
- );
2679
+ const Component = () => /* @__PURE__ */ jsx(App, { pluginManager, plugin, mode, children: /* @__PURE__ */ jsx(Oas, { oas, operations, generator: this, children: plugin.options.oasType && /* @__PURE__ */ jsx(OasType.File, { name: "oas", typeName: "Oas" }) }) });
2680
+ Component.displayName = pascalCase("operations");
2681
+ root.render(/* @__PURE__ */ jsx(Component, {}));
2682
2682
  return root.files;
2683
2683
  }
2684
2684
  async operation(operation, options) {
@@ -2686,9 +2686,9 @@ var OperationGenerator = class extends OperationGenerator$1 {
2686
2686
  const root = createRoot({
2687
2687
  logger: pluginManager.logger
2688
2688
  });
2689
- root.render(
2690
- /* @__PURE__ */ jsx(App, { pluginManager, plugin: { ...plugin, options }, mode, children: /* @__PURE__ */ jsx(Oas, { oas, operations: [operation], generator: this, children: /* @__PURE__ */ jsx(Oas.Operation, { operation, children: /* @__PURE__ */ jsx(OperationSchema.File, {}) }) }) })
2691
- );
2689
+ const Component = () => /* @__PURE__ */ jsx(App, { pluginManager, plugin: { ...plugin, options }, mode, children: /* @__PURE__ */ jsx(Oas, { oas, operations: [operation], generator: this, children: /* @__PURE__ */ jsx(Oas.Operation, { operation, children: /* @__PURE__ */ jsx(OperationSchema.File, {}) }) }) });
2690
+ Component.displayName = pascalCase(operation.getOperationId());
2691
+ root.render(/* @__PURE__ */ jsx(Component, {}));
2692
2692
  return root.files;
2693
2693
  }
2694
2694
  };
@@ -3427,5 +3427,5 @@ react/cjs/react.development.js:
3427
3427
  */
3428
3428
 
3429
3429
  export { OperationSchema2 as OperationSchema, Operations, Schema2 as Schema, init_esm_shims, pluginZod, pluginZodName };
3430
- //# sourceMappingURL=chunk-Z5LNW4XC.js.map
3431
- //# sourceMappingURL=chunk-Z5LNW4XC.js.map
3430
+ //# sourceMappingURL=chunk-47JK5TES.js.map
3431
+ //# sourceMappingURL=chunk-47JK5TES.js.map