@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 +1 -1
- package/THIRD_PARTY_NOTICES +4 -4
- package/lib/chunks/{OYO2D2IL.js → 64PJUTGH.js} +1 -1
- package/lib/chunks/{4BR7G6JO.js → CUWLBJXP.js} +1 -1
- package/lib/chunks/{PVILCIEK.js → GCAYTKJY.js} +2 -2
- package/lib/chunks/{4GKD2B4N.js → HFIKZEXG.js} +5 -5
- package/lib/chunks/{RD4BYLLT.js → JR2DXWZO.js} +19 -3
- package/lib/chunks/{QCV6V37L.js → KWQEC5JF.js} +3 -3
- package/lib/chunks/{V2UTD4F3.js → LZNQHR3A.js} +18 -6
- package/lib/chunks/{NRZEGU6G.js → OFNDHNJR.js} +10 -8
- package/lib/chunks/{BFQ3EROY.js → OYU4O47C.js} +1 -1
- package/lib/chunks/{TYUOO44G.js → PU67EGEM.js} +7 -3
- package/lib/chunks/{3E6EHT7M.js → Q7LC24EZ.js} +4 -4
- package/lib/chunks/{73MCRGNI.js → RLUKQFWZ.js} +90 -24
- package/lib/chunks/{325TP2UK.js → UQJWXLNC.js} +2 -2
- package/lib/chunks/{ILH7YVRM.js → UV3RHVRI.js} +2 -2
- package/lib/chunks/{JBIFNX5C.js → Y7LKQTQ4.js} +2 -2
- package/lib/chunks/{6DYZ77KC.js → YPFS42IW.js} +3 -3
- package/lib/chunks/{HT6ZGKQQ.js → Z3EJWJEX.js} +174 -7
- package/lib/index.js +33 -28
- package/package.json +1 -1
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;
|