@kubb/core 5.0.0-beta.80 → 5.0.0-beta.82

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.
@@ -199,7 +199,8 @@ type AdapterBuilder<T extends AdapterFactoryOptions> = (options: T['options']) =
199
199
  *
200
200
  * @example
201
201
  * ```ts
202
- * import { createAdapter, ast, type AdapterFactoryOptions } from '@kubb/core'
202
+ * import { createAdapter, type AdapterFactoryOptions } from '@kubb/core'
203
+ * import { ast } from '@kubb/ast'
203
204
  *
204
205
  * type MyAdapter = AdapterFactoryOptions<'my-adapter', { validate?: boolean }>
205
206
  *
@@ -1668,7 +1669,7 @@ type Parser<TMeta extends object = object, TNode = unknown> = {
1668
1669
  * @example
1669
1670
  * ```ts
1670
1671
  * import { defineParser } from '@kubb/core'
1671
- * import { extractStringsFromNodes } from '@kubb/ast/utils'
1672
+ * import { extractStringsFromNodes } from '@kubb/ast'
1672
1673
  *
1673
1674
  * export const jsonParser = defineParser({
1674
1675
  * name: 'json',
@@ -2884,5 +2885,5 @@ declare class Diagnostics {
2884
2885
  static formatLines(diagnostic: Diagnostic): Array<string>;
2885
2886
  }
2886
2887
  //#endregion
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 };
2888
- //# sourceMappingURL=diagnostics-CQYd4UQZ.d.ts.map
2888
+ export { KubbPluginEndContext as $, KubbHookStartContext as A, logLevel as At, ParsedFile as B, KubbFilesProcessingEndContext as C, createStorage as Ct, KubbGenerationStartContext as D, ReporterName as Dt, KubbGenerationEndContext as E, ReporterContext as Et, KubbSuccessContext as F, AsyncEventEmitter as Ft, defineParser as G, Kubb$1 as H, KubbWarnContext as I, defineGenerator as J, Generator as K, PossibleConfig as L, KubbInfoContext as M, AdapterFactoryOptions as Mt, KubbLifecycleStartContext as N, AdapterSource as Nt, KubbHookEndContext as O, UserReporter as Ot, KubbPluginsEndContext as P, createAdapter as Pt, Include as Q, UserConfig as R, KubbFileProcessingUpdate as S, Storage as St, KubbFilesProcessingUpdateContext as T, Reporter as Tt, createKubb as U, CreateKubbOptions as V, Parser as W, Exclude$1 as X, KubbDriver as Y, Group as Z, InputPath as _, ResolverPathParams as _t, DiagnosticLocation as a, OutputOptions as at, KubbDiagnosticContext as b, RendererFactory as bt, PerformanceDiagnostic as c, PluginFactoryOptions as ct, SerializedDiagnostic as d, ResolveBannerContext as dt, KubbPluginSetupContext as et, UpdateDiagnostic as f, ResolveBannerFile as ft, InputData as g, ResolverFileParams as gt, Config as h, ResolverContext as ht, DiagnosticKind as i, OutputMode as it, KubbHooks as j, Adapter as jt, KubbHookLineContext as k, createReporter as kt, ProblemCode as l, definePlugin as lt, CLIOptions as m, Resolver as mt, DiagnosticByCode as n, NormalizedPlugin as nt, DiagnosticSeverity as o, Override as ot, BuildOutput as p, ResolveOptionsContext as pt, GeneratorContext as q, DiagnosticDoc as r, Output as rt, Diagnostics as s, Plugin as st, Diagnostic as t, KubbPluginStartContext as tt, ProblemDiagnostic as u, BannerMeta as ut, KubbBuildEndContext as v, defineResolver as vt, KubbFilesProcessingStartContext as w, GenerationResult as wt, KubbErrorContext as x, createRenderer as xt, KubbBuildStartContext as y, Renderer as yt, FileProcessorHooks as z };
2889
+ //# sourceMappingURL=diagnostics-DuaXn2bT.d.ts.map
package/dist/index.cjs CHANGED
@@ -1,13 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_memoryStorage = require("./memoryStorage-9cOBg7bL.cjs");
2
+ const require_memoryStorage = require("./memoryStorage-DQ6qXJ8o.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");
6
6
  let node_path = require("node:path");
7
7
  node_path = require_memoryStorage.__toESM(node_path, 1);
8
- let _kubb_ast = require("@kubb/ast");
9
8
  let node_async_hooks = require("node:async_hooks");
10
- let _kubb_ast_utils = require("@kubb/ast/utils");
9
+ let _kubb_ast = require("@kubb/ast");
11
10
  let node_process = require("node:process");
12
11
  node_process = require_memoryStorage.__toESM(node_process, 1);
13
12
  //#region ../../internals/utils/src/time.ts
@@ -369,7 +368,8 @@ var Url = class Url {
369
368
  *
370
369
  * @example
371
370
  * ```ts
372
- * import { createAdapter, ast, type AdapterFactoryOptions } from '@kubb/core'
371
+ * import { createAdapter, type AdapterFactoryOptions } from '@kubb/core'
372
+ * import { ast } from '@kubb/ast'
373
373
  *
374
374
  * type MyAdapter = AdapterFactoryOptions<'my-adapter', { validate?: boolean }>
375
375
  *
@@ -396,7 +396,7 @@ function createAdapter(build) {
396
396
  /**
397
397
  * Docs major version, derived from the package version so the link tracks the published major.
398
398
  */
399
- const docsMajor = "5.0.0-beta.80".split(".")[0] ?? "5";
399
+ const docsMajor = "5.0.0-beta.82".split(".")[0] ?? "5";
400
400
  /**
401
401
  * Narrows a {@link Diagnostic} to the variant for `code`, or `null` when it does not match.
402
402
  *
@@ -971,11 +971,11 @@ function computeOptions(node, options, exclude, include, override) {
971
971
  return options;
972
972
  }
973
973
  function defaultResolveOptions(node, { options, exclude = [], include, override = [] }) {
974
- const optionsKey = options;
975
- let byOptions = resolveOptionsCache.get(optionsKey);
974
+ if (typeof options !== "object" || options === null) return computeOptions(node, options, exclude, include, override);
975
+ let byOptions = resolveOptionsCache.get(options);
976
976
  if (!byOptions) {
977
977
  byOptions = /* @__PURE__ */ new WeakMap();
978
- resolveOptionsCache.set(optionsKey, byOptions);
978
+ resolveOptionsCache.set(options, byOptions);
979
979
  }
980
980
  const cached = byOptions.get(node);
981
981
  if (cached !== void 0) return cached.value;
@@ -1799,7 +1799,7 @@ var KubbDriver = class {
1799
1799
  }) !== null) includedOpsByState.get(state)?.push(operation);
1800
1800
  }
1801
1801
  for (const state of pruningStates) {
1802
- state.allowedSchemaNames = (0, _kubb_ast_utils.collectUsedSchemaNames)(includedOpsByState.get(state) ?? [], schemasBuffer);
1802
+ state.allowedSchemaNames = (0, _kubb_ast.collectUsedSchemaNames)(includedOpsByState.get(state) ?? [], schemasBuffer);
1803
1803
  includedOpsByState.delete(state);
1804
1804
  }
1805
1805
  }
@@ -2660,7 +2660,7 @@ function defineGenerator(generator) {
2660
2660
  * @example
2661
2661
  * ```ts
2662
2662
  * import { defineParser } from '@kubb/core'
2663
- * import { extractStringsFromNodes } from '@kubb/ast/utils'
2663
+ * import { extractStringsFromNodes } from '@kubb/ast'
2664
2664
  *
2665
2665
  * export const jsonParser = defineParser({
2666
2666
  * name: 'json',
@@ -2684,12 +2684,6 @@ exports.AsyncEventEmitter = require_memoryStorage.AsyncEventEmitter;
2684
2684
  exports.Diagnostics = Diagnostics;
2685
2685
  exports.KubbDriver = KubbDriver;
2686
2686
  exports.Url = Url;
2687
- Object.defineProperty(exports, "ast", {
2688
- enumerable: true,
2689
- get: function() {
2690
- return _kubb_ast.ast;
2691
- }
2692
- });
2693
2687
  exports.cliReporter = cliReporter;
2694
2688
  exports.createAdapter = createAdapter;
2695
2689
  exports.createKubb = createKubb;