Skip to content

Commit 446e35b

Browse files
committed
chore: changes after review
1 parent 88159cc commit 446e35b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.changeset/tender-pigs-brake.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"@redocly/respect-core": patch
2+
"@redocly/cli": patch
33
---
44

55
Applied proxy settings during Respect execution.

packages/cli/src/commands/respect/connection-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ export function createNetworkDispatcher(parsedPathToFetch: string, mtlsCerts: Mt
4949
return undefined;
5050
}
5151

52-
export function withConnectionClientIfNeeded(mtlsCerts: MtlsCerts = {}) {
52+
export function withConnectionClient(mtlsCerts: MtlsCerts = {}) {
5353
const proxyUrl = getProxyUrl();
5454

5555
if (!mtlsCerts && !proxyUrl) {
5656
return fetch;
5757
}
5858

59-
return function fetchWithDispatcher(input: string | URL | RequestInfo, init?: RequestInit) {
59+
return (input: string | URL | RequestInfo, init?: RequestInit) => {
6060
const url = typeof input === 'string' ? input : 'url' in input ? input.url : input.toString();
6161

6262
return fetch(input, {

packages/cli/src/commands/respect/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { composeJsonLogsFiles } from './json-logs.js';
88
import { displayFilesSummaryTable } from './display-files-summary-table.js';
99
import { readEnvVariables } from '../../utils/read-env-variables.js';
1010
import { resolveMtlsCertificates } from './mtls/resolve-mtls-certificates.js';
11-
import { withConnectionClientIfNeeded } from './connection-client.js';
11+
import { withConnectionClient } from './connection-client.js';
1212
import { withHar } from './har-logs/index.js';
1313
import { createHarLog } from './har-logs/har-logs.js';
1414
import { jsonStringifyWithArrayBuffer } from '../../utils/json-stringify-with-array-buffer.js';
@@ -60,7 +60,7 @@ export async function handleRespect({
6060
: undefined;
6161
}
6262

63-
let customFetch = withConnectionClientIfNeeded(mtlsCerts);
63+
let customFetch = withConnectionClient(mtlsCerts);
6464
if (argv['har-output']) {
6565
harLogs = createHarLog({ version });
6666
customFetch = withHar(customFetch, { har: harLogs });

0 commit comments

Comments
 (0)