@kubb/agent 5.0.0-alpha.35 → 5.0.0-alpha.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.
Files changed (180) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/server/chunks/nitro/nitro.mjs +1293 -20554
  3. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  4. package/.output/server/chunks/routes/api/health.get.mjs +16 -14
  5. package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
  6. package/.output/server/index.mjs +16 -14
  7. package/.output/server/index.mjs.map +1 -1
  8. package/.output/server/node_modules/.nitro/ws@8.18.0/lib/constants.js +18 -0
  9. package/.output/server/node_modules/.nitro/ws@8.18.0/lib/permessage-deflate.js +514 -0
  10. package/.output/server/node_modules/.nitro/ws@8.18.0/lib/sender.js +602 -0
  11. package/.output/server/node_modules/.nitro/ws@8.18.0/lib/stream.js +159 -0
  12. package/.output/server/node_modules/.nitro/ws@8.18.0/lib/websocket-server.js +540 -0
  13. package/.output/server/node_modules/.nitro/ws@8.18.0/lib/websocket.js +1388 -0
  14. package/.output/server/node_modules/.nitro/ws@8.18.0/package.json +69 -0
  15. package/.output/server/node_modules/.nitro/ws@8.18.0/wrapper.mjs +8 -0
  16. package/.output/server/node_modules/.nitro/ws@8.20.0/lib/buffer-util.js +131 -0
  17. package/.output/server/node_modules/.nitro/ws@8.20.0/lib/event-target.js +292 -0
  18. package/.output/server/node_modules/.nitro/ws@8.20.0/lib/extension.js +203 -0
  19. package/.output/server/node_modules/.nitro/ws@8.20.0/lib/limiter.js +55 -0
  20. package/.output/server/node_modules/.nitro/ws@8.20.0/lib/receiver.js +706 -0
  21. package/.output/server/node_modules/.nitro/ws@8.20.0/lib/subprotocol.js +62 -0
  22. package/.output/server/node_modules/.nitro/ws@8.20.0/lib/validation.js +152 -0
  23. package/.output/server/node_modules/@clack/core/dist/index.mjs +11 -0
  24. package/.output/server/node_modules/@clack/core/package.json +60 -0
  25. package/.output/server/node_modules/@clack/prompts/dist/index.mjs +137 -0
  26. package/.output/server/node_modules/@clack/prompts/package.json +65 -0
  27. package/.output/server/node_modules/@kubb/ast/dist/chunk--u3MIqq1.js +8 -0
  28. package/.output/server/node_modules/@kubb/ast/dist/index.js +423 -0
  29. package/.output/server/node_modules/@kubb/ast/package.json +70 -0
  30. package/.output/server/node_modules/@kubb/core/dist/chunk--u3MIqq1.js +8 -0
  31. package/.output/server/node_modules/@kubb/core/dist/hooks.js +23 -0
  32. package/.output/server/node_modules/@kubb/core/dist/index.js +2311 -0
  33. package/.output/server/node_modules/@kubb/core/package.json +109 -0
  34. package/.output/server/node_modules/@kubb/fabric-core/dist/chunk-O_arW02_.js +17 -0
  35. package/.output/server/node_modules/@kubb/fabric-core/dist/defaultParser-iCpMSYCp.js +15 -0
  36. package/.output/server/node_modules/@kubb/fabric-core/dist/getRelativePath-NAm_Y-vp.js +55 -0
  37. package/.output/server/node_modules/@kubb/fabric-core/dist/index.js +653 -0
  38. package/.output/server/node_modules/@kubb/fabric-core/dist/onProcessExit-Cput7j2c.js +742 -0
  39. package/.output/server/node_modules/@kubb/fabric-core/dist/parsers/typescript.js +101 -0
  40. package/.output/server/node_modules/@kubb/fabric-core/dist/parsers.js +17 -0
  41. package/.output/server/node_modules/@kubb/fabric-core/dist/plugins.js +375 -0
  42. package/.output/server/node_modules/@kubb/fabric-core/package.json +111 -0
  43. package/.output/server/node_modules/@kubb/oas/dist/chunk--u3MIqq1.js +8 -0
  44. package/.output/server/node_modules/@kubb/oas/dist/index.js +918 -0
  45. package/.output/server/node_modules/@kubb/oas/package.json +94 -0
  46. package/.output/server/node_modules/@kubb/plugin-client/dist/StaticClassClient-bCe7RG_w.js +636 -0
  47. package/.output/server/node_modules/@kubb/plugin-client/dist/chunk--u3MIqq1.js +8 -0
  48. package/.output/server/node_modules/@kubb/plugin-client/dist/components.js +2 -0
  49. package/.output/server/node_modules/@kubb/plugin-client/dist/generators-BffddRNu.js +723 -0
  50. package/.output/server/node_modules/@kubb/plugin-client/dist/index.js +124 -0
  51. package/.output/server/node_modules/@kubb/plugin-client/dist/templates/clients/axios.source.js +6 -0
  52. package/.output/server/node_modules/@kubb/plugin-client/dist/templates/clients/fetch.source.js +6 -0
  53. package/.output/server/node_modules/@kubb/plugin-client/dist/templates/config.source.js +6 -0
  54. package/.output/server/node_modules/@kubb/plugin-client/package.json +153 -0
  55. package/.output/server/node_modules/@kubb/plugin-cypress/dist/chunk--u3MIqq1.js +8 -0
  56. package/.output/server/node_modules/@kubb/plugin-cypress/dist/components-BK_6GU4v.js +257 -0
  57. package/.output/server/node_modules/@kubb/plugin-cypress/dist/generators-D5YFtyyC.js +71 -0
  58. package/.output/server/node_modules/@kubb/plugin-cypress/dist/index.js +79 -0
  59. package/.output/server/node_modules/@kubb/plugin-cypress/package.json +108 -0
  60. package/.output/server/node_modules/@kubb/plugin-faker/dist/chunk--u3MIqq1.js +8 -0
  61. package/.output/server/node_modules/@kubb/plugin-faker/dist/components-BkBIov4R.js +419 -0
  62. package/.output/server/node_modules/@kubb/plugin-faker/dist/fakerGenerator-BztogaeO.js +200 -0
  63. package/.output/server/node_modules/@kubb/plugin-faker/dist/index.js +141 -0
  64. package/.output/server/node_modules/@kubb/plugin-faker/package.json +103 -0
  65. package/.output/server/node_modules/@kubb/plugin-mcp/dist/Server-H3SwqhwF.js +178 -0
  66. package/.output/server/node_modules/@kubb/plugin-mcp/dist/chunk--u3MIqq1.js +8 -0
  67. package/.output/server/node_modules/@kubb/plugin-mcp/dist/generators-BqkMrcs9.js +274 -0
  68. package/.output/server/node_modules/@kubb/plugin-mcp/dist/index.js +122 -0
  69. package/.output/server/node_modules/@kubb/plugin-mcp/package.json +107 -0
  70. package/.output/server/node_modules/@kubb/plugin-msw/dist/chunk--u3MIqq1.js +8 -0
  71. package/.output/server/node_modules/@kubb/plugin-msw/dist/components-DgtTZkWX.js +277 -0
  72. package/.output/server/node_modules/@kubb/plugin-msw/dist/generators-C34kqa1L.js +161 -0
  73. package/.output/server/node_modules/@kubb/plugin-msw/dist/index.js +84 -0
  74. package/.output/server/node_modules/@kubb/plugin-msw/package.json +109 -0
  75. package/.output/server/node_modules/@kubb/plugin-oas/dist/SchemaMapper-CqMkO2T1.js +58 -0
  76. package/.output/server/node_modules/@kubb/plugin-oas/dist/chunk--u3MIqq1.js +8 -0
  77. package/.output/server/node_modules/@kubb/plugin-oas/dist/generators-D7C3CXsN.js +79 -0
  78. package/.output/server/node_modules/@kubb/plugin-oas/dist/generators.js +2 -0
  79. package/.output/server/node_modules/@kubb/plugin-oas/dist/getFooter-Pw3tLCiV.js +112 -0
  80. package/.output/server/node_modules/@kubb/plugin-oas/dist/hooks.js +200 -0
  81. package/.output/server/node_modules/@kubb/plugin-oas/dist/index.js +408 -0
  82. package/.output/server/node_modules/@kubb/plugin-oas/dist/requestBody-pRavthCw.js +1336 -0
  83. package/.output/server/node_modules/@kubb/plugin-oas/dist/utils.js +268 -0
  84. package/.output/server/node_modules/@kubb/plugin-oas/package.json +122 -0
  85. package/.output/server/node_modules/@kubb/plugin-react-query/dist/chunk--u3MIqq1.js +8 -0
  86. package/.output/server/node_modules/@kubb/plugin-react-query/dist/components-CpyHYGOw.js +1520 -0
  87. package/.output/server/node_modules/@kubb/plugin-react-query/dist/generators-CpiBv5eE.js +1427 -0
  88. package/.output/server/node_modules/@kubb/plugin-react-query/dist/index.js +166 -0
  89. package/.output/server/node_modules/@kubb/plugin-react-query/package.json +112 -0
  90. package/.output/server/node_modules/@kubb/plugin-redoc/dist/chunk--u3MIqq1.js +8 -0
  91. package/.output/server/node_modules/@kubb/plugin-redoc/dist/index.js +65 -0
  92. package/.output/server/node_modules/@kubb/plugin-redoc/package.json +85 -0
  93. package/.output/server/node_modules/@kubb/plugin-redoc/static/redoc.hbs +22 -0
  94. package/.output/server/node_modules/@kubb/plugin-solid-query/dist/chunk--u3MIqq1.js +8 -0
  95. package/.output/server/node_modules/@kubb/plugin-solid-query/dist/components-BhStIi1M.js +665 -0
  96. package/.output/server/node_modules/@kubb/plugin-solid-query/dist/generators-CQClzsST.js +415 -0
  97. package/.output/server/node_modules/@kubb/plugin-solid-query/dist/index.js +145 -0
  98. package/.output/server/node_modules/@kubb/plugin-solid-query/package.json +113 -0
  99. package/.output/server/node_modules/@kubb/plugin-svelte-query/dist/chunk--u3MIqq1.js +8 -0
  100. package/.output/server/node_modules/@kubb/plugin-svelte-query/dist/components-DntKBsnB.js +666 -0
  101. package/.output/server/node_modules/@kubb/plugin-svelte-query/dist/generators-BtTsGGrM.js +414 -0
  102. package/.output/server/node_modules/@kubb/plugin-svelte-query/dist/index.js +145 -0
  103. package/.output/server/node_modules/@kubb/plugin-svelte-query/package.json +113 -0
  104. package/.output/server/node_modules/@kubb/plugin-swr/dist/chunk--u3MIqq1.js +8 -0
  105. package/.output/server/node_modules/@kubb/plugin-swr/dist/components-DRDGvgXG.js +702 -0
  106. package/.output/server/node_modules/@kubb/plugin-swr/dist/generators-ClWZJ-YG.js +399 -0
  107. package/.output/server/node_modules/@kubb/plugin-swr/dist/index.js +144 -0
  108. package/.output/server/node_modules/@kubb/plugin-swr/package.json +115 -0
  109. package/.output/server/node_modules/@kubb/plugin-ts/dist/chunk--u3MIqq1.js +8 -0
  110. package/.output/server/node_modules/@kubb/plugin-ts/dist/components-C7fu-sK1.js +723 -0
  111. package/.output/server/node_modules/@kubb/plugin-ts/dist/index.js +2 -0
  112. package/.output/server/node_modules/@kubb/plugin-ts/dist/plugin-CYC-FGXe.js +479 -0
  113. package/.output/server/node_modules/@kubb/plugin-ts/package.json +105 -0
  114. package/.output/server/node_modules/@kubb/plugin-vue-query/dist/chunk--u3MIqq1.js +8 -0
  115. package/.output/server/node_modules/@kubb/plugin-vue-query/dist/components-_AMBl0g-.js +1029 -0
  116. package/.output/server/node_modules/@kubb/plugin-vue-query/dist/generators-Zb1s5Wmb.js +661 -0
  117. package/.output/server/node_modules/@kubb/plugin-vue-query/dist/index.js +157 -0
  118. package/.output/server/node_modules/@kubb/plugin-vue-query/package.json +114 -0
  119. package/.output/server/node_modules/@kubb/plugin-zod/dist/chunk--u3MIqq1.js +8 -0
  120. package/.output/server/node_modules/@kubb/plugin-zod/dist/components-eECfXVou.js +842 -0
  121. package/.output/server/node_modules/@kubb/plugin-zod/dist/generators-D1R6NNf2.js +290 -0
  122. package/.output/server/node_modules/@kubb/plugin-zod/dist/index.js +175 -0
  123. package/.output/server/node_modules/@kubb/plugin-zod/dist/templates/ToZod.source.js +6 -0
  124. package/.output/server/node_modules/@kubb/plugin-zod/package.json +112 -0
  125. package/.output/server/node_modules/@kubb/react-fabric/dist/chunk-BGCRLu6H.js +38 -0
  126. package/.output/server/node_modules/@kubb/react-fabric/dist/index.js +525 -0
  127. package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime-Bl0DfUmV.js +1448 -0
  128. package/.output/server/node_modules/@kubb/react-fabric/dist/jsx-runtime.js +12 -0
  129. package/.output/server/node_modules/@kubb/react-fabric/dist/parsers.js +2 -0
  130. package/.output/server/node_modules/@kubb/react-fabric/dist/plugins.js +4 -0
  131. package/.output/server/node_modules/@kubb/react-fabric/dist/reactPlugin-QQPrjNuQ.js +17813 -0
  132. package/.output/server/node_modules/@kubb/react-fabric/package.json +143 -0
  133. package/.output/server/node_modules/buffer-from/index.js +72 -0
  134. package/.output/server/node_modules/buffer-from/package.json +19 -0
  135. package/.output/server/node_modules/empathic/access.js +39 -0
  136. package/.output/server/node_modules/empathic/access.mjs +34 -0
  137. package/.output/server/node_modules/empathic/find.js +81 -0
  138. package/.output/server/node_modules/empathic/find.mjs +76 -0
  139. package/.output/server/node_modules/empathic/package.json +49 -0
  140. package/.output/server/node_modules/empathic/package.mjs +52 -0
  141. package/.output/server/node_modules/empathic/resolve.js +31 -0
  142. package/.output/server/node_modules/empathic/resolve.mjs +27 -0
  143. package/.output/server/node_modules/empathic/walk.js +22 -0
  144. package/.output/server/node_modules/empathic/walk.mjs +20 -0
  145. package/.output/server/node_modules/fast-string-truncated-width/dist/index.js +171 -0
  146. package/.output/server/node_modules/fast-string-truncated-width/dist/utils.js +15 -0
  147. package/.output/server/node_modules/fast-string-truncated-width/package.json +35 -0
  148. package/.output/server/node_modules/fast-string-width/dist/index.js +14 -0
  149. package/.output/server/node_modules/fast-string-width/package.json +34 -0
  150. package/.output/server/node_modules/fast-wrap-ansi/lib/main.js +216 -0
  151. package/.output/server/node_modules/fast-wrap-ansi/package.json +51 -0
  152. package/.output/server/node_modules/p-limit/index.js +127 -0
  153. package/.output/server/node_modules/p-limit/package.json +58 -0
  154. package/.output/server/node_modules/react-devtools-core/dist/backend.js +18302 -0
  155. package/.output/server/node_modules/react-devtools-core/package.json +38 -0
  156. package/.output/server/node_modules/sisteransi/package.json +34 -0
  157. package/.output/server/node_modules/sisteransi/src/index.js +58 -0
  158. package/.output/server/node_modules/source-map-support/package.json +31 -0
  159. package/.output/server/node_modules/source-map-support/source-map-support.js +625 -0
  160. package/.output/server/node_modules/typescript/lib/typescript.js +200276 -0
  161. package/.output/server/node_modules/typescript/package.json +120 -0
  162. package/.output/server/node_modules/yocto-queue/index.js +90 -0
  163. package/.output/server/node_modules/yocto-queue/package.json +48 -0
  164. package/.output/server/package.json +34 -2
  165. package/package.json +20 -20
  166. /package/.output/server/node_modules/{ws → .nitro/ws@8.18.0}/lib/buffer-util.js +0 -0
  167. /package/.output/server/node_modules/{ws → .nitro/ws@8.18.0}/lib/event-target.js +0 -0
  168. /package/.output/server/node_modules/{ws → .nitro/ws@8.18.0}/lib/extension.js +0 -0
  169. /package/.output/server/node_modules/{ws → .nitro/ws@8.18.0}/lib/limiter.js +0 -0
  170. /package/.output/server/node_modules/{ws → .nitro/ws@8.18.0}/lib/receiver.js +0 -0
  171. /package/.output/server/node_modules/{ws → .nitro/ws@8.18.0}/lib/subprotocol.js +0 -0
  172. /package/.output/server/node_modules/{ws → .nitro/ws@8.18.0}/lib/validation.js +0 -0
  173. /package/.output/server/node_modules/{ws → .nitro/ws@8.20.0}/lib/constants.js +0 -0
  174. /package/.output/server/node_modules/{ws → .nitro/ws@8.20.0}/lib/permessage-deflate.js +0 -0
  175. /package/.output/server/node_modules/{ws → .nitro/ws@8.20.0}/lib/sender.js +0 -0
  176. /package/.output/server/node_modules/{ws → .nitro/ws@8.20.0}/lib/stream.js +0 -0
  177. /package/.output/server/node_modules/{ws → .nitro/ws@8.20.0}/lib/websocket-server.js +0 -0
  178. /package/.output/server/node_modules/{ws → .nitro/ws@8.20.0}/lib/websocket.js +0 -0
  179. /package/.output/server/node_modules/{ws → .nitro/ws@8.20.0}/package.json +0 -0
  180. /package/.output/server/node_modules/{ws → .nitro/ws@8.20.0}/wrapper.mjs +0 -0
@@ -0,0 +1,166 @@
1
+ import "./chunk--u3MIqq1.js";
2
+ import { d as MutationKey, f as camelCase, p as pascalCase, u as QueryKey } from "./components-CpyHYGOw.js";
3
+ import { a as infiniteQueryGenerator, i as mutationGenerator, n as suspenseInfiniteQueryGenerator, o as hookOptionsGenerator, r as queryGenerator, s as customHookOptionsFileGenerator, t as suspenseQueryGenerator } from "./generators-CpiBv5eE.js";
4
+ import path from "node:path";
5
+ import { definePlugin, getBarrelFiles, getMode } from "@kubb/core";
6
+ import { pluginClientName } from "@kubb/plugin-client";
7
+ import { source } from "@kubb/plugin-client/templates/clients/axios.source";
8
+ import { source as source$1 } from "@kubb/plugin-client/templates/clients/fetch.source";
9
+ import { source as source$2 } from "@kubb/plugin-client/templates/config.source";
10
+ import { OperationGenerator, pluginOasName } from "@kubb/plugin-oas";
11
+ import { pluginTsName } from "@kubb/plugin-ts";
12
+ import { pluginZodName } from "@kubb/plugin-zod";
13
+ //#region src/plugin.ts
14
+ const pluginReactQueryName = "plugin-react-query";
15
+ const pluginReactQuery = definePlugin((options) => {
16
+ const { output = {
17
+ path: "hooks",
18
+ barrelType: "named"
19
+ }, group, exclude = [], include, override = [], parser = "client", suspense = {}, infinite = false, transformers = {}, paramsType = "inline", pathParamsType = paramsType === "object" ? "object" : options.pathParamsType || "inline", generators = [
20
+ queryGenerator,
21
+ suspenseQueryGenerator,
22
+ infiniteQueryGenerator,
23
+ suspenseInfiniteQueryGenerator,
24
+ mutationGenerator,
25
+ hookOptionsGenerator,
26
+ customHookOptionsFileGenerator
27
+ ].filter(Boolean), mutation = {}, query = {}, mutationKey = MutationKey.getTransformer, queryKey = QueryKey.getTransformer, customOptions, paramsCasing, contentType, client } = options;
28
+ const clientName = client?.client ?? "axios";
29
+ const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : void 0);
30
+ return {
31
+ name: pluginReactQueryName,
32
+ options: {
33
+ output,
34
+ client: {
35
+ bundle: client?.bundle,
36
+ baseURL: client?.baseURL,
37
+ client: clientName,
38
+ clientType: client?.clientType ?? "function",
39
+ dataReturnType: client?.dataReturnType ?? "data",
40
+ pathParamsType,
41
+ importPath: clientImportPath,
42
+ paramsCasing
43
+ },
44
+ infinite: infinite ? {
45
+ queryParam: "id",
46
+ initialPageParam: 0,
47
+ cursorParam: void 0,
48
+ nextParam: void 0,
49
+ previousParam: void 0,
50
+ ...infinite
51
+ } : false,
52
+ suspense,
53
+ queryKey,
54
+ query: query === false ? false : {
55
+ methods: ["get"],
56
+ importPath: "@tanstack/react-query",
57
+ ...query
58
+ },
59
+ mutationKey,
60
+ mutation: mutation === false ? false : {
61
+ methods: [
62
+ "post",
63
+ "put",
64
+ "patch",
65
+ "delete"
66
+ ],
67
+ importPath: "@tanstack/react-query",
68
+ ...mutation
69
+ },
70
+ customOptions: customOptions ? {
71
+ name: "useCustomHookOptions",
72
+ ...customOptions
73
+ } : void 0,
74
+ paramsType,
75
+ pathParamsType,
76
+ parser,
77
+ paramsCasing,
78
+ group
79
+ },
80
+ pre: [
81
+ pluginOasName,
82
+ pluginTsName,
83
+ parser === "zod" ? pluginZodName : void 0
84
+ ].filter(Boolean),
85
+ resolvePath(baseName, pathMode, options) {
86
+ const root = path.resolve(this.config.root, this.config.output.path);
87
+ if ((pathMode ?? getMode(path.resolve(root, output.path))) === "single")
88
+ /**
89
+ * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend
90
+ * Other plugins then need to call addOrAppend instead of just add from the fileManager class
91
+ */
92
+ return path.resolve(root, output.path);
93
+ if (group && (options?.group?.path || options?.group?.tag)) {
94
+ const groupName = group?.name ? group.name : (ctx) => {
95
+ if (group?.type === "path") return `${ctx.group.split("/")[1]}`;
96
+ return `${camelCase(ctx.group)}Controller`;
97
+ };
98
+ return path.resolve(root, output.path, groupName({ group: group.type === "path" ? options.group.path : options.group.tag }), baseName);
99
+ }
100
+ return path.resolve(root, output.path, baseName);
101
+ },
102
+ resolveName(name, type) {
103
+ let resolvedName = camelCase(name);
104
+ if (type === "file" || type === "function") resolvedName = camelCase(name, { isFile: type === "file" });
105
+ if (type === "type") resolvedName = pascalCase(name);
106
+ if (type) return transformers?.name?.(resolvedName, type) || resolvedName;
107
+ return resolvedName;
108
+ },
109
+ async install() {
110
+ const root = path.resolve(this.config.root, this.config.output.path);
111
+ const mode = getMode(path.resolve(root, output.path));
112
+ const oas = await this.getOas();
113
+ const baseURL = await this.getBaseURL();
114
+ if (baseURL) this.plugin.options.client.baseURL = baseURL;
115
+ const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName]);
116
+ if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath) await this.upsertFile({
117
+ baseName: "fetch.ts",
118
+ path: path.resolve(root, ".kubb/fetch.ts"),
119
+ sources: [{
120
+ name: "fetch",
121
+ value: this.plugin.options.client.client === "fetch" ? source$1 : source,
122
+ isExportable: true,
123
+ isIndexable: true
124
+ }],
125
+ imports: [],
126
+ exports: []
127
+ });
128
+ if (!hasClientPlugin) await this.upsertFile({
129
+ baseName: "config.ts",
130
+ path: path.resolve(root, ".kubb/config.ts"),
131
+ sources: [{
132
+ name: "config",
133
+ value: source$2,
134
+ isExportable: false,
135
+ isIndexable: false
136
+ }],
137
+ imports: [],
138
+ exports: []
139
+ });
140
+ const files = await new OperationGenerator(this.plugin.options, {
141
+ fabric: this.fabric,
142
+ oas,
143
+ pluginManager: this.pluginManager,
144
+ events: this.events,
145
+ plugin: this.plugin,
146
+ contentType,
147
+ exclude,
148
+ include,
149
+ override,
150
+ mode
151
+ }).build(...generators);
152
+ await this.upsertFile(...files);
153
+ const barrelFiles = await getBarrelFiles(this.fabric.files, {
154
+ type: output.barrelType ?? "named",
155
+ root,
156
+ output,
157
+ meta: { pluginKey: this.plugin.key }
158
+ });
159
+ await this.upsertFile(...barrelFiles);
160
+ }
161
+ };
162
+ });
163
+ //#endregion
164
+ export { pluginReactQuery, pluginReactQueryName };
165
+
166
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,112 @@
1
+ {
2
+ "name": "@kubb/plugin-react-query",
3
+ "version": "4.37.2",
4
+ "description": "React Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for React applications.",
5
+ "keywords": [
6
+ "react-query",
7
+ "tanstack-query",
8
+ "react",
9
+ "react-hooks",
10
+ "hooks",
11
+ "data-fetching",
12
+ "api-client",
13
+ "sdk-generator",
14
+ "typescript",
15
+ "type-safe",
16
+ "openapi",
17
+ "swagger",
18
+ "oas",
19
+ "code-generator",
20
+ "codegen",
21
+ "plugins",
22
+ "kubb"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/kubb-labs/kubb.git",
27
+ "directory": "packages/plugin-react-query"
28
+ },
29
+ "license": "MIT",
30
+ "author": "stijnvanhulle",
31
+ "sideEffects": false,
32
+ "type": "module",
33
+ "exports": {
34
+ ".": {
35
+ "import": "./dist/index.js",
36
+ "require": "./dist/index.cjs"
37
+ },
38
+ "./components": {
39
+ "import": "./dist/components.js",
40
+ "require": "./dist/components.cjs"
41
+ },
42
+ "./generators": {
43
+ "import": "./dist/generators.js",
44
+ "require": "./dist/generators.cjs"
45
+ },
46
+ "./package.json": "./package.json"
47
+ },
48
+ "types": "./dist/index.d.ts",
49
+ "typesVersions": {
50
+ "*": {
51
+ "components": [
52
+ "./dist/components.d.ts"
53
+ ],
54
+ "generators": [
55
+ "./dist/generators.d.ts"
56
+ ]
57
+ }
58
+ },
59
+ "files": [
60
+ "src",
61
+ "dist",
62
+ "!/**/**.test.**",
63
+ "!/**/__tests__/**",
64
+ "!/**/__snapshots__/**"
65
+ ],
66
+ "size-limit": [
67
+ {
68
+ "path": "./dist/*.js",
69
+ "limit": "510 KiB",
70
+ "gzip": true
71
+ }
72
+ ],
73
+ "dependencies": {
74
+ "@kubb/fabric-core": "0.14.0",
75
+ "@kubb/react-fabric": "0.14.0",
76
+ "remeda": "^2.33.6",
77
+ "@kubb/core": "4.37.2",
78
+ "@kubb/oas": "4.37.2",
79
+ "@kubb/plugin-client": "4.37.2",
80
+ "@kubb/plugin-oas": "4.37.2",
81
+ "@kubb/plugin-ts": "4.37.2",
82
+ "@kubb/plugin-zod": "4.37.2"
83
+ },
84
+ "peerDependencies": {
85
+ "@kubb/fabric-core": "0.14.0",
86
+ "@kubb/react-fabric": "0.14.0"
87
+ },
88
+ "engines": {
89
+ "node": ">=20"
90
+ },
91
+ "publishConfig": {
92
+ "access": "public",
93
+ "registry": "https://registry.npmjs.org/"
94
+ },
95
+ "main": "./dist/index.cjs",
96
+ "module": "./dist/index.js",
97
+ "devDependencies": {
98
+ "@internals/tanstack-query": "0.0.0",
99
+ "@internals/utils": "0.0.0"
100
+ },
101
+ "scripts": {
102
+ "build": "tsdown && size-limit",
103
+ "clean": "npx rimraf ./dist",
104
+ "lint": "bun biome lint .",
105
+ "lint:fix": "bun biome lint --fix --unsafe .",
106
+ "release": "pnpm publish --no-git-check",
107
+ "release:canary": "bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check",
108
+ "start": "tsdown --watch",
109
+ "test": "vitest --passWithNoTests",
110
+ "typecheck": "tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false"
111
+ }
112
+ }
@@ -0,0 +1,8 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __name = (target, value) => __defProp(target, "name", {
4
+ value,
5
+ configurable: true
6
+ });
7
+ //#endregion
8
+ export { __name as t };
@@ -0,0 +1,65 @@
1
+ import "./chunk--u3MIqq1.js";
2
+ import path from "node:path";
3
+ import { definePlugin } from "@kubb/core";
4
+ import { pluginOasName } from "@kubb/plugin-oas";
5
+ import fs from "node:fs";
6
+ import { fileURLToPath } from "node:url";
7
+ import pkg from "handlebars";
8
+ //#region src/redoc.tsx
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+ async function getPageHTML(api, { title, disableGoogleFont, templateOptions } = {}) {
12
+ const templateFileName = path.join(__dirname, "../static/redoc.hbs");
13
+ return pkg.compile(fs.readFileSync(templateFileName).toString())({
14
+ title: title || api.info.title || "ReDoc documentation",
15
+ redocHTML: `
16
+ <script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> <\/script>
17
+ <div id="redoc-container"></div>
18
+ <script>
19
+ const data = ${JSON.stringify(api, null, 2)};
20
+ Redoc.init(data, {
21
+ "expandResponses": "200,400"
22
+ }, document.getElementById('redoc-container'))
23
+ <\/script>
24
+ `,
25
+ disableGoogleFont,
26
+ templateOptions
27
+ });
28
+ }
29
+ //#endregion
30
+ //#region src/plugin.ts
31
+ function trimExtName(text) {
32
+ return text.replace(/\.[^/.]+$/, "");
33
+ }
34
+ const pluginRedocName = "plugin-redoc";
35
+ const pluginRedoc = definePlugin((options) => {
36
+ const { output = { path: "docs.html" } } = options;
37
+ return {
38
+ name: pluginRedocName,
39
+ options: {
40
+ output,
41
+ name: trimExtName(output.path)
42
+ },
43
+ pre: [pluginOasName],
44
+ async install() {
45
+ const oas = await this.getOas();
46
+ await oas.dereference();
47
+ const root = path.resolve(this.config.root, this.config.output.path);
48
+ const pageHTML = await getPageHTML(oas.api);
49
+ await this.addFile({
50
+ baseName: "docs.html",
51
+ path: path.resolve(root, output.path || "./docs.html"),
52
+ sources: [{
53
+ name: "docs.html",
54
+ value: pageHTML
55
+ }],
56
+ imports: [],
57
+ exports: []
58
+ });
59
+ }
60
+ };
61
+ });
62
+ //#endregion
63
+ export { pluginRedoc, pluginRedocName };
64
+
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "@kubb/plugin-redoc",
3
+ "version": "4.37.2",
4
+ "description": "Redoc documentation generator plugin for Kubb, creating beautiful, interactive API documentation from OpenAPI specifications.",
5
+ "keywords": [
6
+ "redoc",
7
+ "documentation",
8
+ "api-docs",
9
+ "openapi",
10
+ "swagger",
11
+ "interactive-docs",
12
+ "typescript",
13
+ "code-generator",
14
+ "codegen",
15
+ "plugins",
16
+ "kubb"
17
+ ],
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/kubb-labs/kubb.git",
21
+ "directory": "packages/plugin-redoc"
22
+ },
23
+ "license": "MIT",
24
+ "author": "stijnvanhulle",
25
+ "sideEffects": false,
26
+ "type": "module",
27
+ "exports": {
28
+ ".": {
29
+ "import": "./dist/index.js",
30
+ "require": "./dist/index.cjs"
31
+ },
32
+ "./package.json": "./package.json"
33
+ },
34
+ "types": "./dist/index.d.ts",
35
+ "typesVersions": {
36
+ "*": {}
37
+ },
38
+ "files": [
39
+ "src",
40
+ "dist",
41
+ "static",
42
+ "!/**/**.test.**",
43
+ "!/**/__tests__/**",
44
+ "!/**/__snapshots__/**"
45
+ ],
46
+ "size-limit": [
47
+ {
48
+ "path": "./dist/*.js",
49
+ "limit": "510 KiB",
50
+ "gzip": true
51
+ }
52
+ ],
53
+ "dependencies": {
54
+ "@kubb/fabric-core": "0.14.0",
55
+ "@kubb/react-fabric": "0.14.0",
56
+ "handlebars": "^4.7.8",
57
+ "@kubb/core": "4.37.2",
58
+ "@kubb/oas": "4.37.2",
59
+ "@kubb/plugin-oas": "4.37.2"
60
+ },
61
+ "peerDependencies": {
62
+ "@kubb/fabric-core": "0.14.0",
63
+ "@kubb/react-fabric": "0.14.0"
64
+ },
65
+ "engines": {
66
+ "node": ">=20"
67
+ },
68
+ "publishConfig": {
69
+ "access": "public",
70
+ "registry": "https://registry.npmjs.org/"
71
+ },
72
+ "main": "./dist/index.cjs",
73
+ "module": "./dist/index.js",
74
+ "scripts": {
75
+ "build": "tsdown && size-limit",
76
+ "clean": "npx rimraf ./dist",
77
+ "lint": "bun biome lint .",
78
+ "lint:fix": "bun biome lint --fix --unsafe .",
79
+ "release": "pnpm publish --no-git-check",
80
+ "release:canary": "bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check",
81
+ "start": "tsdown --watch",
82
+ "test": "vitest --passWithNoTests",
83
+ "typecheck": "tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false"
84
+ }
85
+ }
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <meta charset="utf8" />
6
+ <title>{{title}}</title>
7
+ <!-- needed for adaptive design -->
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+ <style>
10
+ body {
11
+ padding: 0;
12
+ margin: 0;
13
+ }
14
+ </style>
15
+ {{#unless disableGoogleFont}}<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">{{/unless}}
16
+ </head>
17
+
18
+ <body>
19
+ {{{redocHTML}}}
20
+ </body>
21
+
22
+ </html>
@@ -0,0 +1,8 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __name = (target, value) => __defProp(target, "name", {
4
+ value,
5
+ configurable: true
6
+ });
7
+ //#endregion
8
+ export { __name as t };