kubb 5.10.1 → 5.10.3

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 (41) hide show
  1. package/dist/astro.cjs +1 -1
  2. package/dist/astro.d.cts +2 -0
  3. package/dist/config.cjs +1 -1
  4. package/dist/config.d.cts +3 -0
  5. package/dist/config.d.ts +1 -1
  6. package/dist/config.js +1 -1
  7. package/dist/defineConfig-APkA8IxV.cjs +60 -0
  8. package/dist/defineConfig-APkA8IxV.cjs.map +1 -0
  9. package/dist/{defineConfig-D7bKDuZT.d.ts → defineConfig-Dw_FP2Nv.d.cts} +1 -2
  10. package/dist/defineConfig-Dw_FP2Nv.d.ts +60 -0
  11. package/dist/{defineConfig-CReNal6i.js → defineConfig-EWSTl_g4.js} +9 -3
  12. package/dist/{defineConfig-CReNal6i.js.map → defineConfig-EWSTl_g4.js.map} +1 -1
  13. package/dist/esbuild.cjs +1 -1
  14. package/dist/esbuild.d.cts +2 -0
  15. package/dist/farm.cjs +1 -1
  16. package/dist/farm.d.cts +2 -0
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +11 -0
  19. package/dist/index.d.ts +1 -2
  20. package/dist/index.js +1 -2
  21. package/dist/index.js.map +1 -1
  22. package/dist/jsx/jsx-dev-runtime.d.cts +1 -0
  23. package/dist/jsx/jsx-runtime.d.cts +1 -0
  24. package/dist/jsx.d.cts +1 -0
  25. package/dist/kit/testing.d.cts +1 -0
  26. package/dist/kit.d.cts +1 -0
  27. package/dist/nuxt.cjs +1 -1
  28. package/dist/nuxt.d.cts +2 -0
  29. package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
  30. package/dist/rolldown.cjs +1 -1
  31. package/dist/rolldown.d.cts +2 -0
  32. package/dist/rollup.cjs +1 -1
  33. package/dist/rollup.d.cts +2 -0
  34. package/dist/rspack.cjs +1 -1
  35. package/dist/rspack.d.cts +2 -0
  36. package/dist/vite.cjs +1 -1
  37. package/dist/vite.d.cts +2 -0
  38. package/dist/webpack.cjs +1 -1
  39. package/dist/webpack.d.cts +2 -0
  40. package/package.json +156 -60
  41. package/dist/rolldown-runtime-C0LytTxp.js +0 -8
package/dist/astro.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_astro = require("unplugin-kubb/astro");
3
3
  unplugin_kubb_astro = require_rolldown_runtime.__toESM(unplugin_kubb_astro, 1);
4
4
  module.exports = unplugin_kubb_astro.default;
@@ -0,0 +1,2 @@
1
+ import astro_default from "unplugin-kubb/astro";
2
+ export = astro_default;
package/dist/config.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_defineConfig = require("./defineConfig-wAz42i-Y.cjs");
2
+ const require_defineConfig = require("./defineConfig-APkA8IxV.cjs");
3
3
  exports.defineConfig = require_defineConfig.defineConfig;
@@ -0,0 +1,3 @@
1
+ import { t as defineConfig } from "./defineConfig-Dw_FP2Nv.cjs";
2
+ import { BarrelType } from "@kubb/plugin-barrel";
3
+ export { type BarrelType, defineConfig };
package/dist/config.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { t as defineConfig } from "./defineConfig-D7bKDuZT.js";
1
+ import { t as defineConfig } from "./defineConfig-Dw_FP2Nv.js";
2
2
  import { BarrelType } from "@kubb/plugin-barrel";
3
3
  export { type BarrelType, defineConfig };
package/dist/config.js CHANGED
@@ -1 +1 @@
1
- export { t as defineConfig } from "./defineConfig-CReNal6i.js";
1
+ export { t as defineConfig } from "./defineConfig-EWSTl_g4.js";
@@ -0,0 +1,60 @@
1
+ let unplugin_kubb = require("unplugin-kubb");
2
+ //#region src/defineConfig.ts
3
+ function normalizeConfig(config) {
4
+ if (Array.isArray(config)) return config.map(unplugin_kubb.applyDefaults);
5
+ return (0, unplugin_kubb.applyDefaults)(config);
6
+ }
7
+ /**
8
+ * Defines a Kubb build configuration and fills in defaults for any omitted fields.
9
+ *
10
+ * Defaults applied when omitted:
11
+ * - `adapter` → `adapterOas()` (OpenAPI 2.0/3.0/3.1).
12
+ * - `parsers` → `[parserTs(), parserTsx(), parserMd()]`.
13
+ * - `reporters` → `[cliReporter, jsonReporter, fileReporter, htmlReporter]`.
14
+ * - `plugins` → `pluginBarrel()` is appended when not already present.
15
+ * - `output.barrel` → `false` when not set.
16
+ * - `output.format` and `output.lint` → `false`.
17
+ *
18
+ * Accepts a config object, an array of configs, a Promise resolving to one,
19
+ * or a function that receives the parsed CLI options and returns any of the
20
+ * above. The return type is preserved so async/array variants stay typed.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * import { defineConfig } from 'kubb'
25
+ * import { pluginTs } from '@kubb/plugin-ts'
26
+ *
27
+ * export default defineConfig({
28
+ * input: './petStore.yaml',
29
+ * output: { path: './src/gen' },
30
+ * plugins: [pluginTs()],
31
+ * })
32
+ * ```
33
+ *
34
+ * @example Function form with CLI options
35
+ * ```ts
36
+ * import { defineConfig } from 'kubb'
37
+ *
38
+ * export default defineConfig(({ input }) => ({
39
+ * input: input ?? './petStore.yaml',
40
+ * output: { path: './src/gen' },
41
+ * plugins: [],
42
+ * }))
43
+ * ```
44
+ */
45
+ function defineConfig(config) {
46
+ if (typeof config === "function") return (async (cli) => {
47
+ return normalizeConfig(await config(cli));
48
+ });
49
+ if (config instanceof Promise) return config.then(normalizeConfig);
50
+ return normalizeConfig(config);
51
+ }
52
+ //#endregion
53
+ Object.defineProperty(exports, "defineConfig", {
54
+ enumerable: true,
55
+ get: function() {
56
+ return defineConfig;
57
+ }
58
+ });
59
+
60
+ //# sourceMappingURL=defineConfig-APkA8IxV.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineConfig-APkA8IxV.cjs","names":["applyDefaults"],"sources":["../src/defineConfig.ts"],"sourcesContent":["import type { PossiblePromise } from '@internals/utils'\nimport type { CLIOptions, UserConfig } from '@kubb/core'\nimport { applyDefaults } from 'unplugin-kubb'\n\ntype AnyConfigResult = UserConfig<unknown> | Array<UserConfig<unknown>>\ntype ConfigInput = AnyConfigResult | Promise<AnyConfigResult> | ((cli: CLIOptions) => PossiblePromise<AnyConfigResult>)\ntype NormalizeConfig<TConfig> =\n TConfig extends Array<UserConfig<infer TInput>> ? Array<UserConfig<TInput>> : TConfig extends UserConfig<infer TInput> ? UserConfig<TInput> : never\ntype DefinedConfig<TConfig extends ConfigInput> = TConfig extends (cli: CLIOptions) => PossiblePromise<infer TResult>\n ? (cli: CLIOptions) => Promise<NormalizeConfig<TResult>>\n : TConfig extends Promise<infer TResult>\n ? Promise<NormalizeConfig<TResult>>\n : NormalizeConfig<TConfig>\n\nfunction normalizeConfig<TInput>(config: UserConfig<TInput> | Array<UserConfig<TInput>>): UserConfig<TInput> | Array<UserConfig<TInput>> {\n if (Array.isArray(config)) {\n return config.map(applyDefaults)\n }\n\n return applyDefaults(config)\n}\n\n/**\n * Defines a Kubb build configuration and fills in defaults for any omitted fields.\n *\n * Defaults applied when omitted:\n * - `adapter` → `adapterOas()` (OpenAPI 2.0/3.0/3.1).\n * - `parsers` → `[parserTs(), parserTsx(), parserMd()]`.\n * - `reporters` → `[cliReporter, jsonReporter, fileReporter, htmlReporter]`.\n * - `plugins` → `pluginBarrel()` is appended when not already present.\n * - `output.barrel` → `false` when not set.\n * - `output.format` and `output.lint` → `false`.\n *\n * Accepts a config object, an array of configs, a Promise resolving to one,\n * or a function that receives the parsed CLI options and returns any of the\n * above. The return type is preserved so async/array variants stay typed.\n *\n * @example\n * ```ts\n * import { defineConfig } from 'kubb'\n * import { pluginTs } from '@kubb/plugin-ts'\n *\n * export default defineConfig({\n * input: './petStore.yaml',\n * output: { path: './src/gen' },\n * plugins: [pluginTs()],\n * })\n * ```\n *\n * @example Function form with CLI options\n * ```ts\n * import { defineConfig } from 'kubb'\n *\n * export default defineConfig(({ input }) => ({\n * input: input ?? './petStore.yaml',\n * output: { path: './src/gen' },\n * plugins: [],\n * }))\n * ```\n */\nexport function defineConfig<TConfig extends ConfigInput>(config: TConfig): DefinedConfig<TConfig> {\n if (typeof config === 'function') {\n return (async (cli: CLIOptions) => {\n return normalizeConfig(await config(cli))\n }) as DefinedConfig<TConfig>\n }\n\n if (config instanceof Promise) {\n return config.then(normalizeConfig) as DefinedConfig<TConfig>\n }\n\n return normalizeConfig(config) as DefinedConfig<TConfig>\n}\n"],"mappings":";;AAcA,SAAS,gBAAwB,QAAwG;CACvI,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,OAAO,IAAIA,cAAAA,aAAa;CAGjC,QAAA,GAAOA,cAAAA,cAAAA,CAAc,MAAM;AAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,aAA0C,QAAyC;CACjG,IAAI,OAAO,WAAW,YACpB,QAAQ,OAAO,QAAoB;EACjC,OAAO,gBAAgB,MAAM,OAAO,GAAG,CAAC;CAC1C;CAGF,IAAI,kBAAkB,SACpB,OAAO,OAAO,KAAK,eAAe;CAGpC,OAAO,gBAAgB,MAAM;AAC/B"}
@@ -1,4 +1,3 @@
1
- import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
2
1
  import { CLIOptions, UserConfig } from "@kubb/core";
3
2
  //#region ../../internals/utils/src/promise.d.ts
4
3
  /** A value that may already be resolved or still pending.
@@ -58,4 +57,4 @@ type DefinedConfig<TConfig extends ConfigInput> = TConfig extends ((cli: CLIOpti
58
57
  declare function defineConfig<TConfig extends ConfigInput>(config: TConfig): DefinedConfig<TConfig>;
59
58
  //#endregion
60
59
  export { defineConfig as t };
61
- //# sourceMappingURL=defineConfig-D7bKDuZT.d.ts.map
60
+ //# sourceMappingURL=defineConfig-Dw_FP2Nv.d.cts.map
@@ -0,0 +1,60 @@
1
+ import { CLIOptions, UserConfig } from "@kubb/core";
2
+ //#region ../../internals/utils/src/promise.d.ts
3
+ /** A value that may already be resolved or still pending.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * function load(id: string): PossiblePromise<string> {
8
+ * return cache.get(id) ?? fetchRemote(id)
9
+ * }
10
+ * ```
11
+ */
12
+ type PossiblePromise<T> = Promise<T> | T;
13
+ //#endregion
14
+ //#region src/defineConfig.d.ts
15
+ type AnyConfigResult = UserConfig<unknown> | Array<UserConfig<unknown>>;
16
+ type ConfigInput = AnyConfigResult | Promise<AnyConfigResult> | ((cli: CLIOptions) => PossiblePromise<AnyConfigResult>);
17
+ type NormalizeConfig<TConfig> = TConfig extends Array<UserConfig<infer TInput>> ? Array<UserConfig<TInput>> : TConfig extends UserConfig<infer TInput> ? UserConfig<TInput> : never;
18
+ type DefinedConfig<TConfig extends ConfigInput> = TConfig extends ((cli: CLIOptions) => PossiblePromise<infer TResult>) ? (cli: CLIOptions) => Promise<NormalizeConfig<TResult>> : TConfig extends Promise<infer TResult> ? Promise<NormalizeConfig<TResult>> : NormalizeConfig<TConfig>;
19
+ /**
20
+ * Defines a Kubb build configuration and fills in defaults for any omitted fields.
21
+ *
22
+ * Defaults applied when omitted:
23
+ * - `adapter` → `adapterOas()` (OpenAPI 2.0/3.0/3.1).
24
+ * - `parsers` → `[parserTs(), parserTsx(), parserMd()]`.
25
+ * - `reporters` → `[cliReporter, jsonReporter, fileReporter, htmlReporter]`.
26
+ * - `plugins` → `pluginBarrel()` is appended when not already present.
27
+ * - `output.barrel` → `false` when not set.
28
+ * - `output.format` and `output.lint` → `false`.
29
+ *
30
+ * Accepts a config object, an array of configs, a Promise resolving to one,
31
+ * or a function that receives the parsed CLI options and returns any of the
32
+ * above. The return type is preserved so async/array variants stay typed.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * import { defineConfig } from 'kubb'
37
+ * import { pluginTs } from '@kubb/plugin-ts'
38
+ *
39
+ * export default defineConfig({
40
+ * input: './petStore.yaml',
41
+ * output: { path: './src/gen' },
42
+ * plugins: [pluginTs()],
43
+ * })
44
+ * ```
45
+ *
46
+ * @example Function form with CLI options
47
+ * ```ts
48
+ * import { defineConfig } from 'kubb'
49
+ *
50
+ * export default defineConfig(({ input }) => ({
51
+ * input: input ?? './petStore.yaml',
52
+ * output: { path: './src/gen' },
53
+ * plugins: [],
54
+ * }))
55
+ * ```
56
+ */
57
+ declare function defineConfig<TConfig extends ConfigInput>(config: TConfig): DefinedConfig<TConfig>;
58
+ //#endregion
59
+ export { defineConfig as t };
60
+ //# sourceMappingURL=defineConfig-Dw_FP2Nv.d.ts.map
@@ -1,5 +1,11 @@
1
- import "./rolldown-runtime-C0LytTxp.js";
2
1
  import { applyDefaults } from "unplugin-kubb";
2
+ //#region \0rolldown/runtime.js
3
+ var __defProp = Object.defineProperty;
4
+ var __name = (target, value) => __defProp(target, "name", {
5
+ value,
6
+ configurable: true
7
+ });
8
+ //#endregion
3
9
  //#region src/defineConfig.ts
4
10
  function normalizeConfig(config) {
5
11
  if (Array.isArray(config)) return config.map(applyDefaults);
@@ -51,6 +57,6 @@ function defineConfig(config) {
51
57
  return normalizeConfig(config);
52
58
  }
53
59
  //#endregion
54
- export { defineConfig as t };
60
+ export { __name as n, defineConfig as t };
55
61
 
56
- //# sourceMappingURL=defineConfig-CReNal6i.js.map
62
+ //# sourceMappingURL=defineConfig-EWSTl_g4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defineConfig-CReNal6i.js","names":[],"sources":["../src/defineConfig.ts"],"sourcesContent":["import type { PossiblePromise } from '@internals/utils'\nimport type { CLIOptions, UserConfig } from '@kubb/core'\nimport { applyDefaults } from 'unplugin-kubb'\n\ntype AnyConfigResult = UserConfig<unknown> | Array<UserConfig<unknown>>\ntype ConfigInput = AnyConfigResult | Promise<AnyConfigResult> | ((cli: CLIOptions) => PossiblePromise<AnyConfigResult>)\ntype NormalizeConfig<TConfig> =\n TConfig extends Array<UserConfig<infer TInput>> ? Array<UserConfig<TInput>> : TConfig extends UserConfig<infer TInput> ? UserConfig<TInput> : never\ntype DefinedConfig<TConfig extends ConfigInput> = TConfig extends (cli: CLIOptions) => PossiblePromise<infer TResult>\n ? (cli: CLIOptions) => Promise<NormalizeConfig<TResult>>\n : TConfig extends Promise<infer TResult>\n ? Promise<NormalizeConfig<TResult>>\n : NormalizeConfig<TConfig>\n\nfunction normalizeConfig<TInput>(config: UserConfig<TInput> | Array<UserConfig<TInput>>): UserConfig<TInput> | Array<UserConfig<TInput>> {\n if (Array.isArray(config)) {\n return config.map(applyDefaults)\n }\n\n return applyDefaults(config)\n}\n\n/**\n * Defines a Kubb build configuration and fills in defaults for any omitted fields.\n *\n * Defaults applied when omitted:\n * - `adapter` → `adapterOas()` (OpenAPI 2.0/3.0/3.1).\n * - `parsers` → `[parserTs(), parserTsx(), parserMd()]`.\n * - `reporters` → `[cliReporter, jsonReporter, fileReporter, htmlReporter]`.\n * - `plugins` → `pluginBarrel()` is appended when not already present.\n * - `output.barrel` → `false` when not set.\n * - `output.format` and `output.lint` → `false`.\n *\n * Accepts a config object, an array of configs, a Promise resolving to one,\n * or a function that receives the parsed CLI options and returns any of the\n * above. The return type is preserved so async/array variants stay typed.\n *\n * @example\n * ```ts\n * import { defineConfig } from 'kubb'\n * import { pluginTs } from '@kubb/plugin-ts'\n *\n * export default defineConfig({\n * input: './petStore.yaml',\n * output: { path: './src/gen' },\n * plugins: [pluginTs()],\n * })\n * ```\n *\n * @example Function form with CLI options\n * ```ts\n * import { defineConfig } from 'kubb'\n *\n * export default defineConfig(({ input }) => ({\n * input: input ?? './petStore.yaml',\n * output: { path: './src/gen' },\n * plugins: [],\n * }))\n * ```\n */\nexport function defineConfig<TConfig extends ConfigInput>(config: TConfig): DefinedConfig<TConfig> {\n if (typeof config === 'function') {\n return (async (cli: CLIOptions) => {\n return normalizeConfig(await config(cli))\n }) as DefinedConfig<TConfig>\n }\n\n if (config instanceof Promise) {\n return config.then(normalizeConfig) as DefinedConfig<TConfig>\n }\n\n return normalizeConfig(config) as DefinedConfig<TConfig>\n}\n"],"mappings":";;;AAcA,SAAS,gBAAwB,QAAwG;CACvI,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,OAAO,IAAI,aAAa;CAGjC,OAAO,cAAc,MAAM;AAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,aAA0C,QAAyC;CACjG,IAAI,OAAO,WAAW,YACpB,QAAQ,OAAO,QAAoB;EACjC,OAAO,gBAAgB,MAAM,OAAO,GAAG,CAAC;CAC1C;CAGF,IAAI,kBAAkB,SACpB,OAAO,OAAO,KAAK,eAAe;CAGpC,OAAO,gBAAgB,MAAM;AAC/B"}
1
+ {"version":3,"file":"defineConfig-EWSTl_g4.js","names":[],"sources":["../src/defineConfig.ts"],"sourcesContent":["import type { PossiblePromise } from '@internals/utils'\nimport type { CLIOptions, UserConfig } from '@kubb/core'\nimport { applyDefaults } from 'unplugin-kubb'\n\ntype AnyConfigResult = UserConfig<unknown> | Array<UserConfig<unknown>>\ntype ConfigInput = AnyConfigResult | Promise<AnyConfigResult> | ((cli: CLIOptions) => PossiblePromise<AnyConfigResult>)\ntype NormalizeConfig<TConfig> =\n TConfig extends Array<UserConfig<infer TInput>> ? Array<UserConfig<TInput>> : TConfig extends UserConfig<infer TInput> ? UserConfig<TInput> : never\ntype DefinedConfig<TConfig extends ConfigInput> = TConfig extends (cli: CLIOptions) => PossiblePromise<infer TResult>\n ? (cli: CLIOptions) => Promise<NormalizeConfig<TResult>>\n : TConfig extends Promise<infer TResult>\n ? Promise<NormalizeConfig<TResult>>\n : NormalizeConfig<TConfig>\n\nfunction normalizeConfig<TInput>(config: UserConfig<TInput> | Array<UserConfig<TInput>>): UserConfig<TInput> | Array<UserConfig<TInput>> {\n if (Array.isArray(config)) {\n return config.map(applyDefaults)\n }\n\n return applyDefaults(config)\n}\n\n/**\n * Defines a Kubb build configuration and fills in defaults for any omitted fields.\n *\n * Defaults applied when omitted:\n * - `adapter` → `adapterOas()` (OpenAPI 2.0/3.0/3.1).\n * - `parsers` → `[parserTs(), parserTsx(), parserMd()]`.\n * - `reporters` → `[cliReporter, jsonReporter, fileReporter, htmlReporter]`.\n * - `plugins` → `pluginBarrel()` is appended when not already present.\n * - `output.barrel` → `false` when not set.\n * - `output.format` and `output.lint` → `false`.\n *\n * Accepts a config object, an array of configs, a Promise resolving to one,\n * or a function that receives the parsed CLI options and returns any of the\n * above. The return type is preserved so async/array variants stay typed.\n *\n * @example\n * ```ts\n * import { defineConfig } from 'kubb'\n * import { pluginTs } from '@kubb/plugin-ts'\n *\n * export default defineConfig({\n * input: './petStore.yaml',\n * output: { path: './src/gen' },\n * plugins: [pluginTs()],\n * })\n * ```\n *\n * @example Function form with CLI options\n * ```ts\n * import { defineConfig } from 'kubb'\n *\n * export default defineConfig(({ input }) => ({\n * input: input ?? './petStore.yaml',\n * output: { path: './src/gen' },\n * plugins: [],\n * }))\n * ```\n */\nexport function defineConfig<TConfig extends ConfigInput>(config: TConfig): DefinedConfig<TConfig> {\n if (typeof config === 'function') {\n return (async (cli: CLIOptions) => {\n return normalizeConfig(await config(cli))\n }) as DefinedConfig<TConfig>\n }\n\n if (config instanceof Promise) {\n return config.then(normalizeConfig) as DefinedConfig<TConfig>\n }\n\n return normalizeConfig(config) as DefinedConfig<TConfig>\n}\n"],"mappings":";;;;;;;;;AAcA,SAAS,gBAAwB,QAAwG;CACvI,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,OAAO,IAAI,aAAa;CAGjC,OAAO,cAAc,MAAM;AAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,SAAgB,aAA0C,QAAyC;CACjG,IAAI,OAAO,WAAW,YACpB,QAAQ,OAAO,QAAoB;EACjC,OAAO,gBAAgB,MAAM,OAAO,GAAG,CAAC;CAC1C;CAGF,IAAI,kBAAkB,SACpB,OAAO,OAAO,KAAK,eAAe;CAGpC,OAAO,gBAAgB,MAAM;AAC/B"}
package/dist/esbuild.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_esbuild = require("unplugin-kubb/esbuild");
3
3
  unplugin_kubb_esbuild = require_rolldown_runtime.__toESM(unplugin_kubb_esbuild, 1);
4
4
  module.exports = unplugin_kubb_esbuild.default;
@@ -0,0 +1,2 @@
1
+ import esbuild_default from "unplugin-kubb/esbuild";
2
+ export = esbuild_default;
package/dist/farm.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_farm = require("unplugin-kubb/farm");
3
3
  unplugin_kubb_farm = require_rolldown_runtime.__toESM(unplugin_kubb_farm, 1);
4
4
  module.exports = unplugin_kubb_farm.default;
@@ -0,0 +1,2 @@
1
+ import farm_default from "unplugin-kubb/farm";
2
+ export = farm_default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["createCoreKubb","defineConfig"],"sources":["../src/createKubb.ts"],"sourcesContent":["import { createKubb as createCoreKubb, type CreateKubbOptions, type Kubb, type UserConfig } from '@kubb/core'\nimport { defineConfig } from './defineConfig.ts'\n\n/**\n * Creates a Kubb instance with the same defaults as `defineConfig`.\n */\nexport function createKubb(userConfig: UserConfig, options?: CreateKubbOptions): Kubb {\n return createCoreKubb(defineConfig(userConfig), options)\n}\n"],"mappings":";;;;;;;;AAMA,SAAgB,WAAW,YAAwB,SAAmC;CACpF,QAAA,GAAOA,WAAAA,WAAAA,CAAeC,qBAAAA,aAAa,UAAU,GAAG,OAAO;AACzD"}
1
+ {"version":3,"file":"index.cjs","names":["createCoreKubb","defineConfig"],"sources":["../src/createKubb.ts"],"sourcesContent":["import { createKubb as createCoreKubb, type CreateKubbOptions, type Kubb, type UserConfig } from '@kubb/core'\nimport { defineConfig } from './defineConfig.ts'\n\n/**\n * Creates a Kubb instance with the same defaults as `defineConfig`.\n */\nexport function createKubb(userConfig: UserConfig, options?: CreateKubbOptions): Kubb {\n return createCoreKubb(defineConfig(userConfig), options)\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,WAAW,YAAwB,SAAmC;CACpF,QAAA,GAAOA,WAAAA,WAAAA,CAAeC,qBAAAA,aAAa,UAAU,GAAG,OAAO;AACzD"}
@@ -0,0 +1,11 @@
1
+ import { t as defineConfig } from "./defineConfig-Dw_FP2Nv.cjs";
2
+ import { BuildOutput, Config, CreateKubbOptions, CreateKubbOptions as CreateKubbOptions$1, Kubb, Kubb as Kubb$1, UserConfig, UserConfig as UserConfig$1 } from "@kubb/core";
3
+ import { BarrelType } from "@kubb/plugin-barrel";
4
+ //#region src/createKubb.d.ts
5
+ /**
6
+ * Creates a Kubb instance with the same defaults as `defineConfig`.
7
+ */
8
+ export declare function createKubb(userConfig: UserConfig$1, options?: CreateKubbOptions$1): Kubb$1;
9
+ //#endregion
10
+ export { type BarrelType, type BuildOutput, type Config, type CreateKubbOptions, type Kubb, type UserConfig, defineConfig };
11
+ //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
2
- import { t as defineConfig } from "./defineConfig-D7bKDuZT.js";
1
+ import { t as defineConfig } from "./defineConfig-Dw_FP2Nv.js";
3
2
  import { BuildOutput, Config, CreateKubbOptions, CreateKubbOptions as CreateKubbOptions$1, Kubb, Kubb as Kubb$1, UserConfig, UserConfig as UserConfig$1 } from "@kubb/core";
4
3
  import { BarrelType } from "@kubb/plugin-barrel";
5
4
  //#region src/createKubb.d.ts
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
- import "./rolldown-runtime-C0LytTxp.js";
2
- import { t as defineConfig } from "./defineConfig-CReNal6i.js";
1
+ import { t as defineConfig } from "./defineConfig-EWSTl_g4.js";
3
2
  import { createKubb as createKubb$1 } from "@kubb/core";
4
3
  //#region src/createKubb.ts
5
4
  /**
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createCoreKubb"],"sources":["../src/createKubb.ts"],"sourcesContent":["import { createKubb as createCoreKubb, type CreateKubbOptions, type Kubb, type UserConfig } from '@kubb/core'\nimport { defineConfig } from './defineConfig.ts'\n\n/**\n * Creates a Kubb instance with the same defaults as `defineConfig`.\n */\nexport function createKubb(userConfig: UserConfig, options?: CreateKubbOptions): Kubb {\n return createCoreKubb(defineConfig(userConfig), options)\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,WAAW,YAAwB,SAAmC;CACpF,OAAOA,aAAe,aAAa,UAAU,GAAG,OAAO;AACzD"}
1
+ {"version":3,"file":"index.js","names":["createCoreKubb"],"sources":["../src/createKubb.ts"],"sourcesContent":["import { createKubb as createCoreKubb, type CreateKubbOptions, type Kubb, type UserConfig } from '@kubb/core'\nimport { defineConfig } from './defineConfig.ts'\n\n/**\n * Creates a Kubb instance with the same defaults as `defineConfig`.\n */\nexport function createKubb(userConfig: UserConfig, options?: CreateKubbOptions): Kubb {\n return createCoreKubb(defineConfig(userConfig), options)\n}\n"],"mappings":";;;;;;AAMA,SAAgB,WAAW,YAAwB,SAAmC;CACpF,OAAOA,aAAe,aAAa,UAAU,GAAG,OAAO;AACzD"}
@@ -0,0 +1 @@
1
+ export * from "@kubb/renderer-jsx/jsx-dev-runtime";
@@ -0,0 +1 @@
1
+ export * from "@kubb/renderer-jsx/jsx-runtime";
package/dist/jsx.d.cts ADDED
@@ -0,0 +1 @@
1
+ export * from "@kubb/renderer-jsx";
@@ -0,0 +1 @@
1
+ export * from "@kubb/kit/testing";
package/dist/kit.d.cts ADDED
@@ -0,0 +1 @@
1
+ export * from "@kubb/kit";
package/dist/nuxt.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_nuxt = require("unplugin-kubb/nuxt");
3
3
  unplugin_kubb_nuxt = require_rolldown_runtime.__toESM(unplugin_kubb_nuxt, 1);
4
4
  module.exports = unplugin_kubb_nuxt.default;
@@ -0,0 +1,2 @@
1
+ import nuxt_default from "unplugin-kubb/nuxt";
2
+ export = nuxt_default;
@@ -0,0 +1,28 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ Object.defineProperty(exports, "__toESM", {
24
+ enumerable: true,
25
+ get: function() {
26
+ return __toESM;
27
+ }
28
+ });
package/dist/rolldown.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_rolldown = require("unplugin-kubb/rolldown");
3
3
  unplugin_kubb_rolldown = require_rolldown_runtime.__toESM(unplugin_kubb_rolldown, 1);
4
4
  module.exports = unplugin_kubb_rolldown.default;
@@ -0,0 +1,2 @@
1
+ import rolldown_default from "unplugin-kubb/rolldown";
2
+ export = rolldown_default;
package/dist/rollup.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_rollup = require("unplugin-kubb/rollup");
3
3
  unplugin_kubb_rollup = require_rolldown_runtime.__toESM(unplugin_kubb_rollup, 1);
4
4
  module.exports = unplugin_kubb_rollup.default;
@@ -0,0 +1,2 @@
1
+ import rollup_default from "unplugin-kubb/rollup";
2
+ export = rollup_default;
package/dist/rspack.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_rspack = require("unplugin-kubb/rspack");
3
3
  unplugin_kubb_rspack = require_rolldown_runtime.__toESM(unplugin_kubb_rspack, 1);
4
4
  module.exports = unplugin_kubb_rspack.default;
@@ -0,0 +1,2 @@
1
+ import rspack_default from "unplugin-kubb/rspack";
2
+ export = rspack_default;
package/dist/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_vite = require("unplugin-kubb/vite");
3
3
  unplugin_kubb_vite = require_rolldown_runtime.__toESM(unplugin_kubb_vite, 1);
4
4
  module.exports = unplugin_kubb_vite.default;
@@ -0,0 +1,2 @@
1
+ import vite_default from "unplugin-kubb/vite";
2
+ export = vite_default;
package/dist/webpack.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-qbf5tadS.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
2
  let unplugin_kubb_webpack = require("unplugin-kubb/webpack");
3
3
  unplugin_kubb_webpack = require_rolldown_runtime.__toESM(unplugin_kubb_webpack, 1);
4
4
  module.exports = unplugin_kubb_webpack.default;
@@ -0,0 +1,2 @@
1
+ import webpack_default from "unplugin-kubb/webpack";
2
+ export = webpack_default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubb",
3
- "version": "5.10.1",
3
+ "version": "5.10.3",
4
4
  "description": "Turn your API spec into type-safe code. Generate TypeScript types, API clients, hooks, validators and mocks from a spec such as OpenAPI.",
5
5
  "keywords": [
6
6
  "api-client",
@@ -52,86 +52,174 @@
52
52
  "main": "./dist/index.cjs",
53
53
  "module": "./dist/index.js",
54
54
  "types": "./dist/index.d.ts",
55
+ "typesVersions": {
56
+ "*": {
57
+ "*": [
58
+ "./dist/*",
59
+ "./*"
60
+ ]
61
+ }
62
+ },
55
63
  "exports": {
56
64
  ".": {
57
- "types": "./dist/index.d.ts",
58
- "import": "./dist/index.js",
59
- "require": "./dist/index.cjs"
65
+ "import": {
66
+ "types": "./dist/index.d.ts",
67
+ "default": "./dist/index.js"
68
+ },
69
+ "require": {
70
+ "types": "./dist/index.d.cts",
71
+ "default": "./dist/index.cjs"
72
+ }
60
73
  },
61
74
  "./astro": {
62
- "types": "./dist/astro.d.ts",
63
- "import": "./dist/astro.js",
64
- "require": "./dist/astro.cjs"
75
+ "import": {
76
+ "types": "./dist/astro.d.ts",
77
+ "default": "./dist/astro.js"
78
+ },
79
+ "require": {
80
+ "types": "./dist/astro.d.cts",
81
+ "default": "./dist/astro.cjs"
82
+ }
65
83
  },
66
84
  "./config": {
67
- "types": "./dist/config.d.ts",
68
- "import": "./dist/config.js",
69
- "require": "./dist/config.cjs"
85
+ "import": {
86
+ "types": "./dist/config.d.ts",
87
+ "default": "./dist/config.js"
88
+ },
89
+ "require": {
90
+ "types": "./dist/config.d.cts",
91
+ "default": "./dist/config.cjs"
92
+ }
70
93
  },
71
94
  "./esbuild": {
72
- "types": "./dist/esbuild.d.ts",
73
- "import": "./dist/esbuild.js",
74
- "require": "./dist/esbuild.cjs"
95
+ "import": {
96
+ "types": "./dist/esbuild.d.ts",
97
+ "default": "./dist/esbuild.js"
98
+ },
99
+ "require": {
100
+ "types": "./dist/esbuild.d.cts",
101
+ "default": "./dist/esbuild.cjs"
102
+ }
75
103
  },
76
104
  "./farm": {
77
- "types": "./dist/farm.d.ts",
78
- "import": "./dist/farm.js",
79
- "require": "./dist/farm.cjs"
105
+ "import": {
106
+ "types": "./dist/farm.d.ts",
107
+ "default": "./dist/farm.js"
108
+ },
109
+ "require": {
110
+ "types": "./dist/farm.d.cts",
111
+ "default": "./dist/farm.cjs"
112
+ }
80
113
  },
81
114
  "./jsx": {
82
- "types": "./dist/jsx.d.ts",
83
- "import": "./dist/jsx.js",
84
- "require": "./dist/jsx.cjs"
115
+ "import": {
116
+ "types": "./dist/jsx.d.ts",
117
+ "default": "./dist/jsx.js"
118
+ },
119
+ "require": {
120
+ "types": "./dist/jsx.d.cts",
121
+ "default": "./dist/jsx.cjs"
122
+ }
85
123
  },
86
124
  "./jsx/jsx-dev-runtime": {
87
- "types": "./dist/jsx/jsx-dev-runtime.d.ts",
88
- "import": "./dist/jsx/jsx-dev-runtime.js",
89
- "require": "./dist/jsx/jsx-dev-runtime.cjs"
125
+ "import": {
126
+ "types": "./dist/jsx/jsx-dev-runtime.d.ts",
127
+ "default": "./dist/jsx/jsx-dev-runtime.js"
128
+ },
129
+ "require": {
130
+ "types": "./dist/jsx/jsx-dev-runtime.d.cts",
131
+ "default": "./dist/jsx/jsx-dev-runtime.cjs"
132
+ }
90
133
  },
91
134
  "./jsx/jsx-runtime": {
92
- "types": "./dist/jsx/jsx-runtime.d.ts",
93
- "import": "./dist/jsx/jsx-runtime.js",
94
- "require": "./dist/jsx/jsx-runtime.cjs"
135
+ "import": {
136
+ "types": "./dist/jsx/jsx-runtime.d.ts",
137
+ "default": "./dist/jsx/jsx-runtime.js"
138
+ },
139
+ "require": {
140
+ "types": "./dist/jsx/jsx-runtime.d.cts",
141
+ "default": "./dist/jsx/jsx-runtime.cjs"
142
+ }
95
143
  },
96
144
  "./kit": {
97
- "types": "./dist/kit.d.ts",
98
- "import": "./dist/kit.js",
99
- "require": "./dist/kit.cjs"
145
+ "import": {
146
+ "types": "./dist/kit.d.ts",
147
+ "default": "./dist/kit.js"
148
+ },
149
+ "require": {
150
+ "types": "./dist/kit.d.cts",
151
+ "default": "./dist/kit.cjs"
152
+ }
100
153
  },
101
154
  "./kit/testing": {
102
- "types": "./dist/kit/testing.d.ts",
103
- "import": "./dist/kit/testing.js",
104
- "require": "./dist/kit/testing.cjs"
155
+ "import": {
156
+ "types": "./dist/kit/testing.d.ts",
157
+ "default": "./dist/kit/testing.js"
158
+ },
159
+ "require": {
160
+ "types": "./dist/kit/testing.d.cts",
161
+ "default": "./dist/kit/testing.cjs"
162
+ }
105
163
  },
106
164
  "./nuxt": {
107
- "types": "./dist/nuxt.d.ts",
108
- "import": "./dist/nuxt.js",
109
- "require": "./dist/nuxt.cjs"
165
+ "import": {
166
+ "types": "./dist/nuxt.d.ts",
167
+ "default": "./dist/nuxt.js"
168
+ },
169
+ "require": {
170
+ "types": "./dist/nuxt.d.cts",
171
+ "default": "./dist/nuxt.cjs"
172
+ }
110
173
  },
111
174
  "./rolldown": {
112
- "types": "./dist/rolldown.d.ts",
113
- "import": "./dist/rolldown.js",
114
- "require": "./dist/rolldown.cjs"
175
+ "import": {
176
+ "types": "./dist/rolldown.d.ts",
177
+ "default": "./dist/rolldown.js"
178
+ },
179
+ "require": {
180
+ "types": "./dist/rolldown.d.cts",
181
+ "default": "./dist/rolldown.cjs"
182
+ }
115
183
  },
116
184
  "./rollup": {
117
- "types": "./dist/rollup.d.ts",
118
- "import": "./dist/rollup.js",
119
- "require": "./dist/rollup.cjs"
185
+ "import": {
186
+ "types": "./dist/rollup.d.ts",
187
+ "default": "./dist/rollup.js"
188
+ },
189
+ "require": {
190
+ "types": "./dist/rollup.d.cts",
191
+ "default": "./dist/rollup.cjs"
192
+ }
120
193
  },
121
194
  "./rspack": {
122
- "types": "./dist/rspack.d.ts",
123
- "import": "./dist/rspack.js",
124
- "require": "./dist/rspack.cjs"
195
+ "import": {
196
+ "types": "./dist/rspack.d.ts",
197
+ "default": "./dist/rspack.js"
198
+ },
199
+ "require": {
200
+ "types": "./dist/rspack.d.cts",
201
+ "default": "./dist/rspack.cjs"
202
+ }
125
203
  },
126
204
  "./vite": {
127
- "types": "./dist/vite.d.ts",
128
- "import": "./dist/vite.js",
129
- "require": "./dist/vite.cjs"
205
+ "import": {
206
+ "types": "./dist/vite.d.ts",
207
+ "default": "./dist/vite.js"
208
+ },
209
+ "require": {
210
+ "types": "./dist/vite.d.cts",
211
+ "default": "./dist/vite.cjs"
212
+ }
130
213
  },
131
214
  "./webpack": {
132
- "types": "./dist/webpack.d.ts",
133
- "import": "./dist/webpack.js",
134
- "require": "./dist/webpack.cjs"
215
+ "import": {
216
+ "types": "./dist/webpack.d.ts",
217
+ "default": "./dist/webpack.js"
218
+ },
219
+ "require": {
220
+ "types": "./dist/webpack.d.cts",
221
+ "default": "./dist/webpack.cjs"
222
+ }
135
223
  },
136
224
  "./package.json": "./package.json"
137
225
  },
@@ -140,17 +228,17 @@
140
228
  "registry": "https://registry.npmjs.org/"
141
229
  },
142
230
  "dependencies": {
143
- "@kubb/adapter-oas": "5.10.1",
144
- "@kubb/cli": "5.10.1",
145
- "@kubb/core": "5.10.1",
146
- "@kubb/kit": "5.10.1",
147
- "@kubb/mcp": "5.10.1",
148
- "@kubb/parser-md": "5.10.1",
149
- "@kubb/parser-ts": "5.10.1",
150
- "@kubb/plugin-barrel": "5.10.1",
151
- "@kubb/renderer-jsx": "5.10.1",
152
- "@kubb/studio": "5.10.1",
153
- "unplugin-kubb": "5.10.1"
231
+ "@kubb/adapter-oas": "5.10.3",
232
+ "@kubb/cli": "5.10.3",
233
+ "@kubb/core": "5.10.3",
234
+ "@kubb/kit": "5.10.3",
235
+ "@kubb/mcp": "5.10.3",
236
+ "@kubb/parser-md": "5.10.3",
237
+ "@kubb/parser-ts": "5.10.3",
238
+ "@kubb/plugin-barrel": "5.10.3",
239
+ "@kubb/renderer-jsx": "5.10.3",
240
+ "@kubb/studio": "5.10.3",
241
+ "unplugin-kubb": "5.10.3"
154
242
  },
155
243
  "devDependencies": {
156
244
  "@farmfe/core": "^1.7.11",
@@ -164,6 +252,14 @@
164
252
  "vite": "^8.3.4",
165
253
  "webpack": "^5.111.1"
166
254
  },
255
+ "peerDependencies": {
256
+ "vitest": "^4.0.0 || ^5.0.0"
257
+ },
258
+ "peerDependenciesMeta": {
259
+ "vitest": {
260
+ "optional": true
261
+ }
262
+ },
167
263
  "preferGlobal": true,
168
264
  "engines": {
169
265
  "node": ">=22"
@@ -1,8 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __name = (target, value) => __defProp(target, "name", {
4
- value,
5
- configurable: true
6
- });
7
- //#endregion
8
- export { __name as t };