@redocly/cli 0.0.0-snapshot.1765200839 → 0.0.0-snapshot.1765541222

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.
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-with-timeout.d.ts","sourceRoot":"","sources":["../../src/utils/fetch-with-timeout.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;yBAEoB,KAAK,MAAM,EAAE,0BAAyB,uBAA4B;AAAxF,wBAUE"}
1
+ {"version":3,"file":"fetch-with-timeout.d.ts","sourceRoot":"","sources":["../../src/utils/fetch-with-timeout.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;yBAEoB,KAAK,MAAM,EAAE,0BAAyB,uBAA4B;AAAxF,wBAsBE"}
@@ -1,7 +1,18 @@
1
- import { getProxyAgent } from './proxy-agent.js';
2
- import { Agent } from 'undici';
1
+ import { getProxyUrl } from './proxy-agent.js';
2
+ import { Agent, ProxyAgent } from 'undici';
3
3
  export default async (url, { timeout, ...options } = {}) => {
4
- const dispatcher = getProxyAgent() || (timeout ? new Agent({ connect: { timeout } }) : undefined);
4
+ const proxyUrl = getProxyUrl();
5
+ let dispatcher;
6
+ const connectOptions = timeout ? { connect: { timeout } } : {};
7
+ if (proxyUrl) {
8
+ dispatcher = new ProxyAgent({
9
+ uri: proxyUrl,
10
+ ...connectOptions,
11
+ });
12
+ }
13
+ else if (timeout) {
14
+ dispatcher = new Agent(connectOptions);
15
+ }
5
16
  const res = await fetch(url, {
6
17
  signal: timeout ? AbortSignal.timeout(timeout) : undefined,
7
18
  ...options,
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-with-timeout.js","sourceRoot":"","sources":["../../src/utils/fetch-with-timeout.ts"],"names":[],"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C;IACL,CAAC;SAAM,IAAI,OAAO,EAAE,CAAC;QACnB,UAAU,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAC3B,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1D,GAAG,OAAO;QACV,UAAU;KACI,CAAC,CAAC;IAElB,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/cli",
3
- "version": "0.0.0-snapshot.1765200839",
3
+ "version": "0.0.0-snapshot.1765541222",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -42,8 +42,8 @@
42
42
  "@opentelemetry/resources": "2.0.1",
43
43
  "@opentelemetry/sdk-trace-node": "2.0.1",
44
44
  "@opentelemetry/semantic-conventions": "1.34.0",
45
- "@redocly/openapi-core": "0.0.0-snapshot.1765200839",
46
- "@redocly/respect-core": "0.0.0-snapshot.1765200839",
45
+ "@redocly/openapi-core": "0.0.0-snapshot.1765541222",
46
+ "@redocly/respect-core": "0.0.0-snapshot.1765541222",
47
47
  "abort-controller": "^3.0.0",
48
48
  "chokidar": "^3.5.1",
49
49
  "colorette": "^1.2.0",
@@ -55,8 +55,8 @@
55
55
  "https-proxy-agent": "^7.0.5",
56
56
  "mobx": "^6.0.4",
57
57
  "pluralize": "^8.0.0",
58
- "react": "^17.0.0 || ^18.2.0 || ^19.0.0",
59
- "react-dom": "^17.0.0 || ^18.2.0 || ^19.0.0",
58
+ "react": "^17.0.0 || ^18.2.0 || ^19.2.1",
59
+ "react-dom": "^17.0.0 || ^18.2.0 || ^19.2.1",
60
60
  "redoc": "2.5.1",
61
61
  "semver": "^7.5.2",
62
62
  "set-cookie-parser": "^2.3.5",
@@ -72,8 +72,8 @@
72
72
  "@types/cookie": "0.6.0",
73
73
  "@types/har-format": "^1.2.16",
74
74
  "@types/pluralize": "^0.0.29",
75
- "@types/react": "^17.0.0 || ^18.2.21 || ^19.0.0",
76
- "@types/react-dom": "^17.0.0 || ^18.2.7 || ^19.0.0",
75
+ "@types/react": "^17.0.0 || ^18.2.21 || ^19.2.1",
76
+ "@types/react-dom": "^17.0.0 || ^18.2.7 || ^19.2.1",
77
77
  "@types/semver": "^7.5.0",
78
78
  "@types/set-cookie-parser": "2.4.10",
79
79
  "@types/yargs": "17.0.32",