@kubb/plugin-svelte-query 3.0.0-beta.1 → 3.0.0-beta.11
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/{chunk-IYE4XII3.cjs → chunk-C3XFYLKR.cjs} +32 -23
- package/dist/chunk-C3XFYLKR.cjs.map +1 -0
- package/dist/{chunk-WAAKXO6O.cjs → chunk-HUR476BL.cjs} +125 -21
- package/dist/chunk-HUR476BL.cjs.map +1 -0
- package/dist/{chunk-B7GVNGYU.js → chunk-LSV2AJSI.js} +125 -21
- package/dist/chunk-LSV2AJSI.js.map +1 -0
- package/dist/{chunk-STYJ2DL3.js → chunk-PCNLFEZJ.js} +23 -14
- package/dist/chunk-PCNLFEZJ.js.map +1 -0
- package/dist/components.cjs +6 -6
- package/dist/components.d.cts +11 -6
- package/dist/components.d.ts +11 -6
- package/dist/components.js +1 -1
- package/dist/generators.cjs +4 -4
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/index.cjs +19 -22
- 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 +18 -21
- package/dist/index.js.map +1 -1
- package/dist/types-Co8a9Sr5.d.cts +347 -0
- package/dist/types-Co8a9Sr5.d.ts +347 -0
- package/package.json +14 -14
- package/src/components/Mutation.tsx +7 -3
- package/src/components/Query.tsx +62 -6
- package/src/components/QueryOptions.tsx +47 -7
- package/src/generators/__snapshots__/findByTagsObject.ts +60 -0
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +1 -3
- package/src/generators/mutationGenerator.tsx +3 -2
- package/src/generators/queryGenerator.tsx +4 -2
- package/src/plugin.ts +17 -19
- package/src/types.ts +17 -21
- package/dist/chunk-B7GVNGYU.js.map +0 -1
- package/dist/chunk-IYE4XII3.cjs.map +0 -1
- package/dist/chunk-STYJ2DL3.js.map +0 -1
- package/dist/chunk-WAAKXO6O.cjs.map +0 -1
- package/dist/types-DJAXpPpT.d.cts +0 -201
- package/dist/types-DJAXpPpT.d.ts +0 -201
package/dist/components.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Operation } from '@kubb/oas';
|
|
2
2
|
import { OperationSchemas } from '@kubb/plugin-oas';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { P as PluginSvelteQuery } from './types-
|
|
4
|
+
import { P as PluginSvelteQuery } from './types-Co8a9Sr5.cjs';
|
|
5
5
|
import { FunctionParams } from '@kubb/react';
|
|
6
6
|
import '@kubb/core';
|
|
7
7
|
|
|
@@ -15,10 +15,11 @@ type Props$4 = {
|
|
|
15
15
|
mutationKeyName: string;
|
|
16
16
|
typeSchemas: OperationSchemas;
|
|
17
17
|
operation: Operation;
|
|
18
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
18
19
|
dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType'];
|
|
19
20
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
20
21
|
};
|
|
21
|
-
declare function Mutation({ name, clientName, pathParamsType, dataReturnType, typeSchemas, operation, mutationKeyName }: Props$4): ReactNode;
|
|
22
|
+
declare function Mutation({ name, clientName, paramsType, pathParamsType, dataReturnType, typeSchemas, operation, mutationKeyName }: Props$4): ReactNode;
|
|
22
23
|
|
|
23
24
|
type Props$3 = {
|
|
24
25
|
/**
|
|
@@ -30,17 +31,19 @@ type Props$3 = {
|
|
|
30
31
|
queryKeyTypeName: string;
|
|
31
32
|
typeSchemas: OperationSchemas;
|
|
32
33
|
operation: Operation;
|
|
34
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
33
35
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
34
36
|
dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType'];
|
|
35
37
|
};
|
|
36
38
|
type GetParamsProps$3 = {
|
|
39
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
37
40
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
38
41
|
dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType'];
|
|
39
42
|
typeSchemas: OperationSchemas;
|
|
40
43
|
};
|
|
41
|
-
declare function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, pathParamsType, dataReturnType, typeSchemas, operation }: Props$3): ReactNode;
|
|
44
|
+
declare function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, paramsType, pathParamsType, dataReturnType, typeSchemas, operation, }: Props$3): ReactNode;
|
|
42
45
|
declare namespace Query {
|
|
43
|
-
var getParams: ({ pathParamsType, dataReturnType, typeSchemas }: GetParamsProps$3) => FunctionParams;
|
|
46
|
+
var getParams: ({ paramsType, pathParamsType, dataReturnType, typeSchemas }: GetParamsProps$3) => FunctionParams;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
type Props$2 = {
|
|
@@ -82,15 +85,17 @@ type Props = {
|
|
|
82
85
|
clientName: string;
|
|
83
86
|
queryKeyName: string;
|
|
84
87
|
typeSchemas: OperationSchemas;
|
|
88
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
85
89
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
86
90
|
};
|
|
87
91
|
type GetParamsProps = {
|
|
92
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
88
93
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
89
94
|
typeSchemas: OperationSchemas;
|
|
90
95
|
};
|
|
91
|
-
declare function QueryOptions({ name, clientName, typeSchemas, pathParamsType, queryKeyName }: Props): ReactNode;
|
|
96
|
+
declare function QueryOptions({ name, clientName, typeSchemas, paramsType, pathParamsType, queryKeyName }: Props): ReactNode;
|
|
92
97
|
declare namespace QueryOptions {
|
|
93
|
-
var getParams: ({ pathParamsType, typeSchemas }: GetParamsProps) => FunctionParams;
|
|
98
|
+
var getParams: ({ paramsType, pathParamsType, typeSchemas }: GetParamsProps) => FunctionParams;
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
export { Mutation, MutationKey, Query, QueryKey, QueryOptions };
|
package/dist/components.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Operation } from '@kubb/oas';
|
|
2
2
|
import { OperationSchemas } from '@kubb/plugin-oas';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { P as PluginSvelteQuery } from './types-
|
|
4
|
+
import { P as PluginSvelteQuery } from './types-Co8a9Sr5.js';
|
|
5
5
|
import { FunctionParams } from '@kubb/react';
|
|
6
6
|
import '@kubb/core';
|
|
7
7
|
|
|
@@ -15,10 +15,11 @@ type Props$4 = {
|
|
|
15
15
|
mutationKeyName: string;
|
|
16
16
|
typeSchemas: OperationSchemas;
|
|
17
17
|
operation: Operation;
|
|
18
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
18
19
|
dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType'];
|
|
19
20
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
20
21
|
};
|
|
21
|
-
declare function Mutation({ name, clientName, pathParamsType, dataReturnType, typeSchemas, operation, mutationKeyName }: Props$4): ReactNode;
|
|
22
|
+
declare function Mutation({ name, clientName, paramsType, pathParamsType, dataReturnType, typeSchemas, operation, mutationKeyName }: Props$4): ReactNode;
|
|
22
23
|
|
|
23
24
|
type Props$3 = {
|
|
24
25
|
/**
|
|
@@ -30,17 +31,19 @@ type Props$3 = {
|
|
|
30
31
|
queryKeyTypeName: string;
|
|
31
32
|
typeSchemas: OperationSchemas;
|
|
32
33
|
operation: Operation;
|
|
34
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
33
35
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
34
36
|
dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType'];
|
|
35
37
|
};
|
|
36
38
|
type GetParamsProps$3 = {
|
|
39
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
37
40
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
38
41
|
dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType'];
|
|
39
42
|
typeSchemas: OperationSchemas;
|
|
40
43
|
};
|
|
41
|
-
declare function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, pathParamsType, dataReturnType, typeSchemas, operation }: Props$3): ReactNode;
|
|
44
|
+
declare function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, paramsType, pathParamsType, dataReturnType, typeSchemas, operation, }: Props$3): ReactNode;
|
|
42
45
|
declare namespace Query {
|
|
43
|
-
var getParams: ({ pathParamsType, dataReturnType, typeSchemas }: GetParamsProps$3) => FunctionParams;
|
|
46
|
+
var getParams: ({ paramsType, pathParamsType, dataReturnType, typeSchemas }: GetParamsProps$3) => FunctionParams;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
type Props$2 = {
|
|
@@ -82,15 +85,17 @@ type Props = {
|
|
|
82
85
|
clientName: string;
|
|
83
86
|
queryKeyName: string;
|
|
84
87
|
typeSchemas: OperationSchemas;
|
|
88
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
85
89
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
86
90
|
};
|
|
87
91
|
type GetParamsProps = {
|
|
92
|
+
paramsType: PluginSvelteQuery['resolvedOptions']['paramsType'];
|
|
88
93
|
pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType'];
|
|
89
94
|
typeSchemas: OperationSchemas;
|
|
90
95
|
};
|
|
91
|
-
declare function QueryOptions({ name, clientName, typeSchemas, pathParamsType, queryKeyName }: Props): ReactNode;
|
|
96
|
+
declare function QueryOptions({ name, clientName, typeSchemas, paramsType, pathParamsType, queryKeyName }: Props): ReactNode;
|
|
92
97
|
declare namespace QueryOptions {
|
|
93
|
-
var getParams: ({ pathParamsType, typeSchemas }: GetParamsProps) => FunctionParams;
|
|
98
|
+
var getParams: ({ paramsType, pathParamsType, typeSchemas }: GetParamsProps) => FunctionParams;
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
export { Mutation, MutationKey, Query, QueryKey, QueryOptions };
|
package/dist/components.js
CHANGED
package/dist/generators.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkC3XFYLKR_cjs = require('./chunk-C3XFYLKR.cjs');
|
|
4
|
+
require('./chunk-HUR476BL.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "mutationGenerator", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkC3XFYLKR_cjs.mutationGenerator; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "queryGenerator", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkC3XFYLKR_cjs.queryGenerator; }
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=generators.cjs.map
|
|
17
17
|
//# sourceMappingURL=generators.cjs.map
|
package/dist/generators.d.cts
CHANGED
package/dist/generators.d.ts
CHANGED
package/dist/generators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { mutationGenerator, queryGenerator } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { mutationGenerator, queryGenerator } from './chunk-PCNLFEZJ.js';
|
|
2
|
+
import './chunk-LSV2AJSI.js';
|
|
3
3
|
//# sourceMappingURL=generators.js.map
|
|
4
4
|
//# sourceMappingURL=generators.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkC3XFYLKR_cjs = require('./chunk-C3XFYLKR.cjs');
|
|
4
|
+
require('./chunk-HUR476BL.cjs');
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var core = require('@kubb/core');
|
|
7
7
|
var transformers = require('@kubb/core/transformers');
|
|
8
|
-
require('@kubb/core/utils');
|
|
9
8
|
var pluginOas = require('@kubb/plugin-oas');
|
|
10
9
|
var pluginTs = require('@kubb/plugin-ts');
|
|
11
10
|
var pluginZod = require('@kubb/plugin-zod');
|
|
@@ -24,16 +23,16 @@ var pluginSvelteQuery = core.createPlugin((options) => {
|
|
|
24
23
|
override = [],
|
|
25
24
|
parser = "client",
|
|
26
25
|
transformers: transformers$1 = {},
|
|
26
|
+
paramsType = "inline",
|
|
27
27
|
pathParamsType = "inline",
|
|
28
28
|
mutation = {},
|
|
29
29
|
query = {},
|
|
30
|
-
generators = [
|
|
30
|
+
generators = [chunkC3XFYLKR_cjs.queryGenerator, chunkC3XFYLKR_cjs.mutationGenerator].filter(Boolean)
|
|
31
31
|
} = options;
|
|
32
32
|
return {
|
|
33
33
|
name: pluginSvelteQueryName,
|
|
34
34
|
options: {
|
|
35
35
|
output,
|
|
36
|
-
baseURL: void 0,
|
|
37
36
|
client: {
|
|
38
37
|
importPath: "@kubb/plugin-client/client",
|
|
39
38
|
dataReturnType: "data",
|
|
@@ -52,7 +51,8 @@ var pluginSvelteQuery = core.createPlugin((options) => {
|
|
|
52
51
|
importPath: "@tanstack/svelte-query",
|
|
53
52
|
...mutation
|
|
54
53
|
},
|
|
55
|
-
|
|
54
|
+
paramsType,
|
|
55
|
+
pathParamsType: paramsType === "object" ? "object" : pathParamsType,
|
|
56
56
|
parser
|
|
57
57
|
},
|
|
58
58
|
pre: [pluginOas.pluginOasName, pluginTs.pluginTsName, parser === "zod" ? pluginZod.pluginZodName : void 0].filter(Boolean),
|
|
@@ -89,22 +89,19 @@ var pluginSvelteQuery = core.createPlugin((options) => {
|
|
|
89
89
|
const root = path__default.default.resolve(this.config.root, this.config.output.path);
|
|
90
90
|
const mode = core.FileManager.getMode(path__default.default.resolve(root, output.path));
|
|
91
91
|
const baseURL = await swaggerPlugin.context.getBaseURL();
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
mode
|
|
106
|
-
}
|
|
107
|
-
);
|
|
92
|
+
if (baseURL) {
|
|
93
|
+
this.plugin.options.client.baseURL = baseURL;
|
|
94
|
+
}
|
|
95
|
+
const operationGenerator = new pluginOas.OperationGenerator(this.plugin.options, {
|
|
96
|
+
oas,
|
|
97
|
+
pluginManager: this.pluginManager,
|
|
98
|
+
plugin: this.plugin,
|
|
99
|
+
contentType: swaggerPlugin.context.contentType,
|
|
100
|
+
exclude,
|
|
101
|
+
include,
|
|
102
|
+
override,
|
|
103
|
+
mode
|
|
104
|
+
});
|
|
108
105
|
const files = await operationGenerator.build(...generators);
|
|
109
106
|
await this.addFile(...files);
|
|
110
107
|
const barrelFiles = await this.fileManager.getBarrelFiles({
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugin.ts"],"names":["createPlugin","transformers","queryGenerator","mutationGenerator","pluginOasName","pluginTsName","pluginZodName","options","path","FileManager","camelCase","pascalCase","PluginManager","OperationGenerator"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/plugin.ts"],"names":["createPlugin","transformers","queryGenerator","mutationGenerator","pluginOasName","pluginTsName","pluginZodName","options","path","FileManager","camelCase","pascalCase","PluginManager","OperationGenerator"],"mappings":";;;;;;;;;;;;;;;AAcO,IAAM,qBAAwB,G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A,QACnC,OAAA;AAAA,QACA,OAAA;AAAA,QACA,QAAA;AAAA,QACA;AAAA,OACD,CAAA;AAED,MAAA,MAAM,KAAQ,GAAA,MAAM,kBAAmB,CAAA,KAAA,CAAM,GAAG,UAAU,CAAA;AAC1D,MAAM,MAAA,IAAA,CAAK,OAAQ,CAAA,GAAG,KAAK,CAAA;AAE3B,MAAA,MAAM,WAAc,GAAA,MAAM,IAAK,CAAA,WAAA,CAAY,cAAe,CAAA;AAAA,QACxD,IAAA,EAAM,OAAO,UAAc,IAAA,OAAA;AAAA,QAC3B,IAAA;AAAA,QACA,MAAA;AAAA,QACA,KAAA,EAAO,KAAK,WAAY,CAAA,KAAA;AAAA,QACxB,IAAM,EAAA;AAAA,UACJ,SAAA,EAAW,KAAK,MAAO,CAAA;AAAA,SACzB;AAAA,QACA,QAAQ,IAAK,CAAA;AAAA,OACd,CAAA;AAED,MAAM,MAAA,IAAA,CAAK,OAAQ,CAAA,GAAG,WAAW,CAAA;AAAA;AACnC,GACF;AACF,CAAC","file":"index.cjs","sourcesContent":["import path from 'node:path'\n\nimport { FileManager, type Group, PluginManager, createPlugin } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\n\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\n\nimport type { Plugin } from '@kubb/core'\nimport type { PluginOas } from '@kubb/plugin-oas'\nimport { mutationGenerator, queryGenerator } from './generators'\nimport type { PluginSvelteQuery } from './types.ts'\n\nexport const pluginSvelteQueryName = 'plugin-svelte-query' satisfies PluginSvelteQuery['name']\n\nexport const pluginSvelteQuery = createPlugin<PluginSvelteQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n transformers = {},\n paramsType = 'inline',\n pathParamsType = 'inline',\n mutation = {},\n query = {},\n generators = [queryGenerator, mutationGenerator].filter(Boolean),\n } = options\n\n return {\n name: pluginSvelteQueryName,\n options: {\n output,\n client: {\n importPath: '@kubb/plugin-client/client',\n dataReturnType: 'data',\n pathParamsType: 'inline',\n ...options.client,\n },\n query: {\n key: (key: unknown[]) => key,\n methods: ['get'],\n importPath: '@tanstack/svelte-query',\n ...query,\n },\n mutation: {\n key: (key: unknown[]) => key,\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/svelte-query',\n ...mutation,\n },\n paramsType,\n pathParamsType: paramsType === 'object' ? 'object' : pathParamsType,\n parser,\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 ?? FileManager.getMode(path.resolve(root, output.path))\n\n if (options?.tag && group?.type === 'tag') {\n const groupName: Group['name'] = group?.name ? group.name : (ctx) => `${ctx.group}Controller`\n\n return path.resolve(root, output.path, groupName({ group: camelCase(options.tag) }), baseName)\n }\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 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 buildStart() {\n const [swaggerPlugin]: [Plugin<PluginOas>] = PluginManager.getDependedPlugins<PluginOas>(this.plugins, [pluginOasName])\n\n const oas = await swaggerPlugin.context.getOas()\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = FileManager.getMode(path.resolve(root, output.path))\n const baseURL = await swaggerPlugin.context.getBaseURL()\n\n if (baseURL) {\n this.plugin.options.client.baseURL = baseURL\n }\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType: swaggerPlugin.context.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 this.fileManager.getBarrelFiles({\n type: output.barrelType ?? 'named',\n root,\n output,\n files: this.fileManager.files,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.addFile(...barrelFiles)\n },\n }\n})\n"]}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { queryGenerator, mutationGenerator } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { queryGenerator, mutationGenerator } from './chunk-PCNLFEZJ.js';
|
|
2
|
+
import './chunk-LSV2AJSI.js';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { createPlugin, FileManager, PluginManager } from '@kubb/core';
|
|
5
5
|
import { camelCase, pascalCase } from '@kubb/core/transformers';
|
|
6
|
-
import '@kubb/core/utils';
|
|
7
6
|
import { pluginOasName, OperationGenerator } from '@kubb/plugin-oas';
|
|
8
7
|
import { pluginTsName } from '@kubb/plugin-ts';
|
|
9
8
|
import { pluginZodName } from '@kubb/plugin-zod';
|
|
@@ -18,6 +17,7 @@ var pluginSvelteQuery = createPlugin((options) => {
|
|
|
18
17
|
override = [],
|
|
19
18
|
parser = "client",
|
|
20
19
|
transformers = {},
|
|
20
|
+
paramsType = "inline",
|
|
21
21
|
pathParamsType = "inline",
|
|
22
22
|
mutation = {},
|
|
23
23
|
query = {},
|
|
@@ -27,7 +27,6 @@ var pluginSvelteQuery = createPlugin((options) => {
|
|
|
27
27
|
name: pluginSvelteQueryName,
|
|
28
28
|
options: {
|
|
29
29
|
output,
|
|
30
|
-
baseURL: void 0,
|
|
31
30
|
client: {
|
|
32
31
|
importPath: "@kubb/plugin-client/client",
|
|
33
32
|
dataReturnType: "data",
|
|
@@ -46,7 +45,8 @@ var pluginSvelteQuery = createPlugin((options) => {
|
|
|
46
45
|
importPath: "@tanstack/svelte-query",
|
|
47
46
|
...mutation
|
|
48
47
|
},
|
|
49
|
-
|
|
48
|
+
paramsType,
|
|
49
|
+
pathParamsType: paramsType === "object" ? "object" : pathParamsType,
|
|
50
50
|
parser
|
|
51
51
|
},
|
|
52
52
|
pre: [pluginOasName, pluginTsName, parser === "zod" ? pluginZodName : void 0].filter(Boolean),
|
|
@@ -83,22 +83,19 @@ var pluginSvelteQuery = createPlugin((options) => {
|
|
|
83
83
|
const root = path.resolve(this.config.root, this.config.output.path);
|
|
84
84
|
const mode = FileManager.getMode(path.resolve(root, output.path));
|
|
85
85
|
const baseURL = await swaggerPlugin.context.getBaseURL();
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
mode
|
|
100
|
-
}
|
|
101
|
-
);
|
|
86
|
+
if (baseURL) {
|
|
87
|
+
this.plugin.options.client.baseURL = baseURL;
|
|
88
|
+
}
|
|
89
|
+
const operationGenerator = new OperationGenerator(this.plugin.options, {
|
|
90
|
+
oas,
|
|
91
|
+
pluginManager: this.pluginManager,
|
|
92
|
+
plugin: this.plugin,
|
|
93
|
+
contentType: swaggerPlugin.context.contentType,
|
|
94
|
+
exclude,
|
|
95
|
+
include,
|
|
96
|
+
override,
|
|
97
|
+
mode
|
|
98
|
+
});
|
|
102
99
|
const files = await operationGenerator.build(...generators);
|
|
103
100
|
await this.addFile(...files);
|
|
104
101
|
const barrelFiles = await this.fileManager.getBarrelFiles({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugin.ts"],"names":["options"],"mappings":"
|
|
1
|
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AAc,OAAQ,CAAA,WAAA;AAAA,QACnC,OAAA;AAAA,QACA,OAAA;AAAA,QACA,QAAA;AAAA,QACA;AAAA,OACD,CAAA;AAED,MAAA,MAAM,KAAQ,GAAA,MAAM,kBAAmB,CAAA,KAAA,CAAM,GAAG,UAAU,CAAA;AAC1D,MAAM,MAAA,IAAA,CAAK,OAAQ,CAAA,GAAG,KAAK,CAAA;AAE3B,MAAA,MAAM,WAAc,GAAA,MAAM,IAAK,CAAA,WAAA,CAAY,cAAe,CAAA;AAAA,QACxD,IAAA,EAAM,OAAO,UAAc,IAAA,OAAA;AAAA,QAC3B,IAAA;AAAA,QACA,MAAA;AAAA,QACA,KAAA,EAAO,KAAK,WAAY,CAAA,KAAA;AAAA,QACxB,IAAM,EAAA;AAAA,UACJ,SAAA,EAAW,KAAK,MAAO,CAAA;AAAA,SACzB;AAAA,QACA,QAAQ,IAAK,CAAA;AAAA,OACd,CAAA;AAED,MAAM,MAAA,IAAA,CAAK,OAAQ,CAAA,GAAG,WAAW,CAAA;AAAA;AACnC,GACF;AACF,CAAC","file":"index.js","sourcesContent":["import path from 'node:path'\n\nimport { FileManager, type Group, PluginManager, createPlugin } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\n\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\n\nimport type { Plugin } from '@kubb/core'\nimport type { PluginOas } from '@kubb/plugin-oas'\nimport { mutationGenerator, queryGenerator } from './generators'\nimport type { PluginSvelteQuery } from './types.ts'\n\nexport const pluginSvelteQueryName = 'plugin-svelte-query' satisfies PluginSvelteQuery['name']\n\nexport const pluginSvelteQuery = createPlugin<PluginSvelteQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n transformers = {},\n paramsType = 'inline',\n pathParamsType = 'inline',\n mutation = {},\n query = {},\n generators = [queryGenerator, mutationGenerator].filter(Boolean),\n } = options\n\n return {\n name: pluginSvelteQueryName,\n options: {\n output,\n client: {\n importPath: '@kubb/plugin-client/client',\n dataReturnType: 'data',\n pathParamsType: 'inline',\n ...options.client,\n },\n query: {\n key: (key: unknown[]) => key,\n methods: ['get'],\n importPath: '@tanstack/svelte-query',\n ...query,\n },\n mutation: {\n key: (key: unknown[]) => key,\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/svelte-query',\n ...mutation,\n },\n paramsType,\n pathParamsType: paramsType === 'object' ? 'object' : pathParamsType,\n parser,\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 ?? FileManager.getMode(path.resolve(root, output.path))\n\n if (options?.tag && group?.type === 'tag') {\n const groupName: Group['name'] = group?.name ? group.name : (ctx) => `${ctx.group}Controller`\n\n return path.resolve(root, output.path, groupName({ group: camelCase(options.tag) }), baseName)\n }\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 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 buildStart() {\n const [swaggerPlugin]: [Plugin<PluginOas>] = PluginManager.getDependedPlugins<PluginOas>(this.plugins, [pluginOasName])\n\n const oas = await swaggerPlugin.context.getOas()\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = FileManager.getMode(path.resolve(root, output.path))\n const baseURL = await swaggerPlugin.context.getBaseURL()\n\n if (baseURL) {\n this.plugin.options.client.baseURL = baseURL\n }\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType: swaggerPlugin.context.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 this.fileManager.getBarrelFiles({\n type: output.barrelType ?? 'named',\n root,\n output,\n files: this.fileManager.files,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.addFile(...barrelFiles)\n },\n }\n})\n"]}
|