@redocly/cli 0.0.0-snapshot.1785229997 → 0.0.0-snapshot.1785244667
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/lib/chunks/{UIDQCTVI.js → 6LUUJ5LR.js} +1 -1
- package/lib/chunks/{ZCF2YWSB.js → HFIKZEXG.js} +3 -3
- package/lib/chunks/{ADJRH7PP.js → JR2DXWZO.js} +31 -131
- package/lib/chunks/{DCWPEC35.js → L5HQXVA6.js} +1 -1
- package/lib/chunks/{RMTDGHBP.js → LZNQHR3A.js} +17 -5
- package/lib/chunks/{O5U7AESV.js → NSPKCBBA.js} +2 -2
- package/lib/chunks/{OX5JLHET.js → OFNDHNJR.js} +2 -2
- package/lib/chunks/{PAZIZVGW.js → PU67EGEM.js} +6 -2
- package/lib/chunks/{PALJTNKL.js → Q7LC24EZ.js} +2 -2
- package/lib/chunks/{3UGBCSN6.js → RMOZ27PP.js} +3 -3
- package/lib/chunks/{WTUD47FM.js → SEUM4EAD.js} +1 -1
- package/lib/chunks/{T2IFVCFM.js → UV3RHVRI.js} +1 -1
- package/lib/chunks/{OEBTCJXO.js → Y7LKQTQ4.js} +1 -1
- package/lib/index.js +17 -16
- package/package.json +1 -1
|
@@ -2,17 +2,17 @@ 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
|
|
@@ -3070,35 +3070,6 @@ var {
|
|
|
3070
3070
|
bgWhiteBright
|
|
3071
3071
|
} = createColors();
|
|
3072
3072
|
|
|
3073
|
-
// ../respect-core/lib/modules/context-parser/resolve-workflow-reference.js
|
|
3074
|
-
function parseSourceDescriptionWorkflowRef(ref) {
|
|
3075
|
-
if (!ref.startsWith("$sourceDescriptions.")) {
|
|
3076
|
-
return void 0;
|
|
3077
|
-
}
|
|
3078
|
-
const parts = ref.split(".");
|
|
3079
|
-
if (parts.length === 3 && parts[1] && parts[2]) {
|
|
3080
|
-
return { sourceDescriptionName: parts[1], workflowId: parts[2], isLegacyForm: false };
|
|
3081
|
-
}
|
|
3082
|
-
if (parts.length === 4 && parts[2] === "workflows" && parts[1] && parts[3]) {
|
|
3083
|
-
return { sourceDescriptionName: parts[1], workflowId: parts[3], isLegacyForm: true };
|
|
3084
|
-
}
|
|
3085
|
-
return void 0;
|
|
3086
|
-
}
|
|
3087
|
-
function resolveWorkflowReference({ ref, ctx }) {
|
|
3088
|
-
if (!ref) {
|
|
3089
|
-
return void 0;
|
|
3090
|
-
}
|
|
3091
|
-
if (!ref.startsWith("$")) {
|
|
3092
|
-
return "workflows" in ctx ? ctx.workflows?.find((workflow) => workflow.workflowId === ref) : void 0;
|
|
3093
|
-
}
|
|
3094
|
-
const parsedRef = parseSourceDescriptionWorkflowRef(ref);
|
|
3095
|
-
if (!parsedRef) {
|
|
3096
|
-
return void 0;
|
|
3097
|
-
}
|
|
3098
|
-
const workflows = ctx.$sourceDescriptions?.[parsedRef.sourceDescriptionName]?.workflows;
|
|
3099
|
-
return Array.isArray(workflows) ? workflows.find((workflow) => workflow.workflowId === parsedRef.workflowId) : void 0;
|
|
3100
|
-
}
|
|
3101
|
-
|
|
3102
3073
|
// ../respect-core/lib/modules/context-parser/get-value-from-context.js
|
|
3103
3074
|
var hasCurlyBraces = (input) => {
|
|
3104
3075
|
return /\{.*?\}/.test(input);
|
|
@@ -3331,35 +3302,18 @@ var resolveValue = (value2, ctx, logger) => {
|
|
|
3331
3302
|
if (path5.startsWith("$file(") && path5.endsWith(")")) {
|
|
3332
3303
|
return path5.slice(7, -2);
|
|
3333
3304
|
}
|
|
3334
|
-
if (path5.startsWith("$sourceDescriptions.")) {
|
|
3335
|
-
const
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
if (!sourceDescriptionDocument) {
|
|
3341
|
-
throw new Error(`Can't resolve ${red(path5)}: source description ${red(sourceDescriptionName)} is not found. Available source descriptions: ${Object.keys(sourceDescriptions ?? {}).join(", ")}.`);
|
|
3342
|
-
}
|
|
3343
|
-
const workflow = resolveWorkflowReference({ ref: path5, ctx });
|
|
3344
|
-
if (workflow) {
|
|
3345
|
-
return workflow;
|
|
3346
|
-
}
|
|
3347
|
-
if (!isLegacyForm) {
|
|
3348
|
-
const sourceDescriptionObject = ("sourceDescriptions" in ctx ? ctx.sourceDescriptions : void 0)?.find(({ name }) => name === sourceDescriptionName);
|
|
3349
|
-
if (sourceDescriptionObject && Object.prototype.hasOwnProperty.call(sourceDescriptionObject, reference)) {
|
|
3350
|
-
return sourceDescriptionObject[reference];
|
|
3351
|
-
}
|
|
3352
|
-
if (Object.prototype.hasOwnProperty.call(sourceDescriptionDocument, reference)) {
|
|
3353
|
-
return sourceDescriptionDocument[reference];
|
|
3354
|
-
}
|
|
3355
|
-
}
|
|
3356
|
-
const availableWorkflows = (Array.isArray(sourceDescriptionDocument.workflows) ? sourceDescriptionDocument.workflows : []).map((workflow2) => workflow2.workflowId).join(", ");
|
|
3357
|
-
const availableWorkflowsHint = availableWorkflows ? ` Available workflows: ${availableWorkflows}.` : "";
|
|
3358
|
-
throw new Error(isLegacyForm ? `Can't resolve ${red(path5)}: workflow ${red(reference)} is not found in source description ${red(sourceDescriptionName)}.${availableWorkflowsHint}` : `Can't resolve ${red(path5)}: ${red(reference)} does not match a workflow or a field of source description ${red(sourceDescriptionName)}.${availableWorkflowsHint}`);
|
|
3305
|
+
if (path5.startsWith("$sourceDescriptions.") && path5.includes(".workflows.")) {
|
|
3306
|
+
const parts = path5.split(".");
|
|
3307
|
+
const sourceDescriptionName = parts[1];
|
|
3308
|
+
const workflowId = parts[3];
|
|
3309
|
+
if (!sourceDescriptionName || !workflowId) {
|
|
3310
|
+
return void 0;
|
|
3359
3311
|
}
|
|
3360
|
-
|
|
3361
|
-
|
|
3312
|
+
const sourceDescriptions = getFrom(ctx)("$sourceDescriptions");
|
|
3313
|
+
if (!sourceDescriptions[sourceDescriptionName]) {
|
|
3314
|
+
return void 0;
|
|
3362
3315
|
}
|
|
3316
|
+
return sourceDescriptions[sourceDescriptionName].workflows.find((workflow) => workflow.workflowId === workflowId);
|
|
3363
3317
|
}
|
|
3364
3318
|
if (path5 && path5.trim().startsWith("faker.")) {
|
|
3365
3319
|
return getFakeData({ pointer: path5, ctx, logger });
|
|
@@ -17282,7 +17236,7 @@ async function runStep({ step, ctx, workflowId, retriesLeft, executedStepsCount
|
|
|
17282
17236
|
const successActionsToRun = (onSuccess || workflow?.successActions || []).map((action) => resolveReusableComponentItem(action, ctx));
|
|
17283
17237
|
const resolvedParameters = parameters?.map((parameter) => resolveReusableComponentItem(parameter, ctx));
|
|
17284
17238
|
if (targetWorkflowRef) {
|
|
17285
|
-
const targetWorkflow =
|
|
17239
|
+
const targetWorkflow = ctx.workflows.find((w32) => w32.workflowId === targetWorkflowRef) || getValueFromContext({ value: targetWorkflowRef, ctx, logger: ctx.options.logger });
|
|
17286
17240
|
if (!targetWorkflow) {
|
|
17287
17241
|
const failedCall = {
|
|
17288
17242
|
name: CHECKS.UNEXPECTED_ERROR,
|
|
@@ -17291,9 +17245,7 @@ async function runStep({ step, ctx, workflowId, retriesLeft, executedStepsCount
|
|
|
17291
17245
|
severity: ctx.severity["UNEXPECTED_ERROR"]
|
|
17292
17246
|
};
|
|
17293
17247
|
step.checks.push(failedCall);
|
|
17294
|
-
|
|
17295
|
-
printUnknownStep(step, ctx.options.logger);
|
|
17296
|
-
return { shouldEnd: true };
|
|
17248
|
+
return;
|
|
17297
17249
|
}
|
|
17298
17250
|
const workflowCtx = await resolveWorkflowContext(targetWorkflowRef, targetWorkflow, ctx, ctx.options.config);
|
|
17299
17251
|
if (resolvedParameters && resolvedParameters.length > 0) {
|
|
@@ -17347,8 +17299,6 @@ async function runStep({ step, ctx, workflowId, retriesLeft, executedStepsCount
|
|
|
17347
17299
|
severity: ctx.severity["UNEXPECTED_ERROR"]
|
|
17348
17300
|
};
|
|
17349
17301
|
step.checks.push(failedCall);
|
|
17350
|
-
ctx.executedSteps.push(step);
|
|
17351
|
-
printUnknownStep(step, ctx.options.logger);
|
|
17352
17302
|
}
|
|
17353
17303
|
ctx.$steps[stepId] = {
|
|
17354
17304
|
outputs
|
|
@@ -17462,23 +17412,10 @@ async function runStep({ step, ctx, workflowId, retriesLeft, executedStepsCount
|
|
|
17462
17412
|
}
|
|
17463
17413
|
}
|
|
17464
17414
|
async function runActions(actions = [], kind, executedStepsCount2) {
|
|
17465
|
-
function failStepWithActionError(message) {
|
|
17466
|
-
step.checks.push({
|
|
17467
|
-
name: CHECKS.UNEXPECTED_ERROR,
|
|
17468
|
-
message,
|
|
17469
|
-
passed: false,
|
|
17470
|
-
severity: ctx.severity["UNEXPECTED_ERROR"]
|
|
17471
|
-
});
|
|
17472
|
-
if (!ctx.executedSteps.includes(step)) {
|
|
17473
|
-
ctx.executedSteps.push(step);
|
|
17474
|
-
printUnknownStep(step, ctx.options.logger);
|
|
17475
|
-
}
|
|
17476
|
-
return { shouldEnd: true };
|
|
17477
|
-
}
|
|
17478
17415
|
for (const action of actions) {
|
|
17479
17416
|
const { type, criteria } = action;
|
|
17480
17417
|
if (action.workflowId && action.stepId) {
|
|
17481
|
-
|
|
17418
|
+
throw new Error(`Cannot use both workflowId: ${action.workflowId} and stepId: ${action.stepId} in ${action.type} action`);
|
|
17482
17419
|
}
|
|
17483
17420
|
const matchesCriteria = checkCriteria({
|
|
17484
17421
|
workflowId,
|
|
@@ -17487,10 +17424,11 @@ async function runStep({ step, ctx, workflowId, retriesLeft, executedStepsCount
|
|
|
17487
17424
|
ctx
|
|
17488
17425
|
}).every((check) => check.passed);
|
|
17489
17426
|
if (matchesCriteria) {
|
|
17490
|
-
const targetWorkflow = action.workflowId ?
|
|
17491
|
-
|
|
17492
|
-
|
|
17493
|
-
|
|
17427
|
+
const targetWorkflow = action.workflowId ? getValueFromContext({
|
|
17428
|
+
value: action.workflowId,
|
|
17429
|
+
ctx,
|
|
17430
|
+
logger: ctx.options.logger
|
|
17431
|
+
}) : void 0;
|
|
17494
17432
|
const targetCtx = action.workflowId && targetWorkflow ? await resolveWorkflowContext(action.workflowId, targetWorkflow, ctx, ctx.options.config) : { ...ctx, executedSteps: [] };
|
|
17495
17433
|
const targetStep = action.stepId ? action.stepId : void 0;
|
|
17496
17434
|
if (type === "retry") {
|
|
@@ -17524,7 +17462,7 @@ async function runStep({ step, ctx, workflowId, retriesLeft, executedStepsCount
|
|
|
17524
17462
|
} else if (targetStep) {
|
|
17525
17463
|
const stepToRun = workflow?.steps.find((s55) => s55.stepId === targetStep);
|
|
17526
17464
|
if (!stepToRun) {
|
|
17527
|
-
|
|
17465
|
+
throw new Error(`Step ${targetStep} not found in workflow ${workflowId}`);
|
|
17528
17466
|
}
|
|
17529
17467
|
await runStep({
|
|
17530
17468
|
step: stepToRun,
|
|
@@ -17550,7 +17488,7 @@ async function runStep({ step, ctx, workflowId, retriesLeft, executedStepsCount
|
|
|
17550
17488
|
return { shouldEnd: true };
|
|
17551
17489
|
} else if (type === "goto") {
|
|
17552
17490
|
if (!targetWorkflow && !targetStep) {
|
|
17553
|
-
|
|
17491
|
+
throw new Error("Either workflowId or stepId must be provided in goto action");
|
|
17554
17492
|
}
|
|
17555
17493
|
if (targetWorkflow || targetStep) {
|
|
17556
17494
|
printActionsSeparator({
|
|
@@ -17618,42 +17556,7 @@ async function runWorkflows({ testDescription, options, executedStepsCount }) {
|
|
|
17618
17556
|
for (const workflow of workflows) {
|
|
17619
17557
|
ctx.executedSteps = [];
|
|
17620
17558
|
if (workflow.dependsOn?.length) {
|
|
17621
|
-
|
|
17622
|
-
await handleDependsOn({ workflow, ctx, config: options.config, executedStepsCount });
|
|
17623
|
-
} catch (error) {
|
|
17624
|
-
if (!(error instanceof WorkflowDependencyError)) {
|
|
17625
|
-
throw error;
|
|
17626
|
-
}
|
|
17627
|
-
const failureTime = performance.now();
|
|
17628
|
-
const failedStep = {
|
|
17629
|
-
stepId: "dependsOn",
|
|
17630
|
-
checks: [
|
|
17631
|
-
{
|
|
17632
|
-
name: CHECKS.UNEXPECTED_ERROR,
|
|
17633
|
-
message: error.message,
|
|
17634
|
-
passed: false,
|
|
17635
|
-
severity: ctx.severity["UNEXPECTED_ERROR"]
|
|
17636
|
-
}
|
|
17637
|
-
]
|
|
17638
|
-
};
|
|
17639
|
-
printWorkflowSeparator({
|
|
17640
|
-
fileName: basename3(ctx.options.filePath),
|
|
17641
|
-
workflowName: workflow.workflowId,
|
|
17642
|
-
logger: options.logger
|
|
17643
|
-
});
|
|
17644
|
-
printUnknownStep(failedStep, options.logger);
|
|
17645
|
-
executedWorkflows.push({
|
|
17646
|
-
type: "workflow",
|
|
17647
|
-
workflowId: workflow.workflowId,
|
|
17648
|
-
startTime: failureTime,
|
|
17649
|
-
endTime: failureTime,
|
|
17650
|
-
totalTimeMs: 0,
|
|
17651
|
-
executedSteps: [failedStep],
|
|
17652
|
-
ctx,
|
|
17653
|
-
globalTimeoutError: false
|
|
17654
|
-
});
|
|
17655
|
-
continue;
|
|
17656
|
-
}
|
|
17559
|
+
await handleDependsOn({ workflow, ctx, config: options.config, executedStepsCount });
|
|
17657
17560
|
}
|
|
17658
17561
|
const workflowExecutionResult = await runWorkflow({
|
|
17659
17562
|
workflowInput: workflow.workflowId,
|
|
@@ -17767,19 +17670,15 @@ async function runWorkflow({ workflowInput, ctx, fromStepId, skipLineSeparator,
|
|
|
17767
17670
|
globalTimeoutError: hasFailedTimeoutSteps
|
|
17768
17671
|
};
|
|
17769
17672
|
}
|
|
17770
|
-
var WorkflowDependencyError = class extends Error {
|
|
17771
|
-
};
|
|
17772
17673
|
async function handleDependsOn({ workflow, ctx, config, executedStepsCount }) {
|
|
17773
17674
|
if (!workflow.dependsOn?.length)
|
|
17774
17675
|
return;
|
|
17775
|
-
const
|
|
17776
|
-
const resolvedWorkflow =
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17780
|
-
|
|
17781
|
-
});
|
|
17782
|
-
const dependenciesWorkflows = await Promise.all(resolvedDependencies.map(async ({ workflowId, resolvedWorkflow }) => {
|
|
17676
|
+
const dependenciesWorkflows = await Promise.all(workflow.dependsOn.map(async (workflowId) => {
|
|
17677
|
+
const resolvedWorkflow = getValueFromContext({
|
|
17678
|
+
value: workflowId,
|
|
17679
|
+
ctx,
|
|
17680
|
+
logger: ctx.options.logger
|
|
17681
|
+
});
|
|
17783
17682
|
const workflowCtx = await resolveWorkflowContext(workflowId, resolvedWorkflow, ctx, config);
|
|
17784
17683
|
printRequiredWorkflowSeparator(workflow.workflowId, ctx.options.logger);
|
|
17785
17684
|
return runWorkflow({
|
|
@@ -17789,9 +17688,10 @@ async function handleDependsOn({ workflow, ctx, config, executedStepsCount }) {
|
|
|
17789
17688
|
executedStepsCount
|
|
17790
17689
|
});
|
|
17791
17690
|
}));
|
|
17792
|
-
const
|
|
17793
|
-
|
|
17794
|
-
|
|
17691
|
+
const totals = calculateTotals(dependenciesWorkflows);
|
|
17692
|
+
const hasProblems = totals.steps.failed > 0;
|
|
17693
|
+
if (hasProblems) {
|
|
17694
|
+
throw new Error("Dependent workflows has failed steps");
|
|
17795
17695
|
}
|
|
17796
17696
|
}
|
|
17797
17697
|
async function resolveWorkflowContext(workflowId, resolvedWorkflow, ctx, config) {
|
|
@@ -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,
|
|
@@ -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,10 +2,10 @@ 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 "./6LUUJ5LR.js";
|
|
6
6
|
import "./Y6DTFCLS.js";
|
|
7
7
|
import "./4FB5ZIPP.js";
|
|
8
|
-
import "./
|
|
8
|
+
import "./RMOZ27PP.js";
|
|
9
9
|
import "./XB6C62FW.js";
|
|
10
10
|
import "./UUU33DK3.js";
|
|
11
11
|
import "./Z3EJWJEX.js";
|
|
@@ -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,7 +12,7 @@ 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
|
|
@@ -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,12 +5,12 @@ 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
|
|
@@ -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: "0.0.0-snapshot.
|
|
7
|
+
version: "0.0.0-snapshot.1785244667",
|
|
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": "0.0.0-snapshot.
|
|
53
|
-
"@redocly/respect-core": "0.0.0-snapshot.
|
|
52
|
+
"@redocly/openapi-core": "0.0.0-snapshot.1785244667",
|
|
53
|
+
"@redocly/respect-core": "0.0.0-snapshot.1785244667",
|
|
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",
|
package/lib/index.js
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
getProxyUrl,
|
|
48
48
|
getReuniteUrl,
|
|
49
49
|
shouldBypassProxy
|
|
50
|
-
} from "./chunks/
|
|
50
|
+
} from "./chunks/6LUUJ5LR.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/RMOZ27PP.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 {
|
|
@@ -7715,7 +7715,7 @@ async function handleGenerateArazzo({
|
|
|
7715
7715
|
config: config3
|
|
7716
7716
|
};
|
|
7717
7717
|
try {
|
|
7718
|
-
const { generate } = await import("./chunks/
|
|
7718
|
+
const { generate } = await import("./chunks/UV3RHVRI.js");
|
|
7719
7719
|
logger.info(gray("\n Generating Arazzo description... \n"));
|
|
7720
7720
|
const generatedArazzo = await generate(options);
|
|
7721
7721
|
writeFileSync2(outputFile, stringifyYaml(generatedArazzo));
|
|
@@ -9072,14 +9072,14 @@ function mapJsonStep(step, workflowId, ctx) {
|
|
|
9072
9072
|
stepId: step.stepId,
|
|
9073
9073
|
workflowId,
|
|
9074
9074
|
request: {
|
|
9075
|
-
method: publicStep
|
|
9075
|
+
method: publicStep.request?.method || "",
|
|
9076
9076
|
url: step.response?.requestUrl || "",
|
|
9077
|
-
headers: publicStep
|
|
9078
|
-
body: publicStep
|
|
9077
|
+
headers: publicStep.request?.header || {},
|
|
9078
|
+
body: publicStep.request?.body
|
|
9079
9079
|
},
|
|
9080
9080
|
response: {
|
|
9081
9081
|
statusCode: step.response?.statusCode || 0,
|
|
9082
|
-
body: publicStep
|
|
9082
|
+
body: publicStep.response?.body,
|
|
9083
9083
|
headers: step.response?.header || {},
|
|
9084
9084
|
time: step.response?.time || 0,
|
|
9085
9085
|
size: step.response?.responseSize
|
|
@@ -9088,7 +9088,7 @@ function mapJsonStep(step, workflowId, ctx) {
|
|
|
9088
9088
|
...check,
|
|
9089
9089
|
status: calculateCheckStatus(check)
|
|
9090
9090
|
})),
|
|
9091
|
-
totalTimeMs: publicStep
|
|
9091
|
+
totalTimeMs: publicStep.response?.time || 0,
|
|
9092
9092
|
retriesLeft: step.retriesLeft,
|
|
9093
9093
|
status: calculateStepStatus(step.checks)
|
|
9094
9094
|
};
|
|
@@ -9167,7 +9167,7 @@ async function handleRespect({
|
|
|
9167
9167
|
let mtlsCerts;
|
|
9168
9168
|
let harLogs;
|
|
9169
9169
|
try {
|
|
9170
|
-
const { run, conditionallyMaskSecrets: conditionallyMaskSecrets2 } = await import("./chunks/
|
|
9170
|
+
const { run, conditionallyMaskSecrets: conditionallyMaskSecrets2 } = await import("./chunks/UV3RHVRI.js");
|
|
9171
9171
|
const workingDir = config3.configPath ? dirname4(config3.configPath) : process.cwd();
|
|
9172
9172
|
if (argv.mtls) {
|
|
9173
9173
|
mtlsCerts = resolveMtlsCertificates(argv.mtls, workingDir);
|
|
@@ -12643,7 +12643,7 @@ async function sendTelemetry({
|
|
|
12643
12643
|
$0: _,
|
|
12644
12644
|
...args
|
|
12645
12645
|
} = argv;
|
|
12646
|
-
const { RedoclyOAuthClient: RedoclyOAuthClient2 } = await import("./chunks/
|
|
12646
|
+
const { RedoclyOAuthClient: RedoclyOAuthClient2 } = await import("./chunks/NSPKCBBA.js");
|
|
12647
12647
|
const oauthClient = new RedoclyOAuthClient2();
|
|
12648
12648
|
const reuniteUrl = getReuniteUrl(config3, args.residency);
|
|
12649
12649
|
const logged_in = await oauthClient.isAuthorized(reuniteUrl);
|
|
@@ -12682,6 +12682,7 @@ async function sendTelemetry({
|
|
|
12682
12682
|
type: "com.redocly.command.ran",
|
|
12683
12683
|
source: "urn:redocly:cli",
|
|
12684
12684
|
origin: "redocly-cli",
|
|
12685
|
+
env: "production",
|
|
12685
12686
|
osPlatform: os.platform(),
|
|
12686
12687
|
actor: {
|
|
12687
12688
|
id: anonymous_id,
|
|
@@ -12691,7 +12692,7 @@ async function sendTelemetry({
|
|
|
12691
12692
|
category: "product",
|
|
12692
12693
|
data: eventData
|
|
12693
12694
|
});
|
|
12694
|
-
const { otelTelemetry } = await import("./chunks/
|
|
12695
|
+
const { otelTelemetry } = await import("./chunks/L5HQXVA6.js");
|
|
12695
12696
|
otelTelemetry.send(cloudEvent);
|
|
12696
12697
|
} catch (err) {
|
|
12697
12698
|
}
|
|
@@ -13525,7 +13526,7 @@ yargs_default(hideBin(process.argv)).version("version", "Show version number.",
|
|
|
13525
13526
|
return true;
|
|
13526
13527
|
}),
|
|
13527
13528
|
async (argv) => {
|
|
13528
|
-
const { handlerBuildCommand } = await import("./chunks/
|
|
13529
|
+
const { handlerBuildCommand } = await import("./chunks/SEUM4EAD.js");
|
|
13529
13530
|
commandWrapper(handlerBuildCommand)(argv);
|
|
13530
13531
|
}
|
|
13531
13532
|
).command(
|
|
@@ -13746,7 +13747,7 @@ yargs_default(hideBin(process.argv)).version("version", "Show version number.",
|
|
|
13746
13747
|
config: { describe: "Path to the config file.", type: "string" }
|
|
13747
13748
|
}),
|
|
13748
13749
|
async (argv) => {
|
|
13749
|
-
const { handleGenerateSpec } = await import("./chunks/
|
|
13750
|
+
const { handleGenerateSpec } = await import("./chunks/OFNDHNJR.js");
|
|
13750
13751
|
commandWrapper(handleGenerateSpec)(argv);
|
|
13751
13752
|
}
|
|
13752
13753
|
).command(
|
|
@@ -13861,7 +13862,7 @@ yargs_default(hideBin(process.argv)).version("version", "Show version number.",
|
|
|
13861
13862
|
}
|
|
13862
13863
|
}),
|
|
13863
13864
|
async (argv) => {
|
|
13864
|
-
const { handleDrift } = await import("./chunks/
|
|
13865
|
+
const { handleDrift } = await import("./chunks/HFIKZEXG.js");
|
|
13865
13866
|
commandWrapper(handleDrift)(argv);
|
|
13866
13867
|
}
|
|
13867
13868
|
).command(
|
|
@@ -13929,7 +13930,7 @@ yargs_default(hideBin(process.argv)).version("version", "Show version number.",
|
|
|
13929
13930
|
}
|
|
13930
13931
|
}),
|
|
13931
13932
|
async (argv) => {
|
|
13932
|
-
const { handleProxy } = await import("./chunks/
|
|
13933
|
+
const { handleProxy } = await import("./chunks/Q7LC24EZ.js");
|
|
13933
13934
|
commandWrapper(handleProxy)(argv);
|
|
13934
13935
|
}
|
|
13935
13936
|
).completion("completion", "Generate autocomplete script for `redocly` command.").demandCommand(1).middleware([notifyUpdateCliVersion]).strict().argv;
|