@kubb/plugin-vue-query 5.0.0-beta.3 → 5.0.0-beta.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/README.md +26 -5
- package/dist/{components-qfOFRSoM.cjs → components-B6lPYyOP.cjs} +367 -381
- package/dist/components-B6lPYyOP.cjs.map +1 -0
- package/dist/{components-D1UhYFgY.js → components-BZqujNQv.js} +336 -380
- package/dist/components-BZqujNQv.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.ts +3 -67
- package/dist/components.js +1 -1
- package/dist/{generators-CbnIVBgY.js → generators-C-3isXzW.js} +158 -203
- package/dist/generators-C-3isXzW.js.map +1 -0
- package/dist/{generators-C4gs_P1i.cjs → generators-QHQkbNnm.cjs} +157 -202
- package/dist/generators-QHQkbNnm.cjs.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +17 -1
- package/dist/generators.js +1 -1
- package/dist/index.cjs +136 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +136 -23
- package/dist/index.js.map +1 -1
- package/dist/types-D-LjzI_Q.d.ts +270 -0
- package/extension.yaml +1273 -0
- package/package.json +16 -18
- package/src/components/InfiniteQuery.tsx +16 -48
- package/src/components/InfiniteQueryOptions.tsx +43 -58
- package/src/components/Mutation.tsx +33 -42
- package/src/components/Query.tsx +16 -49
- package/src/components/QueryKey.tsx +9 -61
- package/src/components/QueryOptions.tsx +20 -76
- package/src/generators/infiniteQueryGenerator.tsx +55 -63
- package/src/generators/mutationGenerator.tsx +50 -61
- package/src/generators/queryGenerator.tsx +52 -61
- package/src/plugin.ts +46 -30
- package/src/resolvers/resolverVueQuery.ts +61 -4
- package/src/types.ts +129 -53
- package/src/utils.ts +44 -25
- package/dist/components-D1UhYFgY.js.map +0 -1
- package/dist/components-qfOFRSoM.cjs.map +0 -1
- package/dist/generators-C4gs_P1i.cjs.map +0 -1
- package/dist/generators-CbnIVBgY.js.map +0 -1
- package/dist/types-nVDTfuS1.d.ts +0 -194
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<h1
|
|
2
|
+
<h1>@kubb/plugin-vue-query</h1>
|
|
3
3
|
<a href="https://kubb.dev" target="_blank" rel="noopener noreferrer">
|
|
4
4
|
<img width="180" src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo">
|
|
5
5
|
</a>
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
[![Sponsors][sponsors-src]][sponsors-href]
|
|
12
12
|
|
|
13
13
|
<h4>
|
|
14
|
-
<a href="https://codesandbox.io/s/github/kubb-labs/
|
|
14
|
+
<a href="https://codesandbox.io/s/github/kubb-labs/plugins/tree/main/examples/vue-query" target="_blank">View Demo</a>
|
|
15
15
|
<span> · </span>
|
|
16
|
-
<a href="https://kubb.dev/" target="_blank">Documentation</a>
|
|
16
|
+
<a href="https://kubb.dev/plugins/vue-query" target="_blank">Documentation</a>
|
|
17
17
|
<span> · </span>
|
|
18
18
|
<a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
|
|
19
19
|
<span> · </span>
|
|
@@ -21,11 +21,32 @@
|
|
|
21
21
|
</h4>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
`@kubb/plugin-vue-query` generates TanStack Query composables from your OpenAPI specification. Each operation becomes a typed `useQuery`, `useMutation`, or `useInfiniteQuery` composable for Vue 3.
|
|
25
|
+
|
|
26
|
+
## Features
|
|
27
|
+
|
|
28
|
+
- Generates `useQuery`, `useMutation`, `useInfiniteQuery`, and `queryOptions` composables
|
|
29
|
+
- Infers request, response, and error types from the spec
|
|
30
|
+
- Uses Vue 3 Composition API types, including `MaybeRef` and `MaybeRefOrGetter`
|
|
31
|
+
- Works with `@kubb/plugin-ts`, `@kubb/plugin-zod`, and `@kubb/plugin-client`
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
bun add @kubb/plugin-vue-query
|
|
37
|
+
# or
|
|
38
|
+
pnpm add @kubb/plugin-vue-query
|
|
39
|
+
# or
|
|
40
|
+
npm install @kubb/plugin-vue-query
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Documentation
|
|
44
|
+
|
|
45
|
+
See the [full documentation](https://kubb.dev/plugins/vue-query) for configuration options and examples.
|
|
25
46
|
|
|
26
47
|
## Supporting Kubb
|
|
27
48
|
|
|
28
|
-
Kubb
|
|
49
|
+
Kubb is an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
|
|
29
50
|
|
|
30
51
|
- [Become a Sponsor on GitHub](https://github.com/sponsors/stijnvanhulle)
|
|
31
52
|
|