@kubb/core 5.5.3 → 5.5.5
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.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/mocks.cjs +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/mocks.js +1 -1
- package/dist/{types-8ebHH0OM.d.ts → types-DNE8KVDT.d.ts} +4 -1
- package/dist/{usingCtx-4PkDR7Wl.cjs → usingCtx-C_vhSf7M.cjs} +3 -1
- package/dist/usingCtx-C_vhSf7M.cjs.map +1 -0
- package/dist/{usingCtx-DJoMWnM8.js → usingCtx-DdG2edpx.js} +3 -1
- package/dist/usingCtx-DdG2edpx.js.map +1 -0
- package/package.json +2 -2
- package/dist/usingCtx-4PkDR7Wl.cjs.map +0 -1
- package/dist/usingCtx-DJoMWnM8.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { $ as OutputMode, A as SummaryRenderer, At as ReporterPluginFiles, B as KubbDriver, Bt as PerformanceDiagnostic, C as KubbSuccessContext, Ct as createRenderer, D as UserConfig, Dt as Reporter, E as PostGenerateCommand, Et as GenerationResult, F as createKubb, Ft as DiagnosticDoc, G as Filter, Gt as Hookable, H as Parser, Ht as ProblemDiagnostic, I as Generator, It as DiagnosticKind, J as KubbPluginEndContext, Jt as AdapterSource, K as Group, Kt as Adapter, L as GeneratorContext, Lt as DiagnosticLocation, M as GenerateOptions, Mt as createReporter, N as GenerateResult, Nt as logLevel, O as InputKind, Ot as ReporterContext, P as Kubb, Pt as Diagnostic, Q as Output, R as defineGenerator, Rt as DiagnosticSeverity, S as KubbPluginsEndContext, St as RendererFactory, T as PossibleConfig, Tt as createStorage, U as defineParser, Ut as SerializedDiagnostic, V as FileManagerHooks, Vt as ProblemCode, W as Exclude, Wt as UpdateDiagnostic, X as KubbPluginStartContext, Y as KubbPluginSetupContext, Yt as createAdapter, Z as NormalizedPlugin, _ as KubbHookLineContext, _t as ResolverFileParams, a as KubbBuildEndContext, at as ResolvePluginOptions, b as KubbInfoContext, bt as ResolverPathParams, c as KubbErrorContext, ct as ResolveBannerContext, d as KubbFilesProcessingStartContext, dt as ResolveImportsOptions, et as OutputOptions, f as KubbFilesProcessingUpdateContext, ft as ResolveOptionsContext, g as KubbHookEndContext, gt as ResolverFile, h as KubbGenerationSummaryContext, ht as ResolverDefault, i as Input, it as PluginName, j as CreateKubbOptions, jt as UserReporter, k as getInputKind, kt as ReporterName, l as KubbFileProcessingUpdate, lt as ResolveBannerFile, m as KubbGenerationStartContext, mt as Resolver, n as CLIOptions, nt as Plugin, o as KubbBuildStartContext, ot as definePlugin, p as KubbGenerationEndContext, pt as ResolvePathOptions, q as Include, qt as AdapterFactoryOptions, r as Config, rt as PluginFactoryOptions, s as KubbDiagnosticContext, st as BannerMeta, t as BuildOutput, tt as Override, u as KubbFilesProcessingEndContext, ut as ResolveFileOptions, v as KubbHookStartContext, vt as ResolverFilePathParams, w as KubbWarnContext, wt as Storage, x as KubbLifecycleStartContext, xt as Renderer, y as KubbHooks, yt as ResolverPatch, z as NodeCache, zt as Diagnostics } from "./types-
|
|
2
|
+
import { $ as OutputMode, A as SummaryRenderer, At as ReporterPluginFiles, B as KubbDriver, Bt as PerformanceDiagnostic, C as KubbSuccessContext, Ct as createRenderer, D as UserConfig, Dt as Reporter, E as PostGenerateCommand, Et as GenerationResult, F as createKubb, Ft as DiagnosticDoc, G as Filter, Gt as Hookable, H as Parser, Ht as ProblemDiagnostic, I as Generator, It as DiagnosticKind, J as KubbPluginEndContext, Jt as AdapterSource, K as Group, Kt as Adapter, L as GeneratorContext, Lt as DiagnosticLocation, M as GenerateOptions, Mt as createReporter, N as GenerateResult, Nt as logLevel, O as InputKind, Ot as ReporterContext, P as Kubb, Pt as Diagnostic, Q as Output, R as defineGenerator, Rt as DiagnosticSeverity, S as KubbPluginsEndContext, St as RendererFactory, T as PossibleConfig, Tt as createStorage, U as defineParser, Ut as SerializedDiagnostic, V as FileManagerHooks, Vt as ProblemCode, W as Exclude, Wt as UpdateDiagnostic, X as KubbPluginStartContext, Y as KubbPluginSetupContext, Yt as createAdapter, Z as NormalizedPlugin, _ as KubbHookLineContext, _t as ResolverFileParams, a as KubbBuildEndContext, at as ResolvePluginOptions, b as KubbInfoContext, bt as ResolverPathParams, c as KubbErrorContext, ct as ResolveBannerContext, d as KubbFilesProcessingStartContext, dt as ResolveImportsOptions, et as OutputOptions, f as KubbFilesProcessingUpdateContext, ft as ResolveOptionsContext, g as KubbHookEndContext, gt as ResolverFile, h as KubbGenerationSummaryContext, ht as ResolverDefault, i as Input, it as PluginName, j as CreateKubbOptions, jt as UserReporter, k as getInputKind, kt as ReporterName, l as KubbFileProcessingUpdate, lt as ResolveBannerFile, m as KubbGenerationStartContext, mt as Resolver, n as CLIOptions, nt as Plugin, o as KubbBuildStartContext, ot as definePlugin, p as KubbGenerationEndContext, pt as ResolvePathOptions, q as Include, qt as AdapterFactoryOptions, r as Config, rt as PluginFactoryOptions, s as KubbDiagnosticContext, st as BannerMeta, t as BuildOutput, tt as Override, u as KubbFilesProcessingEndContext, ut as ResolveFileOptions, v as KubbHookStartContext, vt as ResolverFilePathParams, w as KubbWarnContext, wt as Storage, x as KubbLifecycleStartContext, xt as Renderer, y as KubbHooks, yt as ResolverPatch, z as NodeCache, zt as Diagnostics } from "./types-DNE8KVDT.js";
|
|
3
3
|
//#region src/applyConfigDefaults.d.ts
|
|
4
4
|
type ApplyConfigDefaultsOptions<TOutput> = {
|
|
5
5
|
defaultAdapter: Adapter;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { a as OPERATION_FILTER_TYPES, c as clean, d as toPosixPath, f as write, h as camelCase, i as Hookable, l as isPathInside, m as toError, n as createNodeCache, o as diagnosticCode, p as getErrorMessage, r as FileManager, s as inParallel, t as _usingCtx, u as read } from "./usingCtx-
|
|
2
|
+
import { a as OPERATION_FILTER_TYPES, c as clean, d as toPosixPath, f as write, h as camelCase, i as Hookable, l as isPathInside, m as toError, n as createNodeCache, o as diagnosticCode, p as getErrorMessage, r as FileManager, s as inParallel, t as _usingCtx, u as read } from "./usingCtx-DdG2edpx.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
5
5
|
import process$1 from "node:process";
|
|
@@ -68,9 +68,11 @@ function applyConfigDefaults(config, { defaultAdapter, barrelPlugin, barrelPlugi
|
|
|
68
68
|
//#region ../../internals/utils/src/isCIEnvironment.ts
|
|
69
69
|
/**
|
|
70
70
|
* Returns `true` when a known CI provider has set its environment variable.
|
|
71
|
+
* `CI=false` and `CI=0` count as not CI, so a user can opt out locally.
|
|
71
72
|
*/
|
|
72
73
|
function isCIEnvironment() {
|
|
73
|
-
|
|
74
|
+
const ci = process$1.env.CI;
|
|
75
|
+
return !!(ci && ci !== "false" && ci !== "0" || process$1.env.GITHUB_ACTIONS || process$1.env.GITLAB_CI || process$1.env.BITBUCKET_BUILD_NUMBER || process$1.env.JENKINS_URL || process$1.env.CIRCLECI || process$1.env.TRAVIS || process$1.env.TEAMCITY_VERSION || process$1.env.BUILDKITE || process$1.env.TF_BUILD);
|
|
74
76
|
}
|
|
75
77
|
//#endregion
|
|
76
78
|
//#region ../../internals/utils/src/openInBrowser.ts
|
|
@@ -125,7 +127,7 @@ function formatMs(ms) {
|
|
|
125
127
|
/**
|
|
126
128
|
* Docs major version, derived from the package version so the link tracks the published major.
|
|
127
129
|
*/
|
|
128
|
-
const docsMajor = "5.5.
|
|
130
|
+
const docsMajor = "5.5.5".split(".")[0] ?? "5";
|
|
129
131
|
/**
|
|
130
132
|
* Builds a type guard that narrows a {@link Diagnostic} to the variant for `kind`. A diagnostic
|
|
131
133
|
* with no `kind` is treated as a `problem`.
|
|
@@ -213,6 +215,11 @@ const diagnosticCatalog = {
|
|
|
213
215
|
cause: "The parsed `input` has no `openapi` or `swagger` version field, so it is not an OpenAPI or Swagger document.",
|
|
214
216
|
fix: "Point `input` at a document that declares `openapi` or `swagger`, and check that a passed object is the spec itself rather than a wrapper around it."
|
|
215
217
|
},
|
|
218
|
+
[diagnosticCode.invalidSpec]: {
|
|
219
|
+
title: "Invalid spec",
|
|
220
|
+
cause: "The document does not pass OpenAPI schema validation. Kubb still generates from it, but the output can be incomplete or wrong.",
|
|
221
|
+
fix: "Fix the reported problem in the spec. Run `kubb validate` to list every error, or set `validate: false` on the adapter to skip the check."
|
|
222
|
+
},
|
|
216
223
|
[diagnosticCode.refNotFound]: {
|
|
217
224
|
title: "Reference not found",
|
|
218
225
|
cause: "A `$ref` could not be resolved in the source document.",
|