@kubb/plugin-react-query 4.5.7 → 4.5.9
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/{components-VIjbw3ls.cjs → components-BStC96Va.cjs} +2 -2
- package/dist/{components-VIjbw3ls.cjs.map → components-BStC96Va.cjs.map} +1 -1
- package/dist/{components-By3fyxDp.js → components-BWrDXrTl.js} +1 -1
- package/dist/{components-By3fyxDp.js.map → components-BWrDXrTl.js.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +1 -1
- package/dist/{generators-BTb-fJYl.js → generators-BAjiYTwQ.js} +18 -18
- package/dist/generators-BAjiYTwQ.js.map +1 -0
- package/dist/{generators-Bry5rKTK.cjs → generators-FKmaFJN7.cjs} +18 -18
- package/dist/generators-FKmaFJN7.cjs.map +1 -0
- package/dist/generators.cjs +2 -2
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/index.cjs +17 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -12
- package/dist/index.js.map +1 -1
- package/dist/{types-DfKaXJ0J.d.cts → types-DXarNSZw.d.cts} +9 -2
- package/dist/{types-CHYnai3-.d.ts → types-DuvxYNEk.d.ts} +9 -2
- package/package.json +9 -9
- package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +2 -2
- package/src/generators/__snapshots__/findByTags.ts +2 -2
- package/src/generators/__snapshots__/findByTagsObject.ts +2 -2
- package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +2 -2
- package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +2 -2
- package/src/generators/__snapshots__/findByTagsWithZod.ts +2 -2
- package/src/generators/__snapshots__/findInfiniteByTags.ts +2 -2
- package/src/generators/__snapshots__/findSuspenseByTags.ts +2 -2
- package/src/generators/__snapshots__/getPetIdCamelCase.ts +2 -2
- package/src/generators/__snapshots__/postAsQuery.ts +2 -2
- package/src/generators/__snapshots__/updatePetById.ts +2 -2
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +2 -2
- package/src/generators/infiniteQueryGenerator.tsx +3 -8
- package/src/generators/mutationGenerator.tsx +3 -3
- package/src/generators/queryGenerator.tsx +11 -10
- package/src/generators/suspenseQueryGenerator.tsx +24 -13
- package/src/plugin.ts +16 -9
- package/src/types.ts +1 -2
- package/dist/generators-BTb-fJYl.js.map +0 -1
- package/dist/generators-Bry5rKTK.cjs.map +0 -1
- /package/dist/{chunk-DMmIE7y6.js → chunk-HKYW5u2u.js} +0 -0
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
}) : target, mod));
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
24
|
-
const require_components = require('./components-
|
|
24
|
+
const require_components = require('./components-BStC96Va.cjs');
|
|
25
25
|
let node_path = require("node:path");
|
|
26
26
|
node_path = __toESM(node_path);
|
|
27
27
|
let __kubb_plugin_client = require("@kubb/plugin-client");
|
|
@@ -144,20 +144,20 @@ const infiniteQueryGenerator = (0, __kubb_plugin_oas_generators.createReactGener
|
|
|
144
144
|
})
|
|
145
145
|
] }) : /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
|
|
146
146
|
/* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
147
|
-
name: "fetch",
|
|
147
|
+
name: ["fetch"],
|
|
148
148
|
root: query.file.path,
|
|
149
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
149
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts")
|
|
150
150
|
}),
|
|
151
151
|
/* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
152
152
|
name: ["RequestConfig", "ResponseErrorConfig"],
|
|
153
153
|
root: query.file.path,
|
|
154
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
154
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts"),
|
|
155
155
|
isTypeOnly: true
|
|
156
156
|
}),
|
|
157
157
|
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
158
158
|
name: ["ResponseConfig"],
|
|
159
159
|
root: query.file.path,
|
|
160
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
160
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts"),
|
|
161
161
|
isTypeOnly: true
|
|
162
162
|
})
|
|
163
163
|
] }),
|
|
@@ -351,20 +351,20 @@ const mutationGenerator = (0, __kubb_plugin_oas_generators.createReactGenerator)
|
|
|
351
351
|
})
|
|
352
352
|
] }) : /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
|
|
353
353
|
/* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
354
|
-
name: "fetch",
|
|
354
|
+
name: ["fetch"],
|
|
355
355
|
root: mutation.file.path,
|
|
356
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
356
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts")
|
|
357
357
|
}),
|
|
358
358
|
/* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
359
359
|
name: ["RequestConfig", "ResponseErrorConfig"],
|
|
360
360
|
root: mutation.file.path,
|
|
361
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
361
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts"),
|
|
362
362
|
isTypeOnly: true
|
|
363
363
|
}),
|
|
364
364
|
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
365
365
|
name: ["ResponseConfig"],
|
|
366
366
|
root: mutation.file.path,
|
|
367
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
367
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts"),
|
|
368
368
|
isTypeOnly: true
|
|
369
369
|
})
|
|
370
370
|
] }),
|
|
@@ -545,20 +545,20 @@ const queryGenerator = (0, __kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
545
545
|
})
|
|
546
546
|
] }) : /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
|
|
547
547
|
/* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
548
|
-
name: "fetch",
|
|
548
|
+
name: ["fetch"],
|
|
549
549
|
root: query.file.path,
|
|
550
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
550
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts")
|
|
551
551
|
}),
|
|
552
552
|
/* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
553
553
|
name: ["RequestConfig", "ResponseErrorConfig"],
|
|
554
554
|
root: query.file.path,
|
|
555
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
555
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts"),
|
|
556
556
|
isTypeOnly: true
|
|
557
557
|
}),
|
|
558
558
|
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
559
559
|
name: ["ResponseConfig"],
|
|
560
560
|
root: query.file.path,
|
|
561
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
561
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts"),
|
|
562
562
|
isTypeOnly: true
|
|
563
563
|
})
|
|
564
564
|
] }),
|
|
@@ -750,20 +750,20 @@ const suspenseQueryGenerator = (0, __kubb_plugin_oas_generators.createReactGener
|
|
|
750
750
|
})
|
|
751
751
|
] }) : /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
|
|
752
752
|
/* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
753
|
-
name: "fetch",
|
|
753
|
+
name: ["fetch"],
|
|
754
754
|
root: query.file.path,
|
|
755
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
755
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts")
|
|
756
756
|
}),
|
|
757
757
|
/* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
758
758
|
name: ["RequestConfig", "ResponseErrorConfig"],
|
|
759
759
|
root: query.file.path,
|
|
760
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
760
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts"),
|
|
761
761
|
isTypeOnly: true
|
|
762
762
|
}),
|
|
763
763
|
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
|
|
764
764
|
name: ["ResponseConfig"],
|
|
765
765
|
root: query.file.path,
|
|
766
|
-
path: node_path.default.resolve(config.root, config.output.path, ".kubb/
|
|
766
|
+
path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetch.ts"),
|
|
767
767
|
isTypeOnly: true
|
|
768
768
|
})
|
|
769
769
|
] }),
|
|
@@ -884,4 +884,4 @@ Object.defineProperty(exports, 'suspenseQueryGenerator', {
|
|
|
884
884
|
return suspenseQueryGenerator;
|
|
885
885
|
}
|
|
886
886
|
});
|
|
887
|
-
//# sourceMappingURL=generators-
|
|
887
|
+
//# sourceMappingURL=generators-FKmaFJN7.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators-FKmaFJN7.cjs","names":["pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","InfiniteQueryOptions","InfiniteQuery","pluginTsName","pluginZodName","pluginClientName","File","path","MutationKey","Client","MutationOptions","Mutation","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","QueryOptions","Query","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","QueryOptions","SuspenseQuery"],"sources":["../src/generators/infiniteQueryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx","../src/generators/suspenseQueryGenerator.tsx"],"sourcesContent":["import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-infinite-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const infiniteOptions = options.infinite && typeof options.infinite === 'object' ? options.infinite : undefined\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n suffix: 'infinite',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'InfiniteQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'InfiniteQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'InfiniteQueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || isMutation || !infiniteOptions) {\n return null\n }\n\n const normalizeKey = (key?: string | null) => (key ?? '').replace(/\\?$/, '')\n const queryParam = infiniteOptions.queryParam\n const cursorParam = infiniteOptions.cursorParam\n const queryParamKeys = type.schemas.queryParams?.keys ?? []\n const responseKeys = [...(type.schemas.responses?.flatMap((item) => item.keys ?? []) ?? []), ...(type.schemas.response?.keys ?? [])]\n\n const hasQueryParam = queryParam ? queryParamKeys.some((key) => normalizeKey(key) === queryParam) : false\n const hasCursorParam = cursorParam ? responseKeys.some((key) => normalizeKey(key) === cursorParam) : true\n\n if (!hasQueryParam || !hasCursorParam) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n\n {hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n cursorParam={infiniteOptions.cursorParam}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryResult']} path={importPath} isTypeOnly />\n <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport { MutationOptions } from '../components/MutationOptions.tsx'\nimport type { PluginReactQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ config, plugin, operation, generator }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/react-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const mutationOptions = {\n name: getName(operation, { type: 'function', suffix: 'MutationOptions' }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation) {\n return null\n }\n\n return (\n <File\n baseName={mutation.file.baseName}\n path={mutation.file.path}\n meta={mutation.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={mutation.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import\n name={['ResponseConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n {!!hasClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.mutationKey}\n />\n\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['mutationOptions']} path={importPath} />\n\n <MutationOptions\n name={mutationOptions.name}\n clientName={client.name}\n mutationKeyName={mutationKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n />\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['UseMutationOptions', 'UseMutationResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n mutationOptionsName={mutationOptions.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ config, plugin, operation, generator }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'QueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'QueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'QueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, {\n pluginKey: [pluginTsName],\n type: 'type',\n }),\n }\n\n const zod = {\n // grouping is coming from react-query instead of zod option, we need to pass the options of zod instead\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, {\n pluginKey: [pluginZodName],\n type: 'function',\n }),\n }\n\n if (!isQuery || isMutation) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n\n {hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.queryKey}\n />\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'QueryObserverOptions', 'UseQueryResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { QueryKey, QueryOptions, SuspenseQuery } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const suspenseQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-suspense-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const isSuspense = !!options.suspense\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, {\n type: 'function',\n prefix: 'use',\n suffix: 'suspense',\n }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'suspense' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n suffix: 'suspense',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, {\n type: 'function',\n suffix: 'SuspenseQueryOptions',\n }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'SuspenseQueryKey' }),\n typeName: getName(operation, {\n type: 'type',\n suffix: 'SuspenseQueryKey',\n }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, {\n pluginKey: [pluginTsName],\n type: 'type',\n }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, {\n pluginKey: [pluginZodName],\n type: 'function',\n }),\n }\n\n if (!isQuery || isMutation || !isSuspense) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n {hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.suspense && (\n <>\n <File.Import name={['useSuspenseQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseSuspenseQueryOptions', 'UseSuspenseQueryResult']} path={importPath} isTypeOnly />\n\n <SuspenseQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAa,gFAAgE;CAC3E,MAAM;CACN,UAAU,EAAE,QAAQ,WAAW,WAAW,UAAU;EAClD,MAAM,EACJ,SACA,SAAS,EAAE,aACT;EACJ,MAAM,yDAAkC;EAExC,MAAM,2CAAc;EACpB,MAAM,EAAE,YAAY,SAAS,6DAAgC,UAAU;EAEvE,MAAM,UAAU,OAAO,QAAQ,UAAU,YAAY,OAAO,QAAQ,OAAO,QAAQ,MAAM,WAAW,UAAU,WAAW,OAAO;EAChI,MAAM,oCAAwB,QAAQ,WAAW,QAA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"}
|
package/dist/generators.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_generators = require('./generators-
|
|
2
|
-
require('./components-
|
|
1
|
+
const require_generators = require('./generators-FKmaFJN7.cjs');
|
|
2
|
+
require('./components-BStC96Va.cjs');
|
|
3
3
|
|
|
4
4
|
exports.infiniteQueryGenerator = require_generators.infiniteQueryGenerator;
|
|
5
5
|
exports.mutationGenerator = require_generators.mutationGenerator;
|
package/dist/generators.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ReactGenerator, r as PluginReactQuery } from "./types-
|
|
1
|
+
import { a as ReactGenerator, r as PluginReactQuery } from "./types-DXarNSZw.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/generators/infiniteQueryGenerator.d.ts
|
|
4
4
|
declare const infiniteQueryGenerator: ReactGenerator<PluginReactQuery>;
|
package/dist/generators.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ReactGenerator, r as PluginReactQuery } from "./types-
|
|
1
|
+
import { a as ReactGenerator, r as PluginReactQuery } from "./types-DuvxYNEk.js";
|
|
2
2
|
|
|
3
3
|
//#region src/generators/infiniteQueryGenerator.d.ts
|
|
4
4
|
declare const infiniteQueryGenerator: ReactGenerator<PluginReactQuery>;
|
package/dist/generators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./components-
|
|
2
|
-
import { i as infiniteQueryGenerator, n as queryGenerator, r as mutationGenerator, t as suspenseQueryGenerator } from "./generators-
|
|
1
|
+
import "./components-BWrDXrTl.js";
|
|
2
|
+
import { i as infiniteQueryGenerator, n as queryGenerator, r as mutationGenerator, t as suspenseQueryGenerator } from "./generators-BAjiYTwQ.js";
|
|
3
3
|
|
|
4
4
|
export { infiniteQueryGenerator, mutationGenerator, queryGenerator, suspenseQueryGenerator };
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_generators = require('./generators-
|
|
2
|
-
const require_components = require('./components-
|
|
1
|
+
const require_generators = require('./generators-FKmaFJN7.cjs');
|
|
2
|
+
const require_components = require('./components-BStC96Va.cjs');
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_generators.__toESM(node_path);
|
|
5
5
|
let __kubb_core = require("@kubb/core");
|
|
@@ -21,16 +21,19 @@ const pluginReactQuery = (0, __kubb_core.definePlugin)((options) => {
|
|
|
21
21
|
require_generators.suspenseQueryGenerator,
|
|
22
22
|
require_generators.infiniteQueryGenerator,
|
|
23
23
|
require_generators.mutationGenerator
|
|
24
|
-
].filter(Boolean), mutation = {}, query = {}, mutationKey = require_components.MutationKey.getTransformer, queryKey = require_components.QueryKey.getTransformer, paramsCasing, contentType } = options;
|
|
24
|
+
].filter(Boolean), mutation = {}, query = {}, mutationKey = require_components.MutationKey.getTransformer, queryKey = require_components.QueryKey.getTransformer, paramsCasing, contentType, client } = options;
|
|
25
|
+
const clientType = client?.client ?? "axios";
|
|
26
|
+
const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientType}` : void 0);
|
|
25
27
|
return {
|
|
26
28
|
name: pluginReactQueryName,
|
|
27
29
|
options: {
|
|
28
30
|
output,
|
|
29
31
|
client: {
|
|
30
|
-
client
|
|
31
|
-
|
|
32
|
+
...options.client,
|
|
33
|
+
client: clientType,
|
|
34
|
+
dataReturnType: client?.dataReturnType ?? "data",
|
|
32
35
|
pathParamsType,
|
|
33
|
-
|
|
36
|
+
importPath: clientImportPath
|
|
34
37
|
},
|
|
35
38
|
infinite: infinite ? {
|
|
36
39
|
queryParam: "id",
|
|
@@ -98,13 +101,15 @@ const pluginReactQuery = (0, __kubb_core.definePlugin)((options) => {
|
|
|
98
101
|
const baseURL = await this.getBaseURL();
|
|
99
102
|
if (baseURL) this.plugin.options.client.baseURL = baseURL;
|
|
100
103
|
const hasClientPlugin = !!this.pluginManager.getPluginByKey([__kubb_plugin_client.pluginClientName]);
|
|
101
|
-
const
|
|
102
|
-
if (!hasClientPlugin && !this.plugin.options.client.importPath && !
|
|
103
|
-
baseName: "
|
|
104
|
-
path: node_path.default.resolve(root, ".kubb/
|
|
104
|
+
const containsFetch = this.fabric.files.some((file) => file.baseName === "fetch.ts");
|
|
105
|
+
if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath && !containsFetch) await this.addFile({
|
|
106
|
+
baseName: "fetch.ts",
|
|
107
|
+
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
105
108
|
sources: [{
|
|
106
|
-
name: "
|
|
107
|
-
value: (0, __kubb_core_utils.resolveModuleSource)(this.plugin.options.client.client === "fetch" ? "@kubb/plugin-client/templates/clients/fetch" : "@kubb/plugin-client/templates/clients/axios").source
|
|
109
|
+
name: "fetch",
|
|
110
|
+
value: (0, __kubb_core_utils.resolveModuleSource)(this.plugin.options.client.client === "fetch" ? "@kubb/plugin-client/templates/clients/fetch" : "@kubb/plugin-client/templates/clients/axios").source,
|
|
111
|
+
isExportable: true,
|
|
112
|
+
isIndexable: true
|
|
108
113
|
}]
|
|
109
114
|
});
|
|
110
115
|
const files = await new __kubb_plugin_oas.OperationGenerator(this.plugin.options, {
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["queryGenerator","suspenseQueryGenerator","infiniteQueryGenerator","mutationGenerator","MutationKey","QueryKey","pluginOasName","pluginTsName","pluginZodName","path","options","groupName: Group['name']","pluginClientName","OperationGenerator"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey } from './components'\nimport { QueryKey } from './components/QueryKey.tsx'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator, suspenseQueryGenerator } from './generators'\nimport type { PluginReactQuery } from './types.ts'\n\nexport const pluginReactQueryName = 'plugin-react-query' satisfies PluginReactQuery['name']\n\nexport const pluginReactQuery = definePlugin<PluginReactQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n suspense = {},\n infinite = false,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n generators = [queryGenerator, suspenseQueryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),\n mutation = {},\n query = {},\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n paramsCasing,\n contentType,\n } = options\n\n return {\n name: pluginReactQueryName,\n options: {\n output,\n client: {\n client:
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["queryGenerator","suspenseQueryGenerator","infiniteQueryGenerator","mutationGenerator","MutationKey","QueryKey","pluginOasName","pluginTsName","pluginZodName","path","options","groupName: Group['name']","pluginClientName","OperationGenerator"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey } from './components'\nimport { QueryKey } from './components/QueryKey.tsx'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator, suspenseQueryGenerator } from './generators'\nimport type { PluginReactQuery } from './types.ts'\n\nexport const pluginReactQueryName = 'plugin-react-query' satisfies PluginReactQuery['name']\n\nexport const pluginReactQuery = definePlugin<PluginReactQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n suspense = {},\n infinite = false,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n generators = [queryGenerator, suspenseQueryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),\n mutation = {},\n query = {},\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n paramsCasing,\n contentType,\n client,\n } = options\n\n const clientType = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientType}` : undefined)\n\n return {\n name: pluginReactQueryName,\n options: {\n output,\n client: {\n ...options.client,\n client: clientType,\n dataReturnType: client?.dataReturnType ?? 'data',\n pathParamsType,\n importPath: clientImportPath,\n },\n infinite: infinite\n ? {\n queryParam: 'id',\n initialPageParam: 0,\n cursorParam: undefined,\n ...infinite,\n }\n : false,\n suspense,\n queryKey,\n query:\n query === false\n ? false\n : {\n methods: ['get'],\n importPath: '@tanstack/react-query',\n ...query,\n },\n mutationKey,\n mutation: {\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/react-query',\n ...mutation,\n },\n paramsType,\n pathParamsType,\n parser,\n paramsCasing,\n group,\n },\n pre: [pluginOasName, pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n let resolvedName = camelCase(name)\n\n if (type === 'file' || type === 'function') {\n resolvedName = camelCase(name, {\n isFile: type === 'file',\n })\n }\n if (type === 'type') {\n resolvedName = pascalCase(name)\n }\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async install() {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = getMode(path.resolve(root, output.path))\n const oas = await this.getOas()\n const baseURL = await this.getBaseURL()\n\n if (baseURL) {\n this.plugin.options.client.baseURL = baseURL\n }\n\n const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName])\n const containsFetch = this.fabric.files.some((file) => file.baseName === 'fetch.ts')\n\n if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath && !containsFetch) {\n // pre add bundled fetch\n await this.addFile({\n baseName: 'fetch.ts',\n path: path.resolve(root, '.kubb/fetch.ts'),\n sources: [\n {\n name: 'fetch',\n value: resolveModuleSource(\n this.plugin.options.client.client === 'fetch' ? '@kubb/plugin-client/templates/clients/fetch' : '@kubb/plugin-client/templates/clients/axios',\n ).source,\n isExportable: true,\n isIndexable: true,\n },\n ],\n })\n }\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const files = await operationGenerator.build(...generators)\n await this.addFile(...files)\n\n const barrelFiles = await getBarrelFiles(this.fabric.files, {\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.addFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAa,uBAAuB;AAEpC,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AAiB;IAC1C,SAAS,CACP;KACE,MAAM;KACN,kDACE,KAAK,OAAO,QAAQ,OAAO,WAAW,UAAU,gDAAgD,8CACjG,CAAC;KACF,cAAc;KACd,aAAa;KACd,CACF;IACF,CAAC;GAeJ,MAAM,QAAQ,MAZa,IAAII,qCAAmB,KAAK,OAAO,SAAS;IACrE,QAAQ,KAAK;IACb;IACA,eAAe,KAAK;IACpB,QAAQ,KAAK;IACb;IACA;IACA;IACA;IACA;IACD,CAAC,CAEqC,MAAM,GAAG,WAAW;AAC3D,SAAM,KAAK,QAAQ,GAAG,MAAM;GAE5B,MAAM,cAAc,sCAAqB,KAAK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACD,QAAQ,KAAK;IACd,CAAC;AAEF,SAAM,KAAK,QAAQ,GAAG,YAAY;;EAErC;EACD"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Options, r as PluginReactQuery, s as UserPluginWithLifeCycle } from "./types-
|
|
1
|
+
import { n as Options, r as PluginReactQuery, s as UserPluginWithLifeCycle } from "./types-DXarNSZw.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin.d.ts
|
|
4
4
|
declare const pluginReactQueryName = "plugin-react-query";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Options, r as PluginReactQuery, s as UserPluginWithLifeCycle } from "./types-
|
|
1
|
+
import { n as Options, r as PluginReactQuery, s as UserPluginWithLifeCycle } from "./types-DuvxYNEk.js";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin.d.ts
|
|
4
4
|
declare const pluginReactQueryName = "plugin-react-query";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as MutationKey, l as QueryKey } from "./components-
|
|
2
|
-
import { i as infiniteQueryGenerator, n as queryGenerator, r as mutationGenerator, t as suspenseQueryGenerator } from "./generators-
|
|
1
|
+
import { a as MutationKey, l as QueryKey } from "./components-BWrDXrTl.js";
|
|
2
|
+
import { i as infiniteQueryGenerator, n as queryGenerator, r as mutationGenerator, t as suspenseQueryGenerator } from "./generators-BAjiYTwQ.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { definePlugin, getBarrelFiles, getMode } from "@kubb/core";
|
|
5
5
|
import { camelCase, pascalCase } from "@kubb/core/transformers";
|
|
@@ -20,16 +20,19 @@ const pluginReactQuery = definePlugin((options) => {
|
|
|
20
20
|
suspenseQueryGenerator,
|
|
21
21
|
infiniteQueryGenerator,
|
|
22
22
|
mutationGenerator
|
|
23
|
-
].filter(Boolean), mutation = {}, query = {}, mutationKey = MutationKey.getTransformer, queryKey = QueryKey.getTransformer, paramsCasing, contentType } = options;
|
|
23
|
+
].filter(Boolean), mutation = {}, query = {}, mutationKey = MutationKey.getTransformer, queryKey = QueryKey.getTransformer, paramsCasing, contentType, client } = options;
|
|
24
|
+
const clientType = client?.client ?? "axios";
|
|
25
|
+
const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientType}` : void 0);
|
|
24
26
|
return {
|
|
25
27
|
name: pluginReactQueryName,
|
|
26
28
|
options: {
|
|
27
29
|
output,
|
|
28
30
|
client: {
|
|
29
|
-
client
|
|
30
|
-
|
|
31
|
+
...options.client,
|
|
32
|
+
client: clientType,
|
|
33
|
+
dataReturnType: client?.dataReturnType ?? "data",
|
|
31
34
|
pathParamsType,
|
|
32
|
-
|
|
35
|
+
importPath: clientImportPath
|
|
33
36
|
},
|
|
34
37
|
infinite: infinite ? {
|
|
35
38
|
queryParam: "id",
|
|
@@ -97,13 +100,15 @@ const pluginReactQuery = definePlugin((options) => {
|
|
|
97
100
|
const baseURL = await this.getBaseURL();
|
|
98
101
|
if (baseURL) this.plugin.options.client.baseURL = baseURL;
|
|
99
102
|
const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName]);
|
|
100
|
-
const
|
|
101
|
-
if (!hasClientPlugin && !this.plugin.options.client.importPath && !
|
|
102
|
-
baseName: "
|
|
103
|
-
path: path.resolve(root, ".kubb/
|
|
103
|
+
const containsFetch = this.fabric.files.some((file) => file.baseName === "fetch.ts");
|
|
104
|
+
if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath && !containsFetch) await this.addFile({
|
|
105
|
+
baseName: "fetch.ts",
|
|
106
|
+
path: path.resolve(root, ".kubb/fetch.ts"),
|
|
104
107
|
sources: [{
|
|
105
|
-
name: "
|
|
106
|
-
value: resolveModuleSource(this.plugin.options.client.client === "fetch" ? "@kubb/plugin-client/templates/clients/fetch" : "@kubb/plugin-client/templates/clients/axios").source
|
|
108
|
+
name: "fetch",
|
|
109
|
+
value: resolveModuleSource(this.plugin.options.client.client === "fetch" ? "@kubb/plugin-client/templates/clients/fetch" : "@kubb/plugin-client/templates/clients/axios").source,
|
|
110
|
+
isExportable: true,
|
|
111
|
+
isIndexable: true
|
|
107
112
|
}]
|
|
108
113
|
});
|
|
109
114
|
const files = await new OperationGenerator(this.plugin.options, {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["options","groupName: Group['name']"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey } from './components'\nimport { QueryKey } from './components/QueryKey.tsx'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator, suspenseQueryGenerator } from './generators'\nimport type { PluginReactQuery } from './types.ts'\n\nexport const pluginReactQueryName = 'plugin-react-query' satisfies PluginReactQuery['name']\n\nexport const pluginReactQuery = definePlugin<PluginReactQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n suspense = {},\n infinite = false,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n generators = [queryGenerator, suspenseQueryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),\n mutation = {},\n query = {},\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n paramsCasing,\n contentType,\n } = options\n\n return {\n name: pluginReactQueryName,\n options: {\n output,\n client: {\n client:
|
|
1
|
+
{"version":3,"file":"index.js","names":["options","groupName: Group['name']"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey } from './components'\nimport { QueryKey } from './components/QueryKey.tsx'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator, suspenseQueryGenerator } from './generators'\nimport type { PluginReactQuery } from './types.ts'\n\nexport const pluginReactQueryName = 'plugin-react-query' satisfies PluginReactQuery['name']\n\nexport const pluginReactQuery = definePlugin<PluginReactQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n suspense = {},\n infinite = false,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n generators = [queryGenerator, suspenseQueryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),\n mutation = {},\n query = {},\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n paramsCasing,\n contentType,\n client,\n } = options\n\n const clientType = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientType}` : undefined)\n\n return {\n name: pluginReactQueryName,\n options: {\n output,\n client: {\n ...options.client,\n client: clientType,\n dataReturnType: client?.dataReturnType ?? 'data',\n pathParamsType,\n importPath: clientImportPath,\n },\n infinite: infinite\n ? {\n queryParam: 'id',\n initialPageParam: 0,\n cursorParam: undefined,\n ...infinite,\n }\n : false,\n suspense,\n queryKey,\n query:\n query === false\n ? false\n : {\n methods: ['get'],\n importPath: '@tanstack/react-query',\n ...query,\n },\n mutationKey,\n mutation: {\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/react-query',\n ...mutation,\n },\n paramsType,\n pathParamsType,\n parser,\n paramsCasing,\n group,\n },\n pre: [pluginOasName, pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n let resolvedName = camelCase(name)\n\n if (type === 'file' || type === 'function') {\n resolvedName = camelCase(name, {\n isFile: type === 'file',\n })\n }\n if (type === 'type') {\n resolvedName = pascalCase(name)\n }\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async install() {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = getMode(path.resolve(root, output.path))\n const oas = await this.getOas()\n const baseURL = await this.getBaseURL()\n\n if (baseURL) {\n this.plugin.options.client.baseURL = baseURL\n }\n\n const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName])\n const containsFetch = this.fabric.files.some((file) => file.baseName === 'fetch.ts')\n\n if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath && !containsFetch) {\n // pre add bundled fetch\n await this.addFile({\n baseName: 'fetch.ts',\n path: path.resolve(root, '.kubb/fetch.ts'),\n sources: [\n {\n name: 'fetch',\n value: resolveModuleSource(\n this.plugin.options.client.client === 'fetch' ? '@kubb/plugin-client/templates/clients/fetch' : '@kubb/plugin-client/templates/clients/axios',\n ).source,\n isExportable: true,\n isIndexable: true,\n },\n ],\n })\n }\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const files = await operationGenerator.build(...generators)\n await this.addFile(...files)\n\n const barrelFiles = await getBarrelFiles(this.fabric.files, {\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.addFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;AAaA,MAAa,uBAAuB;AAEpC,MAAa,mBAAmB,cAAgC,YAAY;CAC1E,MAAM,EACJ,SAAS;EAAE,MAAM;EAAS,YAAY;EAAS,EAC/C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,SAAS,UACT,WAAW,EAAE,EACb,WAAW,OACX,eAAe,EAAE,EACjB,aAAa,UACb,iBAAiB,eAAe,WAAW,WAAW,QAAQ,kBAAkB,UAChF,aAAa;EAAC;E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B,QAAQ,KAAK;IACb;IACA;IACA;IACA;IACA;IACD,CAAC,CAEqC,MAAM,GAAG,WAAW;AAC3D,SAAM,KAAK,QAAQ,GAAG,MAAM;GAE5B,MAAM,cAAc,MAAM,eAAe,KAAK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACD,QAAQ,KAAK;IACd,CAAC;AAEF,SAAM,KAAK,QAAQ,GAAG,YAAY;;EAErC;EACD"}
|
|
@@ -1087,6 +1087,12 @@ type Options$2 = {
|
|
|
1087
1087
|
* @default 'axios'
|
|
1088
1088
|
*/
|
|
1089
1089
|
client?: 'axios' | 'fetch';
|
|
1090
|
+
/**
|
|
1091
|
+
* Bundle the selected client into the generated `.kubb` directory.
|
|
1092
|
+
* When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
|
|
1093
|
+
* @default false
|
|
1094
|
+
*/
|
|
1095
|
+
bundle?: boolean;
|
|
1090
1096
|
transformers?: {
|
|
1091
1097
|
/**
|
|
1092
1098
|
* Customize the names based on the type that is provided by the plugin.
|
|
@@ -1103,6 +1109,7 @@ type ResolvedOptions$1 = {
|
|
|
1103
1109
|
group?: Options$2['group'];
|
|
1104
1110
|
baseURL: string | undefined;
|
|
1105
1111
|
client: Options$2['client'];
|
|
1112
|
+
bundle: NonNullable<Options$2['bundle']>;
|
|
1106
1113
|
parser: NonNullable<Options$2['parser']>;
|
|
1107
1114
|
urlType: NonNullable<Options$2['urlType']>;
|
|
1108
1115
|
importPath: Options$2['importPath'];
|
|
@@ -1190,7 +1197,7 @@ type Options$1 = {
|
|
|
1190
1197
|
* Group the @tanstack/query hooks based on the provided name.
|
|
1191
1198
|
*/
|
|
1192
1199
|
group?: Group;
|
|
1193
|
-
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL'>;
|
|
1200
|
+
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle'>;
|
|
1194
1201
|
/**
|
|
1195
1202
|
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
1196
1203
|
*/
|
|
@@ -1277,4 +1284,4 @@ type ResolvedOptions = {
|
|
|
1277
1284
|
type PluginReactQuery = PluginFactoryOptions<'plugin-react-query', Options$1, ResolvedOptions, never, ResolvePathOptions>;
|
|
1278
1285
|
//#endregion
|
|
1279
1286
|
export { ReactGenerator as a, Operation$1 as c, Transformer as i, Options$1 as n, OperationSchemas as o, PluginReactQuery as r, UserPluginWithLifeCycle as s, Infinite as t };
|
|
1280
|
-
//# sourceMappingURL=types-
|
|
1287
|
+
//# sourceMappingURL=types-DXarNSZw.d.cts.map
|
|
@@ -1087,6 +1087,12 @@ type Options$2 = {
|
|
|
1087
1087
|
* @default 'axios'
|
|
1088
1088
|
*/
|
|
1089
1089
|
client?: 'axios' | 'fetch';
|
|
1090
|
+
/**
|
|
1091
|
+
* Bundle the selected client into the generated `.kubb` directory.
|
|
1092
|
+
* When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
|
|
1093
|
+
* @default false
|
|
1094
|
+
*/
|
|
1095
|
+
bundle?: boolean;
|
|
1090
1096
|
transformers?: {
|
|
1091
1097
|
/**
|
|
1092
1098
|
* Customize the names based on the type that is provided by the plugin.
|
|
@@ -1103,6 +1109,7 @@ type ResolvedOptions$1 = {
|
|
|
1103
1109
|
group?: Options$2['group'];
|
|
1104
1110
|
baseURL: string | undefined;
|
|
1105
1111
|
client: Options$2['client'];
|
|
1112
|
+
bundle: NonNullable<Options$2['bundle']>;
|
|
1106
1113
|
parser: NonNullable<Options$2['parser']>;
|
|
1107
1114
|
urlType: NonNullable<Options$2['urlType']>;
|
|
1108
1115
|
importPath: Options$2['importPath'];
|
|
@@ -1190,7 +1197,7 @@ type Options$1 = {
|
|
|
1190
1197
|
* Group the @tanstack/query hooks based on the provided name.
|
|
1191
1198
|
*/
|
|
1192
1199
|
group?: Group;
|
|
1193
|
-
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL'>;
|
|
1200
|
+
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle'>;
|
|
1194
1201
|
/**
|
|
1195
1202
|
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
1196
1203
|
*/
|
|
@@ -1277,4 +1284,4 @@ type ResolvedOptions = {
|
|
|
1277
1284
|
type PluginReactQuery = PluginFactoryOptions<'plugin-react-query', Options$1, ResolvedOptions, never, ResolvePathOptions>;
|
|
1278
1285
|
//#endregion
|
|
1279
1286
|
export { ReactGenerator as a, Operation$1 as c, Transformer as i, Options$1 as n, OperationSchemas as o, PluginReactQuery as r, UserPluginWithLifeCycle as s, Infinite as t };
|
|
1280
|
-
//# sourceMappingURL=types-
|
|
1287
|
+
//# sourceMappingURL=types-DuvxYNEk.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-react-query",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.9",
|
|
4
4
|
"description": "React Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for React applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-query",
|
|
@@ -67,17 +67,17 @@
|
|
|
67
67
|
}
|
|
68
68
|
],
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@kubb/react-fabric": "0.
|
|
70
|
+
"@kubb/react-fabric": "0.3.1",
|
|
71
71
|
"remeda": "^2.32.0",
|
|
72
|
-
"@kubb/core": "4.5.
|
|
73
|
-
"@kubb/oas": "4.5.
|
|
74
|
-
"@kubb/plugin-client": "4.5.
|
|
75
|
-
"@kubb/plugin-oas": "4.5.
|
|
76
|
-
"@kubb/plugin-ts": "4.5.
|
|
77
|
-
"@kubb/plugin-zod": "4.5.
|
|
72
|
+
"@kubb/core": "4.5.9",
|
|
73
|
+
"@kubb/oas": "4.5.9",
|
|
74
|
+
"@kubb/plugin-client": "4.5.9",
|
|
75
|
+
"@kubb/plugin-oas": "4.5.9",
|
|
76
|
+
"@kubb/plugin-ts": "4.5.9",
|
|
77
|
+
"@kubb/plugin-zod": "4.5.9"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@kubb/react-fabric": "0.
|
|
80
|
+
"@kubb/react-fabric": "0.3.1"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
83
|
"node": ">=20"
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig, ResponseConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig, ResponseConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryResult } from '@tanstack/react-query'
|
|
7
|
+
import { fetch } from './test/.kubb/fetch'
|
|
8
8
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
9
9
|
|
|
10
10
|
export const findPetsByTagsQueryKey = (params?: FindPetsByTagsQueryParams) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
|