kubb 3.1.0 → 3.2.0
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/chunk--u3MIqq1.js +8 -0
- package/dist/index.cjs +33 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +31 -1
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -0
- package/package.json +4 -4
- package/src/defineConfig.ts +27 -0
- package/src/index.ts +3 -0
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
Object.defineProperty;
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/defineConfig.ts
|
|
5
|
+
/**
|
|
6
|
+
* Helper for defining a Kubb configuration.
|
|
7
|
+
*
|
|
8
|
+
* Importing `defineConfig` from `kubb` is the recommended entrypoint as of v5.
|
|
9
|
+
* The `kubb` package wires up the OpenAPI [adapter](https://kubb.dev/docs/5.x/concepts/adapters),
|
|
10
|
+
* the TypeScript [parsers](https://kubb.dev/docs/5.x/concepts/parsers), and the
|
|
11
|
+
* barrel [plugin](https://kubb.dev/plugins/plugin-barrel) for you.
|
|
12
|
+
*
|
|
13
|
+
* Accepts either:
|
|
14
|
+
* - A config object or array of configs
|
|
15
|
+
* - A function returning the config(s), optionally async,
|
|
16
|
+
* receiving the CLI options as argument
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* import { defineConfig } from 'kubb'
|
|
20
|
+
*
|
|
21
|
+
* export default defineConfig({
|
|
22
|
+
* input: { path: './petStore.yaml' },
|
|
23
|
+
* output: { path: './src/gen' },
|
|
24
|
+
* plugins: [pluginTs()],
|
|
25
|
+
* })
|
|
26
|
+
*/
|
|
27
|
+
function defineConfig(config) {
|
|
28
|
+
return config;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
exports.defineConfig = defineConfig;
|
|
1
32
|
var _kubb_core = require("@kubb/core");
|
|
2
33
|
Object.keys(_kubb_core).forEach(function(k) {
|
|
3
34
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
@@ -7,3 +38,5 @@ Object.keys(_kubb_core).forEach(function(k) {
|
|
|
7
38
|
}
|
|
8
39
|
});
|
|
9
40
|
});
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/defineConfig.ts"],"sourcesContent":["import type { ConfigInput } from '@kubb/core'\n\n/**\n * Helper for defining a Kubb configuration.\n *\n * Importing `defineConfig` from `kubb` is the recommended entrypoint as of v5.\n * The `kubb` package wires up the OpenAPI [adapter](https://kubb.dev/docs/5.x/concepts/adapters),\n * the TypeScript [parsers](https://kubb.dev/docs/5.x/concepts/parsers), and the\n * barrel [plugin](https://kubb.dev/plugins/plugin-barrel) for you.\n *\n * Accepts either:\n * - A config object or array of configs\n * - A function returning the config(s), optionally async,\n * receiving the CLI options as argument\n *\n * @example\n * import { defineConfig } from 'kubb'\n *\n * export default defineConfig({\n * input: { path: './petStore.yaml' },\n * output: { path: './src/gen' },\n * plugins: [pluginTs()],\n * })\n */\nexport function defineConfig<TConfig extends ConfigInput>(config: TConfig): TConfig {\n return config\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAgB,aAA0C,QAA0B;AAClF,QAAO"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
+
import { ConfigInput } from "@kubb/core";
|
|
3
|
+
export * from "@kubb/core";
|
|
4
|
+
|
|
5
|
+
//#region src/defineConfig.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Helper for defining a Kubb configuration.
|
|
8
|
+
*
|
|
9
|
+
* Importing `defineConfig` from `kubb` is the recommended entrypoint as of v5.
|
|
10
|
+
* The `kubb` package wires up the OpenAPI [adapter](https://kubb.dev/docs/5.x/concepts/adapters),
|
|
11
|
+
* the TypeScript [parsers](https://kubb.dev/docs/5.x/concepts/parsers), and the
|
|
12
|
+
* barrel [plugin](https://kubb.dev/plugins/plugin-barrel) for you.
|
|
13
|
+
*
|
|
14
|
+
* Accepts either:
|
|
15
|
+
* - A config object or array of configs
|
|
16
|
+
* - A function returning the config(s), optionally async,
|
|
17
|
+
* receiving the CLI options as argument
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* import { defineConfig } from 'kubb'
|
|
21
|
+
*
|
|
22
|
+
* export default defineConfig({
|
|
23
|
+
* input: { path: './petStore.yaml' },
|
|
24
|
+
* output: { path: './src/gen' },
|
|
25
|
+
* plugins: [pluginTs()],
|
|
26
|
+
* })
|
|
27
|
+
*/
|
|
28
|
+
declare function defineConfig<TConfig extends ConfigInput>(config: TConfig): TConfig;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { defineConfig };
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
|
+
import "./chunk--u3MIqq1.js";
|
|
1
2
|
export * from "@kubb/core";
|
|
2
|
-
|
|
3
|
+
//#region src/defineConfig.ts
|
|
4
|
+
/**
|
|
5
|
+
* Helper for defining a Kubb configuration.
|
|
6
|
+
*
|
|
7
|
+
* Importing `defineConfig` from `kubb` is the recommended entrypoint as of v5.
|
|
8
|
+
* The `kubb` package wires up the OpenAPI [adapter](https://kubb.dev/docs/5.x/concepts/adapters),
|
|
9
|
+
* the TypeScript [parsers](https://kubb.dev/docs/5.x/concepts/parsers), and the
|
|
10
|
+
* barrel [plugin](https://kubb.dev/plugins/plugin-barrel) for you.
|
|
11
|
+
*
|
|
12
|
+
* Accepts either:
|
|
13
|
+
* - A config object or array of configs
|
|
14
|
+
* - A function returning the config(s), optionally async,
|
|
15
|
+
* receiving the CLI options as argument
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* import { defineConfig } from 'kubb'
|
|
19
|
+
*
|
|
20
|
+
* export default defineConfig({
|
|
21
|
+
* input: { path: './petStore.yaml' },
|
|
22
|
+
* output: { path: './src/gen' },
|
|
23
|
+
* plugins: [pluginTs()],
|
|
24
|
+
* })
|
|
25
|
+
*/
|
|
26
|
+
function defineConfig(config) {
|
|
27
|
+
return config;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { defineConfig };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/defineConfig.ts"],"sourcesContent":["import type { ConfigInput } from '@kubb/core'\n\n/**\n * Helper for defining a Kubb configuration.\n *\n * Importing `defineConfig` from `kubb` is the recommended entrypoint as of v5.\n * The `kubb` package wires up the OpenAPI [adapter](https://kubb.dev/docs/5.x/concepts/adapters),\n * the TypeScript [parsers](https://kubb.dev/docs/5.x/concepts/parsers), and the\n * barrel [plugin](https://kubb.dev/plugins/plugin-barrel) for you.\n *\n * Accepts either:\n * - A config object or array of configs\n * - A function returning the config(s), optionally async,\n * receiving the CLI options as argument\n *\n * @example\n * import { defineConfig } from 'kubb'\n *\n * export default defineConfig({\n * input: { path: './petStore.yaml' },\n * output: { path: './src/gen' },\n * plugins: [pluginTs()],\n * })\n */\nexport function defineConfig<TConfig extends ConfigInput>(config: TConfig): TConfig {\n return config\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAgB,aAA0C,QAA0B;AAClF,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kubb",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Transform OpenAPI specifications into TypeScript, React-Query, Zod, Faker.js, MSW and more with a plugin-based code generation tool.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"!/**/__snapshots__/**"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@kubb/cli": "4.
|
|
48
|
-
"@kubb/core": "4.
|
|
49
|
-
"@kubb/mcp": "4.
|
|
47
|
+
"@kubb/cli": "4.39.0",
|
|
48
|
+
"@kubb/core": "4.39.0",
|
|
49
|
+
"@kubb/mcp": "4.39.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {},
|
|
52
52
|
"engines": {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ConfigInput } from '@kubb/core'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Helper for defining a Kubb configuration.
|
|
5
|
+
*
|
|
6
|
+
* Importing `defineConfig` from `kubb` is the recommended entrypoint as of v5.
|
|
7
|
+
* The `kubb` package wires up the OpenAPI [adapter](https://kubb.dev/docs/5.x/concepts/adapters),
|
|
8
|
+
* the TypeScript [parsers](https://kubb.dev/docs/5.x/concepts/parsers), and the
|
|
9
|
+
* barrel [plugin](https://kubb.dev/plugins/plugin-barrel) for you.
|
|
10
|
+
*
|
|
11
|
+
* Accepts either:
|
|
12
|
+
* - A config object or array of configs
|
|
13
|
+
* - A function returning the config(s), optionally async,
|
|
14
|
+
* receiving the CLI options as argument
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* import { defineConfig } from 'kubb'
|
|
18
|
+
*
|
|
19
|
+
* export default defineConfig({
|
|
20
|
+
* input: { path: './petStore.yaml' },
|
|
21
|
+
* output: { path: './src/gen' },
|
|
22
|
+
* plugins: [pluginTs()],
|
|
23
|
+
* })
|
|
24
|
+
*/
|
|
25
|
+
export function defineConfig<TConfig extends ConfigInput>(config: TConfig): TConfig {
|
|
26
|
+
return config
|
|
27
|
+
}
|
package/src/index.ts
CHANGED