@kubb/core 5.10.4 → 5.11.1

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
@@ -2692,11 +2692,19 @@ type ByContentType = {
2692
2692
  */
2693
2693
  pattern: string | RegExp;
2694
2694
  };
2695
+ type ByExtension = {
2696
+ /** Filter operations by a vendor extension (`x-*` key) on the source operation. Does not apply to schemas. */
2697
+ type: 'extension';
2698
+ /** Extension key, including the `x-` prefix. */
2699
+ key: `x-${string}`;
2700
+ /** Value the extension must strictly equal. When omitted, the key being present is enough. */
2701
+ value?: unknown;
2702
+ };
2695
2703
  /**
2696
2704
  * Pattern filter for include, exclude, and override rules. Matches operations or schemas
2697
- * by tag, operationId, path, method, content type, or schema name.
2705
+ * by tag, operationId, path, method, content type, schema name, or vendor extension.
2698
2706
  */
2699
- type Filter = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
2707
+ type Filter = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName | ByExtension;
2700
2708
  /**
2701
2709
  * Filter that skips matching operations or schemas during generation, for example
2702
2710
  * deprecated endpoints or internal-only schemas.
@@ -2707,6 +2715,7 @@ type Filter = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySche
2707
2715
  * { type: 'tag', pattern: 'internal' },
2708
2716
  * { type: 'path', pattern: /^\/admin/ },
2709
2717
  * { type: 'operationId', pattern: /^deprecated_/ },
2718
+ * { type: 'extension', key: 'x-internal', value: true },
2710
2719
  * ]
2711
2720
  * ```
2712
2721
  */
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as NodeCache, $t as ReporterPluginFiles, A as PluginFactory, At as KubbInfoContext, B as ResolveImportsOptions, Bt as RunHookOptions, C as NormalizedPlugin, Ct as KubbGenerationEndContext, D as Override, Dt as KubbHookLineContext, E as OutputOptions, Et as KubbHookEndContext, F as definePlugin, Ft as KubbWarnContext, G as ResolverFile, Gt as RendererFactory, H as ResolvePathOptions, Ht as KubbDriver, I as BannerMeta, It as PossibleConfig, J as ResolverPatch, Jt as createStorage, K as ResolverFileParams, Kt as createRenderer, L as ResolveBannerContext, Lt as PostGenerateCommand, M as PluginType, Mt as KubbMessageContext, N as ResolvePluginOptions, Nt as KubbPluginsEndContext, O as Plugin, Ot as KubbHookStartContext, P as assertPluginOption, Pt as KubbSuccessContext, Q as defineGenerator, Qt as ReporterName, R as ResolveBannerFile, Rt as UserConfig, S as KubbPluginStartContext, St as KubbFilesProcessingUpdateContext, T as OutputMode, Tt as KubbGenerationSummaryContext, U as Resolver, Ut as Hookable, V as ResolveOptionsContext, Vt as runHook, W as ResolverDefault, Wt as Renderer, X as Generator, Xt as Reporter, Y as ResolverPathParams, Yt as GenerationResult, Z as GeneratorContext, Zt as ReporterContext, _ as Filter, _t as KubbDiagnosticContext, a as AdapterSource, an as Parser, at as Diagnostics, b as KubbPluginEndContext, bt as KubbFilesProcessingEndContext, c as ExtensionDependency, cn as defineParser, ct as ProblemDiagnostic, d as ExtensionKind, dt as CLIOptions, en as UserReporter, et as Diagnostic, f as ExtensionMeta, ft as Config, g as Exclude, gt as KubbBuildStartContext, h as resolveMeta, ht as KubbBuildEndContext, i as AdapterFactoryOptions, in as SerializedDiagnostic, it as DiagnosticSeverity, j as PluginName, jt as KubbLifecycleStartContext, k as PluginDefinition, kt as KubbHooks, l as ExtensionDependencyRecord, lt as UpdateDiagnostic, m as defineExtension, mt as Input, n as AdapterDefinition, nn as logLevel, nt as DiagnosticKind, o as createAdapter, on as ParserDefinition, ot as PerformanceDiagnostic, p as checkCompatibility, pt as FilesContext, q as ResolverFilePathParams, qt as Storage, r as AdapterFactory, rn as DiagnosticFormatOptions, rt as DiagnosticLocation, s as ExtensionDependencies, sn as ParserFactory, st as ProblemCode, t as Adapter, tn as createReporter, tt as DiagnosticDoc, u as ExtensionFactory, ut as BuildOutput, v as Group, vt as KubbErrorContext, w as Output, wt as KubbGenerationStartContext, x as KubbPluginSetupContext, xt as KubbFilesProcessingStartContext, y as Include, yt as KubbFileProcessingUpdate, z as ResolveFileOptions, zt as HookResult } from "./createAdapter-B5kKMsWV.js";
1
+ import { $ as NodeCache, $t as ReporterPluginFiles, A as PluginFactory, At as KubbInfoContext, B as ResolveImportsOptions, Bt as RunHookOptions, C as NormalizedPlugin, Ct as KubbGenerationEndContext, D as Override, Dt as KubbHookLineContext, E as OutputOptions, Et as KubbHookEndContext, F as definePlugin, Ft as KubbWarnContext, G as ResolverFile, Gt as RendererFactory, H as ResolvePathOptions, Ht as KubbDriver, I as BannerMeta, It as PossibleConfig, J as ResolverPatch, Jt as createStorage, K as ResolverFileParams, Kt as createRenderer, L as ResolveBannerContext, Lt as PostGenerateCommand, M as PluginType, Mt as KubbMessageContext, N as ResolvePluginOptions, Nt as KubbPluginsEndContext, O as Plugin, Ot as KubbHookStartContext, P as assertPluginOption, Pt as KubbSuccessContext, Q as defineGenerator, Qt as ReporterName, R as ResolveBannerFile, Rt as UserConfig, S as KubbPluginStartContext, St as KubbFilesProcessingUpdateContext, T as OutputMode, Tt as KubbGenerationSummaryContext, U as Resolver, Ut as Hookable, V as ResolveOptionsContext, Vt as runHook, W as ResolverDefault, Wt as Renderer, X as Generator, Xt as Reporter, Y as ResolverPathParams, Yt as GenerationResult, Z as GeneratorContext, Zt as ReporterContext, _ as Filter, _t as KubbDiagnosticContext, a as AdapterSource, an as Parser, at as Diagnostics, b as KubbPluginEndContext, bt as KubbFilesProcessingEndContext, c as ExtensionDependency, cn as defineParser, ct as ProblemDiagnostic, d as ExtensionKind, dt as CLIOptions, en as UserReporter, et as Diagnostic, f as ExtensionMeta, ft as Config, g as Exclude, gt as KubbBuildStartContext, h as resolveMeta, ht as KubbBuildEndContext, i as AdapterFactoryOptions, in as SerializedDiagnostic, it as DiagnosticSeverity, j as PluginName, jt as KubbLifecycleStartContext, k as PluginDefinition, kt as KubbHooks, l as ExtensionDependencyRecord, lt as UpdateDiagnostic, m as defineExtension, mt as Input, n as AdapterDefinition, nn as logLevel, nt as DiagnosticKind, o as createAdapter, on as ParserDefinition, ot as PerformanceDiagnostic, p as checkCompatibility, pt as FilesContext, q as ResolverFilePathParams, qt as Storage, r as AdapterFactory, rn as DiagnosticFormatOptions, rt as DiagnosticLocation, s as ExtensionDependencies, sn as ParserFactory, st as ProblemCode, t as Adapter, tn as createReporter, tt as DiagnosticDoc, u as ExtensionFactory, ut as BuildOutput, v as Group, vt as KubbErrorContext, w as Output, wt as KubbGenerationStartContext, x as KubbPluginSetupContext, xt as KubbFilesProcessingStartContext, y as Include, yt as KubbFileProcessingUpdate, z as ResolveFileOptions, zt as HookResult } from "./createAdapter-D6osJ_0O.js";
2
2
  import { FileNode, Macro, UserFileNode } from "@kubb/ast";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  //#region src/composables.d.ts
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as inParallel, C as useOptions, D as Diagnostics, E as resolveMeta, F as toError, M as read, N as toPosixPath, O as formatMs, P as write, S as useKubb, T as defineExtension, _ as setMacros, b as tryUseKubb, c as Resolver, d as definePlugin, f as addGenerator, g as requirePlugin, h as kubbContext, j as isPathInside, k as getElapsedMs, l as getInputKind, m as injectFile, n as KubbDriver, o as _usingCtx, p as addMacro, s as createResolver, t as Hookable, u as assertPluginOption, v as setOptions, w as checkCompatibility, x as useConfig, y as setResolver } from "./Hookable-D_Eafz_X.js";
1
+ import { A as inParallel, C as useOptions, D as Diagnostics, E as resolveMeta, F as toError, M as read, N as toPosixPath, O as formatMs, P as write, S as useKubb, T as defineExtension, _ as setMacros, b as tryUseKubb, c as Resolver, d as definePlugin, f as addGenerator, g as requirePlugin, h as kubbContext, j as isPathInside, k as getElapsedMs, l as getInputKind, m as injectFile, n as KubbDriver, o as _usingCtx, p as addMacro, s as createResolver, t as Hookable, u as assertPluginOption, v as setOptions, w as checkCompatibility, x as useConfig, y as setResolver } from "./Hookable-c0xC5kYM.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { isValid } from "verkit";
4
4
  import process$1 from "node:process";
package/dist/mocks.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as NormalizedPlugin, Ht as KubbDriver, M as PluginType, X as Generator, an as Parser, ft as Config, i as AdapterFactoryOptions, t as Adapter, x as KubbPluginSetupContext } from "./createAdapter-B5kKMsWV.js";
1
+ import { C as NormalizedPlugin, Ht as KubbDriver, M as PluginType, X as Generator, an as Parser, ft as Config, i as AdapterFactoryOptions, t as Adapter, x as KubbPluginSetupContext } from "./createAdapter-D6osJ_0O.js";
2
2
  import { FileNode, InputMeta, Macro, OperationNode, SchemaNode } from "@kubb/ast";
3
3
  //#region src/mocks.d.ts
4
4
  /**
package/dist/mocks.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as camelCase, a as FileManager, i as createNodeCache, r as pluginNotFoundError, t as Hookable } from "./Hookable-D_Eafz_X.js";
1
+ import { I as camelCase, a as FileManager, i as createNodeCache, r as pluginNotFoundError, t as Hookable } from "./Hookable-c0xC5kYM.js";
2
2
  import path, { resolve } from "node:path";
3
3
  import { applyMacros, ast } from "@kubb/ast";
4
4
  import { expect, vi } from "vitest";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/core",
3
- "version": "5.10.4",
3
+ "version": "5.11.1",
4
4
  "description": "Core engine for Kubb. Provides the plugin driver, file manager and build orchestration used by every Kubb plugin.",
5
5
  "keywords": [
6
6
  "code-generator",
@@ -77,14 +77,14 @@
77
77
  "registry": "https://registry.npmjs.org/"
78
78
  },
79
79
  "dependencies": {
80
- "@kubb/ast": "5.10.4",
80
+ "@kubb/ast": "5.11.1",
81
81
  "tinyexec": "^1.3.1",
82
- "unstorage": "^1.17.5",
82
+ "unstorage": "^1.17.6",
83
83
  "verkit": "^0.5.0"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@internals/utils": "0.0.1",
87
- "vue": "^3.5.43"
87
+ "vue": "^3.5.44"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "vitest": "^4.0.0 || ^5.0.0"