-
-
Notifications
You must be signed in to change notification settings - Fork 362
fix(dts-plugin): Add https-proxy-agent support for HTTP-only corporate proxies #4010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: ScriptedAlchemy <[email protected]>
@copilot theres CI errors. |
Fixed the CI formatting errors. The main issues were trailing whitespace and line wrapping that didn't meet the project's formatting standards. I've run the formatter and updated the lockfile for the new https-proxy-agent dependency. All linting and tests pass locally. |
Co-authored-by: ScriptedAlchemy <[email protected]>
- Fix HttpsProxyAgent generic type parameter requirement - Add mock cleanup to prevent test isolation issues - Revert unrelated README.md formatting changes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
The dts-plugin was unable to fetch remote MFE TypeScript typings (
@mf-types.zip
and@mf-types.d.ts
files) in corporate environments with HTTP-only proxies. The issue occurred because Node's defaulthttps.Agent
doesn't handle HTTPS requests through HTTP-only proxies - it doesn't send the requiredCONNECT
request for tunneling.This change adds support for HTTP-only proxies by:
HttpsProxyAgent
The implementation detects proxy configuration from environment variables (
HTTP_PROXY
,HTTPS_PROXY
,http_proxy
,https_proxy
) with preference for HTTPS_PROXY over HTTP_PROXY, and automatically switches between:HttpsProxyAgent
when proxy is configured (withproxy: false
to disable axios built-in proxy)https.Agent
when no proxy is configuredExample of the corporate environment this fixes:
The solution follows the exact approach suggested in the issue using
https-proxy-agent
and includes comprehensive test coverage for all proxy scenarios while preserving existing functionality like thefamily
parameter for IPv4/IPv6 selection.Fixes #3981.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io
If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.