@kubb/plugin-vue-query 5.0.0-alpha.9 → 5.0.0-beta.3
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/LICENSE +17 -10
- package/README.md +1 -3
- package/dist/components-D1UhYFgY.js +1277 -0
- package/dist/components-D1UhYFgY.js.map +1 -0
- package/dist/components-qfOFRSoM.cjs +1367 -0
- package/dist/components-qfOFRSoM.cjs.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.ts +118 -109
- package/dist/components.js +1 -1
- package/dist/generators-C4gs_P1i.cjs +726 -0
- package/dist/generators-C4gs_P1i.cjs.map +1 -0
- package/dist/generators-CbnIVBgY.js +709 -0
- package/dist/generators-CbnIVBgY.js.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +5 -501
- package/dist/generators.js +1 -1
- package/dist/index.cjs +106 -121
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +102 -121
- package/dist/index.js.map +1 -1
- package/dist/types-nVDTfuS1.d.ts +194 -0
- package/package.json +61 -64
- package/src/components/InfiniteQuery.tsx +104 -153
- package/src/components/InfiniteQueryOptions.tsx +122 -162
- package/src/components/Mutation.tsx +110 -136
- package/src/components/Query.tsx +102 -151
- package/src/components/QueryKey.tsx +68 -58
- package/src/components/QueryOptions.tsx +147 -139
- package/src/generators/infiniteQueryGenerator.tsx +165 -170
- package/src/generators/mutationGenerator.tsx +117 -124
- package/src/generators/queryGenerator.tsx +138 -136
- package/src/index.ts +1 -1
- package/src/plugin.ts +124 -175
- package/src/resolvers/resolverVueQuery.ts +19 -0
- package/src/types.ts +68 -48
- package/src/utils.ts +37 -0
- package/dist/components-Yjoe78Y7.cjs +0 -1119
- package/dist/components-Yjoe78Y7.cjs.map +0 -1
- package/dist/components-_AMBl0g-.js +0 -1029
- package/dist/components-_AMBl0g-.js.map +0 -1
- package/dist/generators-CR34GjVu.js +0 -661
- package/dist/generators-CR34GjVu.js.map +0 -1
- package/dist/generators-DH8VkK1q.cjs +0 -678
- package/dist/generators-DH8VkK1q.cjs.map +0 -1
- package/dist/types-CgDFUvfZ.d.ts +0 -211
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["fetchClientSource","axiosClientSource","configSource"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { camelCase
|
|
1
|
+
{"version":3,"file":"index.js","names":["fetchClientSource","axiosClientSource","configSource"],"sources":["../src/resolvers/resolverVueQuery.ts","../src/plugin.ts"],"sourcesContent":["import { camelCase } from '@internals/utils'\nimport { defineResolver } from '@kubb/core'\nimport type { PluginVueQuery } from '../types.ts'\n\n/**\n * Naming convention resolver for Vue Query plugin.\n *\n * Provides default naming helpers using camelCase for functions and file paths.\n */\nexport const resolverVueQuery = defineResolver<PluginVueQuery>((ctx) => ({\n name: 'default',\n pluginName: 'plugin-vue-query',\n default(name, type) {\n return camelCase(name, { isFile: type === 'file' })\n },\n resolveName(name) {\n return ctx.default(name, 'function')\n },\n}))\n","import path from 'node:path'\nimport { camelCase } from '@internals/utils'\nimport { ast, definePlugin, type Group } from '@kubb/core'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { source as axiosClientSource } from '@kubb/plugin-client/templates/clients/axios.source'\nimport { source as fetchClientSource } from '@kubb/plugin-client/templates/clients/fetch.source'\nimport { source as configSource } from '@kubb/plugin-client/templates/config.source'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey } from './components/MutationKey.tsx'\nimport { QueryKey } from './components/QueryKey.tsx'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './generators'\nimport { resolverVueQuery } from './resolvers/resolverVueQuery.ts'\nimport type { PluginVueQuery } from './types.ts'\n\nexport const pluginVueQueryName = 'plugin-vue-query' satisfies PluginVueQuery['name']\n\nexport const pluginVueQuery = definePlugin<PluginVueQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n infinite = false,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n mutation = {},\n query = {},\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n paramsCasing,\n client,\n resolver: userResolver,\n transformer: userTransformer,\n generators: userGenerators = [],\n } = options\n\n const clientName = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : undefined)\n\n const selectedGenerators = options.generators ?? [queryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean)\n\n const groupConfig = group\n ? ({\n ...group,\n name: group.name\n ? group.name\n : (ctx: { group: string }) => {\n if (group.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n },\n } satisfies Group)\n : undefined\n\n return {\n name: pluginVueQueryName,\n options,\n dependencies: [pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n hooks: {\n 'kubb:plugin:setup'(ctx) {\n const resolver = userResolver ? { ...resolverVueQuery, ...userResolver } : resolverVueQuery\n\n ctx.setOptions({\n output,\n transformers,\n client: {\n bundle: client?.bundle,\n baseURL: client?.baseURL,\n client: clientName,\n clientType: client?.clientType ?? 'function',\n importPath: clientImportPath,\n dataReturnType: client?.dataReturnType ?? 'data',\n paramsCasing,\n },\n queryKey,\n query:\n query === false\n ? false\n : {\n importPath: '@tanstack/vue-query',\n methods: ['get'],\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n importPath: '@tanstack/vue-query',\n methods: ['post', 'put', 'patch', 'delete'],\n ...mutation,\n },\n infinite: infinite\n ? {\n queryParam: 'id',\n initialPageParam: 0,\n cursorParam: undefined,\n nextParam: undefined,\n previousParam: undefined,\n ...infinite,\n }\n : false,\n parser,\n paramsType,\n pathParamsType,\n paramsCasing,\n group: groupConfig,\n exclude,\n include,\n override,\n resolver,\n })\n ctx.setResolver(resolver)\n if (userTransformer) {\n ctx.setTransformer(userTransformer)\n }\n\n for (const gen of selectedGenerators) {\n ctx.addGenerator(gen)\n }\n for (const gen of userGenerators) {\n ctx.addGenerator(gen)\n }\n\n const root = path.resolve(ctx.config.root, ctx.config.output.path)\n const hasClientPlugin = !!ctx.config.plugins?.some((p) => (p as { name?: string }).name === pluginClientName)\n\n if (client?.bundle && !hasClientPlugin && !clientImportPath) {\n ctx.injectFile({\n baseName: 'fetch.ts',\n path: path.resolve(root, '.kubb/fetch.ts'),\n sources: [\n ast.createSource({\n name: 'fetch',\n nodes: [ast.createText(clientName === 'fetch' ? fetchClientSource : axiosClientSource)],\n isExportable: true,\n isIndexable: true,\n }),\n ],\n })\n }\n\n if (!hasClientPlugin) {\n ctx.injectFile({\n baseName: 'config.ts',\n path: path.resolve(root, '.kubb/config.ts'),\n sources: [\n ast.createSource({\n name: 'config',\n nodes: [ast.createText(configSource)],\n isExportable: false,\n isIndexable: false,\n }),\n ],\n })\n }\n },\n },\n }\n})\n\nexport default pluginVueQuery\n"],"mappings":"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"}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
+
import { Exclude, Generator, Group, Include, Output, Override, PluginFactoryOptions, Resolver, ast } from "@kubb/core";
|
|
3
|
+
import { ClientImportPath, PluginClient } from "@kubb/plugin-client";
|
|
4
|
+
|
|
5
|
+
//#region src/types.d.ts
|
|
6
|
+
type Transformer = (props: {
|
|
7
|
+
node: ast.OperationNode;
|
|
8
|
+
casing: 'camelcase' | undefined;
|
|
9
|
+
}) => unknown[];
|
|
10
|
+
/**
|
|
11
|
+
* Resolver for Vue Query that provides naming methods for hook functions.
|
|
12
|
+
*/
|
|
13
|
+
type ResolverVueQuery = Resolver & {
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the hook function name for an operation.
|
|
16
|
+
*/
|
|
17
|
+
resolveName(this: ResolverVueQuery, name: string): string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Customize the queryKey.
|
|
21
|
+
*/
|
|
22
|
+
type QueryKey = Transformer;
|
|
23
|
+
/**
|
|
24
|
+
* Customize the mutationKey.
|
|
25
|
+
*/
|
|
26
|
+
type MutationKey = Transformer;
|
|
27
|
+
type Query = {
|
|
28
|
+
/**
|
|
29
|
+
* HTTP methods to use for queries.
|
|
30
|
+
*
|
|
31
|
+
* @default ['get']
|
|
32
|
+
*/
|
|
33
|
+
methods?: Array<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Path to the useQuery hook for useQuery functionality.
|
|
36
|
+
* Used as `import { useQuery } from '${importPath}'`.
|
|
37
|
+
* Accepts relative and absolute paths.
|
|
38
|
+
* Path is used as-is; relative paths are based on the generated file location.
|
|
39
|
+
* @default '@tanstack/vue-query'
|
|
40
|
+
*/
|
|
41
|
+
importPath?: string;
|
|
42
|
+
};
|
|
43
|
+
type Mutation = {
|
|
44
|
+
/**
|
|
45
|
+
* HTTP methods to use for mutations.
|
|
46
|
+
*
|
|
47
|
+
* @default ['post', 'put', 'delete']
|
|
48
|
+
*/
|
|
49
|
+
methods?: Array<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Path to the useMutation hook for useMutation functionality.
|
|
52
|
+
* Used as `import { useMutation } from '${importPath}'`.
|
|
53
|
+
* Accepts relative and absolute paths.
|
|
54
|
+
* Path is used as-is; relative paths are based on the generated file location.
|
|
55
|
+
* @default '@tanstack/vue-query'
|
|
56
|
+
*/
|
|
57
|
+
importPath?: string;
|
|
58
|
+
};
|
|
59
|
+
type Infinite = {
|
|
60
|
+
/**
|
|
61
|
+
* Specify the params key used for `pageParam`.
|
|
62
|
+
* @default 'id'
|
|
63
|
+
*/
|
|
64
|
+
queryParam: string;
|
|
65
|
+
/**
|
|
66
|
+
* Which field of the data is used, set it to undefined when no cursor is known.
|
|
67
|
+
* @deprecated Use `nextParam` and `previousParam` instead for more flexible pagination handling.
|
|
68
|
+
*/
|
|
69
|
+
cursorParam?: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Which field of the data is used to get the cursor for the next page.
|
|
72
|
+
* Supports dot notation (e.g. 'pagination.next.id') or array path (e.g. ['pagination', 'next', 'id']) to access nested fields.
|
|
73
|
+
*/
|
|
74
|
+
nextParam?: string | string[] | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Which field of the data is used to get the cursor for the previous page.
|
|
77
|
+
* Supports dot notation (e.g. 'pagination.prev.id') or array path (e.g. ['pagination', 'prev', 'id']) to access nested fields.
|
|
78
|
+
*/
|
|
79
|
+
previousParam?: string | string[] | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* The initial value, the value of the first page.
|
|
82
|
+
* @default 0
|
|
83
|
+
*/
|
|
84
|
+
initialPageParam: unknown;
|
|
85
|
+
};
|
|
86
|
+
type Options = {
|
|
87
|
+
/**
|
|
88
|
+
* Specify the export location for the files and define the behavior of the output
|
|
89
|
+
* @default { path: 'hooks', barrelType: 'named' }
|
|
90
|
+
*/
|
|
91
|
+
output?: Output;
|
|
92
|
+
/**
|
|
93
|
+
* Group the @tanstack/query hooks based on the provided name.
|
|
94
|
+
*/
|
|
95
|
+
group?: Group;
|
|
96
|
+
client?: ClientImportPath & Pick<PluginClient['options'], 'clientType' | 'dataReturnType' | 'baseURL' | 'bundle' | 'paramsCasing'>;
|
|
97
|
+
/**
|
|
98
|
+
* Tags, operations, or paths to exclude from generation.
|
|
99
|
+
*/
|
|
100
|
+
exclude?: Array<Exclude>;
|
|
101
|
+
/**
|
|
102
|
+
* Tags, operations, or paths to include in generation.
|
|
103
|
+
*/
|
|
104
|
+
include?: Array<Include>;
|
|
105
|
+
/**
|
|
106
|
+
* Override options for specific tags, operations, or paths.
|
|
107
|
+
*/
|
|
108
|
+
override?: Array<Override<ResolvedOptions>>;
|
|
109
|
+
/**
|
|
110
|
+
* Apply casing to parameter names.
|
|
111
|
+
*/
|
|
112
|
+
paramsCasing?: 'camelcase';
|
|
113
|
+
/**
|
|
114
|
+
* How parameters are passed: grouped in an object or spread inline.
|
|
115
|
+
*
|
|
116
|
+
* @default 'inline'
|
|
117
|
+
*/
|
|
118
|
+
paramsType?: 'object' | 'inline';
|
|
119
|
+
/**
|
|
120
|
+
* How path parameters are passed: grouped in an object or spread inline.
|
|
121
|
+
*
|
|
122
|
+
* @default 'inline'
|
|
123
|
+
*/
|
|
124
|
+
pathParamsType?: PluginClient['options']['pathParamsType'];
|
|
125
|
+
/**
|
|
126
|
+
* Add infinite query hooks.
|
|
127
|
+
*/
|
|
128
|
+
infinite?: Partial<Infinite> | false;
|
|
129
|
+
queryKey?: QueryKey;
|
|
130
|
+
/**
|
|
131
|
+
* Configure useQuery behavior.
|
|
132
|
+
*/
|
|
133
|
+
query?: Partial<Query> | false;
|
|
134
|
+
mutationKey?: MutationKey;
|
|
135
|
+
/**
|
|
136
|
+
* Configure useMutation behavior.
|
|
137
|
+
*/
|
|
138
|
+
mutation?: Partial<Mutation> | false;
|
|
139
|
+
/**
|
|
140
|
+
* Parser to use for validating response data.
|
|
141
|
+
*/
|
|
142
|
+
parser?: PluginClient['options']['parser'];
|
|
143
|
+
transformers?: {
|
|
144
|
+
/**
|
|
145
|
+
* Override the default naming for hooks.
|
|
146
|
+
*/
|
|
147
|
+
name?: (name: string, type?: string) => string;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Override naming conventions for function names and types.
|
|
151
|
+
*/
|
|
152
|
+
resolver?: Partial<ResolverVueQuery> & ThisType<ResolverVueQuery>;
|
|
153
|
+
/**
|
|
154
|
+
* AST visitor to transform generated nodes.
|
|
155
|
+
*/
|
|
156
|
+
transformer?: ast.Visitor;
|
|
157
|
+
/**
|
|
158
|
+
* Additional generators alongside the default generators.
|
|
159
|
+
*/
|
|
160
|
+
generators?: Array<Generator<PluginVueQuery>>;
|
|
161
|
+
};
|
|
162
|
+
type ResolvedOptions = {
|
|
163
|
+
output: Output;
|
|
164
|
+
group: Group | undefined;
|
|
165
|
+
exclude: NonNullable<Options['exclude']>;
|
|
166
|
+
include: Options['include'];
|
|
167
|
+
override: NonNullable<Options['override']>;
|
|
168
|
+
client: Pick<PluginClient['options'], 'client' | 'clientType' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle' | 'paramsCasing'>;
|
|
169
|
+
parser: Required<NonNullable<Options['parser']>>;
|
|
170
|
+
pathParamsType: NonNullable<Options['pathParamsType']>;
|
|
171
|
+
paramsCasing: Options['paramsCasing'];
|
|
172
|
+
paramsType: NonNullable<Options['paramsType']>;
|
|
173
|
+
/**
|
|
174
|
+
* Only used for infinite
|
|
175
|
+
*/
|
|
176
|
+
infinite: NonNullable<Infinite> | false;
|
|
177
|
+
queryKey: QueryKey | undefined;
|
|
178
|
+
query: NonNullable<Required<Query>> | false;
|
|
179
|
+
mutationKey: MutationKey | undefined;
|
|
180
|
+
mutation: NonNullable<Required<Mutation>> | false;
|
|
181
|
+
resolver: ResolverVueQuery;
|
|
182
|
+
transformers: NonNullable<Options['transformers']>;
|
|
183
|
+
};
|
|
184
|
+
type PluginVueQuery = PluginFactoryOptions<'plugin-vue-query', Options, ResolvedOptions, ResolverVueQuery>;
|
|
185
|
+
declare global {
|
|
186
|
+
namespace Kubb {
|
|
187
|
+
interface PluginRegistry {
|
|
188
|
+
'plugin-vue-query': PluginVueQuery;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
//#endregion
|
|
193
|
+
export { Transformer as i, Options as n, PluginVueQuery as r, Infinite as t };
|
|
194
|
+
//# sourceMappingURL=types-nVDTfuS1.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,37 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-vue-query",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-beta.3",
|
|
4
4
|
"description": "Vue Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Vue.js applications.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"vue-query",
|
|
7
|
-
"vue",
|
|
8
|
-
"vue.js",
|
|
9
|
-
"vue3",
|
|
10
|
-
"tanstack-query",
|
|
11
|
-
"composables",
|
|
12
|
-
"hooks",
|
|
13
|
-
"data-fetching",
|
|
14
6
|
"api-client",
|
|
15
|
-
"sdk-generator",
|
|
16
|
-
"typescript",
|
|
17
|
-
"type-safe",
|
|
18
|
-
"openapi",
|
|
19
|
-
"swagger",
|
|
20
|
-
"oas",
|
|
21
7
|
"code-generator",
|
|
22
8
|
"codegen",
|
|
9
|
+
"composables",
|
|
10
|
+
"data-fetching",
|
|
11
|
+
"hooks",
|
|
12
|
+
"kubb",
|
|
13
|
+
"oas",
|
|
14
|
+
"openapi",
|
|
23
15
|
"plugins",
|
|
24
|
-
"
|
|
16
|
+
"sdk-generator",
|
|
17
|
+
"swagger",
|
|
18
|
+
"tanstack-query",
|
|
19
|
+
"type-safe",
|
|
20
|
+
"typescript",
|
|
21
|
+
"vue",
|
|
22
|
+
"vue-query",
|
|
23
|
+
"vue.js",
|
|
24
|
+
"vue3"
|
|
25
25
|
],
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"author": "stijnvanhulle",
|
|
26
28
|
"repository": {
|
|
27
29
|
"type": "git",
|
|
28
|
-
"url": "git+https://github.com/kubb-labs/
|
|
30
|
+
"url": "git+https://github.com/kubb-labs/plugins.git",
|
|
29
31
|
"directory": "packages/plugin-vue-query"
|
|
30
32
|
},
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
"files": [
|
|
34
|
+
"src",
|
|
35
|
+
"dist",
|
|
36
|
+
"plugin.json",
|
|
37
|
+
"!/**/**.test.**",
|
|
38
|
+
"!/**/__tests__/**",
|
|
39
|
+
"!/**/__snapshots__/**"
|
|
40
|
+
],
|
|
34
41
|
"type": "module",
|
|
42
|
+
"sideEffects": false,
|
|
43
|
+
"main": "./dist/index.cjs",
|
|
44
|
+
"module": "./dist/index.js",
|
|
45
|
+
"types": "./dist/index.d.ts",
|
|
46
|
+
"typesVersions": {
|
|
47
|
+
"*": {
|
|
48
|
+
"components": [
|
|
49
|
+
"./dist/components.d.ts"
|
|
50
|
+
],
|
|
51
|
+
"generators": [
|
|
52
|
+
"./dist/generators.d.ts"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
35
56
|
"exports": {
|
|
36
57
|
".": {
|
|
37
58
|
"import": "./dist/index.js",
|
|
@@ -47,24 +68,25 @@
|
|
|
47
68
|
},
|
|
48
69
|
"./package.json": "./package.json"
|
|
49
70
|
},
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public",
|
|
73
|
+
"registry": "https://registry.npmjs.org/"
|
|
74
|
+
},
|
|
75
|
+
"dependencies": {
|
|
76
|
+
"@kubb/core": "5.0.0-beta.3",
|
|
77
|
+
"@kubb/renderer-jsx": "5.0.0-beta.3",
|
|
78
|
+
"remeda": "^2.34.0",
|
|
79
|
+
"@kubb/plugin-client": "5.0.0-beta.3",
|
|
80
|
+
"@kubb/plugin-ts": "5.0.0-beta.3",
|
|
81
|
+
"@kubb/plugin-zod": "5.0.0-beta.3"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"@internals/tanstack-query": "0.0.0",
|
|
85
|
+
"@internals/utils": "0.0.0"
|
|
86
|
+
},
|
|
87
|
+
"peerDependencies": {
|
|
88
|
+
"@kubb/renderer-jsx": "5.0.0-beta.3"
|
|
60
89
|
},
|
|
61
|
-
"files": [
|
|
62
|
-
"src",
|
|
63
|
-
"dist",
|
|
64
|
-
"!/**/**.test.**",
|
|
65
|
-
"!/**/__tests__/**",
|
|
66
|
-
"!/**/__snapshots__/**"
|
|
67
|
-
],
|
|
68
90
|
"size-limit": [
|
|
69
91
|
{
|
|
70
92
|
"path": "./dist/*.js",
|
|
@@ -72,39 +94,14 @@
|
|
|
72
94
|
"gzip": true
|
|
73
95
|
}
|
|
74
96
|
],
|
|
75
|
-
"dependencies": {
|
|
76
|
-
"@kubb/fabric-core": "0.14.0",
|
|
77
|
-
"@kubb/react-fabric": "0.14.0",
|
|
78
|
-
"remeda": "^2.33.6",
|
|
79
|
-
"@kubb/oas": "5.0.0-alpha.9",
|
|
80
|
-
"@kubb/core": "5.0.0-alpha.9",
|
|
81
|
-
"@kubb/plugin-client": "5.0.0-alpha.9",
|
|
82
|
-
"@kubb/plugin-oas": "5.0.0-alpha.9",
|
|
83
|
-
"@kubb/plugin-ts": "5.0.0-alpha.9",
|
|
84
|
-
"@kubb/plugin-zod": "5.0.0-alpha.9"
|
|
85
|
-
},
|
|
86
|
-
"peerDependencies": {
|
|
87
|
-
"@kubb/fabric-core": "0.14.0",
|
|
88
|
-
"@kubb/react-fabric": "0.14.0"
|
|
89
|
-
},
|
|
90
97
|
"engines": {
|
|
91
98
|
"node": ">=22"
|
|
92
99
|
},
|
|
93
|
-
"publishConfig": {
|
|
94
|
-
"access": "public",
|
|
95
|
-
"registry": "https://registry.npmjs.org/"
|
|
96
|
-
},
|
|
97
|
-
"main": "./dist/index.cjs",
|
|
98
|
-
"module": "./dist/index.js",
|
|
99
|
-
"devDependencies": {
|
|
100
|
-
"@internals/tanstack-query": "0.0.0",
|
|
101
|
-
"@internals/utils": "0.0.0"
|
|
102
|
-
},
|
|
103
100
|
"scripts": {
|
|
104
101
|
"build": "tsdown && size-limit",
|
|
105
102
|
"clean": "npx rimraf ./dist",
|
|
106
|
-
"lint": "
|
|
107
|
-
"lint:fix": "
|
|
103
|
+
"lint": "oxlint .",
|
|
104
|
+
"lint:fix": "oxlint --fix .",
|
|
108
105
|
"release": "pnpm publish --no-git-check",
|
|
109
106
|
"release:canary": "bash ../../.github/canary.sh && node ../../scripts/build.js canary && pnpm publish --no-git-check",
|
|
110
107
|
"start": "tsdown --watch",
|