@kubb/plugin-swr 5.4.0 → 5.4.1

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.ts CHANGED
@@ -1,30 +1,23 @@
1
1
  import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
2
- import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "kubb/kit";
2
+ import { Diagnostics, Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "kubb/kit";
3
3
  import "@kubb/plugin-ts";
4
- import "kubb/jsx";
5
4
  import "@kubb/plugin-zod";
5
+ import "kubb/jsx";
6
6
  //#region ../../internals/client/src/resolveClient.d.ts
7
- /**
8
- * Resolves which client plugin a consumer (react-query, vue-query, swr, mcp) should call for an
9
- * operation, shared so the selection rules and diagnostics stay in one place.
10
- *
11
- * Every client runtime lives in a dedicated client plugin, so a consumer always calls a registered
12
- * contract client plugin (plugin-fetch, plugin-axios, or plugin-client) and never emits its own
13
- * inline client:
14
- *
15
- * - `contract` — a registered contract client plugin owns the `<op>` functions and the consumer
16
- * imports and calls them.
17
- * - `error` — no client plugin is registered, several are registered without a selector, the
18
- * requested one is missing, or `client` is not a known selector.
19
- *
20
- * The `client` string selects explicitly (`'fetch'` / `'axios'` / `'client'`); when it is unset a
21
- * lone registered contract client plugin is picked up automatically.
22
- */
23
7
  /**
24
8
  * The client selector accepted by a consumer's `client` option. Each calls a registered contract
25
9
  * client plugin.
26
10
  */
27
11
  type ClientSelector = 'fetch' | 'axios' | 'client';
12
+ /**
13
+ * The resolved client strategy stored in a consumer plugin's options: the generated code always
14
+ * imports and calls a registered contract client plugin's `<op>`. The client runtime lives in
15
+ * plugin-axios / plugin-fetch, so nothing is bundled by the consumer.
16
+ */
17
+ type ResolvedContractClient = {
18
+ kind: 'contract';
19
+ pluginName: string;
20
+ };
28
21
  //#endregion
29
22
  //#region ../../internals/tanstack-query/src/types.d.ts
30
23
  type ParamsCasing = 'camelcase' | undefined;
@@ -222,14 +215,6 @@ type Options = OutputOptions & {
222
215
  */
223
216
  macros?: Array<ast.Macro>;
224
217
  };
225
- /**
226
- * The resolved client strategy for the generated hooks, computed once during setup. The hooks always
227
- * import and call a registered contract client plugin's `<op>`.
228
- */
229
- type ResolvedClient = {
230
- kind: 'contract';
231
- pluginName: string;
232
- };
233
218
  type ResolvedOptions = {
234
219
  output: Output;
235
220
  group: Group | undefined;
@@ -239,7 +224,7 @@ type ResolvedOptions = {
239
224
  /**
240
225
  * The resolved contract client the generators import and call.
241
226
  */
242
- client: ResolvedClient;
227
+ client: ResolvedContractClient;
243
228
  queryKey: QueryKey | undefined;
244
229
  query: NonNullable<Required<Query>> | false;
245
230
  mutationKey: MutationKey | undefined;