Skip to content

Commit 1f547ee

Browse files
authored
fix(devtools-proxy-support): lazily load expensive dependencies MONGOSH-1853 (#446)
Notably, this is referring to `pac-proxy-agent` and `ssh2`, which both involve somewhat complex setups. Also, since `ssh2` includes a WebAssembly implementation of a cryptographic algorithm, we should make sure not to load it in FIPS mode.
1 parent 1757248 commit 1f547ee

File tree

5 files changed

+329
-123
lines changed

5 files changed

+329
-123
lines changed

package-lock.json

Lines changed: 96 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/devtools-proxy-support/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@
4848
"dependencies": {
4949
"@mongodb-js/socksv5": "^0.0.10",
5050
"agent-base": "^7.1.1",
51+
"lru-cache": "^11.0.0",
5152
"node-fetch": "^3.3.2",
52-
"proxy-agent": "^6.4.0",
53+
"pac-proxy-agent": "7.0.2",
54+
"http-proxy-agent": "^7.0.2",
55+
"https-proxy-agent": "^7.0.5",
56+
"socks-proxy-agent": "^8.0.4",
5357
"ssh2": "^1.15.0",
5458
"system-ca": "^2.0.0"
5559
},

packages/devtools-proxy-support/src/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ProxyAgent } from 'proxy-agent';
1+
import { ProxyAgent } from './proxy-agent';
22
import type { Agent } from 'https';
33
import type { DevtoolsProxyOptions } from './proxy-options';
44
import { proxyForUrl } from './proxy-options';

0 commit comments

Comments
 (0)