kubb 5.23.1 → 5.23.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.
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/{defineConfig-BQCtkfVT.js → defineConfig-C6FXk_hU.js} +1 -1
- package/dist/{defineConfig-BQCtkfVT.js.map → defineConfig-C6FXk_hU.js.map} +1 -1
- package/dist/{defineConfig-BgZt8DZW.cjs → defineConfig-tpUKTeYn.cjs} +1 -1
- package/dist/{defineConfig-BgZt8DZW.cjs.map → defineConfig-tpUKTeYn.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +15 -15
- /package/dist/{defineConfig-D0oonnIu.d.cts → defineConfig-BaD4Rwdn.d.cts} +0 -0
- /package/dist/{defineConfig-D0oonnIu.d.ts → defineConfig-BaE5GaMK.d.ts} +0 -0
package/dist/config.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_defineConfig = require("./defineConfig-
|
|
2
|
+
const require_defineConfig = require("./defineConfig-tpUKTeYn.cjs");
|
|
3
3
|
exports.defineConfig = require_defineConfig.defineConfig;
|
package/dist/config.d.cts
CHANGED
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as defineConfig } from "./defineConfig-
|
|
1
|
+
export { t as defineConfig } from "./defineConfig-C6FXk_hU.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineConfig-
|
|
1
|
+
{"version":3,"file":"defineConfig-C6FXk_hU.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineConfig-
|
|
1
|
+
{"version":3,"file":"defineConfig-tpUKTeYn.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"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_defineConfig = require("./defineConfig-BgZt8DZW.cjs");
|
|
3
2
|
let _kubb_core = require("@kubb/core");
|
|
3
|
+
const require_defineConfig = require("./defineConfig-tpUKTeYn.cjs");
|
|
4
4
|
// src/createKubb.ts
|
|
5
5
|
/**
|
|
6
6
|
* Creates a Kubb instance with the same defaults as `defineConfig`.
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as defineConfig } from "./defineConfig-D0oonnIu.cjs";
|
|
2
1
|
import { BuildOutput, Config, CreateKubbOptions, CreateKubbOptions as CreateKubbOptions$1, Kubb, Kubb as Kubb$1, UserConfig, UserConfig as UserConfig$1 } from "@kubb/core";
|
|
3
2
|
import { BarrelType } from "@kubb/plugin-barrel";
|
|
3
|
+
import { t as defineConfig } from "./defineConfig-BaD4Rwdn.cjs";
|
|
4
4
|
/**
|
|
5
5
|
* Creates a Kubb instance with the same defaults as `defineConfig`.
|
|
6
6
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as defineConfig } from "./defineConfig-D0oonnIu.js";
|
|
2
1
|
import { BuildOutput, Config, CreateKubbOptions, CreateKubbOptions as CreateKubbOptions$1, Kubb, Kubb as Kubb$1, UserConfig, UserConfig as UserConfig$1 } from "@kubb/core";
|
|
3
2
|
import { BarrelType } from "@kubb/plugin-barrel";
|
|
3
|
+
import { t as defineConfig } from "./defineConfig-BaE5GaMK.js";
|
|
4
4
|
/**
|
|
5
5
|
* Creates a Kubb instance with the same defaults as `defineConfig`.
|
|
6
6
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as defineConfig } from "./defineConfig-BQCtkfVT.js";
|
|
2
1
|
import { createKubb as createKubb$1 } from "@kubb/core";
|
|
2
|
+
import { t as defineConfig } from "./defineConfig-C6FXk_hU.js";
|
|
3
3
|
// src/createKubb.ts
|
|
4
4
|
/**
|
|
5
5
|
* Creates a Kubb instance with the same defaults as `defineConfig`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kubb",
|
|
3
|
-
"version": "5.23.
|
|
3
|
+
"version": "5.23.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",
|
|
@@ -164,26 +164,26 @@
|
|
|
164
164
|
"registry": "https://registry.npmjs.org/"
|
|
165
165
|
},
|
|
166
166
|
"dependencies": {
|
|
167
|
-
"@kubb/adapter-oas": "5.23.
|
|
168
|
-
"@kubb/cli": "5.23.
|
|
169
|
-
"@kubb/core": "
|
|
170
|
-
"@kubb/kit": "
|
|
171
|
-
"@kubb/mcp": "5.23.
|
|
172
|
-
"@kubb/parser-md": "5.23.
|
|
173
|
-
"@kubb/parser-ts": "5.23.
|
|
174
|
-
"@kubb/plugin-barrel": "5.23.
|
|
175
|
-
"@kubb/renderer-jsx": "^5.23.
|
|
176
|
-
"@kubb/studio": "5.23.
|
|
177
|
-
"unplugin-kubb": "5.23.
|
|
167
|
+
"@kubb/adapter-oas": "5.23.3",
|
|
168
|
+
"@kubb/cli": "5.23.3",
|
|
169
|
+
"@kubb/core": "5.23.3",
|
|
170
|
+
"@kubb/kit": "5.23.3",
|
|
171
|
+
"@kubb/mcp": "5.23.3",
|
|
172
|
+
"@kubb/parser-md": "5.23.3",
|
|
173
|
+
"@kubb/parser-ts": "5.23.3",
|
|
174
|
+
"@kubb/plugin-barrel": "5.23.3",
|
|
175
|
+
"@kubb/renderer-jsx": "^5.23.3",
|
|
176
|
+
"@kubb/studio": "5.23.3",
|
|
177
|
+
"unplugin-kubb": "5.23.3"
|
|
178
178
|
},
|
|
179
179
|
"devDependencies": {
|
|
180
|
-
"@farmfe/core": "^2.0.
|
|
180
|
+
"@farmfe/core": "^2.0.1",
|
|
181
181
|
"@internals/utils": "0.0.1",
|
|
182
182
|
"@nuxt/kit": "^4.6.4",
|
|
183
183
|
"@nuxt/schema": "^4.6.4",
|
|
184
184
|
"esbuild": "^0.28.2",
|
|
185
|
-
"rolldown": "^1.3.
|
|
186
|
-
"rollup": "^4.68.
|
|
185
|
+
"rolldown": "^1.3.3",
|
|
186
|
+
"rollup": "^4.68.7",
|
|
187
187
|
"typescript": "^7.0.2",
|
|
188
188
|
"vite": "^8.3.8",
|
|
189
189
|
"webpack": "^5.112.2"
|
|
File without changes
|
|
File without changes
|