@kubb/plugin-svelte-query 5.0.0-alpha.3 → 5.0.0-alpha.31
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-DntKBsnB.js → components-BHuFcBvT.js} +65 -12
- package/dist/components-BHuFcBvT.js.map +1 -0
- package/dist/{components-kpjS70qO.cjs → components-DHd_T2Es.cjs} +65 -12
- package/dist/components-DHd_T2Es.cjs.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +1 -1
- package/dist/{generators-DB6bWBb1.cjs → generators-DI9PsPA0.cjs} +20 -19
- package/dist/generators-DI9PsPA0.cjs.map +1 -0
- package/dist/{generators-BjJF5K9h.js → generators-DV7MaGbo.js} +22 -21
- package/dist/generators-DV7MaGbo.js.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +4 -495
- package/dist/generators.js +1 -1
- package/dist/index.cjs +18 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +19 -12
- package/dist/index.js.map +1 -1
- package/dist/{types-DtgzW06v.d.ts → types-Bncfr56t.d.ts} +13 -3
- package/package.json +12 -12
- package/src/components/Mutation.tsx +1 -1
- package/src/components/QueryOptions.tsx +1 -1
- package/src/generators/mutationGenerator.tsx +10 -19
- package/src/generators/queryGenerator.tsx +10 -14
- package/src/plugin.ts +15 -10
- package/src/types.ts +13 -2
- package/dist/components-DntKBsnB.js.map +0 -1
- package/dist/components-kpjS70qO.cjs.map +0 -1
- package/dist/generators-BjJF5K9h.js.map +0 -1
- package/dist/generators-DB6bWBb1.cjs.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
const require_components = require("./components-
|
|
1
|
+
const require_components = require("./components-DHd_T2Es.cjs");
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
node_path = require_components.__toESM(node_path);
|
|
4
4
|
let _kubb_plugin_client = require("@kubb/plugin-client");
|
|
5
5
|
let _kubb_plugin_ts = require("@kubb/plugin-ts");
|
|
6
6
|
let _kubb_plugin_zod = require("@kubb/plugin-zod");
|
|
7
|
-
let _kubb_plugin_client_components = require("@kubb/plugin-client/components");
|
|
8
7
|
let _kubb_plugin_oas_utils = require("@kubb/plugin-oas/utils");
|
|
9
8
|
let _kubb_react_fabric = require("@kubb/react-fabric");
|
|
10
9
|
let _kubb_react_fabric_jsx_runtime = require("@kubb/react-fabric/jsx-runtime");
|
|
@@ -17,7 +16,8 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
17
16
|
name: "svelte-query",
|
|
18
17
|
Operation({ config, operation, generator, plugin }) {
|
|
19
18
|
const { options, options: { output } } = plugin;
|
|
20
|
-
const
|
|
19
|
+
const driver = (0, _kubb_core_hooks.useDriver)();
|
|
20
|
+
const root = node_path.default.resolve(config.root, config.output.path);
|
|
21
21
|
const oas = (0, _kubb_plugin_oas_hooks.useOas)();
|
|
22
22
|
const { getSchemas, getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
|
|
23
23
|
const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method);
|
|
@@ -45,7 +45,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
45
45
|
type: "function"
|
|
46
46
|
})
|
|
47
47
|
};
|
|
48
|
-
const shouldUseClientPlugin = !!
|
|
48
|
+
const shouldUseClientPlugin = !!driver.getPlugin(_kubb_plugin_client.pluginClientName) && options.client.clientType !== "class";
|
|
49
49
|
const client = {
|
|
50
50
|
name: shouldUseClientPlugin ? getName(operation, {
|
|
51
51
|
type: "function",
|
|
@@ -71,7 +71,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
71
71
|
banner: (0, _kubb_plugin_oas_utils.getBanner)({
|
|
72
72
|
oas,
|
|
73
73
|
output,
|
|
74
|
-
config:
|
|
74
|
+
config: driver.config
|
|
75
75
|
}),
|
|
76
76
|
footer: (0, _kubb_plugin_oas_utils.getFooter)({
|
|
77
77
|
oas,
|
|
@@ -106,7 +106,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
106
106
|
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
107
107
|
name: ["fetch"],
|
|
108
108
|
root: mutation.file.path,
|
|
109
|
-
path: node_path.default.resolve(
|
|
109
|
+
path: node_path.default.resolve(root, ".kubb/fetch.ts")
|
|
110
110
|
}),
|
|
111
111
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
112
112
|
name: [
|
|
@@ -115,13 +115,13 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
115
115
|
"ResponseErrorConfig"
|
|
116
116
|
],
|
|
117
117
|
root: mutation.file.path,
|
|
118
|
-
path: node_path.default.resolve(
|
|
118
|
+
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
119
119
|
isTypeOnly: true
|
|
120
120
|
}),
|
|
121
121
|
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
122
122
|
name: ["ResponseConfig"],
|
|
123
123
|
root: mutation.file.path,
|
|
124
|
-
path: node_path.default.resolve(
|
|
124
|
+
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
125
125
|
isTypeOnly: true
|
|
126
126
|
})
|
|
127
127
|
] }),
|
|
@@ -133,7 +133,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
133
133
|
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
134
134
|
name: ["buildFormData"],
|
|
135
135
|
root: mutation.file.path,
|
|
136
|
-
path: node_path.default.resolve(
|
|
136
|
+
path: node_path.default.resolve(root, ".kubb/config.ts")
|
|
137
137
|
}),
|
|
138
138
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
139
139
|
name: [
|
|
@@ -157,7 +157,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
157
157
|
typeSchemas: type.schemas,
|
|
158
158
|
transformer: options.mutationKey
|
|
159
159
|
}),
|
|
160
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(
|
|
160
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_plugin_client.ClientLegacy, {
|
|
161
161
|
name: client.name,
|
|
162
162
|
baseURL: options.client.baseURL,
|
|
163
163
|
operation,
|
|
@@ -206,7 +206,8 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
206
206
|
name: "svelte-query",
|
|
207
207
|
Operation({ config, operation, generator, plugin }) {
|
|
208
208
|
const { options, options: { output } } = plugin;
|
|
209
|
-
const
|
|
209
|
+
const driver = (0, _kubb_core_hooks.useDriver)();
|
|
210
|
+
const root = node_path.default.resolve(config.root, config.output.path);
|
|
210
211
|
const oas = (0, _kubb_plugin_oas_hooks.useOas)();
|
|
211
212
|
const { getSchemas, getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
|
|
212
213
|
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
@@ -220,7 +221,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
220
221
|
typeName: getName(operation, { type: "type" }),
|
|
221
222
|
file: getFile(operation, { prefix: "create" })
|
|
222
223
|
};
|
|
223
|
-
const shouldUseClientPlugin = !!
|
|
224
|
+
const shouldUseClientPlugin = !!driver.getPlugin(_kubb_plugin_client.pluginClientName) && options.client.clientType !== "class";
|
|
224
225
|
const client = {
|
|
225
226
|
name: shouldUseClientPlugin ? getName(operation, {
|
|
226
227
|
type: "function",
|
|
@@ -264,7 +265,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
264
265
|
banner: (0, _kubb_plugin_oas_utils.getBanner)({
|
|
265
266
|
oas,
|
|
266
267
|
output,
|
|
267
|
-
config:
|
|
268
|
+
config: driver.config
|
|
268
269
|
}),
|
|
269
270
|
footer: (0, _kubb_plugin_oas_utils.getFooter)({
|
|
270
271
|
oas,
|
|
@@ -299,7 +300,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
299
300
|
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
300
301
|
name: ["fetch"],
|
|
301
302
|
root: query.file.path,
|
|
302
|
-
path: node_path.default.resolve(
|
|
303
|
+
path: node_path.default.resolve(root, ".kubb/fetch.ts")
|
|
303
304
|
}),
|
|
304
305
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
305
306
|
name: [
|
|
@@ -308,13 +309,13 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
308
309
|
"ResponseErrorConfig"
|
|
309
310
|
],
|
|
310
311
|
root: query.file.path,
|
|
311
|
-
path: node_path.default.resolve(
|
|
312
|
+
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
312
313
|
isTypeOnly: true
|
|
313
314
|
}),
|
|
314
315
|
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
315
316
|
name: ["ResponseConfig"],
|
|
316
317
|
root: query.file.path,
|
|
317
|
-
path: node_path.default.resolve(
|
|
318
|
+
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
318
319
|
isTypeOnly: true
|
|
319
320
|
})
|
|
320
321
|
] }),
|
|
@@ -326,7 +327,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
326
327
|
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
327
328
|
name: ["buildFormData"],
|
|
328
329
|
root: query.file.path,
|
|
329
|
-
path: node_path.default.resolve(
|
|
330
|
+
path: node_path.default.resolve(root, ".kubb/config.ts")
|
|
330
331
|
}),
|
|
331
332
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
332
333
|
name: [
|
|
@@ -350,7 +351,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
350
351
|
paramsCasing: options.paramsCasing,
|
|
351
352
|
transformer: options.queryKey
|
|
352
353
|
}),
|
|
353
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(
|
|
354
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_plugin_client.ClientLegacy, {
|
|
354
355
|
name: client.name,
|
|
355
356
|
baseURL: options.client.baseURL,
|
|
356
357
|
operation,
|
|
@@ -422,4 +423,4 @@ Object.defineProperty(exports, "queryGenerator", {
|
|
|
422
423
|
}
|
|
423
424
|
});
|
|
424
425
|
|
|
425
|
-
//# sourceMappingURL=generators-
|
|
426
|
+
//# sourceMappingURL=generators-DI9PsPA0.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators-DI9PsPA0.cjs","names":["path","pluginTsName","pluginZodName","pluginClientName","File","MutationKey","Client","Mutation","path","pluginClientName","pluginTsName","pluginZodName","File","QueryKey","Client","QueryOptions","Query"],"sources":["../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx"],"sourcesContent":["import path from 'node:path'\nimport { useDriver } from '@kubb/core/hooks'\nimport { ClientLegacy as Client, pluginClientName } from '@kubb/plugin-client'\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 type { PluginSvelteQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginSvelteQuery>({\n name: 'svelte-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = useDriver()\n const root = path.resolve(config.root, config.output.path)\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 options.mutation !== false &&\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/svelte-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n const hasClientPlugin = !!driver.getPlugin(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginName: pluginClientName }),\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: driver.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 {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', '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 {!shouldUseClientPlugin && <File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(root, '.kubb/fetch.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={mutation.file.path}\n path={path.resolve(root, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={mutation.file.path} path={path.resolve(root, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && <File.Import name={['buildFormData']} root={mutation.file.path} path={path.resolve(root, '.kubb/config.ts')} />}\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 paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.mutationKey}\n />\n {!shouldUseClientPlugin && (\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.client?.paramsCasing || options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.mutation && (\n <>\n <File.Import name={['createMutation']} path={importPath} />\n <File.Import name={['CreateMutationOptions', 'CreateMutationResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n paramsCasing={options.paramsCasing}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { useDriver } from '@kubb/core/hooks'\nimport { ClientLegacy as Client, pluginClientName } from '@kubb/plugin-client'\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 { PluginSvelteQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginSvelteQuery>({\n name: 'svelte-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = useDriver()\n const root = path.resolve(config.root, config.output.path)\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 importPath = options.query ? options.query.importPath : '@tanstack/svelte-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\n }\n\n const hasClientPlugin = !!driver.getPlugin(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginName: 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, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, {\n pluginName: pluginTsName,\n type: 'type',\n }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, {\n pluginName: 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: driver.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 {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', '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 {!shouldUseClientPlugin && <File.Import name={['fetch']} root={query.file.path} path={path.resolve(root, '.kubb/fetch.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(root, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(root, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(root, '.kubb/config.ts')} />}\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\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\n {!shouldUseClientPlugin && (\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.client?.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 || 'data'}\n />\n {options.query && (\n <>\n <File.Import name={['createQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'CreateBaseQueryOptions', 'CreateQueryResult']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,qBAAA,GAAA,4BAAA,sBAA4D;CACvE,MAAM;CACN,UAAU,EAAE,QAAQ,WAAW,WAAW,UAAU;EAClD,MAAM,EACJ,SACA,SAAS,EAAE,aACT;EACJ,MAAM,UAAA,GAAA,iBAAA,YAAoB;EAC1B,MAAM,OAAOA,UAAAA,QAAK,QAAQ,OAAO,MAAM,OAAO,OAAO,KAAK;EAE1D,MAAM,OAAA,GAAA,uBAAA,SAAc;EACpB,MAAM,EAAE,YAAY,SAAS,aAAA,GAAA,uBAAA,qBAAgC,UAAU;EAEvE,MAAM,UAAU,CAAC,CAAC,QAAQ,SAAS,QAAQ,OAAO,QAAQ,MAAM,WAAW,UAAU,WAAW,OAAO;EACvG,MAAM,aACJ,QAAQ,aAAa,SACrB,CAAC,YAAA,GAAA,OAAA,YACU,QAAQ,WAAW,QAAQ,SAAS,UAAU,EAAE,EAAE,QAAQ,QAAQ,QAAQ,MAAM,UAAU,EAAE,CAAC,CAAC,MAAM,WAAW,UAAU,WAAW,OAAO;EAExJ,MAAM,aAAa,QAAQ,WAAW,QAAQ,SAAS,aAAa;EAEpE,MAAM,WAAW;GACf,MAAM,QAAQ,WAAW;IAAE,MAAM;IAAY,QAAQ;IAAU,CAAC;GAChE,UAAU,QAAQ,WAAW,EAAE,MAAM,QAAQ,CAAC;GAC9C,MAAM,QA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AAgB,QAAQ;KACtD,YAAY,QAAQ;KACpB,gBAAgB,QAAQ;KACxB,QAAQ,QAAQ;KAChB,CAAA;IAEJ,iBAAA,GAAA,+BAAA,KAACF,mBAAAA,KAAK,QAAN;KAAa,MAAM,CAAC,eAAe;KAAE,MAAM;KAAc,CAAA;IACzD,iBAAA,GAAA,+BAAA,KAACG,mBAAAA,cAAD;KACE,MAAM,aAAa;KACnB,YAAY,OAAO;KACnB,cAAc,SAAS;KACvB,aAAa,KAAK;KAClB,cAAc,QAAQ;KACtB,YAAY,QAAQ;KACpB,gBAAgB,QAAQ;KACxB,gBAAgB,QAAQ,OAAO,kBAAkB;KACjD,CAAA;IACD,QAAQ,SACP,iBAAA,GAAA,+BAAA,MAAA,+BAAA,UAAA,EAAA,UAAA;KACE,iBAAA,GAAA,+BAAA,KAACH,mBAAAA,KAAK,QAAN;MAAa,MAAM,CAAC,cAAc;MAAE,MAAM;MAAc,CAAA;KACxD,iBAAA,GAAA,+BAAA,KAACA,mBAAAA,KAAK,QAAN;MAAa,MAAM;OAAC;OAAY;OAAe;OAA0B;OAAoB;MAAE,MAAM;MAAY,YAAA;MAAa,CAAA;KAC9H,iBAAA,GAAA,+BAAA,KAACI,mBAAAA,OAAD;MACE,MAAM,MAAM;MACZ,kBAAkB,aAAa;MAC/B,aAAa,KAAK;MAClB,gBAAgB,QAAQ;MACb;MACX,cAAc,QAAQ;MACtB,YAAY,QAAQ;MACpB,gBAAgB,QAAQ,OAAO,kBAAkB;MACjD,cAAc,SAAS;MACvB,kBAAkB,SAAS;MAC3B,CAAA;KACD,EAAA,CAAA;IAEA;;;CAGZ,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import "./chunk--u3MIqq1.js";
|
|
2
|
-
import { a as MutationKey, i as QueryKey, n as QueryOptions, r as Mutation, t as Query } from "./components-
|
|
2
|
+
import { a as MutationKey, i as QueryKey, n as QueryOptions, r as Mutation, t as Query } from "./components-BHuFcBvT.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { pluginClientName } from "@kubb/plugin-client";
|
|
4
|
+
import { ClientLegacy, pluginClientName } from "@kubb/plugin-client";
|
|
5
5
|
import { pluginTsName } from "@kubb/plugin-ts";
|
|
6
6
|
import { pluginZodName } from "@kubb/plugin-zod";
|
|
7
|
-
import { Client } from "@kubb/plugin-client/components";
|
|
8
7
|
import { getBanner, getFooter } from "@kubb/plugin-oas/utils";
|
|
9
8
|
import { File } from "@kubb/react-fabric";
|
|
10
9
|
import { Fragment, jsx, jsxs } from "@kubb/react-fabric/jsx-runtime";
|
|
11
|
-
import {
|
|
10
|
+
import { useDriver } from "@kubb/core/hooks";
|
|
12
11
|
import { createReactGenerator } from "@kubb/plugin-oas/generators";
|
|
13
12
|
import { useOas, useOperationManager } from "@kubb/plugin-oas/hooks";
|
|
14
13
|
import { difference } from "remeda";
|
|
@@ -17,7 +16,8 @@ const mutationGenerator = createReactGenerator({
|
|
|
17
16
|
name: "svelte-query",
|
|
18
17
|
Operation({ config, operation, generator, plugin }) {
|
|
19
18
|
const { options, options: { output } } = plugin;
|
|
20
|
-
const
|
|
19
|
+
const driver = useDriver();
|
|
20
|
+
const root = path.resolve(config.root, config.output.path);
|
|
21
21
|
const oas = useOas();
|
|
22
22
|
const { getSchemas, getName, getFile } = useOperationManager(generator);
|
|
23
23
|
const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method);
|
|
@@ -45,7 +45,7 @@ const mutationGenerator = createReactGenerator({
|
|
|
45
45
|
type: "function"
|
|
46
46
|
})
|
|
47
47
|
};
|
|
48
|
-
const shouldUseClientPlugin = !!
|
|
48
|
+
const shouldUseClientPlugin = !!driver.getPlugin(pluginClientName) && options.client.clientType !== "class";
|
|
49
49
|
const client = {
|
|
50
50
|
name: shouldUseClientPlugin ? getName(operation, {
|
|
51
51
|
type: "function",
|
|
@@ -71,7 +71,7 @@ const mutationGenerator = createReactGenerator({
|
|
|
71
71
|
banner: getBanner({
|
|
72
72
|
oas,
|
|
73
73
|
output,
|
|
74
|
-
config:
|
|
74
|
+
config: driver.config
|
|
75
75
|
}),
|
|
76
76
|
footer: getFooter({
|
|
77
77
|
oas,
|
|
@@ -106,7 +106,7 @@ const mutationGenerator = createReactGenerator({
|
|
|
106
106
|
!shouldUseClientPlugin && /* @__PURE__ */ jsx(File.Import, {
|
|
107
107
|
name: ["fetch"],
|
|
108
108
|
root: mutation.file.path,
|
|
109
|
-
path: path.resolve(
|
|
109
|
+
path: path.resolve(root, ".kubb/fetch.ts")
|
|
110
110
|
}),
|
|
111
111
|
/* @__PURE__ */ jsx(File.Import, {
|
|
112
112
|
name: [
|
|
@@ -115,13 +115,13 @@ const mutationGenerator = createReactGenerator({
|
|
|
115
115
|
"ResponseErrorConfig"
|
|
116
116
|
],
|
|
117
117
|
root: mutation.file.path,
|
|
118
|
-
path: path.resolve(
|
|
118
|
+
path: path.resolve(root, ".kubb/fetch.ts"),
|
|
119
119
|
isTypeOnly: true
|
|
120
120
|
}),
|
|
121
121
|
options.client.dataReturnType === "full" && /* @__PURE__ */ jsx(File.Import, {
|
|
122
122
|
name: ["ResponseConfig"],
|
|
123
123
|
root: mutation.file.path,
|
|
124
|
-
path: path.resolve(
|
|
124
|
+
path: path.resolve(root, ".kubb/fetch.ts"),
|
|
125
125
|
isTypeOnly: true
|
|
126
126
|
})
|
|
127
127
|
] }),
|
|
@@ -133,7 +133,7 @@ const mutationGenerator = createReactGenerator({
|
|
|
133
133
|
!shouldUseClientPlugin && /* @__PURE__ */ jsx(File.Import, {
|
|
134
134
|
name: ["buildFormData"],
|
|
135
135
|
root: mutation.file.path,
|
|
136
|
-
path: path.resolve(
|
|
136
|
+
path: path.resolve(root, ".kubb/config.ts")
|
|
137
137
|
}),
|
|
138
138
|
/* @__PURE__ */ jsx(File.Import, {
|
|
139
139
|
name: [
|
|
@@ -157,7 +157,7 @@ const mutationGenerator = createReactGenerator({
|
|
|
157
157
|
typeSchemas: type.schemas,
|
|
158
158
|
transformer: options.mutationKey
|
|
159
159
|
}),
|
|
160
|
-
!shouldUseClientPlugin && /* @__PURE__ */ jsx(
|
|
160
|
+
!shouldUseClientPlugin && /* @__PURE__ */ jsx(ClientLegacy, {
|
|
161
161
|
name: client.name,
|
|
162
162
|
baseURL: options.client.baseURL,
|
|
163
163
|
operation,
|
|
@@ -206,7 +206,8 @@ const queryGenerator = createReactGenerator({
|
|
|
206
206
|
name: "svelte-query",
|
|
207
207
|
Operation({ config, operation, generator, plugin }) {
|
|
208
208
|
const { options, options: { output } } = plugin;
|
|
209
|
-
const
|
|
209
|
+
const driver = useDriver();
|
|
210
|
+
const root = path.resolve(config.root, config.output.path);
|
|
210
211
|
const oas = useOas();
|
|
211
212
|
const { getSchemas, getName, getFile } = useOperationManager(generator);
|
|
212
213
|
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
@@ -220,7 +221,7 @@ const queryGenerator = createReactGenerator({
|
|
|
220
221
|
typeName: getName(operation, { type: "type" }),
|
|
221
222
|
file: getFile(operation, { prefix: "create" })
|
|
222
223
|
};
|
|
223
|
-
const shouldUseClientPlugin = !!
|
|
224
|
+
const shouldUseClientPlugin = !!driver.getPlugin(pluginClientName) && options.client.clientType !== "class";
|
|
224
225
|
const client = {
|
|
225
226
|
name: shouldUseClientPlugin ? getName(operation, {
|
|
226
227
|
type: "function",
|
|
@@ -264,7 +265,7 @@ const queryGenerator = createReactGenerator({
|
|
|
264
265
|
banner: getBanner({
|
|
265
266
|
oas,
|
|
266
267
|
output,
|
|
267
|
-
config:
|
|
268
|
+
config: driver.config
|
|
268
269
|
}),
|
|
269
270
|
footer: getFooter({
|
|
270
271
|
oas,
|
|
@@ -299,7 +300,7 @@ const queryGenerator = createReactGenerator({
|
|
|
299
300
|
!shouldUseClientPlugin && /* @__PURE__ */ jsx(File.Import, {
|
|
300
301
|
name: ["fetch"],
|
|
301
302
|
root: query.file.path,
|
|
302
|
-
path: path.resolve(
|
|
303
|
+
path: path.resolve(root, ".kubb/fetch.ts")
|
|
303
304
|
}),
|
|
304
305
|
/* @__PURE__ */ jsx(File.Import, {
|
|
305
306
|
name: [
|
|
@@ -308,13 +309,13 @@ const queryGenerator = createReactGenerator({
|
|
|
308
309
|
"ResponseErrorConfig"
|
|
309
310
|
],
|
|
310
311
|
root: query.file.path,
|
|
311
|
-
path: path.resolve(
|
|
312
|
+
path: path.resolve(root, ".kubb/fetch.ts"),
|
|
312
313
|
isTypeOnly: true
|
|
313
314
|
}),
|
|
314
315
|
options.client.dataReturnType === "full" && /* @__PURE__ */ jsx(File.Import, {
|
|
315
316
|
name: ["ResponseConfig"],
|
|
316
317
|
root: query.file.path,
|
|
317
|
-
path: path.resolve(
|
|
318
|
+
path: path.resolve(root, ".kubb/fetch.ts"),
|
|
318
319
|
isTypeOnly: true
|
|
319
320
|
})
|
|
320
321
|
] }),
|
|
@@ -326,7 +327,7 @@ const queryGenerator = createReactGenerator({
|
|
|
326
327
|
!shouldUseClientPlugin && /* @__PURE__ */ jsx(File.Import, {
|
|
327
328
|
name: ["buildFormData"],
|
|
328
329
|
root: query.file.path,
|
|
329
|
-
path: path.resolve(
|
|
330
|
+
path: path.resolve(root, ".kubb/config.ts")
|
|
330
331
|
}),
|
|
331
332
|
/* @__PURE__ */ jsx(File.Import, {
|
|
332
333
|
name: [
|
|
@@ -350,7 +351,7 @@ const queryGenerator = createReactGenerator({
|
|
|
350
351
|
paramsCasing: options.paramsCasing,
|
|
351
352
|
transformer: options.queryKey
|
|
352
353
|
}),
|
|
353
|
-
!shouldUseClientPlugin && /* @__PURE__ */ jsx(
|
|
354
|
+
!shouldUseClientPlugin && /* @__PURE__ */ jsx(ClientLegacy, {
|
|
354
355
|
name: client.name,
|
|
355
356
|
baseURL: options.client.baseURL,
|
|
356
357
|
operation,
|
|
@@ -411,4 +412,4 @@ const queryGenerator = createReactGenerator({
|
|
|
411
412
|
//#endregion
|
|
412
413
|
export { mutationGenerator as n, queryGenerator as t };
|
|
413
414
|
|
|
414
|
-
//# sourceMappingURL=generators-
|
|
415
|
+
//# sourceMappingURL=generators-DV7MaGbo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators-DV7MaGbo.js","names":["Client","Client"],"sources":["../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx"],"sourcesContent":["import path from 'node:path'\nimport { useDriver } from '@kubb/core/hooks'\nimport { ClientLegacy as Client, pluginClientName } from '@kubb/plugin-client'\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 type { PluginSvelteQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginSvelteQuery>({\n name: 'svelte-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = useDriver()\n const root = path.resolve(config.root, config.output.path)\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 options.mutation !== false &&\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/svelte-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n const hasClientPlugin = !!driver.getPlugin(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginName: pluginClientName }),\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: driver.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 {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', '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 {!shouldUseClientPlugin && <File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(root, '.kubb/fetch.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={mutation.file.path}\n path={path.resolve(root, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={mutation.file.path} path={path.resolve(root, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && <File.Import name={['buildFormData']} root={mutation.file.path} path={path.resolve(root, '.kubb/config.ts')} />}\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 paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.mutationKey}\n />\n {!shouldUseClientPlugin && (\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.client?.paramsCasing || options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.mutation && (\n <>\n <File.Import name={['createMutation']} path={importPath} />\n <File.Import name={['CreateMutationOptions', 'CreateMutationResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n paramsCasing={options.paramsCasing}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { useDriver } from '@kubb/core/hooks'\nimport { ClientLegacy as Client, pluginClientName } from '@kubb/plugin-client'\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 { PluginSvelteQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginSvelteQuery>({\n name: 'svelte-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = useDriver()\n const root = path.resolve(config.root, config.output.path)\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 importPath = options.query ? options.query.importPath : '@tanstack/svelte-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\n }\n\n const hasClientPlugin = !!driver.getPlugin(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginName: 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, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, {\n pluginName: pluginTsName,\n type: 'type',\n }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, {\n pluginName: 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: driver.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 {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', '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 {!shouldUseClientPlugin && <File.Import name={['fetch']} root={query.file.path} path={path.resolve(root, '.kubb/fetch.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(root, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(root, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(root, '.kubb/config.ts')} />}\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\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\n {!shouldUseClientPlugin && (\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.client?.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 || 'data'}\n />\n {options.query && (\n <>\n <File.Import name={['createQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'CreateBaseQueryOptions', 'CreateQueryResult']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,oBAAoB,qBAAwC;CACvE,MAAM;CACN,UAAU,EAAE,QAAQ,WAAW,WAAW,UAAU;EAClD,MAAM,EACJ,SACA,SAAS,EAAE,aACT;EACJ,MAAM,SAAS,WAAW;EAC1B,MAAM,OAAO,KAAK,QAAQ,OAAO,MAAM,OAAO,OAAO,KAAK;EAE1D,MAAM,MAAM,QAAQ;EACpB,MAAM,EAAE,YAAY,SAAS,YAAY,oBAAoB,UAAU;EAEvE,MAAM,UAAU,CAAC,CAAC,QAAQ,SAAS,QAAQ,OAAO,QAAQ,MAAM,WAAW,UAAU,WAAW,OAAO;EACvG,MAAM,aACJ,QAAQ,aAAa,SACrB,CAAC,WACD,WAAW,QAAQ,WAAW,QAAQ,SAAS,UAAU,EAAE,EAAE,QAAQ,QAAQ,QAAQ,MAAM,UAAU,EAAE,CAAC,CAAC,MAAM,WAAW,UAAU,WAAW,OAAO;EAExJ,MAAM,aAAa,QAAQ,WAAW,QAAQ,SAAS,aAAa;EAEpE,MAAM,WAAW;GACf,MAAM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YAAY,IAAI;KAChB,gBAAgB,QAAQ,OAAO,kBAAkB;KACjD,cAAc,QAAQ,QAAQ,gBAAgB,QAAQ;KACtD,YAAY,QAAQ;KACpB,gBAAgB,QAAQ;KACxB,QAAQ,QAAQ;KAChB,CAAA;IAEJ,oBAAC,KAAK,QAAN;KAAa,MAAM,CAAC,eAAe;KAAE,MAAM;KAAc,CAAA;IACzD,oBAAC,cAAD;KACE,MAAM,aAAa;KACnB,YAAY,OAAO;KACnB,cAAc,SAAS;KACvB,aAAa,KAAK;KAClB,cAAc,QAAQ;KACtB,YAAY,QAAQ;KACpB,gBAAgB,QAAQ;KACxB,gBAAgB,QAAQ,OAAO,kBAAkB;KACjD,CAAA;IACD,QAAQ,SACP,qBAAA,UAAA,EAAA,UAAA;KACE,oBAAC,KAAK,QAAN;MAAa,MAAM,CAAC,cAAc;MAAE,MAAM;MAAc,CAAA;KACxD,oBAAC,KAAK,QAAN;MAAa,MAAM;OAAC;OAAY;OAAe;OAA0B;OAAoB;MAAE,MAAM;MAAY,YAAA;MAAa,CAAA;KAC9H,oBAAC,OAAD;MACE,MAAM,MAAM;MACZ,kBAAkB,aAAa;MAC/B,aAAa,KAAK;MAClB,gBAAgB,QAAQ;MACb;MACX,cAAc,QAAQ;MACtB,YAAY,QAAQ;MACpB,gBAAgB,QAAQ,OAAO,kBAAkB;MACjD,cAAc,SAAS;MACvB,kBAAkB,SAAS;MAC3B,CAAA;KACD,EAAA,CAAA;IAEA;;;CAGZ,CAAC"}
|
package/dist/generators.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generators = require("./generators-
|
|
2
|
+
const require_generators = require("./generators-DI9PsPA0.cjs");
|
|
3
3
|
exports.mutationGenerator = require_generators.mutationGenerator;
|
|
4
4
|
exports.queryGenerator = require_generators.queryGenerator;
|