@kubb/core 5.0.0-beta.74 → 5.0.0-beta.76

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.
@@ -43,15 +43,6 @@ declare class AsyncEventEmitter<TEvents extends { [K in keyof TEvents]: Array<un
43
43
  * ```
44
44
  */
45
45
  on<TEventName extends keyof TEvents & string>(eventName: TEventName, handler: AsyncListener<TEvents[TEventName]>): void;
46
- /**
47
- * Registers a one-shot listener that removes itself after the first invocation.
48
- *
49
- * @example
50
- * ```ts
51
- * emitter.onOnce('build', async (name) => { console.log(name) })
52
- * ```
53
- */
54
- onOnce<TEventName extends keyof TEvents & string>(eventName: TEventName, handler: AsyncListener<TEvents[TEventName]>): void;
55
46
  /**
56
47
  * Removes a previously registered listener.
57
48
  *
@@ -81,10 +72,6 @@ declare class AsyncEventEmitter<TEvents extends { [K in keyof TEvents]: Array<un
81
72
  * ```
82
73
  */
83
74
  setMaxListeners(max: number): void;
84
- /**
85
- * Returns the current per-event listener ceiling.
86
- */
87
- getMaxListeners(): number;
88
75
  /**
89
76
  * Removes all listeners from every event channel.
90
77
  *
@@ -1120,17 +1107,16 @@ type KubbPluginSetupContext<TFactory extends PluginFactoryOptions = PluginFactor
1120
1107
  * Register one or more generators dynamically. Generators fire during the AST walk
1121
1108
  * (schema/operation/operations) just like generators declared statically on `createPlugin`.
1122
1109
  *
1123
- * Pass generators as separate arguments or as arrays. Arrays are flattened, so spreading an
1124
- * existing list is optional.
1110
+ * Pass generators as separate arguments. Spread an existing list to register it in one call.
1125
1111
  *
1126
1112
  * @example
1127
1113
  * ```ts
1128
1114
  * ctx.addGenerator(myGenerator)
1129
1115
  * ctx.addGenerator(schemaGenerator, operationGenerator)
1130
- * ctx.addGenerator(selectedGenerators)
1116
+ * ctx.addGenerator(...selectedGenerators)
1131
1117
  * ```
1132
1118
  */
1133
- addGenerator<TElement = unknown>(...generators: Array<Generator<TFactory, TElement> | Array<Generator<TFactory, TElement>>>): void;
1119
+ addGenerator<TElement = unknown>(...generators: Array<Generator<TFactory, TElement>>): void;
1134
1120
  /**
1135
1121
  * Set or override the resolver for this plugin.
1136
1122
  * The resolver controls file naming and path resolution.
@@ -2899,4 +2885,4 @@ declare class Diagnostics {
2899
2885
  }
2900
2886
  //#endregion
2901
2887
  export { KubbPluginSetupContext as $, KubbHookStartContext as A, Adapter as At, ParsedFile as B, KubbFilesProcessingEndContext as C, GenerationResult as Ct, KubbGenerationStartContext as D, UserReporter as Dt, KubbGenerationEndContext as E, ReporterName as Et, KubbSuccessContext as F, Generator as G, createKubb as H, KubbWarnContext as I, KubbDriver as J, GeneratorContext as K, PossibleConfig as L, KubbInfoContext as M, AdapterSource as Mt, KubbLifecycleStartContext as N, createAdapter as Nt, KubbHookEndContext as O, createReporter as Ot, KubbPluginsEndContext as P, AsyncEventEmitter as Pt, KubbPluginEndContext as Q, UserConfig as R, KubbFileProcessingUpdate as S, createStorage as St, KubbFilesProcessingUpdateContext as T, ReporterContext as Tt, Parser as U, Kubb$1 as V, defineParser as W, Group as X, Exclude$1 as Y, Include as Z, InputPath as _, defineResolver as _t, DiagnosticLocation as a, Override as at, KubbDiagnosticContext as b, createRenderer as bt, PerformanceDiagnostic as c, definePlugin as ct, SerializedDiagnostic as d, ResolveBannerFile as dt, KubbPluginStartContext as et, UpdateDiagnostic as f, ResolveOptionsContext as ft, InputData as g, ResolverPathParams as gt, Config as h, ResolverFileParams as ht, DiagnosticKind as i, OutputOptions as it, KubbHooks as j, AdapterFactoryOptions as jt, KubbHookLineContext as k, logLevel as kt, ProblemCode as l, BannerMeta as lt, CLIOptions as m, ResolverContext as mt, DiagnosticByCode as n, Output as nt, DiagnosticSeverity as o, Plugin as ot, BuildOutput as p, Resolver as pt, defineGenerator as q, DiagnosticDoc as r, OutputMode as rt, Diagnostics as s, PluginFactoryOptions as st, Diagnostic as t, NormalizedPlugin as tt, ProblemDiagnostic as u, ResolveBannerContext as ut, KubbBuildEndContext as v, Renderer as vt, KubbFilesProcessingStartContext as w, Reporter as wt, KubbErrorContext as x, Storage as xt, KubbBuildStartContext as y, RendererFactory as yt, FileProcessorHooks as z };
2902
- //# sourceMappingURL=diagnostics-uXrHtPzQ.d.ts.map
2888
+ //# sourceMappingURL=diagnostics-CQYd4UQZ.d.ts.map
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_memoryStorage = require("./memoryStorage-CfycFGzX.cjs");
2
+ const require_memoryStorage = require("./memoryStorage-Bk7RHgGj.cjs");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_util = require("node:util");
5
5
  let node_fs_promises = require("node:fs/promises");
@@ -302,16 +302,6 @@ function toParamsObject(path, { replacer, casing } = {}) {
302
302
  * Helpers for OpenAPI/Swagger paths, plus a thin wrapper over the native `URL`.
303
303
  */
304
304
  var Url = class Url {
305
- /**
306
- * Reports whether `url` is a parseable absolute URL. Delegates to the native `URL.canParse`.
307
- *
308
- * @example
309
- * Url.canParse('https://petstore.swagger.io/v2') // true
310
- * Url.canParse('/pet/{petId}') // false
311
- */
312
- static canParse(url, base) {
313
- return URL.canParse(url, base);
314
- }
315
305
  /**
316
306
  * Converts an OpenAPI/Swagger path to Express-style colon syntax.
317
307
  *
@@ -406,7 +396,7 @@ function createAdapter(build) {
406
396
  /**
407
397
  * Docs major version, derived from the package version so the link tracks the published major.
408
398
  */
409
- const docsMajor = "5.0.0-beta.74".split(".")[0] ?? "5";
399
+ const docsMajor = "5.0.0-beta.76".split(".")[0] ?? "5";
410
400
  /**
411
401
  * Narrows a {@link Diagnostic} to the variant for `code`, or `null` when it does not match.
412
402
  *
@@ -2096,7 +2086,7 @@ function inputToAdapterSource(config) {
2096
2086
  type: "data",
2097
2087
  data: input.data
2098
2088
  };
2099
- if (Url.canParse(input.path)) return {
2089
+ if (URL.canParse(input.path)) return {
2100
2090
  type: "path",
2101
2091
  path: input.path
2102
2092
  };