@redocly/cli 2.40.0 → 2.41.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/README.md CHANGED
@@ -106,7 +106,7 @@ The `stylish` output is as good as it sounds, but if you need JSON, Markdown, Ch
106
106
 
107
107
  [Learn more about API standards and configuring Redocly rules](https://redocly.com/docs/cli/api-standards).
108
108
 
109
- Looking for more examples? Check out our [Cookbook](https://github.com/Redocly/redocly-cli-cookbook).
109
+ Looking for more examples? Check out our [Cookbook](./cookbook/README.md).
110
110
 
111
111
  ### API contract testing with Respect
112
112
 
@@ -4,7 +4,7 @@ Third-party software bundled in @redocly/cli
4
4
  (MPL-2.0 OR Apache-2.0)
5
5
 
6
6
  Packages:
7
- dompurify@3.4.11 — copyright owner or entity authorized by
7
+ dompurify@3.4.12 — copyright owner or entity authorized by
8
8
 
9
9
  License text:
10
10
 
@@ -573,7 +573,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
573
573
  BSD-3-Clause
574
574
 
575
575
  Packages:
576
- fast-uri@3.1.2 — Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
576
+ fast-uri@3.1.4 — Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
577
577
  source-map@0.6.1 — Copyright (c) 2009-2011, Mozilla Foundation and contributors
578
578
 
579
579
  License text:
@@ -649,13 +649,13 @@ Packages:
649
649
  @redocly/cli-otel@0.3.4 — Copyright 2025 Redocly Inc, all rights reserved.
650
650
  @redocly/config@0.22.0 — Copyright 2024 Redocly Inc.
651
651
  @redocly/config@0.52.0 — Copyright 2024 Redocly Inc.
652
- @redocly/openapi-core@1.34.16
652
+ @redocly/openapi-core@1.34.17
653
653
  agent-base@7.1.4 — Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
654
654
  ajv-formats@3.0.1 — Copyright (c) 2020 Evgeny Poberezkin
655
655
  ajv@8.20.0 — Copyright (c) 2015-2021 Evgeny Poberezkin
656
656
  ansi-styles@4.3.0
657
657
  balanced-match@1.0.2 — Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
658
- brace-expansion@2.1.1 — Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
658
+ brace-expansion@2.1.2 — Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
659
659
  call-me-maybe@1.0.2 — Copyright (c) 2015 Eric McCarthy
660
660
  chalk@4.1.2
661
661
  classnames@2.5.1 — Copyright (c) 2018 Jed Watson
@@ -2,7 +2,7 @@ import { createRequire as __createRequire } from 'node:module';
2
2
  const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  logger
5
- } from "./HT6ZGKQQ.js";
5
+ } from "./Z3EJWJEX.js";
6
6
 
7
7
  // src/commands/split/oas/constants.ts
8
8
  var OPENAPI3_METHOD_NAMES = [
@@ -2,7 +2,7 @@ import { createRequire as __createRequire } from 'node:module';
2
2
  const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  HandledError
5
- } from "./HT6ZGKQQ.js";
5
+ } from "./Z3EJWJEX.js";
6
6
 
7
7
  // src/utils/error.ts
8
8
  var AbortFlowError = class extends Error {
@@ -8,7 +8,7 @@ import {
8
8
  } from "./4FB5ZIPP.js";
9
9
  import {
10
10
  version
11
- } from "./6DYZ77KC.js";
11
+ } from "./YPFS42IW.js";
12
12
  import {
13
13
  require_undici
14
14
  } from "./XB6C62FW.js";
@@ -16,7 +16,7 @@ import {
16
16
  blue,
17
17
  green,
18
18
  logger
19
- } from "./HT6ZGKQQ.js";
19
+ } from "./Z3EJWJEX.js";
20
20
  import {
21
21
  __toESM
22
22
  } from "./5ILQMFXK.js";
@@ -2,24 +2,24 @@ import { createRequire as __createRequire } from 'node:module';
2
2
  const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  selectTrafficParser
5
- } from "./JBIFNX5C.js";
5
+ } from "./Y7LKQTQ4.js";
6
6
  import {
7
7
  ValidationSession,
8
8
  loadOpenApiIndex,
9
9
  parseCsv,
10
10
  renderReport
11
- } from "./V2UTD4F3.js";
11
+ } from "./LZNQHR3A.js";
12
12
  import {
13
13
  listFilesRecursively,
14
14
  normalizeFsPath
15
- } from "./TYUOO44G.js";
15
+ } from "./PU67EGEM.js";
16
16
  import {
17
17
  AbortFlowError,
18
18
  exitWithError
19
- } from "./4BR7G6JO.js";
19
+ } from "./CUWLBJXP.js";
20
20
  import {
21
21
  logger
22
- } from "./HT6ZGKQQ.js";
22
+ } from "./Z3EJWJEX.js";
23
23
  import "./Z2I5YXYN.js";
24
24
  import "./5ILQMFXK.js";
25
25
 
@@ -17,7 +17,7 @@ import {
17
17
  lint,
18
18
  pluralize,
19
19
  require__
20
- } from "./HT6ZGKQQ.js";
20
+ } from "./Z3EJWJEX.js";
21
21
  import {
22
22
  __commonJS,
23
23
  __toESM
@@ -5946,7 +5946,7 @@ function resolveDescriptionNameFromPath(descriptionPath) {
5946
5946
  async function generateArazzoDescription(opts) {
5947
5947
  const { descriptionPath, outputFile, collectSpecData } = opts;
5948
5948
  const document = await bundleOpenApi(opts) || {};
5949
- collectSpecData?.(document);
5949
+ collectSpecData?.({ parsed: document });
5950
5950
  const { paths: pathsObject, info, security: rootSecurity, components } = document;
5951
5951
  const sourceDescriptionName = resolveDescriptionNameFromPath(descriptionPath);
5952
5952
  const resolvedDescriptionPath = outputFile ? path2.relative(path2.dirname(outputFile), path2.resolve(descriptionPath)) : descriptionPath;
@@ -11972,7 +11972,7 @@ async function bundleArazzo(options) {
11972
11972
  if (!isTestFile(fileName, bundledDocument.bundle.parsed)) {
11973
11973
  throw new Error(`No test files found. File ${fileName} does not follows naming pattern "*.[yaml | yml | json]" or have not valid "Arazzo" description.`);
11974
11974
  }
11975
- collectSpecData?.(bundledDocument.bundle.parsed || {});
11975
+ collectSpecData?.(bundledDocument.bundle);
11976
11976
  const errorLintProblems = lintProblems.filter((problem) => problem.severity === "error");
11977
11977
  if (errorLintProblems.length) {
11978
11978
  throw new Error(`${red("Found errors in Arazzo description")} ${bold(fileName)}`);
@@ -17311,6 +17311,22 @@ async function runStep({ step, ctx, workflowId, retriesLeft, executedStepsCount
17311
17311
  };
17312
17312
  }
17313
17313
  }
17314
+ const childWorkflowFailed = calculateTotals([stepWorkflowResult]).steps.failed > 0;
17315
+ if (childWorkflowFailed) {
17316
+ const result = await runActions(failureActionsToRun, "failure", executedStepsCount);
17317
+ if (result?.retriesLeft && result.retriesLeft > 0) {
17318
+ return result.stepResult;
17319
+ }
17320
+ if (result?.shouldEnd) {
17321
+ return { shouldEnd: true };
17322
+ }
17323
+ }
17324
+ if (successActionsToRun.length && !childWorkflowFailed) {
17325
+ const result = await runActions(successActionsToRun, "success", executedStepsCount);
17326
+ if (result?.shouldEnd) {
17327
+ return { shouldEnd: true };
17328
+ }
17329
+ }
17314
17330
  return { shouldEnd: false };
17315
17331
  }
17316
17332
  ctx.executedSteps.push(step);
@@ -2,13 +2,13 @@ import { createRequire as __createRequire } from 'node:module';
2
2
  const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  RedoclyOAuthClient
5
- } from "./PVILCIEK.js";
5
+ } from "./GCAYTKJY.js";
6
6
  import "./Y6DTFCLS.js";
7
7
  import "./4FB5ZIPP.js";
8
- import "./6DYZ77KC.js";
8
+ import "./YPFS42IW.js";
9
9
  import "./XB6C62FW.js";
10
10
  import "./UUU33DK3.js";
11
- import "./HT6ZGKQQ.js";
11
+ import "./Z3EJWJEX.js";
12
12
  import "./Z2I5YXYN.js";
13
13
  import "./5ILQMFXK.js";
14
14
  export {
@@ -13,7 +13,7 @@ import {
13
13
  resolvePathForServer,
14
14
  shouldIgnoreHeaderAsUndocumented,
15
15
  splitSetCookieHeader
16
- } from "./TYUOO44G.js";
16
+ } from "./PU67EGEM.js";
17
17
  import {
18
18
  BaseResolver,
19
19
  blue,
@@ -35,7 +35,7 @@ import {
35
35
  require_dist,
36
36
  walkDocument,
37
37
  yellow
38
- } from "./HT6ZGKQQ.js";
38
+ } from "./Z3EJWJEX.js";
39
39
  import {
40
40
  __toESM
41
41
  } from "./5ILQMFXK.js";
@@ -1751,6 +1751,7 @@ function relaxRequiredForTarget(schema, target, ancestors = /* @__PURE__ */ new
1751
1751
  }
1752
1752
  var SchemaValidator = class {
1753
1753
  ajv;
1754
+ fallbackAjv;
1754
1755
  objectSchemaCaches = {
1755
1756
  none: /* @__PURE__ */ new WeakMap(),
1756
1757
  request: /* @__PURE__ */ new WeakMap(),
@@ -1758,10 +1759,11 @@ var SchemaValidator = class {
1758
1759
  };
1759
1760
  scalarSchemaCache = /* @__PURE__ */ new Map();
1760
1761
  constructor(options) {
1761
- this.ajv = new AjvConstructor({
1762
+ const ajvOptions = {
1762
1763
  strict: false,
1763
1764
  allErrors: true,
1764
1765
  allowUnionTypes: true,
1766
+ discriminator: true,
1765
1767
  coerceTypes: options?.coerceTypes ? "array" : false,
1766
1768
  validateFormats: true,
1767
1769
  verbose: true,
@@ -1770,8 +1772,11 @@ var SchemaValidator = class {
1770
1772
  // Treat it as a no-op format to avoid noisy unknown-format warnings.
1771
1773
  enum: true
1772
1774
  }
1773
- });
1775
+ };
1776
+ this.ajv = new AjvConstructor(ajvOptions);
1777
+ this.fallbackAjv = new AjvConstructor({ ...ajvOptions, discriminator: false });
1774
1778
  applyFormats(this.ajv);
1779
+ applyFormats(this.fallbackAjv);
1775
1780
  }
1776
1781
  validate(schema, value, target) {
1777
1782
  if (schema === void 0) {
@@ -1802,7 +1807,7 @@ var SchemaValidator = class {
1802
1807
  return cached2;
1803
1808
  }
1804
1809
  const effectiveSchema = target ? relaxRequiredForTarget(schema, target) : schema;
1805
- const compiled2 = this.ajv.compile(effectiveSchema);
1810
+ const compiled2 = this.compileSchema(effectiveSchema);
1806
1811
  cache.set(schema, compiled2);
1807
1812
  return compiled2;
1808
1813
  }
@@ -1811,10 +1816,17 @@ var SchemaValidator = class {
1811
1816
  if (cached) {
1812
1817
  return cached;
1813
1818
  }
1814
- const compiled = this.ajv.compile(schema);
1819
+ const compiled = this.compileSchema(schema);
1815
1820
  this.scalarSchemaCache.set(cacheKey, compiled);
1816
1821
  return compiled;
1817
1822
  }
1823
+ compileSchema(schema) {
1824
+ try {
1825
+ return this.ajv.compile(schema);
1826
+ } catch {
1827
+ return this.fallbackAjv.compile(schema);
1828
+ }
1829
+ }
1818
1830
  };
1819
1831
 
1820
1832
  // src/commands/drift/engine/validation-session.ts
@@ -2,7 +2,7 @@ import { createRequire as __createRequire } from 'node:module';
2
2
  const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  selectTrafficParser
5
- } from "./JBIFNX5C.js";
5
+ } from "./Y7LKQTQ4.js";
6
6
  import {
7
7
  getPathWithoutTrailingSlash,
8
8
  isJsonMime,
@@ -12,14 +12,14 @@ import {
12
12
  normalizeFsPath,
13
13
  normalizeServerPrefix,
14
14
  resolvePathForServer
15
- } from "./TYUOO44G.js";
15
+ } from "./PU67EGEM.js";
16
16
  import {
17
17
  OPENAPI3_METHOD_NAMES,
18
18
  Spinner
19
- } from "./OYO2D2IL.js";
19
+ } from "./64PJUTGH.js";
20
20
  import {
21
21
  exitWithError
22
- } from "./4BR7G6JO.js";
22
+ } from "./CUWLBJXP.js";
23
23
  import {
24
24
  createConfig,
25
25
  isPlainObject,
@@ -28,7 +28,7 @@ import {
28
28
  parseYaml,
29
29
  pluralize,
30
30
  stringifyYaml
31
- } from "./HT6ZGKQQ.js";
31
+ } from "./Z3EJWJEX.js";
32
32
  import "./Z2I5YXYN.js";
33
33
  import "./5ILQMFXK.js";
34
34
 
@@ -1032,16 +1032,18 @@ async function runCursor(request) {
1032
1032
  if (request.model) {
1033
1033
  args.push("--model", request.model);
1034
1034
  }
1035
- args.push(request.system);
1035
+ const prompt = `${request.system}
1036
+
1037
+ ${request.user}`;
1036
1038
  let result;
1037
1039
  try {
1038
- result = await runCommand("cursor-agent", args, request.user);
1040
+ result = await runCommand("cursor-agent", args, prompt);
1039
1041
  } catch (error) {
1040
1042
  if (!(error instanceof CliNotFoundError)) {
1041
1043
  throw error;
1042
1044
  }
1043
1045
  try {
1044
- result = await runCommand("agent", args, request.user);
1046
+ result = await runCommand("agent", args, prompt);
1045
1047
  } catch (fallbackError) {
1046
1048
  if (fallbackError instanceof CliNotFoundError) {
1047
1049
  throw new CliNotFoundError(
@@ -10,7 +10,7 @@ import {
10
10
  } from "./Y6DTFCLS.js";
11
11
  import {
12
12
  version
13
- } from "./6DYZ77KC.js";
13
+ } from "./YPFS42IW.js";
14
14
  import {
15
15
  diag,
16
16
  esm_exports,
@@ -2,7 +2,7 @@ import { createRequire as __createRequire } from 'node:module';
2
2
  const require = __createRequire(import.meta.url);
3
3
  import {
4
4
  isPlainObject
5
- } from "./HT6ZGKQQ.js";
5
+ } from "./Z3EJWJEX.js";
6
6
 
7
7
  // src/commands/drift/utils/files.ts
8
8
  import { open, readdir, stat } from "node:fs/promises";
@@ -121,11 +121,12 @@ var IGNORED_UNDOCUMENTED_HEADERS = /* @__PURE__ */ new Set([
121
121
  "upgrade-insecure-requests",
122
122
  "user-agent",
123
123
  "via",
124
- "x-amzn-trace-id",
125
124
  "x-client-trace-id",
126
125
  "x-cloud-trace-context",
127
126
  "x-correlation-id",
128
127
  "x-http-method-override",
128
+ "x-hub-signature",
129
+ "x-hub-signature-256",
129
130
  "x-method-override",
130
131
  "x-real-ip",
131
132
  "x-request-id",
@@ -138,9 +139,12 @@ var IGNORED_UNDOCUMENTED_HEADER_PREFIXES = [
138
139
  "cf-",
139
140
  "sec-ch-",
140
141
  "sec-fetch-",
142
+ "x-amz-",
143
+ "x-amzn-",
141
144
  "x-b3-",
142
145
  "x-envoy-",
143
- "x-forwarded-"
146
+ "x-forwarded-",
147
+ "x-github-"
144
148
  ];
145
149
  var SET_COOKIE_SEPARATOR = "\n";
146
150
  function splitSetCookieHeader(value) {
@@ -5,23 +5,23 @@ import {
5
5
  loadOpenApiIndex,
6
6
  parseCsv,
7
7
  renderReport
8
- } from "./V2UTD4F3.js";
8
+ } from "./LZNQHR3A.js";
9
9
  import {
10
10
  createNormalizedExchange,
11
11
  isJsonMime,
12
12
  normalizeFsPath
13
- } from "./TYUOO44G.js";
13
+ } from "./PU67EGEM.js";
14
14
  import {
15
15
  AbortFlowError,
16
16
  exitWithError
17
- } from "./4BR7G6JO.js";
17
+ } from "./CUWLBJXP.js";
18
18
  import {
19
19
  require_undici
20
20
  } from "./XB6C62FW.js";
21
21
  import {
22
22
  isPlainObject,
23
23
  logger
24
- } from "./HT6ZGKQQ.js";
24
+ } from "./Z3EJWJEX.js";
25
25
  import "./Z2I5YXYN.js";
26
26
  import {
27
27
  __toESM