@kubb/plugin-vue-query 5.8.0-canary.20261029T093901 → 5.8.0

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.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "kubb/kit";
1
+ import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "@kubb/kit";
2
2
  import "@kubb/plugin-zod";
3
3
  import { ResolverTs } from "@kubb/plugin-ts";
4
- import "kubb/jsx";
4
+ import "@kubb/renderer-jsx";
5
5
  /**
6
6
  * The client selector accepted by a consumer's `client` option. Each calls a registered contract
7
7
  * client plugin.
@@ -430,7 +430,7 @@ export declare const pluginVueQueryName = "plugin-vue-query";
430
430
  * })
431
431
  * ```
432
432
  */
433
- export declare const pluginVueQuery: import("kubb/kit").PluginFactory<PluginVueQuery>;
433
+ export declare const pluginVueQuery: import("@kubb/kit").PluginFactory<PluginVueQuery>;
434
434
  /**
435
435
  * Default resolver used by `@kubb/plugin-vue-query`. Decides the names and
436
436
  * file paths for every generated TanStack Query composable (`useFoo`,
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "kubb/kit";
1
+ import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "@kubb/kit";
2
2
  import "@kubb/plugin-zod";
3
3
  import { ResolverTs } from "@kubb/plugin-ts";
4
- import "kubb/jsx";
4
+ import "@kubb/renderer-jsx";
5
5
  /**
6
6
  * The client selector accepted by a consumer's `client` option. Each calls a registered contract
7
7
  * client plugin.
@@ -430,7 +430,7 @@ export declare const pluginVueQueryName = "plugin-vue-query";
430
430
  * })
431
431
  * ```
432
432
  */
433
- export declare const pluginVueQuery: import("kubb/kit").PluginFactory<PluginVueQuery>;
433
+ export declare const pluginVueQuery: import("@kubb/kit").PluginFactory<PluginVueQuery>;
434
434
  /**
435
435
  * Default resolver used by `@kubb/plugin-vue-query`. Decides the names and
436
436
  * file paths for every generated TanStack Query composable (`useFoo`,
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { Diagnostics, Resolver, Url, addGenerator, ast, camelCase, createResolver, defineExtension, defineGenerator, setMacros, setResolver, useConfig } from "kubb/kit";
1
+ import { Diagnostics, Resolver, Url, addGenerator, ast, camelCase, createResolver, defineExtension, defineGenerator, setMacros, setResolver, useConfig } from "@kubb/kit";
2
2
  import path from "node:path";
3
3
  import { createFunctionParameter, createFunctionParameters, createObjectBindingPattern, createTypeLiteral, functionPrinter, pluginTsName } from "@kubb/plugin-ts";
4
4
  import { pluginZodName } from "@kubb/plugin-zod";
5
- import { File, Function, Type, jsxRenderer } from "kubb/jsx";
6
- import { Fragment, jsx, jsxs } from "kubb/jsx/jsx-runtime";
5
+ import { File, Function, Type, jsxRenderer } from "@kubb/renderer-jsx";
6
+ import { Fragment, jsx, jsxs } from "@kubb/renderer-jsx/jsx-runtime";
7
7
  // ../../internals/shared/src/operation.ts
8
8
  /**
9
9
  * Builds the `ResolverFileParams` every operation generator passes to
@@ -25,19 +25,19 @@ function operationFileEntry(node, name, extname = ".ts") {
25
25
  };
26
26
  }
27
27
  /**
28
- * Resolves a dependency plugin's generated file for `node.operationId`, cached in `cache` (the
29
- * current node's `ctx.cache`) under the resolver's own plugin name. Several dependents reading the
28
+ * Resolves a dependency plugin's generated file for `node.operationId`, cached in `memo` (the
29
+ * build's `ctx.memo`) under the resolver's own plugin name and the operation. Several dependents reading the
30
30
  * same dependency for the same operation in one pass (a query plugin's several hook generators, the
31
31
  * MCP handler, ...) share one computed name and path instead of each calling `resolver.file` again.
32
32
  *
33
33
  * @example Cache `plugin-ts`'s file for the current operation
34
34
  * ```ts
35
- * const fileTs = resolveDependencyOperationFile({ cache: ctx.cache, node, resolver: tsResolver, root, output })
35
+ * const fileTs = resolveDependencyOperationFile({ memo: ctx.memo, node, resolver: tsResolver, root, output })
36
36
  * ```
37
37
  */
38
38
  function resolveDependencyOperationFile(options) {
39
- const { cache, node, resolver, root, output, group } = options;
40
- return cache.ensureItem(`${resolver.pluginName}:operationFile`, () => resolver.file({
39
+ const { memo, node, resolver, root, output, group } = options;
40
+ return memo(`${resolver.pluginName}:operationFile:${node.operationId}`, () => resolver.file({
41
41
  ...operationFileEntry(node, node.operationId),
42
42
  root,
43
43
  output,
@@ -482,7 +482,7 @@ var compatibility = {
482
482
  "node": ">=22.22"
483
483
  };
484
484
  // package.json
485
- var version = "5.8.0-canary.20261029T093901";
485
+ var version = "5.8.0";
486
486
  // ../../internals/client/src/resolveOperationTypes.ts
487
487
  /**
488
488
  * A `plugin-ts` shaped resolver whose operation type names point at the types `pluginZod({ inferred })`
@@ -679,7 +679,7 @@ function resolveImportPath(options) {
679
679
  * output root, the same path consumers read `RequestConfig` / `ResponseErrorConfig` from.
680
680
  * With plugin-client they come from the user's `importPath` module instead.
681
681
  *
682
- * The result is cached in the current node's `cache` (`ctx.cache`) under the client plugin's name,
682
+ * The result is cached in `memo` (the build's `ctx.memo`) under the client plugin's name and the operation,
683
683
  * so several dependents reading the same client plugin for one operation in a single pass
684
684
  * (react-query's query/mutation/infinite generators, vue-query, swr, the MCP handler, ...) share
685
685
  * one computed result instead of each re-deriving the name and path.
@@ -689,9 +689,9 @@ function resolveImportPath(options) {
689
689
  * and import path therefore match the `<op>` actually emitted, even when an `override` changes it.
690
690
  */
691
691
  function resolveClientOperation(options) {
692
- const { clientPlugin, driver, node, root, output, cache } = options;
692
+ const { clientPlugin, driver, node, root, output, memo } = options;
693
693
  if (!clientPlugin) return null;
694
- return cache.ensureItem(`${clientPlugin.pluginName}:clientOperation`, () => {
694
+ return memo(`${clientPlugin.pluginName}:clientOperation:${node.operationId}`, () => {
695
695
  const resolver = driver.getResolver(clientPlugin.pluginName);
696
696
  const pluginOptions = driver.getPlugin(clientPlugin.pluginName)?.options ?? {};
697
697
  const { exclude, include, override } = pluginOptions;
@@ -742,7 +742,7 @@ function resolveHookFile(node, ctx, options) {
742
742
  group: group ?? void 0
743
743
  });
744
744
  const fileTs = resolveDependencyOperationFile({
745
- cache: ctx.cache,
745
+ memo: ctx.memo,
746
746
  node,
747
747
  resolver: tsResolver,
748
748
  root,
@@ -1565,7 +1565,7 @@ const infiniteQueryGenerator = defineGenerator({
1565
1565
  node,
1566
1566
  root,
1567
1567
  output,
1568
- cache: ctx.cache
1568
+ memo: ctx.memo
1569
1569
  });
1570
1570
  if (!contractOp) return null;
1571
1571
  const queryName = resolver.infiniteQuery.name(node);
@@ -1757,7 +1757,7 @@ const mutationGenerator = defineGenerator({
1757
1757
  node,
1758
1758
  root,
1759
1759
  output,
1760
- cache: ctx.cache
1760
+ memo: ctx.memo
1761
1761
  });
1762
1762
  if (!contractOp) return null;
1763
1763
  const mutationHookName = resolver.mutation.name(node);
@@ -1831,7 +1831,7 @@ const queryGenerator = defineGenerator({
1831
1831
  node,
1832
1832
  root,
1833
1833
  output,
1834
- cache: ctx.cache
1834
+ memo: ctx.memo
1835
1835
  });
1836
1836
  if (!contractOp) return null;
1837
1837
  const queryName = resolver.query.name(node);