@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 CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_usingCtx = require("./usingCtx-4PkDR7Wl.cjs");
2
+ const require_usingCtx = require("./usingCtx-C_vhSf7M.cjs");
3
3
  let node_async_hooks = require("node:async_hooks");
4
4
  let node_util = require("node:util");
5
5
  let node_process = require("node:process");
@@ -70,9 +70,11 @@ function applyConfigDefaults(config, { defaultAdapter, barrelPlugin, barrelPlugi
70
70
  //#region ../../internals/utils/src/isCIEnvironment.ts
71
71
  /**
72
72
  * Returns `true` when a known CI provider has set its environment variable.
73
+ * `CI=false` and `CI=0` count as not CI, so a user can opt out locally.
73
74
  */
74
75
  function isCIEnvironment() {
75
- return !!(node_process.default.env.CI || node_process.default.env.GITHUB_ACTIONS || node_process.default.env.GITLAB_CI || node_process.default.env.BITBUCKET_BUILD_NUMBER || node_process.default.env.JENKINS_URL || node_process.default.env.CIRCLECI || node_process.default.env.TRAVIS || node_process.default.env.TEAMCITY_VERSION || node_process.default.env.BUILDKITE || node_process.default.env.TF_BUILD);
76
+ const ci = node_process.default.env.CI;
77
+ return !!(ci && ci !== "false" && ci !== "0" || node_process.default.env.GITHUB_ACTIONS || node_process.default.env.GITLAB_CI || node_process.default.env.BITBUCKET_BUILD_NUMBER || node_process.default.env.JENKINS_URL || node_process.default.env.CIRCLECI || node_process.default.env.TRAVIS || node_process.default.env.TEAMCITY_VERSION || node_process.default.env.BUILDKITE || node_process.default.env.TF_BUILD);
76
78
  }
77
79
  //#endregion
78
80
  //#region ../../internals/utils/src/openInBrowser.ts
@@ -127,7 +129,7 @@ function formatMs(ms) {
127
129
  /**
128
130
  * Docs major version, derived from the package version so the link tracks the published major.
129
131
  */
130
- const docsMajor = "5.5.3".split(".")[0] ?? "5";
132
+ const docsMajor = "5.5.5".split(".")[0] ?? "5";
131
133
  /**
132
134
  * Builds a type guard that narrows a {@link Diagnostic} to the variant for `kind`. A diagnostic
133
135
  * with no `kind` is treated as a `problem`.
@@ -215,6 +217,11 @@ const diagnosticCatalog = {
215
217
  cause: "The parsed `input` has no `openapi` or `swagger` version field, so it is not an OpenAPI or Swagger document.",
216
218
  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."
217
219
  },
220
+ [require_usingCtx.diagnosticCode.invalidSpec]: {
221
+ title: "Invalid spec",
222
+ cause: "The document does not pass OpenAPI schema validation. Kubb still generates from it, but the output can be incomplete or wrong.",
223
+ 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."
224
+ },
218
225
  [require_usingCtx.diagnosticCode.refNotFound]: {
219
226
  title: "Reference not found",
220
227
  cause: "A `$ref` could not be resolved in the source document.",