@kubb/plugin-faker 5.3.0-canary.20261029T093900 → 5.3.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,5 +1,5 @@
1
- import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "kubb/kit";
2
- import { KubbReactNode } from "kubb/jsx";
1
+ import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "@kubb/kit";
2
+ import { KubbReactNode } from "@kubb/renderer-jsx";
3
3
  /**
4
4
  * Resolver for Faker that provides naming methods for mock functions.
5
5
  *
@@ -245,7 +245,7 @@ export declare function Faker({ node, description, name, typeName, printer, canO
245
245
  * factory returns a value matching the corresponding TypeScript type from
246
246
  * `@kubb/plugin-ts`.
247
247
  */
248
- export declare const fakerGenerator: import("kubb/kit").Generator<PluginFaker, unknown>;
248
+ export declare const fakerGenerator: import("@kubb/kit").Generator<PluginFaker, unknown>;
249
249
  /**
250
250
  * Canonical plugin name for `@kubb/plugin-faker`. Used for driver lookups and
251
251
  * cross-plugin dependency references.
@@ -275,7 +275,7 @@ export declare const pluginFakerName = "plugin-faker";
275
275
  * })
276
276
  * ```
277
277
  */
278
- export declare const pluginFaker: import("kubb/kit").PluginFactory<PluginFaker>;
278
+ export declare const pluginFaker: import("@kubb/kit").PluginFactory<PluginFaker>;
279
279
  /**
280
280
  * Default resolver used by `@kubb/plugin-faker`. Decides the names and file
281
281
  * paths for every generated mock factory. Functions and files are prefixed
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "kubb/kit";
2
- import { KubbReactNode } from "kubb/jsx";
1
+ import { Exclude, Group, Include, Output, OutputOptions, Override, PluginType, Resolver, ResolverPatch, ast } from "@kubb/kit";
2
+ import { KubbReactNode } from "@kubb/renderer-jsx";
3
3
  /**
4
4
  * Resolver for Faker that provides naming methods for mock functions.
5
5
  *
@@ -245,7 +245,7 @@ export declare function Faker({ node, description, name, typeName, printer, canO
245
245
  * factory returns a value matching the corresponding TypeScript type from
246
246
  * `@kubb/plugin-ts`.
247
247
  */
248
- export declare const fakerGenerator: import("kubb/kit").Generator<PluginFaker, unknown>;
248
+ export declare const fakerGenerator: import("@kubb/kit").Generator<PluginFaker, unknown>;
249
249
  /**
250
250
  * Canonical plugin name for `@kubb/plugin-faker`. Used for driver lookups and
251
251
  * cross-plugin dependency references.
@@ -275,7 +275,7 @@ export declare const pluginFakerName = "plugin-faker";
275
275
  * })
276
276
  * ```
277
277
  */
278
- export declare const pluginFaker: import("kubb/kit").PluginFactory<PluginFaker>;
278
+ export declare const pluginFaker: import("@kubb/kit").PluginFactory<PluginFaker>;
279
279
  /**
280
280
  * Default resolver used by `@kubb/plugin-faker`. Decides the names and file
281
281
  * paths for every generated mock factory. Functions and files are prefixed
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { posix } from "node:path";
2
- import { Diagnostics, Resolver, addGenerator, ast, camelCase, containsCircularRef, createResolver, defineExtension, defineGenerator, setMacros, setResolver, syncSchemaRef } from "kubb/kit";
3
- import { File, Function, jsxRenderer } from "kubb/jsx";
4
- import { Fragment, jsx, jsxs } from "kubb/jsx/jsx-runtime";
2
+ import { Diagnostics, Resolver, addGenerator, ast, camelCase, containsCircularRef, createResolver, defineExtension, defineGenerator, setMacros, setResolver, syncSchemaRef } from "@kubb/kit";
3
+ import { File, Function, jsxRenderer } from "@kubb/renderer-jsx";
4
+ import { Fragment, jsx, jsxs } from "@kubb/renderer-jsx/jsx-runtime";
5
5
  import { buildParams, enumTypeName, pluginTsName } from "@kubb/plugin-ts";
6
6
  // ../../internals/utils/src/reserved.ts
7
7
  /**
@@ -587,19 +587,19 @@ function operationFileEntry(node, name, extname = ".ts") {
587
587
  };
588
588
  }
589
589
  /**
590
- * Resolves a dependency plugin's generated file for `node.operationId`, cached in `cache` (the
591
- * current node's `ctx.cache`) under the resolver's own plugin name. Several dependents reading the
590
+ * Resolves a dependency plugin's generated file for `node.operationId`, cached in `memo` (the
591
+ * build's `ctx.memo`) under the resolver's own plugin name and the operation. Several dependents reading the
592
592
  * same dependency for the same operation in one pass (a query plugin's several hook generators, the
593
593
  * MCP handler, ...) share one computed name and path instead of each calling `resolver.file` again.
594
594
  *
595
595
  * @example Cache `plugin-ts`'s file for the current operation
596
596
  * ```ts
597
- * const fileTs = resolveDependencyOperationFile({ cache: ctx.cache, node, resolver: tsResolver, root, output })
597
+ * const fileTs = resolveDependencyOperationFile({ memo: ctx.memo, node, resolver: tsResolver, root, output })
598
598
  * ```
599
599
  */
600
600
  function resolveDependencyOperationFile(options) {
601
- const { cache, node, resolver, root, output, group } = options;
602
- return cache.ensureItem(`${resolver.pluginName}:operationFile`, () => resolver.file({
601
+ const { memo, node, resolver, root, output, group } = options;
602
+ return memo(`${resolver.pluginName}:operationFile:${node.operationId}`, () => resolver.file({
603
603
  ...operationFileEntry(node, node.operationId),
604
604
  root,
605
605
  output,
@@ -1339,7 +1339,7 @@ const fakerGenerator = defineGenerator({
1339
1339
  group: group ?? void 0
1340
1340
  }),
1341
1341
  typeFile: resolveDependencyOperationFile({
1342
- cache: ctx.cache,
1342
+ memo: ctx.memo,
1343
1343
  node,
1344
1344
  resolver: tsResolver,
1345
1345
  root,
@@ -1476,7 +1476,7 @@ var compatibility = {
1476
1476
  "node": ">=22.22"
1477
1477
  };
1478
1478
  // package.json
1479
- var version = "5.3.0-canary.20261029T093900";
1479
+ var version = "5.3.0";
1480
1480
  // src/resolvers/resolverFaker.ts
1481
1481
  /**
1482
1482
  * Default resolver used by `@kubb/plugin-faker`. Decides the names and file