@kubb/plugin-fetch 5.11.0-canary.20261029T124214 → 5.11.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,4 +1,4 @@
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
4
  /**
@@ -247,7 +247,7 @@ declare global {
247
247
  * operation using the shared `Operation` component: a grouped `<Name>Request` type and a function
248
248
  * that forwards a single `options` object to the bundled `client` and returns the `RequestResult`.
249
249
  */
250
- export declare const clientGenerator: import("kubb/kit").Generator<PluginFetch>;
250
+ export declare const clientGenerator: import("@kubb/kit").Generator<PluginFetch>;
251
251
  /**
252
252
  * Canonical plugin name for `@kubb/plugin-fetch`. Used for driver lookups and cross-plugin
253
253
  * dependency references.
@@ -275,6 +275,6 @@ export declare const pluginFetchName = "plugin-fetch";
275
275
  * })
276
276
  * ```
277
277
  */
278
- export declare const pluginFetch: import("kubb/kit").PluginFactory<PluginFetch>;
278
+ export declare const pluginFetch: import("@kubb/kit").PluginFactory<PluginFetch>;
279
279
  export { type Options, type PluginFetch, type ResolvedOptions, type ResolverClient, pluginFetch as default };
280
280
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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
4
  /**
@@ -247,7 +247,7 @@ declare global {
247
247
  * operation using the shared `Operation` component: a grouped `<Name>Request` type and a function
248
248
  * that forwards a single `options` object to the bundled `client` and returns the `RequestResult`.
249
249
  */
250
- export declare const clientGenerator: import("kubb/kit").Generator<PluginFetch>;
250
+ export declare const clientGenerator: import("@kubb/kit").Generator<PluginFetch>;
251
251
  /**
252
252
  * Canonical plugin name for `@kubb/plugin-fetch`. Used for driver lookups and cross-plugin
253
253
  * dependency references.
@@ -275,6 +275,6 @@ export declare const pluginFetchName = "plugin-fetch";
275
275
  * })
276
276
  * ```
277
277
  */
278
- export declare const pluginFetch: import("kubb/kit").PluginFactory<PluginFetch>;
278
+ export declare const pluginFetch: import("@kubb/kit").PluginFactory<PluginFetch>;
279
279
  export { type Options, type PluginFetch, type ResolvedOptions, type ResolverClient, pluginFetch as default };
280
280
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { Diagnostics, Resolver, Url, addGenerator, ast, camelCase, createResolver, defineExtension, defineGenerator, injectFile, macroSimplifyUnion, pascalCase, setMacros, setResolver, useConfig } from "kubb/kit";
1
+ import { Diagnostics, Resolver, Url, addGenerator, ast, camelCase, createResolver, defineExtension, defineGenerator, injectFile, macroSimplifyUnion, pascalCase, setMacros, setResolver, useConfig } from "@kubb/kit";
2
2
  import path from "node:path";
3
3
  import { pluginZodName } from "@kubb/plugin-zod";
4
- import { File, Function, jsxRenderer } from "kubb/jsx";
4
+ import { File, Function, jsxRenderer } from "@kubb/renderer-jsx";
5
5
  import { createFunctionParameter, createFunctionParameters, functionPrinter, pluginTsName } from "@kubb/plugin-ts";
6
- import { Fragment, jsx, jsxs } from "kubb/jsx/jsx-runtime";
6
+ import { Fragment, jsx, jsxs } from "@kubb/renderer-jsx/jsx-runtime";
7
7
  import { fileURLToPath } from "node:url";
8
8
  // ../../internals/shared/src/operation.ts
9
9
  /**
@@ -26,19 +26,19 @@ function operationFileEntry(node, name, extname = ".ts") {
26
26
  };
27
27
  }
28
28
  /**
29
- * Resolves a dependency plugin's generated file for `node.operationId`, cached in `cache` (the
30
- * current node's `ctx.cache`) under the resolver's own plugin name. Several dependents reading the
29
+ * Resolves a dependency plugin's generated file for `node.operationId`, cached in `memo` (the
30
+ * build's `ctx.memo`) under the resolver's own plugin name and the operation. Several dependents reading the
31
31
  * same dependency for the same operation in one pass (a query plugin's several hook generators, the
32
32
  * MCP handler, ...) share one computed name and path instead of each calling `resolver.file` again.
33
33
  *
34
34
  * @example Cache `plugin-ts`'s file for the current operation
35
35
  * ```ts
36
- * const fileTs = resolveDependencyOperationFile({ cache: ctx.cache, node, resolver: tsResolver, root, output })
36
+ * const fileTs = resolveDependencyOperationFile({ memo: ctx.memo, node, resolver: tsResolver, root, output })
37
37
  * ```
38
38
  */
39
39
  function resolveDependencyOperationFile(options) {
40
- const { cache, node, resolver, root, output, group } = options;
41
- return cache.ensureItem(`${resolver.pluginName}:operationFile`, () => resolver.file({
40
+ const { memo, node, resolver, root, output, group } = options;
41
+ return memo(`${resolver.pluginName}:operationFile:${node.operationId}`, () => resolver.file({
42
42
  ...operationFileEntry(node, node.operationId),
43
43
  root,
44
44
  output,
@@ -980,7 +980,7 @@ function createClientGenerator(name) {
980
980
  group: group ?? void 0
981
981
  }),
982
982
  fileTypes: resolveDependencyOperationFile({
983
- cache: ctx.cache,
983
+ memo: ctx.memo,
984
984
  node,
985
985
  resolver: types.resolver,
986
986
  root,
@@ -1485,7 +1485,7 @@ var compatibility = {
1485
1485
  "node": ">=22.22"
1486
1486
  };
1487
1487
  // package.json
1488
- var version = "5.11.0-canary.20261029T124214";
1488
+ var version = "5.11.0";
1489
1489
  // src/templates.ts
1490
1490
  /** Absolute path to the fetch client template, copied into `.kubb/client.ts`. */
1491
1491
  const fetchClientTemplatePath = fileURLToPath(new URL("../templates/fetch.ts", import.meta.url));