kubb 5.14.6 → 5.15.1

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/bin/kubb.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- process.setSourceMapsEnabled?.(true)
3
+ // Mapping 35 bundles costs 10 to 30 ms per run, so only debug runs pay for readable stack traces.
4
+ if (['1', 'true'].includes(process.env.KUBB_DEBUG ?? '')) process.setSourceMapsEnabled?.(true)
4
5
  process.title = 'Kubb'
5
6
 
6
7
  try {
package/dist/config.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_defineConfig = require("./defineConfig-DtKDtaUR.cjs");
2
+ const require_defineConfig = require("./defineConfig-BgZt8DZW.cjs");
3
3
  exports.defineConfig = require_defineConfig.defineConfig;
package/dist/config.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { t as defineConfig } from "./defineConfig-DbD-Nz8V.cjs";
1
+ import { t as defineConfig } from "./defineConfig-D0oonnIu.cjs";
2
2
  import { BarrelType } from "@kubb/plugin-barrel";
3
3
  export { type BarrelType, defineConfig };
package/dist/config.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { t as defineConfig } from "./defineConfig-DbD-Nz8V.js";
1
+ import { t as defineConfig } from "./defineConfig-D0oonnIu.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-CpyWWFBM.js";
1
+ export { t as defineConfig } from "./defineConfig-BQCtkfVT.js";
@@ -1,12 +1,11 @@
1
1
  import { applyDefaults } from "unplugin-kubb";
2
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
3
3
  var __defProp = Object.defineProperty;
4
4
  var __name = (target, value) => __defProp(target, "name", {
5
5
  value,
6
6
  configurable: true
7
7
  });
8
- //#endregion
9
- //#region src/defineConfig.ts
8
+ // src/defineConfig.ts
10
9
  function normalizeConfig(config) {
11
10
  if (Array.isArray(config)) return config.map(applyDefaults);
12
11
  return applyDefaults(config);
@@ -16,7 +15,6 @@ function defineConfig(config) {
16
15
  if (config instanceof Promise) return config.then(normalizeConfig);
17
16
  return normalizeConfig(config);
18
17
  }
19
- //#endregion
20
18
  export { __name as n, defineConfig as t };
21
19
 
22
- //# sourceMappingURL=defineConfig-CpyWWFBM.js.map
20
+ //# sourceMappingURL=defineConfig-BQCtkfVT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defineConfig-CpyWWFBM.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 ConfigResult<TInput> = UserConfig<TInput> | Array<UserConfig<TInput>>\ntype ConfigFunction<TInput, TResult extends ConfigResult<TInput>> = (cli: CLIOptions) => PossiblePromise<TResult>\n\nfunction normalizeConfig<TInput>(config: ConfigResult<TInput>): ConfigResult<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 * Each shape has its own overload so TypeScript checks the config against\n * `UserConfig` directly and reports unknown keys such as a misspelled `output.clean`.\n * The function overloads come first: TypeScript caches the callback's return type after\n * the first overload it tries, so an object overload before them would widen literals\n * such as `barrel: { type: 'named' }` to `string`.\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<TInput>(config: ConfigFunction<TInput, UserConfig<TInput>>): (cli: CLIOptions) => Promise<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: ConfigFunction<TInput, Array<UserConfig<TInput>>>): (cli: CLIOptions) => Promise<Array<UserConfig<TInput>>>\nexport function defineConfig<TInput>(config: Promise<UserConfig<TInput>>): Promise<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: Promise<Array<UserConfig<TInput>>>): Promise<Array<UserConfig<TInput>>>\nexport function defineConfig<TInput>(config: Array<UserConfig<TInput>>): Array<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: UserConfig<TInput>): UserConfig<TInput>\nexport function defineConfig<TInput>(\n config: ConfigResult<TInput> | Promise<ConfigResult<TInput>> | ConfigFunction<TInput, ConfigResult<TInput>>,\n): ConfigResult<TInput> | Promise<ConfigResult<TInput>> | ((cli: CLIOptions) => Promise<ConfigResult<TInput>>) {\n if (typeof config === 'function') {\n return async (cli: CLIOptions) => normalizeConfig(await config(cli))\n }\n\n if (config instanceof Promise) {\n return config.then(normalizeConfig)\n }\n\n return normalizeConfig(config)\n}\n"],"mappings":";;;;;;;;;AAOA,SAAS,gBAAwB,QAAoD;CACnF,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,OAAO,IAAI,aAAa;CAGjC,OAAO,cAAc,MAAM;AAC7B;AAoDA,SAAgB,aACd,QAC6G;CAC7G,IAAI,OAAO,WAAW,YACpB,OAAO,OAAO,QAAoB,gBAAgB,MAAM,OAAO,GAAG,CAAC;CAGrE,IAAI,kBAAkB,SACpB,OAAO,OAAO,KAAK,eAAe;CAGpC,OAAO,gBAAgB,MAAM;AAC/B"}
1
+ {"version":3,"file":"defineConfig-BQCtkfVT.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 ConfigResult<TInput> = UserConfig<TInput> | Array<UserConfig<TInput>>\ntype ConfigFunction<TInput, TResult extends ConfigResult<TInput>> = (cli: CLIOptions) => PossiblePromise<TResult>\n\nfunction normalizeConfig<TInput>(config: ConfigResult<TInput>): ConfigResult<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 * Each shape has its own overload so TypeScript checks the config against\n * `UserConfig` directly and reports unknown keys such as a misspelled `output.clean`.\n * The function overloads come first: TypeScript caches the callback's return type after\n * the first overload it tries, so an object overload before them would widen literals\n * such as `barrel: { type: 'named' }` to `string`.\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<TInput>(config: ConfigFunction<TInput, UserConfig<TInput>>): (cli: CLIOptions) => Promise<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: ConfigFunction<TInput, Array<UserConfig<TInput>>>): (cli: CLIOptions) => Promise<Array<UserConfig<TInput>>>\nexport function defineConfig<TInput>(config: Promise<UserConfig<TInput>>): Promise<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: Promise<Array<UserConfig<TInput>>>): Promise<Array<UserConfig<TInput>>>\nexport function defineConfig<TInput>(config: Array<UserConfig<TInput>>): Array<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: UserConfig<TInput>): UserConfig<TInput>\nexport function defineConfig<TInput>(\n config: ConfigResult<TInput> | Promise<ConfigResult<TInput>> | ConfigFunction<TInput, ConfigResult<TInput>>,\n): ConfigResult<TInput> | Promise<ConfigResult<TInput>> | ((cli: CLIOptions) => Promise<ConfigResult<TInput>>) {\n if (typeof config === 'function') {\n return async (cli: CLIOptions) => normalizeConfig(await config(cli))\n }\n\n if (config instanceof Promise) {\n return config.then(normalizeConfig)\n }\n\n return normalizeConfig(config)\n}\n"],"mappings":";;;;;;;;AAOA,SAAS,gBAAwB,QAAoD;CACnF,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,OAAO,IAAI,aAAa;CAGjC,OAAO,cAAc,MAAM;AAC7B;AAoDA,SAAgB,aACd,QAC6G;CAC7G,IAAI,OAAO,WAAW,YACpB,OAAO,OAAO,QAAoB,gBAAgB,MAAM,OAAO,GAAG,CAAC;CAGrE,IAAI,kBAAkB,SACpB,OAAO,OAAO,KAAK,eAAe;CAGpC,OAAO,gBAAgB,MAAM;AAC/B"}
@@ -1,12 +1,11 @@
1
- //#region \0rolldown/runtime.js
1
+ // \0rolldown/runtime.js
2
2
  var __defProp = Object.defineProperty;
3
3
  var __name = (target, value) => __defProp(target, "name", {
4
4
  value,
5
5
  configurable: true
6
6
  });
7
- //#endregion
8
7
  let unplugin_kubb = require("unplugin-kubb");
9
- //#region src/defineConfig.ts
8
+ // src/defineConfig.ts
10
9
  function normalizeConfig(config) {
11
10
  if (Array.isArray(config)) return config.map(unplugin_kubb.applyDefaults);
12
11
  return (0, unplugin_kubb.applyDefaults)(config);
@@ -16,7 +15,6 @@ function defineConfig(config) {
16
15
  if (config instanceof Promise) return config.then(normalizeConfig);
17
16
  return normalizeConfig(config);
18
17
  }
19
- //#endregion
20
18
  Object.defineProperty(exports, "__name", {
21
19
  enumerable: true,
22
20
  get: function() {
@@ -30,4 +28,4 @@ Object.defineProperty(exports, "defineConfig", {
30
28
  }
31
29
  });
32
30
 
33
- //# sourceMappingURL=defineConfig-DtKDtaUR.cjs.map
31
+ //# sourceMappingURL=defineConfig-BgZt8DZW.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"defineConfig-DtKDtaUR.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 ConfigResult<TInput> = UserConfig<TInput> | Array<UserConfig<TInput>>\ntype ConfigFunction<TInput, TResult extends ConfigResult<TInput>> = (cli: CLIOptions) => PossiblePromise<TResult>\n\nfunction normalizeConfig<TInput>(config: ConfigResult<TInput>): ConfigResult<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 * Each shape has its own overload so TypeScript checks the config against\n * `UserConfig` directly and reports unknown keys such as a misspelled `output.clean`.\n * The function overloads come first: TypeScript caches the callback's return type after\n * the first overload it tries, so an object overload before them would widen literals\n * such as `barrel: { type: 'named' }` to `string`.\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<TInput>(config: ConfigFunction<TInput, UserConfig<TInput>>): (cli: CLIOptions) => Promise<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: ConfigFunction<TInput, Array<UserConfig<TInput>>>): (cli: CLIOptions) => Promise<Array<UserConfig<TInput>>>\nexport function defineConfig<TInput>(config: Promise<UserConfig<TInput>>): Promise<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: Promise<Array<UserConfig<TInput>>>): Promise<Array<UserConfig<TInput>>>\nexport function defineConfig<TInput>(config: Array<UserConfig<TInput>>): Array<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: UserConfig<TInput>): UserConfig<TInput>\nexport function defineConfig<TInput>(\n config: ConfigResult<TInput> | Promise<ConfigResult<TInput>> | ConfigFunction<TInput, ConfigResult<TInput>>,\n): ConfigResult<TInput> | Promise<ConfigResult<TInput>> | ((cli: CLIOptions) => Promise<ConfigResult<TInput>>) {\n if (typeof config === 'function') {\n return async (cli: CLIOptions) => normalizeConfig(await config(cli))\n }\n\n if (config instanceof Promise) {\n return config.then(normalizeConfig)\n }\n\n return normalizeConfig(config)\n}\n"],"mappings":";;;;;;;;;AAOA,SAAS,gBAAwB,QAAoD;CACnF,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,OAAO,IAAIA,cAAAA,aAAa;CAGjC,QAAA,GAAOA,cAAAA,cAAAA,CAAc,MAAM;AAC7B;AAoDA,SAAgB,aACd,QAC6G;CAC7G,IAAI,OAAO,WAAW,YACpB,OAAO,OAAO,QAAoB,gBAAgB,MAAM,OAAO,GAAG,CAAC;CAGrE,IAAI,kBAAkB,SACpB,OAAO,OAAO,KAAK,eAAe;CAGpC,OAAO,gBAAgB,MAAM;AAC/B"}
1
+ {"version":3,"file":"defineConfig-BgZt8DZW.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 ConfigResult<TInput> = UserConfig<TInput> | Array<UserConfig<TInput>>\ntype ConfigFunction<TInput, TResult extends ConfigResult<TInput>> = (cli: CLIOptions) => PossiblePromise<TResult>\n\nfunction normalizeConfig<TInput>(config: ConfigResult<TInput>): ConfigResult<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 * Each shape has its own overload so TypeScript checks the config against\n * `UserConfig` directly and reports unknown keys such as a misspelled `output.clean`.\n * The function overloads come first: TypeScript caches the callback's return type after\n * the first overload it tries, so an object overload before them would widen literals\n * such as `barrel: { type: 'named' }` to `string`.\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<TInput>(config: ConfigFunction<TInput, UserConfig<TInput>>): (cli: CLIOptions) => Promise<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: ConfigFunction<TInput, Array<UserConfig<TInput>>>): (cli: CLIOptions) => Promise<Array<UserConfig<TInput>>>\nexport function defineConfig<TInput>(config: Promise<UserConfig<TInput>>): Promise<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: Promise<Array<UserConfig<TInput>>>): Promise<Array<UserConfig<TInput>>>\nexport function defineConfig<TInput>(config: Array<UserConfig<TInput>>): Array<UserConfig<TInput>>\nexport function defineConfig<TInput>(config: UserConfig<TInput>): UserConfig<TInput>\nexport function defineConfig<TInput>(\n config: ConfigResult<TInput> | Promise<ConfigResult<TInput>> | ConfigFunction<TInput, ConfigResult<TInput>>,\n): ConfigResult<TInput> | Promise<ConfigResult<TInput>> | ((cli: CLIOptions) => Promise<ConfigResult<TInput>>) {\n if (typeof config === 'function') {\n return async (cli: CLIOptions) => normalizeConfig(await config(cli))\n }\n\n if (config instanceof Promise) {\n return config.then(normalizeConfig)\n }\n\n return normalizeConfig(config)\n}\n"],"mappings":";;;;;;;;AAOA,SAAS,gBAAwB,QAAoD;CACnF,IAAI,MAAM,QAAQ,MAAM,GACtB,OAAO,OAAO,IAAIA,cAAAA,aAAa;CAGjC,QAAA,GAAOA,cAAAA,cAAAA,CAAc,MAAM;AAC7B;AAoDA,SAAgB,aACd,QAC6G;CAC7G,IAAI,OAAO,WAAW,YACpB,OAAO,OAAO,QAAoB,gBAAgB,MAAM,OAAO,GAAG,CAAC;CAGrE,IAAI,kBAAkB,SACpB,OAAO,OAAO,KAAK,eAAe;CAGpC,OAAO,gBAAgB,MAAM;AAC/B"}
@@ -1,5 +1,4 @@
1
1
  import { CLIOptions, UserConfig } from "@kubb/core";
2
- //#region ../../internals/utils/src/promise.d.ts
3
2
  /** A value that may already be resolved or still pending.
4
3
  *
5
4
  * @example
@@ -10,8 +9,6 @@ import { CLIOptions, UserConfig } from "@kubb/core";
10
9
  * ```
11
10
  */
12
11
  type PossiblePromise<T> = Promise<T> | T;
13
- //#endregion
14
- //#region src/defineConfig.d.ts
15
12
  type ConfigResult<TInput> = UserConfig<TInput> | Array<UserConfig<TInput>>;
16
13
  type ConfigFunction<TInput, TResult extends ConfigResult<TInput>> = (cli: CLIOptions) => PossiblePromise<TResult>;
17
14
  /**
@@ -64,6 +61,5 @@ declare function defineConfig<TInput>(config: Promise<UserConfig<TInput>>): Prom
64
61
  declare function defineConfig<TInput>(config: Promise<Array<UserConfig<TInput>>>): Promise<Array<UserConfig<TInput>>>;
65
62
  declare function defineConfig<TInput>(config: Array<UserConfig<TInput>>): Array<UserConfig<TInput>>;
66
63
  declare function defineConfig<TInput>(config: UserConfig<TInput>): UserConfig<TInput>;
67
- //#endregion
68
64
  export { defineConfig as t };
69
- //# sourceMappingURL=defineConfig-DbD-Nz8V.d.ts.map
65
+ //# sourceMappingURL=defineConfig-D0oonnIu.d.cts.map
@@ -1,5 +1,4 @@
1
1
  import { CLIOptions, UserConfig } from "@kubb/core";
2
- //#region ../../internals/utils/src/promise.d.ts
3
2
  /** A value that may already be resolved or still pending.
4
3
  *
5
4
  * @example
@@ -10,8 +9,6 @@ import { CLIOptions, UserConfig } from "@kubb/core";
10
9
  * ```
11
10
  */
12
11
  type PossiblePromise<T> = Promise<T> | T;
13
- //#endregion
14
- //#region src/defineConfig.d.ts
15
12
  type ConfigResult<TInput> = UserConfig<TInput> | Array<UserConfig<TInput>>;
16
13
  type ConfigFunction<TInput, TResult extends ConfigResult<TInput>> = (cli: CLIOptions) => PossiblePromise<TResult>;
17
14
  /**
@@ -64,6 +61,5 @@ declare function defineConfig<TInput>(config: Promise<UserConfig<TInput>>): Prom
64
61
  declare function defineConfig<TInput>(config: Promise<Array<UserConfig<TInput>>>): Promise<Array<UserConfig<TInput>>>;
65
62
  declare function defineConfig<TInput>(config: Array<UserConfig<TInput>>): Array<UserConfig<TInput>>;
66
63
  declare function defineConfig<TInput>(config: UserConfig<TInput>): UserConfig<TInput>;
67
- //#endregion
68
64
  export { defineConfig as t };
69
- //# sourceMappingURL=defineConfig-DbD-Nz8V.d.cts.map
65
+ //# sourceMappingURL=defineConfig-D0oonnIu.d.ts.map
package/dist/index.cjs CHANGED
@@ -1,14 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_defineConfig = require("./defineConfig-DtKDtaUR.cjs");
2
+ const require_defineConfig = require("./defineConfig-BgZt8DZW.cjs");
3
3
  let _kubb_core = require("@kubb/core");
4
- //#region src/createKubb.ts
4
+ // src/createKubb.ts
5
5
  /**
6
6
  * Creates a Kubb instance with the same defaults as `defineConfig`.
7
7
  */
8
8
  function createKubb(userConfig, options) {
9
9
  return (0, _kubb_core.createKubb)(require_defineConfig.defineConfig(userConfig), options);
10
10
  }
11
- //#endregion
12
11
  exports.createKubb = createKubb;
13
12
  exports.defineConfig = require_defineConfig.defineConfig;
14
13
 
package/dist/index.d.cts CHANGED
@@ -1,11 +1,9 @@
1
- import { t as defineConfig } from "./defineConfig-DbD-Nz8V.cjs";
1
+ import { t as defineConfig } from "./defineConfig-D0oonnIu.cjs";
2
2
  import { BuildOutput, Config, CreateKubbOptions, CreateKubbOptions as CreateKubbOptions$1, Kubb, Kubb as Kubb$1, UserConfig, UserConfig as UserConfig$1 } from "@kubb/core";
3
3
  import { BarrelType } from "@kubb/plugin-barrel";
4
- //#region src/createKubb.d.ts
5
4
  /**
6
5
  * Creates a Kubb instance with the same defaults as `defineConfig`.
7
6
  */
8
7
  export declare function createKubb(userConfig: UserConfig$1, options?: CreateKubbOptions$1): Kubb$1;
9
- //#endregion
10
8
  export { type BarrelType, type BuildOutput, type Config, type CreateKubbOptions, type Kubb, type UserConfig, defineConfig };
11
9
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,11 +1,9 @@
1
- import { t as defineConfig } from "./defineConfig-DbD-Nz8V.js";
1
+ import { t as defineConfig } from "./defineConfig-D0oonnIu.js";
2
2
  import { BuildOutput, Config, CreateKubbOptions, CreateKubbOptions as CreateKubbOptions$1, Kubb, Kubb as Kubb$1, UserConfig, UserConfig as UserConfig$1 } from "@kubb/core";
3
3
  import { BarrelType } from "@kubb/plugin-barrel";
4
- //#region src/createKubb.d.ts
5
4
  /**
6
5
  * Creates a Kubb instance with the same defaults as `defineConfig`.
7
6
  */
8
7
  export declare function createKubb(userConfig: UserConfig$1, options?: CreateKubbOptions$1): Kubb$1;
9
- //#endregion
10
8
  export { type BarrelType, type BuildOutput, type Config, type CreateKubbOptions, type Kubb, type UserConfig, defineConfig };
11
9
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,13 +1,12 @@
1
- import { t as defineConfig } from "./defineConfig-CpyWWFBM.js";
1
+ import { t as defineConfig } from "./defineConfig-BQCtkfVT.js";
2
2
  import { createKubb as createKubb$1 } from "@kubb/core";
3
- //#region src/createKubb.ts
3
+ // src/createKubb.ts
4
4
  /**
5
5
  * Creates a Kubb instance with the same defaults as `defineConfig`.
6
6
  */
7
7
  function createKubb(userConfig, options) {
8
8
  return createKubb$1(defineConfig(userConfig), options);
9
9
  }
10
- //#endregion
11
10
  export { createKubb, defineConfig };
12
11
 
13
12
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubb",
3
- "version": "5.14.6",
3
+ "version": "5.15.1",
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",
@@ -168,17 +168,17 @@
168
168
  "registry": "https://registry.npmjs.org/"
169
169
  },
170
170
  "dependencies": {
171
- "@kubb/adapter-oas": "5.14.6",
172
- "@kubb/cli": "5.14.6",
173
- "@kubb/core": "5.14.6",
174
- "@kubb/kit": "5.14.6",
175
- "@kubb/mcp": "5.14.6",
176
- "@kubb/parser-md": "5.14.6",
177
- "@kubb/parser-ts": "5.14.6",
178
- "@kubb/plugin-barrel": "5.14.6",
179
- "@kubb/renderer-jsx": "5.14.6",
180
- "@kubb/studio": "5.14.6",
181
- "unplugin-kubb": "5.14.6"
171
+ "@kubb/adapter-oas": "5.15.1",
172
+ "@kubb/cli": "5.15.1",
173
+ "@kubb/core": "5.15.1",
174
+ "@kubb/kit": "5.15.1",
175
+ "@kubb/mcp": "5.15.1",
176
+ "@kubb/parser-md": "5.15.1",
177
+ "@kubb/parser-ts": "5.15.1",
178
+ "@kubb/plugin-barrel": "5.15.1",
179
+ "@kubb/renderer-jsx": "5.15.1",
180
+ "@kubb/studio": "5.15.1",
181
+ "unplugin-kubb": "5.15.1"
182
182
  },
183
183
  "devDependencies": {
184
184
  "@farmfe/core": "^1.7.11",
@@ -186,11 +186,11 @@
186
186
  "@nuxt/kit": "^4.6.2",
187
187
  "@nuxt/schema": "^4.6.2",
188
188
  "esbuild": "^0.28.2",
189
- "rolldown": "^1.2.14",
190
- "rollup": "^4.64.12",
189
+ "rolldown": "^1.2.15",
190
+ "rollup": "^4.65.0",
191
191
  "typescript": "^7.0.2",
192
192
  "vite": "^8.3.5",
193
- "webpack": "^5.112.0"
193
+ "webpack": "^5.112.2"
194
194
  },
195
195
  "peerDependencies": {
196
196
  "vitest": "^4.0.0 || ^5.0.0"