@kubb/core 5.0.0-alpha.73 → 5.0.0-alpha.74

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/core",
3
- "version": "5.0.0-alpha.73",
3
+ "version": "5.0.0-alpha.74",
4
4
  "description": "Core functionality for Kubb's plugin-based code generation system, providing the foundation for transforming OpenAPI specifications.",
5
5
  "keywords": [
6
6
  "ast",
@@ -64,16 +64,16 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "fflate": "^0.8.2",
67
- "tinyexec": "^1.1.1",
68
- "@kubb/ast": "5.0.0-alpha.73"
67
+ "tinyexec": "^1.1.2",
68
+ "@kubb/ast": "5.0.0-alpha.74"
69
69
  },
70
70
  "devDependencies": {
71
71
  "p-limit": "^7.3.0",
72
72
  "@internals/utils": "0.0.0",
73
- "@kubb/renderer-jsx": "5.0.0-alpha.73"
73
+ "@kubb/renderer-jsx": "5.0.0-alpha.74"
74
74
  },
75
75
  "peerDependencies": {
76
- "@kubb/renderer-jsx": "5.0.0-alpha.73"
76
+ "@kubb/renderer-jsx": "5.0.0-alpha.74"
77
77
  },
78
78
  "size-limit": [
79
79
  {
package/src/Kubb.ts CHANGED
@@ -30,49 +30,45 @@ import type {
30
30
  } from './types'
31
31
 
32
32
  /**
33
- * The instance returned by {@link createKubb}.
33
+ * Kubb code generation instance returned by {@link createKubb}.
34
+ *
35
+ * Use this when orchestrating multiple builds, inspecting plugin timings, or integrating Kubb into a larger toolchain.
36
+ * For a single one-off build, chain directly: `await createKubb(config).build()`.
34
37
  */
35
38
  export type Kubb = {
36
39
  /**
37
- * The shared event emitter. Attach listeners here before calling `setup()` or `build()`.
40
+ * Shared event emitter for lifecycle and status events. Attach listeners before calling `setup()` or `build()`.
38
41
  */
39
42
  readonly hooks: AsyncEventEmitter<KubbHooks>
40
43
  /**
41
- * Raw generated source, keyed by absolute file path.
42
- * Populated after a successful `build()` or `safeBuild()` call.
44
+ * Generated source code keyed by absolute file path. Available after `build()` or `safeBuild()` completes.
43
45
  */
44
46
  readonly sources: Map<string, string>
45
47
  /**
46
- * The plugin driver. Available after `setup()` has been called.
48
+ * Plugin driver managing all plugins. Available after `setup()` completes.
47
49
  */
48
50
  readonly driver: PluginDriver | undefined
49
51
  /**
50
- * The resolved config with applied defaults. Available after `setup()` has been called.
52
+ * Resolved configuration with defaults applied. Available after `setup()` completes.
51
53
  */
52
54
  readonly config: Config | undefined
53
55
  /**
54
- * Initializes all Kubb infrastructure: validates input, applies config defaults,
55
- * runs the adapter, and creates the PluginDriver.
56
- *
57
- * Calling `build()` or `safeBuild()` without calling `setup()` first will
58
- * automatically invoke `setup()` before proceeding.
56
+ * Resolves config and initializes the driver. `build()` calls this automatically.
59
57
  */
60
58
  setup(): Promise<void>
61
59
  /**
62
- * Runs a full Kubb build and throws on any error or plugin failure.
63
- * Automatically calls `setup()` if it has not been called yet.
60
+ * Runs the full pipeline and throws on any plugin error. Automatically calls `setup()` if needed.
64
61
  */
65
62
  build(): Promise<BuildOutput>
66
63
  /**
67
- * Runs a full Kubb build and captures errors instead of throwing.
68
- * Automatically calls `setup()` if it has not been called yet.
64
+ * Runs the full pipeline and captures errors in `BuildOutput` instead of throwing. Automatically calls `setup()` if needed.
69
65
  */
70
66
  safeBuild(): Promise<BuildOutput>
71
67
  }
72
68
 
73
69
  /**
74
- * Events emitted during the Kubb code generation lifecycle.
75
- * These events can be listened to for logging, progress tracking, and custom integrations.
70
+ * Lifecycle events emitted during Kubb code generation.
71
+ * Use these for logging, progress tracking, and custom integrations.
76
72
  *
77
73
  * @example
78
74
  * ```typescript
@@ -92,76 +88,74 @@ export type Kubb = {
92
88
  */
93
89
  export interface KubbHooks {
94
90
  /**
95
- * Emitted at the beginning of the Kubb lifecycle, before any code generation starts.
91
+ * Fires at the start of the Kubb lifecycle, before code generation begins.
96
92
  */
97
93
  'kubb:lifecycle:start': [ctx: KubbLifecycleStartContext]
98
94
  /**
99
- * Emitted at the end of the Kubb lifecycle, after all code generation is complete.
95
+ * Fires at the end of the Kubb lifecycle, after all code generation completes.
100
96
  */
101
97
  'kubb:lifecycle:end': []
102
98
 
103
99
  /**
104
- * Emitted when configuration loading starts.
100
+ * Fires when configuration loading starts.
105
101
  */
106
102
  'kubb:config:start': []
107
103
  /**
108
- * Emitted when configuration loading is complete.
104
+ * Fires when configuration loading completes.
109
105
  */
110
106
  'kubb:config:end': [ctx: KubbConfigEndContext]
111
107
 
112
108
  /**
113
- * Emitted when code generation phase starts.
109
+ * Fires when code generation starts.
114
110
  */
115
111
  'kubb:generation:start': [ctx: KubbGenerationStartContext]
116
112
  /**
117
- * Emitted when code generation phase completes.
113
+ * Fires when code generation completes.
118
114
  */
119
115
  'kubb:generation:end': [ctx: KubbGenerationEndContext]
120
116
  /**
121
- * Emitted with a summary of the generation results.
122
- * Contains summary lines, title, and success status.
117
+ * Fires with a generation summary including summary lines, title, and success status.
123
118
  */
124
119
  'kubb:generation:summary': [ctx: KubbGenerationSummaryContext]
125
120
 
126
121
  /**
127
- * Emitted when code formatting starts (e.g., running Biome or Prettier).
122
+ * Fires when code formatting starts (e.g., Biome or Prettier).
128
123
  */
129
124
  'kubb:format:start': []
130
125
  /**
131
- * Emitted when code formatting completes.
126
+ * Fires when code formatting completes.
132
127
  */
133
128
  'kubb:format:end': []
134
129
 
135
130
  /**
136
- * Emitted when linting starts.
131
+ * Fires when linting starts.
137
132
  */
138
133
  'kubb:lint:start': []
139
134
  /**
140
- * Emitted when linting completes.
135
+ * Fires when linting completes.
141
136
  */
142
137
  'kubb:lint:end': []
143
138
 
144
139
  /**
145
- * Emitted when plugin hooks execution starts.
140
+ * Fires when plugin hooks execution starts.
146
141
  */
147
142
  'kubb:hooks:start': []
148
143
  /**
149
- * Emitted when plugin hooks execution completes.
144
+ * Fires when plugin hooks execution completes.
150
145
  */
151
146
  'kubb:hooks:end': []
152
147
 
153
148
  /**
154
- * Emitted when a single hook execution starts (e.g., format or lint).
155
- * The callback should be invoked when the command completes.
149
+ * Fires when a single hook executes (e.g., format or lint). The callback is invoked when the command finishes.
156
150
  */
157
151
  'kubb:hook:start': [ctx: KubbHookStartContext]
158
152
  /**
159
- * Emitted when a single hook execution completes.
153
+ * Fires when a single hook execution completes.
160
154
  */
161
155
  'kubb:hook:end': [ctx: KubbHookEndContext]
162
156
 
163
157
  /**
164
- * Emitted when a new version of Kubb is available.
158
+ * Fires when a new Kubb version is available.
165
159
  */
166
160
  'kubb:version:new': [ctx: KubbVersionNewContext]
167
161
 
@@ -170,7 +164,7 @@ export interface KubbHooks {
170
164
  */
171
165
  'kubb:info': [ctx: KubbInfoContext]
172
166
  /**
173
- * Error event. Emitted when an error occurs during code generation.
167
+ * Error event, fired when an error occurs during generation.
174
168
  */
175
169
  'kubb:error': [ctx: KubbErrorContext]
176
170
  /**
@@ -182,81 +176,60 @@ export interface KubbHooks {
182
176
  */
183
177
  'kubb:warn': [ctx: KubbWarnContext]
184
178
  /**
185
- * Debug event for detailed logging.
186
- * Contains timestamp, log messages, and optional filename.
179
+ * Debug event for detailed logging with timestamp and optional filename.
187
180
  */
188
181
  'kubb:debug': [ctx: KubbDebugContext]
189
182
 
190
183
  /**
191
- * Emitted when file processing starts.
192
- * Contains the list of files to be processed.
184
+ * Fires when file processing starts with the list of files to process.
193
185
  */
194
186
  'kubb:files:processing:start': [ctx: KubbFilesProcessingStartContext]
195
187
  /**
196
- * Emitted for each file being processed, providing progress updates.
197
- * Contains processed count, total count, percentage, and file details.
188
+ * Fires for each file with progress updates: processed count, total, percentage, and file details.
198
189
  */
199
190
  'kubb:file:processing:update': [ctx: KubbFileProcessingUpdateContext]
200
191
  /**
201
- * Emitted when file processing completes.
202
- * Contains the list of processed files.
192
+ * Fires when file processing completes with the list of processed files.
203
193
  */
204
194
  'kubb:files:processing:end': [ctx: KubbFilesProcessingEndContext]
205
195
 
206
196
  /**
207
- * Emitted when a plugin starts executing.
197
+ * Fires when a plugin starts execution.
208
198
  */
209
199
  'kubb:plugin:start': [ctx: KubbPluginStartContext]
210
200
  /**
211
- * Emitted when a plugin completes execution.
212
- * Duration in ms.
201
+ * Fires when a plugin completes execution. Duration measured in milliseconds.
213
202
  */
214
203
  'kubb:plugin:end': [ctx: KubbPluginEndContext]
215
204
 
216
205
  /**
217
- * Fired once — before any plugin's `buildStart` runs so that hook-style plugins
218
- * can register generators, configure resolvers/transformers/renderers, or inject
219
- * extra files. All `kubb:plugin:setup` handlers registered via `definePlugin` receive
220
- * a plugin-specific context (with the correct `addGenerator` closure).
221
- * External tooling can observe this event via `hooks.on('kubb:plugin:setup', …)`.
206
+ * Fires once before plugins execute allowing plugins to register generators, configure resolvers/transformers/renderers, or inject files.
222
207
  */
223
208
  'kubb:plugin:setup': [ctx: KubbPluginSetupContext]
224
209
  /**
225
- * Fired immediately before the plugin execution loop begins.
226
- * The adapter has already parsed the source and `inputNode` is available.
210
+ * Fires before the plugin execution loop begins. The adapter has already parsed the source and `inputNode` is available.
227
211
  */
228
212
  'kubb:build:start': [ctx: KubbBuildStartContext]
229
213
  /**
230
- * Fired after all plugins have run and all per-plugin barrels have been generated,
231
- * but BEFORE files are written to disk.
232
- * Use this event to inject final files (e.g. a root barrel) that must be persisted
233
- * in the same write pass as the plugin output.
214
+ * Fires after all plugins run and per-plugin barrels generate, but before files write to disk.
215
+ * Use this to inject final files that must persist in the same write pass as plugin output.
234
216
  */
235
217
  'kubb:plugins:end': [ctx: KubbPluginsEndContext]
236
218
  /**
237
- * Fired after all files have been written to disk.
219
+ * Fires after all files write to disk.
238
220
  */
239
221
  'kubb:build:end': [ctx: KubbBuildEndContext]
240
222
 
241
223
  /**
242
- * Emitted for each schema node during the AST walk.
243
- * Generator listeners registered via `addGenerator()` in `kubb:plugin:setup` respond to this event.
244
- * The `ctx.plugin.name` identifies which plugin is driving the current walk.
245
- * `ctx.options` carries the per-node resolved options (after exclude/include/override).
224
+ * Fires for each schema node during AST traversal. Generator listeners respond to this.
246
225
  */
247
226
  'kubb:generate:schema': [node: SchemaNode, ctx: GeneratorContext]
248
227
  /**
249
- * Emitted for each operation node during the AST walk.
250
- * Generator listeners registered via `addGenerator()` in `kubb:plugin:setup` respond to this event.
251
- * The `ctx.plugin.name` identifies which plugin is driving the current walk.
252
- * `ctx.options` carries the per-node resolved options (after exclude/include/override).
228
+ * Fires for each operation node during AST traversal. Generator listeners respond to this.
253
229
  */
254
230
  'kubb:generate:operation': [node: OperationNode, ctx: GeneratorContext]
255
231
  /**
256
- * Emitted once after all operations have been walked, with the full collected array.
257
- * Generator listeners with an `operations()` method respond to this event.
258
- * The `ctx.plugin.name` identifies which plugin is driving the current walk.
259
- * `ctx.options` carries the plugin-level resolved options for the batch call.
232
+ * Fires once after all operations traverse with the full collected array. Batch generator listeners respond to this.
260
233
  */
261
234
  'kubb:generate:operations': [nodes: Array<OperationNode>, ctx: GeneratorContext]
262
235
  }
@@ -1,24 +1,31 @@
1
1
  import type { Adapter, AdapterFactoryOptions } from './types.ts'
2
2
 
3
- /**
4
- * Builder type for an {@link Adapter} — takes options and returns the adapter instance.
5
- */
6
3
  type AdapterBuilder<T extends AdapterFactoryOptions> = (options: T['options']) => Adapter<T>
7
4
 
8
5
  /**
9
- * Creates an adapter factory. Call the returned function with optional options to get the adapter instance.
6
+ * Factory for implementing custom adapters that translate non-OpenAPI specs into Kubb's AST.
7
+ *
8
+ * Use this to support GraphQL schemas, gRPC definitions, AsyncAPI, or custom domain-specific languages.
9
+ * Built-in adapters include `@kubb/adapter-oas` for OpenAPI and Swagger documents.
10
+ *
11
+ * @note Adapters must parse their input format to Kubb's `InputNode` structure.
10
12
  *
11
13
  * @example
14
+ * ```ts
12
15
  * export const myAdapter = createAdapter<MyAdapter>((options) => {
13
16
  * return {
14
17
  * name: 'my-adapter',
15
18
  * options,
16
- * async parse(source) { ... },
19
+ * async parse(source) {
20
+ * // Transform source format to InputNode
21
+ * return { ... }
22
+ * },
17
23
  * }
18
24
  * })
19
25
  *
20
- * // instantiate
26
+ * // Instantiate:
21
27
  * const adapter = myAdapter({ validate: true })
28
+ * ```
22
29
  */
23
30
  export function createAdapter<T extends AdapterFactoryOptions = AdapterFactoryOptions>(build: AdapterBuilder<T>): (options?: T['options']) => Adapter<T> {
24
31
  return (options) => build(options ?? ({} as T['options']))
@@ -34,9 +34,17 @@ export type Storage = {
34
34
  }
35
35
 
36
36
  /**
37
- * Creates a storage factory. Call the returned function with optional options to get the storage instance.
37
+ * Factory for implementing custom storage backends that control where generated files are written.
38
+ *
39
+ * Takes a builder function `(options: TOptions) => Storage` and returns a factory `(options?: TOptions) => Storage`.
40
+ * Kubb provides filesystem and in-memory implementations out of the box.
41
+ *
42
+ * @note Call the returned factory with optional options to instantiate the storage adapter.
38
43
  *
39
44
  * @example
45
+ * ```ts
46
+ * import { createStorage } from '@kubb/core'
47
+ *
40
48
  * export const memoryStorage = createStorage(() => {
41
49
  * const store = new Map<string, string>()
42
50
  * return {
@@ -52,6 +60,10 @@ export type Storage = {
52
60
  * async clear(base) { if (!base) store.clear() },
53
61
  * }
54
62
  * })
63
+ *
64
+ * // Instantiate:
65
+ * const storage = memoryStorage()
66
+ * ```
55
67
  */
56
68
  export function createStorage<TOptions = Record<string, never>>(build: (options: TOptions) => Storage): (options?: TOptions) => Storage {
57
69
  return (options) => build(options ?? ({} as TOptions))
@@ -6,33 +6,26 @@ import type { GeneratorContext, PluginFactoryOptions } from './types.ts'
6
6
  export type { GeneratorContext } from './types.ts'
7
7
 
8
8
  /**
9
- * A generator is a named object with optional `schema`, `operation`, and `operations`
10
- * methods. Each method receives the AST node as the first argument and a typed
11
- * `ctx` object as the second, giving access to `ctx.config`, `ctx.resolver`,
12
- * `ctx.adapter`, `ctx.options`, `ctx.upsertFile`, etc.
9
+ * Declares a named generator unit that walks the AST and emits files.
13
10
  *
14
- * Generators that return renderer elements (e.g. JSX) must declare a `renderer`
15
- * factory so that core knows how to process the output without coupling core
16
- * to any specific renderer package.
11
+ * Each method (`schema`, `operation`, `operations`) is called for the matching node type.
12
+ * Each method returns `TElement | Array<FileNode> | void`. JSX-based generators require a `renderer` factory.
13
+ * Return `Array<FileNode>` directly or call `ctx.upsertFile()` manually and return `void` to bypass rendering.
17
14
  *
18
- * Return a renderer element, an array of `FileNode`, or `void` to handle file
19
- * writing manually via `ctx.upsertFile`.
15
+ * @note Generators are consumed by plugins and registered via `ctx.addGenerator()` in `kubb:plugin:setup`.
20
16
  *
21
17
  * @example
22
18
  * ```ts
19
+ * import { defineGenerator } from '@kubb/core'
23
20
  * import { jsxRenderer } from '@kubb/renderer-jsx'
24
21
  *
25
- * export const typeGenerator = defineGenerator<PluginTs>({
22
+ * export const typeGenerator = defineGenerator({
26
23
  * name: 'typescript',
27
24
  * renderer: jsxRenderer,
28
25
  * schema(node, ctx) {
29
26
  * const { adapter, resolver, root, options } = ctx
30
27
  * return <File ...><Type node={node} resolver={resolver} /></File>
31
28
  * },
32
- * operation(node, ctx) {
33
- * const { options } = ctx
34
- * return <File ...><OperationType node={node} /></File>
35
- * },
36
29
  * })
37
30
  * ```
38
31
  */
@@ -22,14 +22,17 @@ export type Middleware = {
22
22
  }
23
23
 
24
24
  /**
25
- * Creates a middleware factory using the hook-style (`hooks:`) API.
25
+ * Creates a middleware factory using the hook-style `hooks` API.
26
26
  *
27
- * Mirrors `definePlugin`: the factory is called with optional options and returns a
28
- * fresh `Middleware` instance. Placing per-build state (e.g. accumulators) inside the
29
- * factory closure ensures each `createKubb` invocation gets its own isolated instance.
27
+ * Middleware handlers fire after all plugin handlers for any given event, making them ideal for post-processing, logging, and auditing.
28
+ * Per-build state (such as accumulators) belongs inside the factory closure so each `createKubb` invocation gets its own isolated instance.
29
+ *
30
+ * @note The factory can accept typed options. See examples for using options and per-build state patterns.
30
31
  *
31
32
  * @example
32
33
  * ```ts
34
+ * import { defineMiddleware } from '@kubb/core'
35
+ *
33
36
  * // Stateless middleware
34
37
  * export const logMiddleware = defineMiddleware(() => ({
35
38
  * name: 'log-middleware',
@@ -41,10 +44,10 @@ export type Middleware = {
41
44
  * }))
42
45
  *
43
46
  * // Middleware with options and per-build state
44
- * export const myMiddleware = defineMiddleware((options: { prefix: string } = { prefix: '' }) => {
47
+ * export const prefixMiddleware = defineMiddleware((options: { prefix: string } = { prefix: '' }) => {
45
48
  * const seen = new Set<string>()
46
49
  * return {
47
- * name: 'my-middleware',
50
+ * name: 'prefix-middleware',
48
51
  * hooks: {
49
52
  * 'kubb:plugin:end'({ plugin }) {
50
53
  * seen.add(`${options.prefix}${plugin.name}`)
@@ -52,11 +55,6 @@ export type Middleware = {
52
55
  * },
53
56
  * }
54
57
  * })
55
- *
56
- * // Usage in kubb.config.ts:
57
- * export default defineConfig({
58
- * middleware: [logMiddleware(), myMiddleware({ prefix: 'pfx:' })],
59
- * })
60
58
  * ```
61
59
  */
62
60
  export function defineMiddleware<TOptions extends object = object>(factory: (options: TOptions) => Middleware): (options?: TOptions) => Middleware {
@@ -21,10 +21,9 @@ export type Parser<TMeta extends object = any> = {
21
21
  }
22
22
 
23
23
  /**
24
- * Defines a parser with type safety.
24
+ * Defines a parser with type safety. Creates parsers that transform generated files to strings based on their extension.
25
25
  *
26
- * Use this function to create parsers that transform generated files to strings
27
- * based on their extension.
26
+ * @note Call the returned factory with optional options to instantiate the parser.
28
27
  *
29
28
  * @example
30
29
  * ```ts
@@ -54,23 +54,23 @@ export function isPlugin(plugin: unknown): plugin is Plugin {
54
54
  }
55
55
 
56
56
  /**
57
- * Creates a plugin factory using the hook-style (`hooks:`) API.
57
+ * Wraps a factory function and returns a typed `Plugin` with lifecycle handlers grouped under `hooks`.
58
58
  *
59
- * The returned factory is called with optional options and produces a `Plugin`
60
- * that coexists with plugins created via the legacy `createPlugin` API in the same
61
- * `kubb.config.ts`.
59
+ * Handlers live in a single `hooks` object (inspired by Astro integrations).
60
+ * All lifecycle events from `KubbHooks` are available for subscription.
62
61
  *
63
- * Lifecycle handlers are registered on the `PluginDriver`'s `AsyncEventEmitter`, enabling
64
- * both the plugin's own handlers and external tooling (CLI, devtools) to observe every event.
62
+ * @note For real plugins, use a `PluginFactoryOptions` type parameter to get type-safe context in `kubb:plugin:setup`.
63
+ * Plugin names should follow the convention `plugin-<feature>` (e.g., `plugin-react-query`, `plugin-zod`).
65
64
  *
66
65
  * @example
67
66
  * ```ts
68
- * // With PluginFactoryOptions (recommended for real plugins)
69
- * export const pluginTs = definePlugin<PluginTs>((options) => ({
67
+ * import { definePlugin } from '@kubb/core'
68
+ *
69
+ * export const pluginTs = definePlugin((options: { prefix?: string } = {}) => ({
70
70
  * name: 'plugin-ts',
71
71
  * hooks: {
72
72
  * 'kubb:plugin:setup'(ctx) {
73
- * ctx.setResolver(resolverTs) // typed as Partial<ResolverTs>
73
+ * ctx.setResolver(resolverTs)
74
74
  * },
75
75
  * },
76
76
  * }))
package/src/mocks.ts CHANGED
@@ -7,7 +7,8 @@ import { applyHookResult } from './renderNode.ts'
7
7
  import type { Adapter, AdapterFactoryOptions, Config, Generator, GeneratorContext, NormalizedPlugin, PluginFactoryOptions } from './types.ts'
8
8
 
9
9
  /**
10
- * Creates a minimal `PluginDriver` mock suitable for unit tests.
10
+
11
+ * Creates a minimal `PluginDriver` mock for unit tests.
11
12
  */
12
13
  export function createMockedPluginDriver(options: { name?: string; plugin?: NormalizedPlugin; config?: Config } = {}): PluginDriver {
13
14
  return {
@@ -26,10 +27,9 @@ export function createMockedPluginDriver(options: { name?: string; plugin?: Norm
26
27
  }
27
28
 
28
29
  /**
29
- * Creates a minimal `Adapter` mock suitable for unit tests.
30
- *
31
- * - `parse` returns an empty `InputNode` by default; override via `options.parse`.
32
- * - `getImports` returns `[]` by default (single-file mode, no cross-file imports).
30
+ * Creates a minimal `Adapter` mock for unit tests.
31
+ * `parse` returns an empty `InputNode` by default; override via `options.parse`.
32
+ * `getImports` returns `[]` by default.
33
33
  */
34
34
  export function createMockedAdapter<TOptions extends AdapterFactoryOptions = AdapterFactoryOptions>(
35
35
  options: {
@@ -51,7 +51,7 @@ export function createMockedAdapter<TOptions extends AdapterFactoryOptions = Ada
51
51
  }
52
52
 
53
53
  /**
54
- * Creates a minimal plugin mock suitable for unit tests.
54
+ * Creates a minimal plugin mock for unit tests.
55
55
  *
56
56
  * @example
57
57
  * const plugin = createMockedPlugin<PluginTs>({ name: '@kubb/plugin-ts', options })