@kubb/plugin-ts 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 +5 -5
- /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 ts from "typescript";
|
|
5
4
|
import { KubbReactNode } from "@kubb/renderer-jsx/types";
|
|
@@ -497,7 +496,7 @@ declare function Type({
|
|
|
497
496
|
* types. Drop-replace with a custom `Generator<PluginTs>` to change how
|
|
498
497
|
* TypeScript output is produced.
|
|
499
498
|
*/
|
|
500
|
-
declare const typeGenerator:
|
|
499
|
+
declare const typeGenerator: import("@kubb/core").Generator<PluginTs, unknown>;
|
|
501
500
|
//#endregion
|
|
502
501
|
//#region src/plugin.d.ts
|
|
503
502
|
/**
|
|
@@ -529,7 +528,7 @@ declare const pluginTsName = "plugin-ts";
|
|
|
529
528
|
* })
|
|
530
529
|
* ```
|
|
531
530
|
*/
|
|
532
|
-
declare const pluginTs: (options?: Options | undefined) =>
|
|
531
|
+
declare const pluginTs: (options?: Options | undefined) => import("@kubb/core").Plugin<PluginTs>;
|
|
533
532
|
//#endregion
|
|
534
533
|
//#region src/printers/functionPrinter.d.ts
|
|
535
534
|
type FunctionPrinterOptions = {
|
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 { parserTs } from "@kubb/parser-ts";
|
|
3
3
|
import { File, jsxRendererSync } from "@kubb/renderer-jsx";
|
|
4
4
|
import { ast, defineGenerator, definePlugin, defineResolver } from "@kubb/core";
|
|
@@ -870,17 +870,17 @@ function getOperationParameters(node, options = {}) {
|
|
|
870
870
|
* - `path` groups use the second path segment (`/pet/findByStatus` → `pet`).
|
|
871
871
|
* - other groups use `${camelCase(group)}${suffix}` (e.g. `petController`).
|
|
872
872
|
*
|
|
873
|
-
*
|
|
873
|
+
* A user-provided `group.name` always wins over the default namer, so callers stay in
|
|
874
|
+
* control of their output folders. Returns `null` when grouping is disabled, matching the
|
|
875
|
+
* per-plugin convention.
|
|
874
876
|
*
|
|
875
877
|
* @param group - The user-supplied group option, or `undefined` to disable grouping.
|
|
876
878
|
* @param options.suffix - Appended to non-`path` group names, e.g. `'Controller'` or `'Requests'`.
|
|
877
|
-
* @param options.honorName - When `true`, a user-provided `group.name` overrides the default namer.
|
|
878
879
|
*
|
|
879
880
|
* @example
|
|
880
881
|
* ```ts
|
|
881
|
-
* createGroupConfig(group, { suffix: 'Controller' })
|
|
882
|
-
* createGroupConfig(group, { suffix: '
|
|
883
|
-
* createGroupConfig(group, { suffix: 'Requests', honorName: true }) // plugin-cypress, plugin-mcp
|
|
882
|
+
* createGroupConfig(group, { suffix: 'Controller' }) // plugin-ts, plugin-client, …
|
|
883
|
+
* createGroupConfig(group, { suffix: 'Requests' }) // plugin-cypress, plugin-mcp
|
|
884
884
|
* ```
|
|
885
885
|
*/
|
|
886
886
|
function createGroupConfig(group, options) {
|
|
@@ -891,7 +891,7 @@ function createGroupConfig(group, options) {
|
|
|
891
891
|
};
|
|
892
892
|
return {
|
|
893
893
|
...group,
|
|
894
|
-
name:
|
|
894
|
+
name: group.name ? group.name : defaultName
|
|
895
895
|
};
|
|
896
896
|
}
|
|
897
897
|
//#endregion
|