@kubb/plugin-client 3.0.0-alpha.2 → 3.0.0-alpha.21
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/README.md +13 -4
- package/client.ts +2 -2
- package/dist/chunk-54CFYFPX.js +176 -0
- package/dist/chunk-54CFYFPX.js.map +1 -0
- package/dist/chunk-HGQQGWKN.js +130 -0
- package/dist/chunk-HGQQGWKN.js.map +1 -0
- package/dist/chunk-HUIJQCWL.cjs +185 -0
- package/dist/chunk-HUIJQCWL.cjs.map +1 -0
- package/dist/chunk-NEK3OJBX.cjs +133 -0
- package/dist/chunk-NEK3OJBX.cjs.map +1 -0
- package/dist/client.cjs +16 -7
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +5 -6
- package/dist/client.js.map +1 -1
- package/dist/components.cjs +11 -4
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +37 -7
- package/dist/components.d.ts +37 -7
- package/dist/components.js +2 -8
- package/dist/components.js.map +1 -1
- package/dist/generators.cjs +17 -0
- package/dist/generators.cjs.map +1 -0
- package/dist/generators.d.cts +9 -0
- package/dist/generators.d.ts +9 -0
- package/dist/generators.js +4 -0
- package/dist/generators.js.map +1 -0
- package/dist/index.cjs +11 -156
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -6
- package/dist/index.d.ts +1 -6
- package/dist/index.js +3 -161
- package/dist/index.js.map +1 -1
- package/dist/types-xPfBu1CW.d.cts +96 -0
- package/dist/types-xPfBu1CW.d.ts +96 -0
- package/package.json +22 -17
- package/src/components/Client.tsx +110 -211
- package/src/components/Operations.tsx +9 -75
- package/src/generators/__snapshots__/deletePet.ts +13 -0
- package/src/generators/__snapshots__/deletePetObject.ts +15 -0
- package/src/generators/__snapshots__/findByTags.ts +13 -0
- package/src/generators/__snapshots__/findByTagsFull.ts +13 -0
- package/src/generators/__snapshots__/findByTagsWithZod.ts +13 -0
- package/src/generators/__snapshots__/findByTagsWithZodFull.ts +13 -0
- package/src/generators/__snapshots__/importPath.ts +13 -0
- package/src/generators/__snapshots__/operations.ts +82 -0
- package/src/generators/__snapshots__/updatePetById.ts +12 -0
- package/src/generators/clientGenerator.tsx +67 -0
- package/src/generators/index.ts +2 -0
- package/src/generators/operationsGenerator.tsx +26 -0
- package/src/plugin.ts +23 -40
- package/src/types.ts +24 -50
- package/dist/chunk-W57BRY5O.js +0 -201
- package/dist/chunk-W57BRY5O.js.map +0 -1
- package/dist/chunk-W7F5CMU6.cjs +0 -201
- package/dist/chunk-W7F5CMU6.cjs.map +0 -1
- package/dist/types-xK4X9e5d.d.cts +0 -228
- package/dist/types-xK4X9e5d.d.ts +0 -228
- package/src/OperationGenerator.tsx +0 -65
- package/src/components/__snapshots__/Client/showPetById.ts +0 -11
- package/src/components/__snapshots__/Operations/showPetById.ts +0 -6
- package/src/components/__snapshots__/Query/showPetById.ts +0 -15
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import * as _kubb_core from '@kubb/core';
|
|
2
|
-
import { O as Options, P as PluginClient } from './types-
|
|
3
|
-
import '@kubb/fs/types';
|
|
2
|
+
import { O as Options, P as PluginClient } from './types-xPfBu1CW.cjs';
|
|
4
3
|
import '@kubb/plugin-oas';
|
|
5
|
-
import '@kubb/core/utils';
|
|
6
|
-
import '@kubb/oas';
|
|
7
|
-
import '@kubb/react';
|
|
8
|
-
import 'react';
|
|
9
4
|
|
|
10
5
|
declare const pluginClientName = "plugin-client";
|
|
11
6
|
declare const pluginClient: (options?: Options | undefined) => _kubb_core.UserPluginWithLifeCycle<PluginClient>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import * as _kubb_core from '@kubb/core';
|
|
2
|
-
import { O as Options, P as PluginClient } from './types-
|
|
3
|
-
import '@kubb/fs/types';
|
|
2
|
+
import { O as Options, P as PluginClient } from './types-xPfBu1CW.js';
|
|
4
3
|
import '@kubb/plugin-oas';
|
|
5
|
-
import '@kubb/core/utils';
|
|
6
|
-
import '@kubb/oas';
|
|
7
|
-
import '@kubb/react';
|
|
8
|
-
import 'react';
|
|
9
4
|
|
|
10
5
|
declare const pluginClientName = "plugin-client";
|
|
11
6
|
declare const pluginClient: (options?: Options | undefined) => _kubb_core.UserPluginWithLifeCycle<PluginClient>;
|
package/dist/index.js
CHANGED
|
@@ -1,162 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "./chunk-W57BRY5O.js";
|
|
5
|
-
|
|
6
|
-
// src/plugin.ts
|
|
7
|
-
import path from "path";
|
|
8
|
-
import { FileManager, PluginManager, createPlugin } from "@kubb/core";
|
|
9
|
-
import { camelCase } from "@kubb/core/transformers";
|
|
10
|
-
import { renderTemplate } from "@kubb/core/utils";
|
|
11
|
-
import { pluginOasName } from "@kubb/plugin-oas";
|
|
12
|
-
import { getGroupedByTagFiles } from "@kubb/plugin-oas/utils";
|
|
13
|
-
|
|
14
|
-
// src/OperationGenerator.tsx
|
|
15
|
-
import { OperationGenerator as Generator } from "@kubb/plugin-oas";
|
|
16
|
-
import { Oas } from "@kubb/plugin-oas/components";
|
|
17
|
-
import { App, createRoot } from "@kubb/react";
|
|
18
|
-
import { jsx } from "@kubb/react/jsx-runtime";
|
|
19
|
-
var OperationGenerator = class extends Generator {
|
|
20
|
-
async all(operations, _operationsByMethod) {
|
|
21
|
-
const { pluginManager, oas, plugin, mode } = this.context;
|
|
22
|
-
const root = createRoot({
|
|
23
|
-
logger: pluginManager.logger
|
|
24
|
-
});
|
|
25
|
-
const templates = {
|
|
26
|
-
operations: Operations.templates,
|
|
27
|
-
client: Client.templates,
|
|
28
|
-
...this.options.templates
|
|
29
|
-
};
|
|
30
|
-
root.render(
|
|
31
|
-
/* @__PURE__ */ jsx(App, { pluginManager, plugin, mode, children: /* @__PURE__ */ jsx(Oas, { oas, operations, generator: this, children: templates.operations && /* @__PURE__ */ jsx(Operations.File, { baseURL: this.options.baseURL, templates: templates.operations }) }) })
|
|
32
|
-
);
|
|
33
|
-
return root.files;
|
|
34
|
-
}
|
|
35
|
-
async operation(operation, options) {
|
|
36
|
-
const { oas, pluginManager, plugin, mode } = this.context;
|
|
37
|
-
const root = createRoot({
|
|
38
|
-
logger: pluginManager.logger
|
|
39
|
-
});
|
|
40
|
-
const templates = {
|
|
41
|
-
operations: Operations.templates,
|
|
42
|
-
client: Client.templates,
|
|
43
|
-
...options.templates
|
|
44
|
-
};
|
|
45
|
-
if (!templates.client) {
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
root.render(
|
|
49
|
-
/* @__PURE__ */ jsx(App, { pluginManager, plugin: { ...plugin, options }, mode, children: /* @__PURE__ */ jsx(Oas, { oas, operations: [operation], generator: this, children: /* @__PURE__ */ jsx(Oas.Operation, { operation, children: /* @__PURE__ */ jsx(Client.File, { baseURL: this.options.baseURL, templates: templates.client }) }) }) })
|
|
50
|
-
);
|
|
51
|
-
return root.files;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// src/plugin.ts
|
|
56
|
-
var pluginClientName = "plugin-client";
|
|
57
|
-
var pluginClient = createPlugin((options) => {
|
|
58
|
-
const {
|
|
59
|
-
output = { path: "clients" },
|
|
60
|
-
group,
|
|
61
|
-
exclude = [],
|
|
62
|
-
include,
|
|
63
|
-
override = [],
|
|
64
|
-
transformers = {},
|
|
65
|
-
dataReturnType = "data",
|
|
66
|
-
pathParamsType = "inline",
|
|
67
|
-
templates
|
|
68
|
-
} = options;
|
|
69
|
-
const template = group?.output ? group.output : `${output.path}/{{tag}}Controller`;
|
|
70
|
-
return {
|
|
71
|
-
name: pluginClientName,
|
|
72
|
-
options: {
|
|
73
|
-
extName: output.extName,
|
|
74
|
-
dataReturnType,
|
|
75
|
-
client: {
|
|
76
|
-
importPath: "@kubb/plugin-client/client",
|
|
77
|
-
...options.client
|
|
78
|
-
},
|
|
79
|
-
pathParamsType,
|
|
80
|
-
templates: {
|
|
81
|
-
operations: Operations.templates,
|
|
82
|
-
client: Client.templates,
|
|
83
|
-
...templates
|
|
84
|
-
},
|
|
85
|
-
baseURL: void 0
|
|
86
|
-
},
|
|
87
|
-
pre: [pluginOasName],
|
|
88
|
-
resolvePath(baseName, pathMode, options2) {
|
|
89
|
-
const root = path.resolve(this.config.root, this.config.output.path);
|
|
90
|
-
const mode = pathMode ?? FileManager.getMode(path.resolve(root, output.path));
|
|
91
|
-
if (mode === "single") {
|
|
92
|
-
return path.resolve(root, output.path);
|
|
93
|
-
}
|
|
94
|
-
if (options2?.tag && group?.type === "tag") {
|
|
95
|
-
const tag = camelCase(options2.tag);
|
|
96
|
-
return path.resolve(root, renderTemplate(template, { tag }), baseName);
|
|
97
|
-
}
|
|
98
|
-
return path.resolve(root, output.path, baseName);
|
|
99
|
-
},
|
|
100
|
-
resolveName(name, type) {
|
|
101
|
-
const resolvedName = camelCase(name, { isFile: type === "file" });
|
|
102
|
-
if (type) {
|
|
103
|
-
return transformers?.name?.(resolvedName, type) || resolvedName;
|
|
104
|
-
}
|
|
105
|
-
return resolvedName;
|
|
106
|
-
},
|
|
107
|
-
async buildStart() {
|
|
108
|
-
const [swaggerPlugin] = PluginManager.getDependedPlugins(this.plugins, [pluginOasName]);
|
|
109
|
-
const oas = await swaggerPlugin.context.getOas();
|
|
110
|
-
const root = path.resolve(this.config.root, this.config.output.path);
|
|
111
|
-
const mode = FileManager.getMode(path.resolve(root, output.path));
|
|
112
|
-
const baseURL = await swaggerPlugin.context.getBaseURL();
|
|
113
|
-
const operationGenerator = new OperationGenerator(
|
|
114
|
-
{
|
|
115
|
-
...this.plugin.options,
|
|
116
|
-
baseURL
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
oas,
|
|
120
|
-
pluginManager: this.pluginManager,
|
|
121
|
-
plugin: this.plugin,
|
|
122
|
-
contentType: swaggerPlugin.context.contentType,
|
|
123
|
-
exclude,
|
|
124
|
-
include,
|
|
125
|
-
override,
|
|
126
|
-
mode
|
|
127
|
-
}
|
|
128
|
-
);
|
|
129
|
-
const files = await operationGenerator.build();
|
|
130
|
-
await this.addFile(...files);
|
|
131
|
-
},
|
|
132
|
-
async buildEnd() {
|
|
133
|
-
if (this.config.output.write === false) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
const root = path.resolve(this.config.root, this.config.output.path);
|
|
137
|
-
if (group?.type === "tag") {
|
|
138
|
-
const rootFiles = await getGroupedByTagFiles({
|
|
139
|
-
logger: this.logger,
|
|
140
|
-
files: this.fileManager.files,
|
|
141
|
-
plugin: this.plugin,
|
|
142
|
-
template,
|
|
143
|
-
exportAs: group.exportAs || "{{tag}}Service",
|
|
144
|
-
root,
|
|
145
|
-
output
|
|
146
|
-
});
|
|
147
|
-
await this.addFile(...rootFiles);
|
|
148
|
-
}
|
|
149
|
-
await this.fileManager.addIndexes({
|
|
150
|
-
root,
|
|
151
|
-
output,
|
|
152
|
-
meta: { pluginKey: this.plugin.key },
|
|
153
|
-
logger: this.logger
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
});
|
|
158
|
-
export {
|
|
159
|
-
pluginClient,
|
|
160
|
-
pluginClientName
|
|
161
|
-
};
|
|
1
|
+
export { pluginClient, pluginClientName } from './chunk-54CFYFPX.js';
|
|
2
|
+
import './chunk-HGQQGWKN.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
162
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { PluginFactoryOptions, Output, ResolveNameParams } from '@kubb/core';
|
|
2
|
+
import { ResolvePathOptions, Exclude, Include, Override } from '@kubb/plugin-oas';
|
|
3
|
+
|
|
4
|
+
type Options = {
|
|
5
|
+
output?: Output;
|
|
6
|
+
/**
|
|
7
|
+
* Group the clients based on the provided name.
|
|
8
|
+
*/
|
|
9
|
+
group?: {
|
|
10
|
+
/**
|
|
11
|
+
* Tag will group based on the operation tag inside the Swagger file
|
|
12
|
+
*/
|
|
13
|
+
type: 'tag';
|
|
14
|
+
/**
|
|
15
|
+
* Relative path to save the grouped clients.
|
|
16
|
+
*
|
|
17
|
+
* `{{tag}}` will be replaced by the current tagName.
|
|
18
|
+
* @example `${output}/{{tag}}Controller` => `clients/PetController`
|
|
19
|
+
* @default `${output}/{{tag}}Controller`
|
|
20
|
+
*/
|
|
21
|
+
output?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Name to be used for the `export * as {{exportAs}} from './`
|
|
24
|
+
* @default `"{{tag}}Service"`
|
|
25
|
+
*/
|
|
26
|
+
exportAs?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
30
|
+
*/
|
|
31
|
+
exclude?: Array<Exclude>;
|
|
32
|
+
/**
|
|
33
|
+
* Array containing include parameters to include tags/operations/methods/paths.
|
|
34
|
+
*/
|
|
35
|
+
include?: Array<Include>;
|
|
36
|
+
/**
|
|
37
|
+
* Array containing override parameters to override `options` based on tags/operations/methods/paths.
|
|
38
|
+
*/
|
|
39
|
+
override?: Array<Override<ResolvedOptions>>;
|
|
40
|
+
/**
|
|
41
|
+
* Create `operations.ts` file with all operations grouped by methods.
|
|
42
|
+
* @default `false`
|
|
43
|
+
*/
|
|
44
|
+
operations?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Path to the client import path that will be used to do the API calls.
|
|
47
|
+
* It will be used as `import client from '${client.importPath}'`.
|
|
48
|
+
* It allows both relative and absolute path.
|
|
49
|
+
* the path will be applied as is, so relative path should be based on the file being generated.
|
|
50
|
+
* @default '@kubb/plugin-client/client'
|
|
51
|
+
*/
|
|
52
|
+
importPath?: string;
|
|
53
|
+
/**
|
|
54
|
+
* ReturnType that needs to be used when calling client().
|
|
55
|
+
*
|
|
56
|
+
* `Data` will return ResponseConfig[data].
|
|
57
|
+
*
|
|
58
|
+
* `Full` will return ResponseConfig.
|
|
59
|
+
* @default `'data'`
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
dataReturnType?: 'data' | 'full';
|
|
63
|
+
/**
|
|
64
|
+
* How to pass your pathParams.
|
|
65
|
+
*
|
|
66
|
+
* `object` will return the pathParams as an object.
|
|
67
|
+
*
|
|
68
|
+
* `inline` will return the pathParams as comma separated params.
|
|
69
|
+
* @default `'inline'`
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
pathParamsType?: 'object' | 'inline';
|
|
73
|
+
/**
|
|
74
|
+
* Which parser can be used before returning the data
|
|
75
|
+
* `'zod'` will use `@kubb/plugin-zod` to parse the data.
|
|
76
|
+
* @default 'client'
|
|
77
|
+
*/
|
|
78
|
+
parser?: 'client' | 'zod';
|
|
79
|
+
transformers?: {
|
|
80
|
+
/**
|
|
81
|
+
* Customize the names based on the type that is provided by the plugin.
|
|
82
|
+
*/
|
|
83
|
+
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
type ResolvedOptions = {
|
|
87
|
+
output: Output;
|
|
88
|
+
baseURL: string | undefined;
|
|
89
|
+
parser: NonNullable<Options['parser']>;
|
|
90
|
+
importPath: NonNullable<Options['importPath']>;
|
|
91
|
+
dataReturnType: NonNullable<Options['dataReturnType']>;
|
|
92
|
+
pathParamsType: NonNullable<Options['pathParamsType']>;
|
|
93
|
+
};
|
|
94
|
+
type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
95
|
+
|
|
96
|
+
export type { Options as O, PluginClient as P };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { PluginFactoryOptions, Output, ResolveNameParams } from '@kubb/core';
|
|
2
|
+
import { ResolvePathOptions, Exclude, Include, Override } from '@kubb/plugin-oas';
|
|
3
|
+
|
|
4
|
+
type Options = {
|
|
5
|
+
output?: Output;
|
|
6
|
+
/**
|
|
7
|
+
* Group the clients based on the provided name.
|
|
8
|
+
*/
|
|
9
|
+
group?: {
|
|
10
|
+
/**
|
|
11
|
+
* Tag will group based on the operation tag inside the Swagger file
|
|
12
|
+
*/
|
|
13
|
+
type: 'tag';
|
|
14
|
+
/**
|
|
15
|
+
* Relative path to save the grouped clients.
|
|
16
|
+
*
|
|
17
|
+
* `{{tag}}` will be replaced by the current tagName.
|
|
18
|
+
* @example `${output}/{{tag}}Controller` => `clients/PetController`
|
|
19
|
+
* @default `${output}/{{tag}}Controller`
|
|
20
|
+
*/
|
|
21
|
+
output?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Name to be used for the `export * as {{exportAs}} from './`
|
|
24
|
+
* @default `"{{tag}}Service"`
|
|
25
|
+
*/
|
|
26
|
+
exportAs?: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
30
|
+
*/
|
|
31
|
+
exclude?: Array<Exclude>;
|
|
32
|
+
/**
|
|
33
|
+
* Array containing include parameters to include tags/operations/methods/paths.
|
|
34
|
+
*/
|
|
35
|
+
include?: Array<Include>;
|
|
36
|
+
/**
|
|
37
|
+
* Array containing override parameters to override `options` based on tags/operations/methods/paths.
|
|
38
|
+
*/
|
|
39
|
+
override?: Array<Override<ResolvedOptions>>;
|
|
40
|
+
/**
|
|
41
|
+
* Create `operations.ts` file with all operations grouped by methods.
|
|
42
|
+
* @default `false`
|
|
43
|
+
*/
|
|
44
|
+
operations?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Path to the client import path that will be used to do the API calls.
|
|
47
|
+
* It will be used as `import client from '${client.importPath}'`.
|
|
48
|
+
* It allows both relative and absolute path.
|
|
49
|
+
* the path will be applied as is, so relative path should be based on the file being generated.
|
|
50
|
+
* @default '@kubb/plugin-client/client'
|
|
51
|
+
*/
|
|
52
|
+
importPath?: string;
|
|
53
|
+
/**
|
|
54
|
+
* ReturnType that needs to be used when calling client().
|
|
55
|
+
*
|
|
56
|
+
* `Data` will return ResponseConfig[data].
|
|
57
|
+
*
|
|
58
|
+
* `Full` will return ResponseConfig.
|
|
59
|
+
* @default `'data'`
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
dataReturnType?: 'data' | 'full';
|
|
63
|
+
/**
|
|
64
|
+
* How to pass your pathParams.
|
|
65
|
+
*
|
|
66
|
+
* `object` will return the pathParams as an object.
|
|
67
|
+
*
|
|
68
|
+
* `inline` will return the pathParams as comma separated params.
|
|
69
|
+
* @default `'inline'`
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
pathParamsType?: 'object' | 'inline';
|
|
73
|
+
/**
|
|
74
|
+
* Which parser can be used before returning the data
|
|
75
|
+
* `'zod'` will use `@kubb/plugin-zod` to parse the data.
|
|
76
|
+
* @default 'client'
|
|
77
|
+
*/
|
|
78
|
+
parser?: 'client' | 'zod';
|
|
79
|
+
transformers?: {
|
|
80
|
+
/**
|
|
81
|
+
* Customize the names based on the type that is provided by the plugin.
|
|
82
|
+
*/
|
|
83
|
+
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
type ResolvedOptions = {
|
|
87
|
+
output: Output;
|
|
88
|
+
baseURL: string | undefined;
|
|
89
|
+
parser: NonNullable<Options['parser']>;
|
|
90
|
+
importPath: NonNullable<Options['importPath']>;
|
|
91
|
+
dataReturnType: NonNullable<Options['dataReturnType']>;
|
|
92
|
+
pathParamsType: NonNullable<Options['pathParamsType']>;
|
|
93
|
+
};
|
|
94
|
+
type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
95
|
+
|
|
96
|
+
export type { Options as O, PluginClient as P };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-client",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.21",
|
|
4
4
|
"description": "Generator plugin-client",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -26,6 +26,11 @@
|
|
|
26
26
|
"require": "./dist/index.cjs",
|
|
27
27
|
"default": "./dist/index.cjs"
|
|
28
28
|
},
|
|
29
|
+
"./generators": {
|
|
30
|
+
"import": "./dist/generators.js",
|
|
31
|
+
"require": "./dist/generators.cjs",
|
|
32
|
+
"default": "./dist/generators.cjs"
|
|
33
|
+
},
|
|
29
34
|
"./components": {
|
|
30
35
|
"import": "./dist/components.js",
|
|
31
36
|
"require": "./dist/components.cjs",
|
|
@@ -51,6 +56,9 @@
|
|
|
51
56
|
"*": {
|
|
52
57
|
"components": [
|
|
53
58
|
"./dist/components.d.ts"
|
|
59
|
+
],
|
|
60
|
+
"generators": [
|
|
61
|
+
"./dist/generators.d.ts"
|
|
54
62
|
]
|
|
55
63
|
}
|
|
56
64
|
},
|
|
@@ -64,27 +72,24 @@
|
|
|
64
72
|
"!/**/__tests__/**"
|
|
65
73
|
],
|
|
66
74
|
"dependencies": {
|
|
67
|
-
"@kubb/core": "3.0.0-alpha.
|
|
68
|
-
"@kubb/fs": "3.0.0-alpha.
|
|
69
|
-
"@kubb/oas": "3.0.0-alpha.
|
|
70
|
-
"@kubb/
|
|
71
|
-
"@kubb/plugin-
|
|
72
|
-
"@kubb/plugin-
|
|
73
|
-
"@kubb/react": "3.0.0-alpha.
|
|
75
|
+
"@kubb/core": "3.0.0-alpha.21",
|
|
76
|
+
"@kubb/fs": "3.0.0-alpha.21",
|
|
77
|
+
"@kubb/oas": "3.0.0-alpha.21",
|
|
78
|
+
"@kubb/plugin-oas": "3.0.0-alpha.21",
|
|
79
|
+
"@kubb/plugin-ts": "3.0.0-alpha.21",
|
|
80
|
+
"@kubb/plugin-zod": "3.0.0-alpha.21",
|
|
81
|
+
"@kubb/react": "3.0.0-alpha.21"
|
|
74
82
|
},
|
|
75
83
|
"devDependencies": {
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"@kubb/config-biome": "3.0.0-alpha.2",
|
|
82
|
-
"@kubb/config-ts": "3.0.0-alpha.2",
|
|
83
|
-
"@kubb/config-tsup": "3.0.0-alpha.2"
|
|
84
|
+
"axios": "^1.7.7",
|
|
85
|
+
"tsup": "^8.3.0",
|
|
86
|
+
"typescript": "^5.6.2",
|
|
87
|
+
"@kubb/config-ts": "3.0.0-alpha.21",
|
|
88
|
+
"@kubb/config-tsup": "3.0.0-alpha.21"
|
|
84
89
|
},
|
|
85
90
|
"peerDependencies": {
|
|
86
91
|
"axios": "^1.7.2",
|
|
87
|
-
"@kubb/react": "3.0.0-alpha.
|
|
92
|
+
"@kubb/react": "3.0.0-alpha.21"
|
|
88
93
|
},
|
|
89
94
|
"peerDependenciesMeta": {
|
|
90
95
|
"axios": {
|