feat: honour HTTPS_PROXY env var for outbound fetches#404
Conversation
|
Warning Review limit reached
Your plan includes 2 reviews of capacity. Refill in 20 minutes and 15 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThis PR adds HTTP/HTTPS proxy support to unifont by installing undici's ChangesProxy Support Implementation
🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #404 +/- ##
==========================================
+ Coverage 98.32% 98.40% +0.08%
==========================================
Files 12 13 +1
Lines 656 690 +34
Branches 172 180 +8
==========================================
+ Hits 645 679 +34
Misses 11 11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/proxy.ts`:
- Around line 17-23: The code sets the module-level flag "installed" before
checking for proxy environment variables, preventing future attempts if env vars
are loaded later; move the assignment of installed = true to after detecting a
non-empty proxyUrl (the const proxyUrl = process.env.HTTPS_PROXY ||
process.env.HTTP_PROXY || process.env.https_proxy || process.env.http_proxy) so
that the function returns early without marking installed when no proxy is
configured, and only mark installed once a proxyUrl is found and proxy setup
proceeds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 57466034-eacf-4f4d-9eed-da5216e76373
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
README.mdpackage.jsonsrc/proxy.tssrc/unifont.ts
this adds
undicias a dep + honorsHTTPS_PROXY/HTTP_PROXYenvironment variables if set and not otherwise configured.Summary by CodeRabbit
New Features
HTTPS_PROXY,HTTP_PROXY, and lowercase variants), allowing builds to fetch font data behind corporate proxies without extra setup.Documentation