@kubb/core 5.0.0-beta.88 → 5.0.0-beta.89
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/{Diagnostics-C2HF9H7A.d.ts → Diagnostics-CM0-Ae30.d.ts} +13 -2
- package/dist/index.cjs +17 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/mocks.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { $ as Include, A as KubbHookStartContext, At as Reporter, B as Kubb, C as KubbFilesProcessingEndContext, Ct as ResolverPathParams, D as KubbGenerationStartContext, Dt as Storage, E as KubbGenerationEndContext, Et as createRenderer, F as KubbSuccessContext, Ft as logLevel, G as KubbDriver, H as Generator, I as KubbWarnContext, It as Adapter, J as Parser, K as FileManagerHooks, L as PossibleConfig, Lt as AdapterFactoryOptions, M as KubbInfoContext, Mt as ReporterName, N as KubbLifecycleStartContext, Nt as UserReporter, O as KubbHookEndContext, Ot as createStorage, P as KubbPluginsEndContext, Pt as createReporter, Q as Group, R as UserConfig, Rt as AdapterSource, S as KubbFileProcessingUpdate, St as ResolverPatch, T as KubbFilesProcessingUpdateContext, Tt as RendererFactory, U as GeneratorContext, V as createKubb, W as defineGenerator, X as Exclude, Y as defineParser, Z as Filter, _ as InputPath, _t as Resolver, a as DiagnosticLocation, at as OutputMode, b as KubbDiagnosticContext, bt as ResolverFileParams, c as PerformanceDiagnostic, ct as Plugin, d as SerializedDiagnostic, dt as BannerMeta, et as KubbPluginEndContext, f as UpdateDiagnostic, ft as ResolveBannerContext, g as InputData, gt as ResolvePathOptions, h as Config, ht as ResolveOptionsContext, i as DiagnosticKind, it as Output, j as KubbHooks, jt as ReporterContext, k as KubbHookLineContext, kt as GenerationResult, l as ProblemCode, lt as PluginFactoryOptions, m as CLIOptions, mt as ResolveFileOptions, n as DiagnosticByCode, nt as KubbPluginStartContext, o as DiagnosticSeverity, ot as OutputOptions, p as BuildOutput, pt as ResolveBannerFile, q as Hookable, r as DiagnosticDoc, rt as NormalizedPlugin, s as Diagnostics, st as Override, t as Diagnostic, tt as KubbPluginSetupContext, u as ProblemDiagnostic, ut as definePlugin, v as KubbBuildEndContext, vt as ResolverDefault, w as KubbFilesProcessingStartContext, wt as Renderer, x as KubbErrorContext, xt as ResolverFilePathParams, y as KubbBuildStartContext, yt as ResolverFile, z as CreateKubbOptions, zt as createAdapter } from "./Diagnostics-
|
|
2
|
+
import { $ as Include, A as KubbHookStartContext, At as Reporter, B as Kubb, C as KubbFilesProcessingEndContext, Ct as ResolverPathParams, D as KubbGenerationStartContext, Dt as Storage, E as KubbGenerationEndContext, Et as createRenderer, F as KubbSuccessContext, Ft as logLevel, G as KubbDriver, H as Generator, I as KubbWarnContext, It as Adapter, J as Parser, K as FileManagerHooks, L as PossibleConfig, Lt as AdapterFactoryOptions, M as KubbInfoContext, Mt as ReporterName, N as KubbLifecycleStartContext, Nt as UserReporter, O as KubbHookEndContext, Ot as createStorage, P as KubbPluginsEndContext, Pt as createReporter, Q as Group, R as UserConfig, Rt as AdapterSource, S as KubbFileProcessingUpdate, St as ResolverPatch, T as KubbFilesProcessingUpdateContext, Tt as RendererFactory, U as GeneratorContext, V as createKubb, W as defineGenerator, X as Exclude, Y as defineParser, Z as Filter, _ as InputPath, _t as Resolver, a as DiagnosticLocation, at as OutputMode, b as KubbDiagnosticContext, bt as ResolverFileParams, c as PerformanceDiagnostic, ct as Plugin, d as SerializedDiagnostic, dt as BannerMeta, et as KubbPluginEndContext, f as UpdateDiagnostic, ft as ResolveBannerContext, g as InputData, gt as ResolvePathOptions, h as Config, ht as ResolveOptionsContext, i as DiagnosticKind, it as Output, j as KubbHooks, jt as ReporterContext, k as KubbHookLineContext, kt as GenerationResult, l as ProblemCode, lt as PluginFactoryOptions, m as CLIOptions, mt as ResolveFileOptions, n as DiagnosticByCode, nt as KubbPluginStartContext, o as DiagnosticSeverity, ot as OutputOptions, p as BuildOutput, pt as ResolveBannerFile, q as Hookable, r as DiagnosticDoc, rt as NormalizedPlugin, s as Diagnostics, st as Override, t as Diagnostic, tt as KubbPluginSetupContext, u as ProblemDiagnostic, ut as definePlugin, v as KubbBuildEndContext, vt as ResolverDefault, w as KubbFilesProcessingStartContext, wt as Renderer, x as KubbErrorContext, xt as ResolverFilePathParams, y as KubbBuildStartContext, yt as ResolverFile, z as CreateKubbOptions, zt as createAdapter } from "./Diagnostics-CM0-Ae30.js";
|
|
3
3
|
|
|
4
4
|
//#region src/reporters/cliReporter.d.ts
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -170,7 +170,7 @@ function memoize(store, factory) {
|
|
|
170
170
|
}
|
|
171
171
|
//#endregion
|
|
172
172
|
//#region package.json
|
|
173
|
-
var version = "5.0.0-beta.
|
|
173
|
+
var version = "5.0.0-beta.89";
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region src/constants.ts
|
|
176
176
|
/**
|
|
@@ -745,6 +745,13 @@ function isNamespace(value) {
|
|
|
745
745
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
746
746
|
}
|
|
747
747
|
/**
|
|
748
|
+
* Shared brand for reaching a resolver's build options. `Resolver.merge` reads this instead of
|
|
749
|
+
* relying on `instanceof`, which fails when a CommonJS config and the ESM CLI each load their own
|
|
750
|
+
* copy of `@kubb/core`. `Symbol.for` resolves to one key across those copies, so the options stay
|
|
751
|
+
* reachable and a `file` override is never dropped.
|
|
752
|
+
*/
|
|
753
|
+
const resolverOptions = Symbol.for("@kubb/core/resolver/options");
|
|
754
|
+
/**
|
|
748
755
|
* Built-in `file.baseName`: casts the identifier with `toFilePath` and appends the extension.
|
|
749
756
|
*/
|
|
750
757
|
function toBaseName({ name, extname }) {
|
|
@@ -788,6 +795,10 @@ var Resolver = class Resolver {
|
|
|
788
795
|
this.#filePath = options.file?.path ? options.file.path.bind(this) : void 0;
|
|
789
796
|
this.#apply(options);
|
|
790
797
|
}
|
|
798
|
+
/** Exposes the raw build options so `Resolver.merge` can read them across `@kubb/core` copies. */
|
|
799
|
+
get [resolverOptions]() {
|
|
800
|
+
return this.#options;
|
|
801
|
+
}
|
|
791
802
|
/**
|
|
792
803
|
* The built-in resolution machinery. Always reaches the untouched defaults, even when a
|
|
793
804
|
* plugin overrides the top-level `name` or `file`.
|
|
@@ -811,11 +822,13 @@ var Resolver = class Resolver {
|
|
|
811
822
|
/**
|
|
812
823
|
* Merges `override` over `base` and returns a new resolver with helpers re-bound. Top-level
|
|
813
824
|
* keys replace, and a namespace (or `file`) merges per method, so overriding `query.name`
|
|
814
|
-
* keeps the base `query.keyName`. Used when applying `setResolver` partial overrides.
|
|
825
|
+
* keeps the base `query.keyName`. Used when applying `setResolver` partial overrides. Reads a
|
|
826
|
+
* resolver's options through the shared brand rather than `instanceof`, so a `file` override
|
|
827
|
+
* survives even when `base` and `override` come from different `@kubb/core` copies.
|
|
815
828
|
*/
|
|
816
829
|
static merge(base, override) {
|
|
817
|
-
const patch =
|
|
818
|
-
const merged = { ...base
|
|
830
|
+
const patch = resolverOptions in override ? override[resolverOptions] : override;
|
|
831
|
+
const merged = { ...base[resolverOptions] };
|
|
819
832
|
for (const [key, value] of Object.entries(patch)) {
|
|
820
833
|
if (value === void 0) continue;
|
|
821
834
|
const current = merged[key];
|