@redocly/cli 2.41.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 +1 -1
- package/lib/chunks/{LCWGF7G6.js → 64PJUTGH.js} +1 -1
- package/lib/chunks/{DT4UM7U4.js → CUWLBJXP.js} +1 -1
- package/lib/chunks/{Q3KTKRJH.js → GCAYTKJY.js} +2 -2
- package/lib/chunks/{HQDT5XFP.js → HFIKZEXG.js} +5 -5
- package/lib/chunks/{6ABF7ZRJ.js → JR2DXWZO.js} +3 -3
- package/lib/chunks/{SZLWDHZK.js → KWQEC5JF.js} +3 -3
- package/lib/chunks/{ZBZADNJT.js → LZNQHR3A.js} +18 -6
- package/lib/chunks/{PFPGSTSG.js → OFNDHNJR.js} +5 -5
- package/lib/chunks/{5YSNZVUA.js → OYU4O47C.js} +1 -1
- package/lib/chunks/{ER45DAHG.js → PU67EGEM.js} +7 -3
- package/lib/chunks/{GOFLD5MJ.js → Q7LC24EZ.js} +4 -4
- package/lib/chunks/{7H6CC6CT.js → RLUKQFWZ.js} +5 -5
- package/lib/chunks/{XDNYWH7V.js → UQJWXLNC.js} +2 -2
- package/lib/chunks/{VMHXZFTB.js → UV3RHVRI.js} +2 -2
- package/lib/chunks/{GBUMU6BX.js → Y7LKQTQ4.js} +2 -2
- package/lib/chunks/{Z5H4OEIW.js → YPFS42IW.js} +3 -3
- package/lib/chunks/{YK6T7IHG.js → Z3EJWJEX.js} +3 -2
- package/lib/index.js +33 -28
- package/package.json +1 -1
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](
|
|
109
|
+
Looking for more examples? Check out our [Cookbook](./cookbook/README.md).
|
|
110
110
|
|
|
111
111
|
### API contract testing with Respect
|
|
112
112
|
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./4FB5ZIPP.js";
|
|
9
9
|
import {
|
|
10
10
|
version
|
|
11
|
-
} from "./
|
|
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 "./
|
|
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 "./
|
|
5
|
+
} from "./Y7LKQTQ4.js";
|
|
6
6
|
import {
|
|
7
7
|
ValidationSession,
|
|
8
8
|
loadOpenApiIndex,
|
|
9
9
|
parseCsv,
|
|
10
10
|
renderReport
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./LZNQHR3A.js";
|
|
12
12
|
import {
|
|
13
13
|
listFilesRecursively,
|
|
14
14
|
normalizeFsPath
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./PU67EGEM.js";
|
|
16
16
|
import {
|
|
17
17
|
AbortFlowError,
|
|
18
18
|
exitWithError
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./CUWLBJXP.js";
|
|
20
20
|
import {
|
|
21
21
|
logger
|
|
22
|
-
} from "./
|
|
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 "./
|
|
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
|
|
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)}`);
|
|
@@ -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 "./
|
|
5
|
+
} from "./GCAYTKJY.js";
|
|
6
6
|
import "./Y6DTFCLS.js";
|
|
7
7
|
import "./4FB5ZIPP.js";
|
|
8
|
-
import "./
|
|
8
|
+
import "./YPFS42IW.js";
|
|
9
9
|
import "./XB6C62FW.js";
|
|
10
10
|
import "./UUU33DK3.js";
|
|
11
|
-
import "./
|
|
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 "./
|
|
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 "./
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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 "./
|
|
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 "./
|
|
15
|
+
} from "./PU67EGEM.js";
|
|
16
16
|
import {
|
|
17
17
|
OPENAPI3_METHOD_NAMES,
|
|
18
18
|
Spinner
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./64PJUTGH.js";
|
|
20
20
|
import {
|
|
21
21
|
exitWithError
|
|
22
|
-
} from "./
|
|
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 "./
|
|
31
|
+
} from "./Z3EJWJEX.js";
|
|
32
32
|
import "./Z2I5YXYN.js";
|
|
33
33
|
import "./5ILQMFXK.js";
|
|
34
34
|
|
|
@@ -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 "./
|
|
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 "./
|
|
8
|
+
} from "./LZNQHR3A.js";
|
|
9
9
|
import {
|
|
10
10
|
createNormalizedExchange,
|
|
11
11
|
isJsonMime,
|
|
12
12
|
normalizeFsPath
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./PU67EGEM.js";
|
|
14
14
|
import {
|
|
15
15
|
AbortFlowError,
|
|
16
16
|
exitWithError
|
|
17
|
-
} from "./
|
|
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 "./
|
|
24
|
+
} from "./Z3EJWJEX.js";
|
|
25
25
|
import "./Z2I5YXYN.js";
|
|
26
26
|
import {
|
|
27
27
|
__toESM
|
|
@@ -3,17 +3,17 @@ const require = __createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getExecutionTime,
|
|
5
5
|
getFallbackApisOrExit
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./UQJWXLNC.js";
|
|
7
7
|
import {
|
|
8
8
|
exitWithError
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./CUWLBJXP.js";
|
|
10
10
|
import {
|
|
11
11
|
require_dist
|
|
12
12
|
} from "./4FB5ZIPP.js";
|
|
13
13
|
import {
|
|
14
14
|
redocStandaloneSri,
|
|
15
15
|
redocVersion
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./YPFS42IW.js";
|
|
17
17
|
import {
|
|
18
18
|
require_json_pointer,
|
|
19
19
|
require_openapi_sampler
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
require_fast_deep_equal,
|
|
26
26
|
require_json_schema_traverse,
|
|
27
27
|
require_pluralize
|
|
28
|
-
} from "./
|
|
28
|
+
} from "./Z3EJWJEX.js";
|
|
29
29
|
import "./Z2I5YXYN.js";
|
|
30
30
|
import {
|
|
31
31
|
__commonJS,
|
|
@@ -92334,7 +92334,7 @@ var handlerBuildCommand = async ({
|
|
|
92334
92334
|
const api = await import_redoc2.default.loadAndBundleSpec(
|
|
92335
92335
|
isAbsoluteUrl(pathToApi) ? pathToApi : resolve2(pathToApi)
|
|
92336
92336
|
);
|
|
92337
|
-
collectSpecData?.(api);
|
|
92337
|
+
collectSpecData?.({ parsed: api });
|
|
92338
92338
|
const pageHTML = await getPageHTML(api, pathToApi, { ...options, redocVersion }, argv.config);
|
|
92339
92339
|
mkdirSync(dirname2(options.output), { recursive: true });
|
|
92340
92340
|
writeFileSync(options.output, pageHTML);
|
|
@@ -3,7 +3,7 @@ const require = __createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
AbortFlowError,
|
|
5
5
|
exitWithError
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./CUWLBJXP.js";
|
|
7
7
|
import {
|
|
8
8
|
ConfigValidationError,
|
|
9
9
|
HandledError,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
red,
|
|
28
28
|
stringifyYaml,
|
|
29
29
|
yellow
|
|
30
|
-
} from "./
|
|
30
|
+
} from "./Z3EJWJEX.js";
|
|
31
31
|
|
|
32
32
|
// src/commands/lint.ts
|
|
33
33
|
import { performance as performance3 } from "perf_hooks";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
maskSecrets,
|
|
9
9
|
parseRuntimeExpression,
|
|
10
10
|
run
|
|
11
|
-
} from "./
|
|
11
|
+
} from "./JR2DXWZO.js";
|
|
12
12
|
import "./VXIQEZPR.js";
|
|
13
13
|
import "./UUU33DK3.js";
|
|
14
|
-
import "./
|
|
14
|
+
import "./Z3EJWJEX.js";
|
|
15
15
|
import "./Z2I5YXYN.js";
|
|
16
16
|
import "./5ILQMFXK.js";
|
|
17
17
|
export {
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
pickHeaderContentType,
|
|
11
11
|
readProbe,
|
|
12
12
|
streamNdjsonObjects
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./PU67EGEM.js";
|
|
14
14
|
import {
|
|
15
15
|
isPlainObject
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./Z3EJWJEX.js";
|
|
17
17
|
|
|
18
18
|
// src/commands/drift/log-formats/har.ts
|
|
19
19
|
import path from "node:path";
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@redocly/cli",
|
|
7
|
-
version: "2.41.
|
|
7
|
+
version: "2.41.1",
|
|
8
8
|
description: "",
|
|
9
9
|
license: "MIT",
|
|
10
10
|
bin: {
|
|
@@ -49,8 +49,8 @@ var package_default = {
|
|
|
49
49
|
"@opentelemetry/sdk-trace-node": "2.8.0",
|
|
50
50
|
"@opentelemetry/semantic-conventions": "1.41.1",
|
|
51
51
|
"@redocly/cli-otel": "0.3.4",
|
|
52
|
-
"@redocly/openapi-core": "2.41.
|
|
53
|
-
"@redocly/respect-core": "2.41.
|
|
52
|
+
"@redocly/openapi-core": "2.41.1",
|
|
53
|
+
"@redocly/respect-core": "2.41.1",
|
|
54
54
|
"@types/cookie": "0.6.0",
|
|
55
55
|
"@types/har-format": "^1.2.16",
|
|
56
56
|
"@types/react": "^17.0.0 || ^18.2.21 || ^19.2.16",
|
|
@@ -38154,7 +38154,7 @@ async function bundle(opts) {
|
|
|
38154
38154
|
if (document instanceof Error) {
|
|
38155
38155
|
throw document;
|
|
38156
38156
|
}
|
|
38157
|
-
opts.collectSpecData?.(document
|
|
38157
|
+
opts.collectSpecData?.(document);
|
|
38158
38158
|
return bundleDocument({
|
|
38159
38159
|
document,
|
|
38160
38160
|
...opts,
|
|
@@ -39144,7 +39144,7 @@ var redoclyConfigSchemaWithoutTheme2 = {
|
|
|
39144
39144
|
async function lint(opts) {
|
|
39145
39145
|
const { ref, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts;
|
|
39146
39146
|
const document = await externalRefResolver.resolveDocument(null, ref, true);
|
|
39147
|
-
opts.collectSpecData?.(document
|
|
39147
|
+
opts.collectSpecData?.(document);
|
|
39148
39148
|
return lintDocument({
|
|
39149
39149
|
document,
|
|
39150
39150
|
...opts,
|
|
@@ -39297,6 +39297,7 @@ export {
|
|
|
39297
39297
|
detectSpec,
|
|
39298
39298
|
require_dist,
|
|
39299
39299
|
isSupportedExtension,
|
|
39300
|
+
isGraphqlRef,
|
|
39300
39301
|
ResolveError,
|
|
39301
39302
|
BaseResolver,
|
|
39302
39303
|
resolveDocument,
|
package/lib/index.js
CHANGED
|
@@ -28,16 +28,16 @@ import {
|
|
|
28
28
|
saveBundle,
|
|
29
29
|
sortTopLevelKeys,
|
|
30
30
|
writeToFileByExtension
|
|
31
|
-
} from "./chunks/
|
|
31
|
+
} from "./chunks/UQJWXLNC.js";
|
|
32
32
|
import {
|
|
33
33
|
OPENAPI3_COMPONENT_NAMES,
|
|
34
34
|
OPENAPI3_METHOD_NAMES,
|
|
35
35
|
Spinner
|
|
36
|
-
} from "./chunks/
|
|
36
|
+
} from "./chunks/64PJUTGH.js";
|
|
37
37
|
import {
|
|
38
38
|
AbortFlowError,
|
|
39
39
|
exitWithError
|
|
40
|
-
} from "./chunks/
|
|
40
|
+
} from "./chunks/CUWLBJXP.js";
|
|
41
41
|
import {
|
|
42
42
|
RedoclyOAuthClient,
|
|
43
43
|
ReuniteApi,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
getProxyUrl,
|
|
48
48
|
getReuniteUrl,
|
|
49
49
|
shouldBypassProxy
|
|
50
|
-
} from "./chunks/
|
|
50
|
+
} from "./chunks/GCAYTKJY.js";
|
|
51
51
|
import {
|
|
52
52
|
ANONYMOUS_ID_CACHE_FILE,
|
|
53
53
|
DEFAULT_FETCH_TIMEOUT,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
engines,
|
|
59
59
|
name,
|
|
60
60
|
version
|
|
61
|
-
} from "./chunks/
|
|
61
|
+
} from "./chunks/YPFS42IW.js";
|
|
62
62
|
import {
|
|
63
63
|
require_undici
|
|
64
64
|
} from "./chunks/XB6C62FW.js";
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
RESET_ESCAPE_CODE,
|
|
67
67
|
calculateTotals,
|
|
68
68
|
conditionallyMaskSecrets
|
|
69
|
-
} from "./chunks/
|
|
69
|
+
} from "./chunks/JR2DXWZO.js";
|
|
70
70
|
import "./chunks/VXIQEZPR.js";
|
|
71
71
|
import "./chunks/UUU33DK3.js";
|
|
72
72
|
import {
|
|
@@ -94,6 +94,7 @@ import {
|
|
|
94
94
|
green,
|
|
95
95
|
isAbsoluteUrl,
|
|
96
96
|
isEmptyObject,
|
|
97
|
+
isGraphqlRef,
|
|
97
98
|
isMappingRef,
|
|
98
99
|
isNotEmptyObject,
|
|
99
100
|
isPlainObject,
|
|
@@ -119,7 +120,7 @@ import {
|
|
|
119
120
|
white,
|
|
120
121
|
xmlEscape,
|
|
121
122
|
yellow
|
|
122
|
-
} from "./chunks/
|
|
123
|
+
} from "./chunks/Z3EJWJEX.js";
|
|
123
124
|
import "./chunks/Z2I5YXYN.js";
|
|
124
125
|
import {
|
|
125
126
|
__commonJS,
|
|
@@ -7714,7 +7715,7 @@ async function handleGenerateArazzo({
|
|
|
7714
7715
|
config: config3
|
|
7715
7716
|
};
|
|
7716
7717
|
try {
|
|
7717
|
-
const { generate } = await import("./chunks/
|
|
7718
|
+
const { generate } = await import("./chunks/UV3RHVRI.js");
|
|
7718
7719
|
logger.info(gray("\n Generating Arazzo description... \n"));
|
|
7719
7720
|
const generatedArazzo = await generate(options);
|
|
7720
7721
|
writeFileSync2(outputFile, stringifyYaml(generatedArazzo));
|
|
@@ -8396,7 +8397,7 @@ Please choose only one!`
|
|
|
8396
8397
|
for (const document of documents) {
|
|
8397
8398
|
try {
|
|
8398
8399
|
const version3 = detectSpec(document.parsed);
|
|
8399
|
-
collectSpecData?.(document
|
|
8400
|
+
collectSpecData?.(document);
|
|
8400
8401
|
if (version3 !== "oas3_0" && version3 !== "oas3_1" && version3 !== "oas3_2") {
|
|
8401
8402
|
return exitWithError(
|
|
8402
8403
|
`Only OpenAPI 3.0, 3.1, and 3.2 are supported: ${blue(document.source.absoluteRef)}.`
|
|
@@ -9166,7 +9167,7 @@ async function handleRespect({
|
|
|
9166
9167
|
let mtlsCerts;
|
|
9167
9168
|
let harLogs;
|
|
9168
9169
|
try {
|
|
9169
|
-
const { run, conditionallyMaskSecrets: conditionallyMaskSecrets2 } = await import("./chunks/
|
|
9170
|
+
const { run, conditionallyMaskSecrets: conditionallyMaskSecrets2 } = await import("./chunks/UV3RHVRI.js");
|
|
9170
9171
|
const workingDir = config3.configPath ? dirname4(config3.configPath) : process.cwd();
|
|
9171
9172
|
if (argv.mtls) {
|
|
9172
9173
|
mtlsCerts = resolveMtlsCertificates(argv.mtls, workingDir);
|
|
@@ -10382,7 +10383,7 @@ async function handleScore({ argv, config: config3, collectSpecData }) {
|
|
|
10382
10383
|
const [{ path: path28 }] = await getFallbackApisOrExit(argv.api ? [argv.api] : [], config3);
|
|
10383
10384
|
const externalRefResolver = new BaseResolver(config3.resolve);
|
|
10384
10385
|
const { bundle: document } = await bundle({ config: config3, ref: path28 });
|
|
10385
|
-
collectSpecData?.(document
|
|
10386
|
+
collectSpecData?.(document);
|
|
10386
10387
|
const specVersion = detectSpec(document.parsed);
|
|
10387
10388
|
if (getMajorSpecVersion(specVersion) !== "oas3") {
|
|
10388
10389
|
return exitWithError(
|
|
@@ -11212,7 +11213,7 @@ async function handleScorecardClassic({
|
|
|
11212
11213
|
}
|
|
11213
11214
|
const externalRefResolver = new BaseResolver(config3.resolve);
|
|
11214
11215
|
const document = await externalRefResolver.resolveDocument(null, path28, true);
|
|
11215
|
-
collectSpecData?.(document
|
|
11216
|
+
collectSpecData?.(document);
|
|
11216
11217
|
const documentInfo = document.parsed?.info;
|
|
11217
11218
|
const builtInMetadata = documentInfo?.["x-metadata"] || {};
|
|
11218
11219
|
const metadata = {
|
|
@@ -11851,7 +11852,7 @@ async function handleSplit({ argv, collectSpecData }) {
|
|
|
11851
11852
|
const ext = getAndValidateFileExtension(api);
|
|
11852
11853
|
if (!fs13.existsSync(api)) exitWithError(`File ${blue(api)} does not exist.`);
|
|
11853
11854
|
const definition = readYaml(api);
|
|
11854
|
-
collectSpecData?.(definition);
|
|
11855
|
+
collectSpecData?.({ parsed: definition });
|
|
11855
11856
|
const specVersion = detectSpec(definition);
|
|
11856
11857
|
switch (specVersion) {
|
|
11857
11858
|
case "async2":
|
|
@@ -11991,7 +11992,7 @@ async function handleStats({ argv, config: config3, collectSpecData }) {
|
|
|
11991
11992
|
const [{ path: path28 }] = await getFallbackApisOrExit(argv.api ? [argv.api] : [], config3);
|
|
11992
11993
|
const externalRefResolver = new BaseResolver(config3.resolve);
|
|
11993
11994
|
const { bundle: document } = await bundle({ config: config3, ref: path28 });
|
|
11994
|
-
collectSpecData?.(document
|
|
11995
|
+
collectSpecData?.(document);
|
|
11995
11996
|
const specVersion = detectSpec(document.parsed);
|
|
11996
11997
|
const types = normalizeTypes(config3.extendTypes(getTypes(specVersion), specVersion), config3);
|
|
11997
11998
|
const { statsVisitor, statsAccumulator } = resolveStatsVisitorAndAccumulator(specVersion);
|
|
@@ -12642,7 +12643,7 @@ async function sendTelemetry({
|
|
|
12642
12643
|
$0: _,
|
|
12643
12644
|
...args
|
|
12644
12645
|
} = argv;
|
|
12645
|
-
const { RedoclyOAuthClient: RedoclyOAuthClient2 } = await import("./chunks/
|
|
12646
|
+
const { RedoclyOAuthClient: RedoclyOAuthClient2 } = await import("./chunks/KWQEC5JF.js");
|
|
12646
12647
|
const oauthClient = new RedoclyOAuthClient2();
|
|
12647
12648
|
const reuniteUrl = getReuniteUrl(config3, args.residency);
|
|
12648
12649
|
const logged_in = await oauthClient.isAuthorized(reuniteUrl);
|
|
@@ -12690,7 +12691,7 @@ async function sendTelemetry({
|
|
|
12690
12691
|
category: "product",
|
|
12691
12692
|
data: eventData
|
|
12692
12693
|
});
|
|
12693
|
-
const { otelTelemetry } = await import("./chunks/
|
|
12694
|
+
const { otelTelemetry } = await import("./chunks/OYU4O47C.js");
|
|
12694
12695
|
otelTelemetry.send(cloudEvent);
|
|
12695
12696
|
} catch (err) {
|
|
12696
12697
|
}
|
|
@@ -12905,24 +12906,28 @@ function commandWrapper(commandHandler) {
|
|
|
12905
12906
|
const respectXSecurityAuthTypes = /* @__PURE__ */ new Set();
|
|
12906
12907
|
const respectSourceDescriptionTypes = /* @__PURE__ */ new Set();
|
|
12907
12908
|
const respectCriterionObjectTypes = /* @__PURE__ */ new Set();
|
|
12908
|
-
const collectSpecData = (document) => {
|
|
12909
|
+
const collectSpecData = ({ parsed: document, source }) => {
|
|
12910
|
+
specVersion = "unknown";
|
|
12911
|
+
specKeyword = void 0;
|
|
12912
|
+
specFullVersion = void 0;
|
|
12913
|
+
if (source?.absoluteRef && isGraphqlRef(source.absoluteRef)) {
|
|
12914
|
+
specVersion = "graphql";
|
|
12915
|
+
return;
|
|
12916
|
+
}
|
|
12909
12917
|
try {
|
|
12910
12918
|
specVersion = detectSpec(document);
|
|
12911
12919
|
} catch (err) {
|
|
12912
|
-
specVersion =
|
|
12920
|
+
specVersion = "unsupported";
|
|
12913
12921
|
}
|
|
12914
12922
|
if (!isPlainObject(document)) return;
|
|
12915
12923
|
specKeyword = document?.openapi ? "openapi" : document?.swagger ? "swagger" : document?.asyncapi ? "asyncapi" : document?.arazzo ? "arazzo" : document?.overlay ? "overlay" : void 0;
|
|
12916
12924
|
if (specKeyword) {
|
|
12917
12925
|
specFullVersion = document[specKeyword];
|
|
12918
|
-
} else {
|
|
12919
|
-
specFullVersion = void 0;
|
|
12920
12926
|
}
|
|
12921
12927
|
if (getMajorSpecVersion(specVersion) === "arazzo1") {
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
collectCriterionObjectTypes(arazzoDocument, respectCriterionObjectTypes);
|
|
12928
|
+
collectXSecurityAuthTypes(document, respectXSecurityAuthTypes);
|
|
12929
|
+
collectSourceDescriptionTypes(document, respectSourceDescriptionTypes);
|
|
12930
|
+
collectCriterionObjectTypes(document, respectCriterionObjectTypes);
|
|
12926
12931
|
}
|
|
12927
12932
|
};
|
|
12928
12933
|
try {
|
|
@@ -13520,7 +13525,7 @@ yargs_default(hideBin(process.argv)).version("version", "Show version number.",
|
|
|
13520
13525
|
return true;
|
|
13521
13526
|
}),
|
|
13522
13527
|
async (argv) => {
|
|
13523
|
-
const { handlerBuildCommand } = await import("./chunks/
|
|
13528
|
+
const { handlerBuildCommand } = await import("./chunks/RLUKQFWZ.js");
|
|
13524
13529
|
commandWrapper(handlerBuildCommand)(argv);
|
|
13525
13530
|
}
|
|
13526
13531
|
).command(
|
|
@@ -13741,7 +13746,7 @@ yargs_default(hideBin(process.argv)).version("version", "Show version number.",
|
|
|
13741
13746
|
config: { describe: "Path to the config file.", type: "string" }
|
|
13742
13747
|
}),
|
|
13743
13748
|
async (argv) => {
|
|
13744
|
-
const { handleGenerateSpec } = await import("./chunks/
|
|
13749
|
+
const { handleGenerateSpec } = await import("./chunks/OFNDHNJR.js");
|
|
13745
13750
|
commandWrapper(handleGenerateSpec)(argv);
|
|
13746
13751
|
}
|
|
13747
13752
|
).command(
|
|
@@ -13856,7 +13861,7 @@ yargs_default(hideBin(process.argv)).version("version", "Show version number.",
|
|
|
13856
13861
|
}
|
|
13857
13862
|
}),
|
|
13858
13863
|
async (argv) => {
|
|
13859
|
-
const { handleDrift } = await import("./chunks/
|
|
13864
|
+
const { handleDrift } = await import("./chunks/HFIKZEXG.js");
|
|
13860
13865
|
commandWrapper(handleDrift)(argv);
|
|
13861
13866
|
}
|
|
13862
13867
|
).command(
|
|
@@ -13924,7 +13929,7 @@ yargs_default(hideBin(process.argv)).version("version", "Show version number.",
|
|
|
13924
13929
|
}
|
|
13925
13930
|
}),
|
|
13926
13931
|
async (argv) => {
|
|
13927
|
-
const { handleProxy } = await import("./chunks/
|
|
13932
|
+
const { handleProxy } = await import("./chunks/Q7LC24EZ.js");
|
|
13928
13933
|
commandWrapper(handleProxy)(argv);
|
|
13929
13934
|
}
|
|
13930
13935
|
).completion("completion", "Generate autocomplete script for `redocly` command.").demandCommand(1).middleware([notifyUpdateCliVersion]).strict().argv;
|