@kubb/plugin-swr 5.0.0-beta.64 → 5.0.0-beta.74

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.
@@ -1,422 +0,0 @@
1
- const require_components = require("./components-DxWGjLWg.cjs");
2
- let node_path = require("node:path");
3
- node_path = require_components.__toESM(node_path);
4
- let _kubb_core = require("@kubb/core");
5
- let _kubb_plugin_client = require("@kubb/plugin-client");
6
- let _kubb_plugin_ts = require("@kubb/plugin-ts");
7
- let _kubb_plugin_zod = require("@kubb/plugin-zod");
8
- let _kubb_renderer_jsx = require("@kubb/renderer-jsx");
9
- let _kubb_renderer_jsx_jsx_runtime = require("@kubb/renderer-jsx/jsx-runtime");
10
- //#region src/generators/mutationGenerator.tsx
11
- /**
12
- * Built-in generator for `useSWRMutation` hooks. Emits one `useFooMutation` hook
13
- * per POST/PUT/DELETE operation (configurable via `mutation.methods`) plus
14
- * the matching `fooMutationKey` helper.
15
- */
16
- const mutationGenerator = (0, _kubb_core.defineGenerator)({
17
- name: "swr-mutation",
18
- renderer: _kubb_renderer_jsx.jsxRenderer,
19
- operation(node, ctx) {
20
- if (!_kubb_core.ast.isHttpOperationNode(node)) return null;
21
- const { config, driver, resolver, root } = ctx;
22
- const { output, query, mutation, paramsCasing, paramsType, pathParamsType, parser, client: clientOptions, group } = ctx.options;
23
- const pluginTs = driver.getPlugin(_kubb_plugin_ts.pluginTsName);
24
- if (!pluginTs) return null;
25
- const tsResolver = driver.getResolver(_kubb_plugin_ts.pluginTsName);
26
- const isQuery = query === false || !!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase());
27
- const queryMethods = new Set(query ? query.methods : []);
28
- if (!(mutation !== false && !isQuery && (mutation ? mutation.methods : []).some((method) => !queryMethods.has(method) && node.method.toLowerCase() === method.toLowerCase()))) return null;
29
- const importPath = mutation ? mutation.importPath : "swr/mutation";
30
- const mutationHookName = resolver.resolveMutationName(node);
31
- const mutationKeyName = resolver.resolveMutationKeyName(node);
32
- const mutationKeyTypeName = resolver.resolveMutationKeyTypeName(node);
33
- const mutationArgTypeName = resolver.resolveMutationArgTypeName(node);
34
- const clientName = resolver.resolveClientName(node);
35
- const meta = {
36
- file: resolver.resolveFile({
37
- name: mutationHookName,
38
- extname: ".ts",
39
- tag: node.tags[0] ?? "default",
40
- path: node.path
41
- }, {
42
- root,
43
- output,
44
- group
45
- }),
46
- fileTs: tsResolver.resolveFile({
47
- name: node.operationId,
48
- extname: ".ts",
49
- tag: node.tags[0] ?? "default",
50
- path: node.path
51
- }, {
52
- root,
53
- output: pluginTs.options?.output ?? output,
54
- group: pluginTs.options?.group
55
- })
56
- };
57
- const importedTypeNames = require_components.resolveOperationTypeNames(node, tsResolver, {
58
- paramsCasing,
59
- order: "body-response-first"
60
- });
61
- const pluginZod = (0, _kubb_plugin_client.isParserEnabled)(parser) ? driver.getPlugin(_kubb_plugin_zod.pluginZodName) : void 0;
62
- const zodResolver = pluginZod ? driver.getResolver(_kubb_plugin_zod.pluginZodName) : void 0;
63
- const fileZod = zodResolver ? zodResolver.resolveFile({
64
- name: node.operationId,
65
- extname: ".ts",
66
- tag: node.tags[0] ?? "default",
67
- path: node.path
68
- }, {
69
- root,
70
- output: pluginZod?.options?.output ?? output,
71
- group: pluginZod?.options?.group
72
- }) : void 0;
73
- const zodSchemaNames = require_components.resolveZodSchemaNames(node, zodResolver, parser);
74
- const clientPlugin = driver.getPlugin(_kubb_plugin_client.pluginClientName);
75
- const shouldUseClientPlugin = clientPlugin?.name === _kubb_plugin_client.pluginClientName && clientOptions.clientType !== "class";
76
- const clientResolver = shouldUseClientPlugin ? driver.getResolver(_kubb_plugin_client.pluginClientName) : void 0;
77
- const clientFile = shouldUseClientPlugin ? clientResolver?.resolveFile({
78
- name: node.operationId,
79
- extname: ".ts",
80
- tag: node.tags[0] ?? "default",
81
- path: node.path
82
- }, {
83
- root,
84
- output: clientPlugin?.options?.output ?? output,
85
- group: clientPlugin?.options?.group
86
- }) : void 0;
87
- const resolvedClientName = shouldUseClientPlugin ? clientResolver?.resolveName(node.operationId) ?? clientName : clientName;
88
- return /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx.File, {
89
- baseName: meta.file.baseName,
90
- path: meta.file.path,
91
- meta: meta.file.meta,
92
- banner: resolver.resolveBanner(ctx.meta, {
93
- output,
94
- config,
95
- file: {
96
- path: meta.file.path,
97
- baseName: meta.file.baseName
98
- }
99
- }),
100
- footer: resolver.resolveFooter(ctx.meta, {
101
- output,
102
- config,
103
- file: {
104
- path: meta.file.path,
105
- baseName: meta.file.baseName
106
- }
107
- }),
108
- children: [
109
- fileZod && zodSchemaNames.length > 0 && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
110
- name: zodSchemaNames,
111
- root: meta.file.path,
112
- path: fileZod.path
113
- }),
114
- clientOptions.importPath ? /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
115
- name: "client",
116
- path: clientOptions.importPath
117
- }), /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
118
- name: [
119
- "Client",
120
- "RequestConfig",
121
- "ResponseErrorConfig"
122
- ],
123
- path: clientOptions.importPath,
124
- isTypeOnly: true
125
- })] }) : /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
126
- name: ["client"],
127
- root: meta.file.path,
128
- path: node_path.default.resolve(root, ".kubb/client.ts")
129
- }), /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
130
- name: [
131
- "Client",
132
- "RequestConfig",
133
- "ResponseErrorConfig"
134
- ],
135
- root: meta.file.path,
136
- path: node_path.default.resolve(root, ".kubb/client.ts"),
137
- isTypeOnly: true
138
- })] }),
139
- shouldUseClientPlugin && clientFile && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
140
- name: [resolvedClientName],
141
- root: meta.file.path,
142
- path: clientFile.path
143
- }),
144
- !shouldUseClientPlugin && node.requestBody?.content?.some((e) => e.contentType === "multipart/form-data") && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
145
- name: ["buildFormData"],
146
- root: meta.file.path,
147
- path: node_path.default.resolve(root, ".kubb/config.ts")
148
- }),
149
- !shouldUseClientPlugin && parser === "zod" && zodResolver && node.requestBody?.content?.[0]?.schema && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
150
- name: ["z"],
151
- path: "zod",
152
- isTypeOnly: true
153
- }),
154
- meta.fileTs && importedTypeNames.length > 0 && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
155
- name: Array.from(new Set(importedTypeNames)),
156
- root: meta.file.path,
157
- path: meta.fileTs.path,
158
- isTypeOnly: true
159
- }),
160
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.MutationKey, {
161
- name: mutationKeyName,
162
- typeName: mutationKeyTypeName,
163
- node,
164
- pathParamsType,
165
- paramsCasing,
166
- transformer: ctx.options.mutationKey
167
- }),
168
- !shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_plugin_client.Client, {
169
- name: resolvedClientName,
170
- baseURL: clientOptions.baseURL,
171
- dataReturnType: clientOptions.dataReturnType || "data",
172
- paramsCasing: clientOptions.paramsCasing || paramsCasing,
173
- paramsType,
174
- pathParamsType,
175
- parser,
176
- node,
177
- tsResolver,
178
- zodResolver
179
- }),
180
- mutation && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
181
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
182
- name: "useSWRMutation",
183
- path: importPath
184
- }),
185
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
186
- name: ["SWRMutationConfiguration"],
187
- path: importPath,
188
- isTypeOnly: true
189
- }),
190
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.Mutation, {
191
- name: mutationHookName,
192
- clientName: resolvedClientName,
193
- mutationKeyName,
194
- mutationKeyTypeName,
195
- mutationArgTypeName,
196
- node,
197
- tsResolver,
198
- dataReturnType: clientOptions.dataReturnType || "data",
199
- paramsCasing,
200
- paramsType,
201
- pathParamsType
202
- })
203
- ] })
204
- ]
205
- });
206
- }
207
- });
208
- //#endregion
209
- //#region src/generators/queryGenerator.tsx
210
- const queryGenerator = (0, _kubb_core.defineGenerator)({
211
- name: "swr-query",
212
- renderer: _kubb_renderer_jsx.jsxRenderer,
213
- operation(node, ctx) {
214
- if (!_kubb_core.ast.isHttpOperationNode(node)) return null;
215
- const { config, driver, resolver, root } = ctx;
216
- const { output, query, mutation, paramsCasing, paramsType, pathParamsType, parser, client: clientOptions, group } = ctx.options;
217
- const pluginTs = driver.getPlugin(_kubb_plugin_ts.pluginTsName);
218
- if (!pluginTs) return null;
219
- const tsResolver = driver.getResolver(_kubb_plugin_ts.pluginTsName);
220
- const isQuery = query === false || !!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase());
221
- const queryMethods = new Set(query ? query.methods : []);
222
- const isMutation = mutation !== false && !isQuery && (mutation ? mutation.methods : []).some((method) => !queryMethods.has(method) && node.method.toLowerCase() === method.toLowerCase());
223
- if (!isQuery || isMutation) return null;
224
- const importPath = query ? query.importPath : "swr";
225
- const queryName = resolver.resolveQueryName(node);
226
- const queryOptionsName = resolver.resolveQueryOptionsName(node);
227
- const queryKeyName = resolver.resolveQueryKeyName(node);
228
- const queryKeyTypeName = resolver.resolveQueryKeyTypeName(node);
229
- const clientName = resolver.resolveClientName(node);
230
- const meta = {
231
- file: resolver.resolveFile({
232
- name: queryName,
233
- extname: ".ts",
234
- tag: node.tags[0] ?? "default",
235
- path: node.path
236
- }, {
237
- root,
238
- output,
239
- group
240
- }),
241
- fileTs: tsResolver.resolveFile({
242
- name: node.operationId,
243
- extname: ".ts",
244
- tag: node.tags[0] ?? "default",
245
- path: node.path
246
- }, {
247
- root,
248
- output: pluginTs.options?.output ?? output,
249
- group: pluginTs.options?.group
250
- })
251
- };
252
- const importedTypeNames = require_components.resolveOperationTypeNames(node, tsResolver, {
253
- paramsCasing,
254
- exclude: [queryKeyTypeName],
255
- order: "body-response-first"
256
- });
257
- const pluginZod = (0, _kubb_plugin_client.isParserEnabled)(parser) ? driver.getPlugin(_kubb_plugin_zod.pluginZodName) : void 0;
258
- const zodResolver = pluginZod ? driver.getResolver(_kubb_plugin_zod.pluginZodName) : void 0;
259
- const fileZod = zodResolver ? zodResolver.resolveFile({
260
- name: node.operationId,
261
- extname: ".ts",
262
- tag: node.tags[0] ?? "default",
263
- path: node.path
264
- }, {
265
- root,
266
- output: pluginZod?.options?.output ?? output,
267
- group: pluginZod?.options?.group
268
- }) : void 0;
269
- const zodSchemaNames = require_components.resolveZodSchemaNames(node, zodResolver, parser);
270
- const clientPlugin = driver.getPlugin(_kubb_plugin_client.pluginClientName);
271
- const shouldUseClientPlugin = clientPlugin?.name === _kubb_plugin_client.pluginClientName && clientOptions.clientType !== "class";
272
- const clientResolver = shouldUseClientPlugin ? driver.getResolver(_kubb_plugin_client.pluginClientName) : void 0;
273
- const clientFile = shouldUseClientPlugin ? clientResolver?.resolveFile({
274
- name: node.operationId,
275
- extname: ".ts",
276
- tag: node.tags[0] ?? "default",
277
- path: node.path
278
- }, {
279
- root,
280
- output: clientPlugin?.options?.output ?? output,
281
- group: clientPlugin?.options?.group
282
- }) : void 0;
283
- const resolvedClientName = shouldUseClientPlugin ? clientResolver?.resolveName(node.operationId) ?? clientName : clientName;
284
- return /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx.File, {
285
- baseName: meta.file.baseName,
286
- path: meta.file.path,
287
- meta: meta.file.meta,
288
- banner: resolver.resolveBanner(ctx.meta, {
289
- output,
290
- config,
291
- file: {
292
- path: meta.file.path,
293
- baseName: meta.file.baseName
294
- }
295
- }),
296
- footer: resolver.resolveFooter(ctx.meta, {
297
- output,
298
- config,
299
- file: {
300
- path: meta.file.path,
301
- baseName: meta.file.baseName
302
- }
303
- }),
304
- children: [
305
- fileZod && zodSchemaNames.length > 0 && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
306
- name: zodSchemaNames,
307
- root: meta.file.path,
308
- path: fileZod.path
309
- }),
310
- clientOptions.importPath ? /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
311
- name: "client",
312
- path: clientOptions.importPath
313
- }), /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
314
- name: [
315
- "Client",
316
- "RequestConfig",
317
- "ResponseErrorConfig"
318
- ],
319
- path: clientOptions.importPath,
320
- isTypeOnly: true
321
- })] }) : /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
322
- name: ["client"],
323
- root: meta.file.path,
324
- path: node_path.default.resolve(root, ".kubb/client.ts")
325
- }), /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
326
- name: [
327
- "Client",
328
- "RequestConfig",
329
- "ResponseErrorConfig"
330
- ],
331
- root: meta.file.path,
332
- path: node_path.default.resolve(root, ".kubb/client.ts"),
333
- isTypeOnly: true
334
- })] }),
335
- shouldUseClientPlugin && clientFile && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
336
- name: [resolvedClientName],
337
- root: meta.file.path,
338
- path: clientFile.path
339
- }),
340
- !shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
341
- name: ["buildFormData"],
342
- root: meta.file.path,
343
- path: node_path.default.resolve(root, ".kubb/config.ts")
344
- }),
345
- meta.fileTs && importedTypeNames.length > 0 && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
346
- name: Array.from(new Set(importedTypeNames)),
347
- root: meta.file.path,
348
- path: meta.fileTs.path,
349
- isTypeOnly: true
350
- }),
351
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.QueryKey, {
352
- name: queryKeyName,
353
- typeName: queryKeyTypeName,
354
- node,
355
- tsResolver,
356
- pathParamsType,
357
- paramsCasing,
358
- transformer: ctx.options.queryKey
359
- }),
360
- !shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_plugin_client.Client, {
361
- name: resolvedClientName,
362
- baseURL: clientOptions.baseURL,
363
- dataReturnType: clientOptions.dataReturnType || "data",
364
- paramsCasing: clientOptions.paramsCasing || paramsCasing,
365
- paramsType,
366
- pathParamsType,
367
- parser,
368
- node,
369
- tsResolver,
370
- zodResolver
371
- }),
372
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.QueryOptions, {
373
- name: queryOptionsName,
374
- clientName: resolvedClientName,
375
- node,
376
- tsResolver,
377
- paramsCasing,
378
- paramsType,
379
- pathParamsType
380
- }),
381
- query && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
382
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
383
- name: "useSWR",
384
- path: importPath
385
- }),
386
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
387
- name: ["SWRConfiguration"],
388
- path: importPath,
389
- isTypeOnly: true
390
- }),
391
- /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.Query, {
392
- name: queryName,
393
- queryOptionsName,
394
- queryKeyName,
395
- queryKeyTypeName,
396
- node,
397
- tsResolver,
398
- paramsCasing,
399
- paramsType,
400
- pathParamsType,
401
- dataReturnType: clientOptions.dataReturnType || "data"
402
- })
403
- ] })
404
- ]
405
- });
406
- }
407
- });
408
- //#endregion
409
- Object.defineProperty(exports, "mutationGenerator", {
410
- enumerable: true,
411
- get: function() {
412
- return mutationGenerator;
413
- }
414
- });
415
- Object.defineProperty(exports, "queryGenerator", {
416
- enumerable: true,
417
- get: function() {
418
- return queryGenerator;
419
- }
420
- });
421
-
422
- //# sourceMappingURL=generators-CJ4ziuNk.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generators-CJ4ziuNk.cjs","names":["jsxRenderer","ast","pluginTsName","resolveOperationTypeNames","pluginZodName","resolveZodSchemaNames","pluginClientName","File","path","MutationKey","Client","Mutation","jsxRenderer","ast","pluginTsName","resolveOperationTypeNames","pluginZodName","resolveZodSchemaNames","pluginClientName","File","path","QueryKey","Client","QueryOptions","Query"],"sources":["../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx"],"sourcesContent":["import path from 'node:path'\nimport { resolveOperationTypeNames } from '@internals/shared'\nimport { resolveZodSchemaNames } from '@internals/tanstack-query'\nimport { ast, defineGenerator } from '@kubb/core'\nimport { Client, isParserEnabled, pluginClientName } from '@kubb/plugin-client'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, jsxRenderer } from '@kubb/renderer-jsx'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginSwr } from '../types'\n\n/**\n * Built-in generator for `useSWRMutation` hooks. Emits one `useFooMutation` hook\n * per POST/PUT/DELETE operation (configurable via `mutation.methods`) plus\n * the matching `fooMutationKey` helper.\n */\nexport const mutationGenerator = defineGenerator<PluginSwr>({\n name: 'swr-mutation',\n renderer: jsxRenderer,\n operation(node, ctx) {\n if (!ast.isHttpOperationNode(node)) return null\n const { config, driver, resolver, root } = ctx\n const { output, query, mutation, paramsCasing, paramsType, pathParamsType, parser, client: clientOptions, group } = ctx.options\n\n const pluginTs = driver.getPlugin(pluginTsName)\n if (!pluginTs) return null\n const tsResolver = driver.getResolver(pluginTsName)\n\n const isQuery = query === false || (!!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase()))\n const queryMethods = new Set(query ? query.methods : [])\n const isMutation =\n mutation !== false &&\n !isQuery &&\n (mutation ? mutation.methods : []).some((method) => !queryMethods.has(method) && node.method.toLowerCase() === method.toLowerCase())\n\n if (!isMutation) return null\n\n const importPath = mutation ? mutation.importPath : 'swr/mutation'\n\n const mutationHookName = resolver.resolveMutationName(node)\n const mutationKeyName = resolver.resolveMutationKeyName(node)\n const mutationKeyTypeName = resolver.resolveMutationKeyTypeName(node)\n const mutationArgTypeName = resolver.resolveMutationArgTypeName(node)\n const clientName = resolver.resolveClientName(node)\n\n const meta = {\n file: resolver.resolveFile({ name: mutationHookName, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group }),\n fileTs: tsResolver.resolveFile(\n { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },\n { root, output: pluginTs.options?.output ?? output, group: pluginTs.options?.group },\n ),\n }\n\n const importedTypeNames = resolveOperationTypeNames(node, tsResolver, { paramsCasing, order: 'body-response-first' })\n\n const pluginZod = isParserEnabled(parser) ? driver.getPlugin(pluginZodName) : undefined\n const zodResolver = pluginZod ? driver.getResolver(pluginZodName) : undefined\n const fileZod = zodResolver\n ? zodResolver.resolveFile(\n { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },\n { root, output: pluginZod?.options?.output ?? output, group: pluginZod?.options?.group },\n )\n : undefined\n const zodSchemaNames = resolveZodSchemaNames(node, zodResolver, parser)\n\n const clientPlugin = driver.getPlugin(pluginClientName)\n const hasClientPlugin = clientPlugin?.name === pluginClientName\n const shouldUseClientPlugin = hasClientPlugin && clientOptions.clientType !== 'class'\n const clientResolver = shouldUseClientPlugin ? driver.getResolver(pluginClientName) : undefined\n\n const clientFile = shouldUseClientPlugin\n ? clientResolver?.resolveFile(\n { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },\n {\n root,\n output: clientPlugin?.options?.output ?? output,\n group: clientPlugin?.options?.group,\n },\n )\n : undefined\n\n const resolvedClientName = shouldUseClientPlugin ? (clientResolver?.resolveName(node.operationId) ?? clientName) : clientName\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n footer={resolver.resolveFooter(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n >\n {fileZod && zodSchemaNames.length > 0 && <File.Import name={zodSchemaNames} root={meta.file.path} path={fileZod.path} />}\n {clientOptions.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'client'} path={clientOptions.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={clientOptions.importPath} isTypeOnly />\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && <File.Import name={['client']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={meta.file.path}\n path={path.resolve(root, '.kubb/client.ts')}\n isTypeOnly\n />\n </>\n )}\n {shouldUseClientPlugin && clientFile && <File.Import name={[resolvedClientName]} root={meta.file.path} path={clientFile.path} />}\n {!shouldUseClientPlugin && node.requestBody?.content?.some((e) => e.contentType === 'multipart/form-data') && (\n <File.Import name={['buildFormData']} root={meta.file.path} path={path.resolve(root, '.kubb/config.ts')} />\n )}\n {!shouldUseClientPlugin && parser === 'zod' && zodResolver && node.requestBody?.content?.[0]?.schema && (\n <File.Import name={['z']} path=\"zod\" isTypeOnly />\n )}\n {meta.fileTs && importedTypeNames.length > 0 && (\n <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />\n )}\n\n <MutationKey\n name={mutationKeyName}\n typeName={mutationKeyTypeName}\n node={node}\n pathParamsType={pathParamsType}\n paramsCasing={paramsCasing}\n transformer={ctx.options.mutationKey}\n />\n\n {!shouldUseClientPlugin && (\n <Client\n name={resolvedClientName}\n baseURL={clientOptions.baseURL}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n paramsCasing={clientOptions.paramsCasing || paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n parser={parser}\n node={node}\n tsResolver={tsResolver}\n zodResolver={zodResolver}\n />\n )}\n\n {mutation && (\n <>\n <File.Import name={'useSWRMutation'} path={importPath} />\n <File.Import name={['SWRMutationConfiguration']} path={importPath} isTypeOnly />\n <Mutation\n name={mutationHookName}\n clientName={resolvedClientName}\n mutationKeyName={mutationKeyName}\n mutationKeyTypeName={mutationKeyTypeName}\n mutationArgTypeName={mutationArgTypeName}\n node={node}\n tsResolver={tsResolver}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n paramsCasing={paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { resolveOperationTypeNames } from '@internals/shared'\nimport { resolveZodSchemaNames } from '@internals/tanstack-query'\nimport { ast, defineGenerator } from '@kubb/core'\nimport { Client, isParserEnabled, pluginClientName } from '@kubb/plugin-client'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, jsxRenderer } from '@kubb/renderer-jsx'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginSwr } from '../types'\n\nexport const queryGenerator = defineGenerator<PluginSwr>({\n name: 'swr-query',\n renderer: jsxRenderer,\n operation(node, ctx) {\n if (!ast.isHttpOperationNode(node)) return null\n const { config, driver, resolver, root } = ctx\n const { output, query, mutation, paramsCasing, paramsType, pathParamsType, parser, client: clientOptions, group } = ctx.options\n\n const pluginTs = driver.getPlugin(pluginTsName)\n if (!pluginTs) return null\n const tsResolver = driver.getResolver(pluginTsName)\n\n const isQuery = query === false || (!!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase()))\n const queryMethods = new Set(query ? query.methods : [])\n const isMutation =\n mutation !== false &&\n !isQuery &&\n (mutation ? mutation.methods : []).some((method) => !queryMethods.has(method) && node.method.toLowerCase() === method.toLowerCase())\n\n if (!isQuery || isMutation) return null\n\n const importPath = query ? query.importPath : 'swr'\n\n const queryName = resolver.resolveQueryName(node)\n const queryOptionsName = resolver.resolveQueryOptionsName(node)\n const queryKeyName = resolver.resolveQueryKeyName(node)\n const queryKeyTypeName = resolver.resolveQueryKeyTypeName(node)\n const clientName = resolver.resolveClientName(node)\n\n const meta = {\n file: resolver.resolveFile({ name: queryName, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path }, { root, output, group }),\n fileTs: tsResolver.resolveFile(\n { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },\n { root, output: pluginTs.options?.output ?? output, group: pluginTs.options?.group },\n ),\n }\n\n const importedTypeNames = resolveOperationTypeNames(node, tsResolver, {\n paramsCasing,\n exclude: [queryKeyTypeName],\n order: 'body-response-first',\n })\n\n const pluginZod = isParserEnabled(parser) ? driver.getPlugin(pluginZodName) : undefined\n const zodResolver = pluginZod ? driver.getResolver(pluginZodName) : undefined\n const fileZod = zodResolver\n ? zodResolver.resolveFile(\n { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },\n { root, output: pluginZod?.options?.output ?? output, group: pluginZod?.options?.group },\n )\n : undefined\n const zodSchemaNames = resolveZodSchemaNames(node, zodResolver, parser)\n\n const clientPlugin = driver.getPlugin(pluginClientName)\n const hasClientPlugin = clientPlugin?.name === pluginClientName\n const shouldUseClientPlugin = hasClientPlugin && clientOptions.clientType !== 'class'\n const clientResolver = shouldUseClientPlugin ? driver.getResolver(pluginClientName) : undefined\n\n const clientFile = shouldUseClientPlugin\n ? clientResolver?.resolveFile(\n { name: node.operationId, extname: '.ts', tag: node.tags[0] ?? 'default', path: node.path },\n {\n root,\n output: clientPlugin?.options?.output ?? output,\n group: clientPlugin?.options?.group,\n },\n )\n : undefined\n\n const resolvedClientName = shouldUseClientPlugin ? (clientResolver?.resolveName(node.operationId) ?? clientName) : clientName\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n footer={resolver.resolveFooter(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n >\n {fileZod && zodSchemaNames.length > 0 && <File.Import name={zodSchemaNames} root={meta.file.path} path={fileZod.path} />}\n {clientOptions.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'client'} path={clientOptions.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={clientOptions.importPath} isTypeOnly />\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && <File.Import name={['client']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={meta.file.path}\n path={path.resolve(root, '.kubb/client.ts')}\n isTypeOnly\n />\n </>\n )}\n {shouldUseClientPlugin && clientFile && <File.Import name={[resolvedClientName]} root={meta.file.path} path={clientFile.path} />}\n {!shouldUseClientPlugin && <File.Import name={['buildFormData']} root={meta.file.path} path={path.resolve(root, '.kubb/config.ts')} />}\n {meta.fileTs && importedTypeNames.length > 0 && (\n <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />\n )}\n\n <QueryKey\n name={queryKeyName}\n typeName={queryKeyTypeName}\n node={node}\n tsResolver={tsResolver}\n pathParamsType={pathParamsType}\n paramsCasing={paramsCasing}\n transformer={ctx.options.queryKey}\n />\n\n {!shouldUseClientPlugin && (\n <Client\n name={resolvedClientName}\n baseURL={clientOptions.baseURL}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n paramsCasing={clientOptions.paramsCasing || paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n parser={parser}\n node={node}\n tsResolver={tsResolver}\n zodResolver={zodResolver}\n />\n )}\n\n <QueryOptions\n name={queryOptionsName}\n clientName={resolvedClientName}\n node={node}\n tsResolver={tsResolver}\n paramsCasing={paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n />\n\n {query && (\n <>\n <File.Import name={'useSWR'} path={importPath} />\n <File.Import name={['SWRConfiguration']} path={importPath} isTypeOnly />\n <Query\n name={queryName}\n queryOptionsName={queryOptionsName}\n queryKeyName={queryKeyName}\n queryKeyTypeName={queryKeyTypeName}\n node={node}\n tsResolver={tsResolver}\n paramsCasing={paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n dataReturnType={cl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