@kubb/plugin-zod 5.0.0-beta.35 → 5.0.0-beta.36
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/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- /package/dist/{chunk--u3MIqq1.js → chunk-C0LytTxp.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as __name } from "./chunk
|
|
2
|
-
import * as _$_kubb_core0 from "@kubb/core";
|
|
1
|
+
import { t as __name } from "./chunk-C0LytTxp.js";
|
|
3
2
|
import { Exclude, Generator, Group, Include, Output, Override, PluginFactoryOptions, Resolver, ast } from "@kubb/core";
|
|
4
3
|
import { AdapterOas } from "@kubb/adapter-oas";
|
|
5
4
|
|
|
@@ -389,7 +388,7 @@ declare global {
|
|
|
389
388
|
* When `mini: true`, schemas use the Zod Mini functional API instead of
|
|
390
389
|
* chainable methods.
|
|
391
390
|
*/
|
|
392
|
-
declare const zodGenerator:
|
|
391
|
+
declare const zodGenerator: import("@kubb/core").Generator<PluginZod, unknown>;
|
|
393
392
|
//#endregion
|
|
394
393
|
//#region src/plugin.d.ts
|
|
395
394
|
/**
|
|
@@ -422,7 +421,7 @@ declare const pluginZodName = "plugin-zod";
|
|
|
422
421
|
* })
|
|
423
422
|
* ```
|
|
424
423
|
*/
|
|
425
|
-
declare const pluginZod: (options?: Options | undefined) =>
|
|
424
|
+
declare const pluginZod: (options?: Options | undefined) => import("@kubb/core").Plugin<PluginZod>;
|
|
426
425
|
//#endregion
|
|
427
426
|
//#region src/resolvers/resolverZod.d.ts
|
|
428
427
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __name } from "./chunk
|
|
1
|
+
import { t as __name } from "./chunk-C0LytTxp.js";
|
|
2
2
|
import { ast, defineGenerator, definePlugin, defineResolver } from "@kubb/core";
|
|
3
3
|
import { Const, File, Type, jsxRendererSync } from "@kubb/renderer-jsx";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "@kubb/renderer-jsx/jsx-runtime";
|
|
@@ -307,17 +307,17 @@ function resolveContentTypeVariants(entries, baseName) {
|
|
|
307
307
|
* - `path` groups use the second path segment (`/pet/findByStatus` → `pet`).
|
|
308
308
|
* - other groups use `${camelCase(group)}${suffix}` (e.g. `petController`).
|
|
309
309
|
*
|
|
310
|
-
*
|
|
310
|
+
* A user-provided `group.name` always wins over the default namer, so callers stay in
|
|
311
|
+
* control of their output folders. Returns `null` when grouping is disabled, matching the
|
|
312
|
+
* per-plugin convention.
|
|
311
313
|
*
|
|
312
314
|
* @param group - The user-supplied group option, or `undefined` to disable grouping.
|
|
313
315
|
* @param options.suffix - Appended to non-`path` group names, e.g. `'Controller'` or `'Requests'`.
|
|
314
|
-
* @param options.honorName - When `true`, a user-provided `group.name` overrides the default namer.
|
|
315
316
|
*
|
|
316
317
|
* @example
|
|
317
318
|
* ```ts
|
|
318
|
-
* createGroupConfig(group, { suffix: 'Controller' })
|
|
319
|
-
* createGroupConfig(group, { suffix: '
|
|
320
|
-
* createGroupConfig(group, { suffix: 'Requests', honorName: true }) // plugin-cypress, plugin-mcp
|
|
319
|
+
* createGroupConfig(group, { suffix: 'Controller' }) // plugin-ts, plugin-client, …
|
|
320
|
+
* createGroupConfig(group, { suffix: 'Requests' }) // plugin-cypress, plugin-mcp
|
|
321
321
|
* ```
|
|
322
322
|
*/
|
|
323
323
|
function createGroupConfig(group, options) {
|
|
@@ -328,7 +328,7 @@ function createGroupConfig(group, options) {
|
|
|
328
328
|
};
|
|
329
329
|
return {
|
|
330
330
|
...group,
|
|
331
|
-
name:
|
|
331
|
+
name: group.name ? group.name : defaultName
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
//#endregion
|