@kubb/core 5.0.0-alpha.29 → 5.0.0-alpha.30

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,9 +1,8 @@
1
1
  import { t as __name } from "./chunk--u3MIqq1.js";
2
- import { $ as createStorage, A as PrinterFactoryOptions, B as ResolverPathParams, C as PluginLifecycle, D as Preset, E as PluginWithLifeCycle, F as ResolvePathOptions, G as UserPluginWithLifeCycle, H as UserGroup, I as ResolvePathParams, J as CoreGeneratorV2, K as UserResolver, L as Resolver, M as ResolveBannerContext, N as ResolveNameParams, O as Presets, P as ResolveOptionsContext, Q as Storage, R as ResolverContext, S as PluginFactoryOptions, T as PluginParameter, U as UserLogger, V as UserConfig, W as UserPlugin, X as ReactGeneratorV2, Y as Generator, Z as defineGenerator, _ as LoggerOptions, a as AdapterSource, b as Plugin, c as Config, d as Group, et as formatters, f as Include, g as LoggerContext, h as Logger, i as AdapterFactoryOptions, it as AsyncEventEmitter, j as PrinterPartial, k as Printer, l as DevtoolsOptions, m as InputPath, n as getMode, nt as logLevel, o as BarrelType, p as InputData, q as KubbEvents, r as Adapter, rt as PossiblePromise, s as CompatibilityPreset, t as PluginDriver, tt as linters, u as Exclude, v as Output, w as PluginLifecycleHooks, x as PluginContext, y as Override, z as ResolverFileParams } from "./PluginDriver-C6VX0skO.js";
2
+ import { $ as defineGenerator, A as Preset, B as Resolver, C as Plugin, D as PluginLifecycleHooks, E as PluginLifecycle, F as ResolveBannerContext, G as UserConfig, H as ResolverFileParams, I as ResolveNameParams, J as UserPlugin, K as UserGroup, L as ResolveOptionsContext, M as Printer, N as PrinterFactoryOptions, O as PluginParameter, P as PrinterPartial, Q as Generator, R as ResolvePathOptions, S as Override, T as PluginFactoryOptions, U as ResolverPathParams, V as ResolverContext, W as SchemaHook, X as UserResolver, Y as UserPluginWithLifeCycle, Z as KubbEvents, _ as LoggerContext, a as AdapterSource, at as logLevel, b as OperationsHook, c as Config, d as GeneratorContext, et as mergeGenerators, f as Group, g as Logger, h as InputPath, i as AdapterFactoryOptions, it as linters, j as Presets, k as PluginWithLifeCycle, l as DevtoolsOptions, m as InputData, n as getMode, nt as createStorage, o as BarrelType, ot as PossiblePromise, p as Include, q as UserLogger, r as Adapter, rt as formatters, s as CompatibilityPreset, st as AsyncEventEmitter, t as PluginDriver, tt as Storage, u as Exclude, v as LoggerOptions, w as PluginContext, x as Output, y as OperationHook, z as ResolvePathParams } from "./PluginDriver-D110FoJ-.js";
3
3
  import { composeTransformers, definePrinter } from "@kubb/ast";
4
- import { Node, OperationNode, RootNode, SchemaNode, Visitor } from "@kubb/ast/types";
4
+ import { Node, RootNode, Visitor } from "@kubb/ast/types";
5
5
  import { Fabric, FabricFile } from "@kubb/fabric-core/types";
6
- import { Fabric as Fabric$1 } from "@kubb/react-fabric/types";
7
6
 
8
7
  //#region ../../internals/utils/src/urlPath.d.ts
9
8
  type URLObject = {
@@ -289,10 +288,11 @@ type PluginBuilder<T extends PluginFactoryOptions = PluginFactoryOptions> = (opt
289
288
  * Creates a plugin factory. Call the returned function with optional options to get the plugin instance.
290
289
  *
291
290
  * @example
291
+ * ```ts
292
292
  * export const myPlugin = createPlugin<MyPlugin>((options) => {
293
293
  * return {
294
294
  * name: 'my-plugin',
295
- * options,
295
+ * get options() { return options },
296
296
  * resolvePath(baseName) { ... },
297
297
  * resolveName(name, type) { ... },
298
298
  * }
@@ -300,6 +300,7 @@ type PluginBuilder<T extends PluginFactoryOptions = PluginFactoryOptions> = (opt
300
300
  *
301
301
  * // instantiate
302
302
  * const plugin = myPlugin({ output: { path: 'src/gen' } })
303
+ * ```
303
304
  */
304
305
  declare function createPlugin<T extends PluginFactoryOptions = PluginFactoryOptions>(build: PluginBuilder<T>): (options?: T['options']) => UserPluginWithLifeCycle<T>;
305
306
  //#endregion
@@ -585,81 +586,6 @@ declare function defaultResolveFooter(node: RootNode | undefined, {
585
586
  */
586
587
  declare function defineResolver<T extends PluginFactoryOptions>(build: ResolverBuilder<T>): T['resolver'];
587
588
  //#endregion
588
- //#region src/renderNode.d.ts
589
- type BuildOperationsV2Options<TOptions extends PluginFactoryOptions> = {
590
- config: Config;
591
- fabric: Fabric$1;
592
- plugin: Plugin<TOptions>;
593
- Component: ReactGeneratorV2<TOptions>['Operations'] | undefined;
594
- adapter: Adapter;
595
- driver: PluginDriver;
596
- options: TOptions['resolvedOptions'];
597
- resolver: TOptions['resolver'];
598
- };
599
- /**
600
- * Renders a React component for a list of operation nodes (V2 generators).
601
- */
602
- declare function renderOperations<TOptions extends PluginFactoryOptions>(nodes: Array<OperationNode>, options: BuildOperationsV2Options<TOptions>): Promise<void>;
603
- type BuildOperationV2Options<TOptions extends PluginFactoryOptions> = {
604
- config: Config;
605
- fabric: Fabric$1;
606
- plugin: Plugin<TOptions>;
607
- Component: ReactGeneratorV2<TOptions>['Operation'] | undefined;
608
- adapter: Adapter;
609
- driver: PluginDriver;
610
- options: TOptions['resolvedOptions'];
611
- resolver: TOptions['resolver'];
612
- };
613
- /**
614
- * Renders a React component for a single operation node (V2 generators).
615
- */
616
- declare function renderOperation<TOptions extends PluginFactoryOptions>(node: OperationNode, options: BuildOperationV2Options<TOptions>): Promise<void>;
617
- type BuildSchemaV2Options<TOptions extends PluginFactoryOptions> = {
618
- config: Config;
619
- fabric: Fabric$1;
620
- plugin: Plugin<TOptions>;
621
- Component: ReactGeneratorV2<TOptions>['Schema'] | undefined;
622
- adapter: Adapter;
623
- driver: PluginDriver;
624
- options: TOptions['resolvedOptions'];
625
- resolver: TOptions['resolver'];
626
- };
627
- /**
628
- * Renders a React component for a single schema node (V2 generators).
629
- */
630
- declare function renderSchema<TOptions extends PluginFactoryOptions>(node: SchemaNode, options: BuildSchemaV2Options<TOptions>): Promise<void>;
631
- /**
632
- * Shared context passed to every `runGenerator*` helper.
633
- * Contains everything a generator needs to produce and write files.
634
- */
635
- type RunGeneratorContext<TOptions extends PluginFactoryOptions> = {
636
- generators: Array<Generator<TOptions>>;
637
- plugin: Plugin<TOptions>;
638
- resolver: TOptions['resolver'];
639
- exclude: Array<Exclude>;
640
- include: Array<Include> | undefined;
641
- override: Array<Override<TOptions['resolvedOptions']>>;
642
- fabric: Fabric$1;
643
- adapter: Adapter;
644
- config: Config;
645
- driver: PluginDriver;
646
- };
647
- /**
648
- * Dispatches a single schema node to all generators (react + core).
649
- * Resolves options per generator and skips excluded nodes.
650
- */
651
- declare function runGeneratorSchema<TOptions extends PluginFactoryOptions>(node: SchemaNode, ctx: RunGeneratorContext<TOptions>): Promise<void>;
652
- /**
653
- * Dispatches a single operation node to all generators (react + core).
654
- * Resolves options per generator and skips excluded nodes.
655
- */
656
- declare function runGeneratorOperation<TOptions extends PluginFactoryOptions>(node: OperationNode, ctx: RunGeneratorContext<TOptions>): Promise<void>;
657
- /**
658
- * Batch-dispatches all collected operation nodes to every generator (react + core).
659
- * Uses `plugin.options` directly — no per-node option resolution.
660
- */
661
- declare function runGeneratorOperations<TOptions extends PluginFactoryOptions>(nodes: Array<OperationNode>, ctx: Omit<RunGeneratorContext<TOptions>, 'exclude' | 'include' | 'override'>): Promise<void>;
662
- //#endregion
663
589
  //#region src/storages/fsStorage.d.ts
664
590
  /**
665
591
  * Built-in filesystem storage driver.
@@ -887,5 +813,5 @@ type DependencyVersion = string;
887
813
  */
888
814
  declare function satisfiesDependency(dependency: DependencyName | RegExp, version: DependencyVersion, cwd?: string): boolean;
889
815
  //#endregion
890
- export { Adapter, AdapterFactoryOptions, AdapterSource, AsyncEventEmitter, BarrelType, type CLIOptions, CompatibilityPreset, Config, type ConfigInput, CoreGeneratorV2, DevtoolsOptions, Exclude, type FileMetaBase, FunctionParams, type FunctionParamsAST, Generator, Group, Include, InputData, InputPath, KubbEvents, Logger, LoggerContext, LoggerOptions, Output, Override, Plugin, PluginContext, PluginDriver, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginParameter, PluginWithLifeCycle, Preset, Presets, Printer, PrinterFactoryOptions, PrinterPartial, ReactGeneratorV2, ResolveBannerContext, ResolveNameParams, ResolveOptionsContext, ResolvePathOptions, ResolvePathParams, Resolver, ResolverContext, ResolverFileParams, ResolverPathParams, Storage, URLPath, UserConfig, UserGroup, UserLogger, UserPlugin, UserPluginWithLifeCycle, UserResolver, build, build as default, buildDefaultBanner, composeTransformers, createAdapter, createPlugin, createStorage, defaultResolveBanner, defaultResolveFile, defaultResolveFooter, defaultResolveOptions, defaultResolvePath, defineConfig, defineGenerator, defineLogger, definePresets, definePrinter, defineResolver, detectFormatter, detectLinter, formatters, fsStorage, getBarrelFiles, getConfigs, getMode, getPreset, isInputPath, linters, logLevel, memoryStorage, renderOperation, renderOperations, renderSchema, runGeneratorOperation, runGeneratorOperations, runGeneratorSchema, safeBuild, satisfiesDependency, setup };
816
+ export { Adapter, AdapterFactoryOptions, AdapterSource, AsyncEventEmitter, BarrelType, type CLIOptions, CompatibilityPreset, Config, type ConfigInput, DevtoolsOptions, Exclude, type FileMetaBase, FunctionParams, type FunctionParamsAST, Generator, GeneratorContext, Group, Include, InputData, InputPath, KubbEvents, Logger, LoggerContext, LoggerOptions, OperationHook, OperationsHook, Output, Override, Plugin, PluginContext, PluginDriver, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginParameter, PluginWithLifeCycle, Preset, Presets, Printer, PrinterFactoryOptions, PrinterPartial, ResolveBannerContext, ResolveNameParams, ResolveOptionsContext, ResolvePathOptions, ResolvePathParams, Resolver, ResolverContext, ResolverFileParams, ResolverPathParams, SchemaHook, Storage, URLPath, UserConfig, UserGroup, UserLogger, UserPlugin, UserPluginWithLifeCycle, UserResolver, build, build as default, buildDefaultBanner, composeTransformers, createAdapter, createPlugin, createStorage, defaultResolveBanner, defaultResolveFile, defaultResolveFooter, defaultResolveOptions, defaultResolvePath, defineConfig, defineGenerator, defineLogger, definePresets, definePrinter, defineResolver, detectFormatter, detectLinter, formatters, fsStorage, getBarrelFiles, getConfigs, getMode, getPreset, isInputPath, linters, logLevel, memoryStorage, mergeGenerators, safeBuild, satisfiesDependency, setup };
891
817
  //# sourceMappingURL=index.d.ts.map