@kubb/plugin-vue-query 5.5.1 → 5.5.4
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/index.cjs +24 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +427 -0
- package/dist/index.d.ts +29 -4
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/docs/options.md +20 -4
- package/kubb-extension.json +1 -1
- package/package.json +15 -10
- package/dist/rolldown-runtime-C0LytTxp.js +0 -8
package/dist/index.cjs
CHANGED
|
@@ -341,11 +341,11 @@ function createGroupConfig(group) {
|
|
|
341
341
|
//#region kubb-extension.json
|
|
342
342
|
var compatibility = {
|
|
343
343
|
"kubb": ">=5.8.3",
|
|
344
|
-
"node": ">=22"
|
|
344
|
+
"node": ">=22.12"
|
|
345
345
|
};
|
|
346
346
|
//#endregion
|
|
347
347
|
//#region package.json
|
|
348
|
-
var version = "5.5.
|
|
348
|
+
var version = "5.5.4";
|
|
349
349
|
//#endregion
|
|
350
350
|
//#region ../../internals/tanstack-query/src/components/HookFile.tsx
|
|
351
351
|
/**
|
|
@@ -835,6 +835,16 @@ return infiniteQueryOptions<${queryFnDataType}, ${errorType}, InfiniteData<${que
|
|
|
835
835
|
//#endregion
|
|
836
836
|
//#region ../../internals/tanstack-query/src/components/MutationKey.tsx
|
|
837
837
|
const declarationPrinter$4 = (0, _kubb_plugin_ts.functionPrinter)({ mode: "declaration" });
|
|
838
|
+
/**
|
|
839
|
+
* Default `mutationKey` builder. Call it from a custom builder to extend the default key.
|
|
840
|
+
*
|
|
841
|
+
* @remarks The returned segments may change between releases. Spread them instead of reading single entries.
|
|
842
|
+
*
|
|
843
|
+
* @example
|
|
844
|
+
* ```ts
|
|
845
|
+
* mutationKey: (props) => [JSON.stringify(props.node.operationId), ...mutationKeyTransformer(props)]
|
|
846
|
+
* ```
|
|
847
|
+
*/
|
|
838
848
|
const mutationKeyTransformer = ({ node }) => {
|
|
839
849
|
if (!node.path) return [];
|
|
840
850
|
return [`{ url: '${kubb_kit.Url.toPath(node.path)}' }`];
|
|
@@ -926,6 +936,16 @@ function createMutationResolver() {
|
|
|
926
936
|
//#endregion
|
|
927
937
|
//#region ../../internals/tanstack-query/src/components/QueryKey.tsx
|
|
928
938
|
const declarationPrinter$3 = (0, _kubb_plugin_ts.functionPrinter)({ mode: "declaration" });
|
|
939
|
+
/**
|
|
940
|
+
* Default `queryKey` builder. Call it from a custom builder to extend the default key.
|
|
941
|
+
*
|
|
942
|
+
* @remarks The returned segments may change between releases. Spread them instead of reading single entries.
|
|
943
|
+
*
|
|
944
|
+
* @example
|
|
945
|
+
* ```ts
|
|
946
|
+
* queryKey: (props) => [JSON.stringify(props.node.operationId), ...queryKeyTransformer(props)]
|
|
947
|
+
* ```
|
|
948
|
+
*/
|
|
929
949
|
const queryKeyTransformer = ({ node, variant }) => {
|
|
930
950
|
if (!node.path) return [];
|
|
931
951
|
const { path, query } = getOperationParameters(node);
|
|
@@ -1752,8 +1772,10 @@ const pluginVueQuery = (0, kubb_kit.defineExtension)({
|
|
|
1752
1772
|
//#endregion
|
|
1753
1773
|
exports.default = pluginVueQuery;
|
|
1754
1774
|
exports.definePageParam = definePageParam;
|
|
1775
|
+
exports.mutationKeyTransformer = mutationKeyTransformer;
|
|
1755
1776
|
exports.pluginVueQuery = pluginVueQuery;
|
|
1756
1777
|
exports.pluginVueQueryName = pluginVueQueryName;
|
|
1778
|
+
exports.queryKeyTransformer = queryKeyTransformer;
|
|
1757
1779
|
exports.resolverVueQuery = resolverVueQuery;
|
|
1758
1780
|
|
|
1759
1781
|
//# sourceMappingURL=index.cjs.map
|