Repository navigation
Add global-agent to CLI for proxying - #5520
Conversation
Coverage report
Show files with reduced coverage 🔻
Test suite run success2171 tests passing in 953 suites. Report generated by 🧪jest coverage report action from 4c6acaa |
baacf54 to
cd82238
Compare
|
/snapit |
|
🫰✨ Thanks @craigmichaelmartin! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g @shopify/[email protected]Tip If you get an Caution After installing, validate the version by running just |
| // Setup global support for environment variable based proxy configuration. | ||
| createGlobalProxyAgent({ | ||
| environmentVariableNamespace: 'SHOPIFY_', | ||
| forceGlobalAgent: true, |
There was a problem hiding this comment.
We set a http agent in the http module. As-is, I think this will automatically replace it. I'm not sure what's the best solve here: we want the http agent to both have proxy support & to have our custom options.
There was a problem hiding this comment.
One option could be using some of the lower-level utilities from global-agent -- doing our own version of https://github.com/gajus/global-agent/blob/abe65f5189ab2e6d32f6cf067b8741b3f0f846f3/src/factories/createGlobalProxyAgent.ts#L109 for instance
|
@craigmichaelmartin here's a working PR that fixes Hydrogen's dev server to use a proxy: Shopify/hydrogen#2831 |
f4f528e to
b822a09
Compare
This comment has been minimized.
This comment has been minimized.
|
/snapit |
|
🫰✨ Thanks @blittle! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g @shopify/[email protected]Tip If you get an Caution After installing, validate the version by running just |
1c0d679 to
2053ed4
Compare
|
/snapit |
|
🫰✨ Thanks @blittle! Your snapshot has been published to npm. Test the snapshot by installing your package globally: pnpm i -g @shopify/[email protected]Tip If you get an Caution After installing, validate the version by running just |
2053ed4 to
4c6acaa
Compare
Add global-agent to CLI for proxying
Original: #3244
WHY are these changes introduced?
#3225
WHAT is this pull request doing?
Uses
global-agentto allow users to set up HTTP(S) proxying as they see fit.How to test your changes?
Test commands with one of each
SHOPIFY_HTTP_PROXY,SHOPIFY_HTTPS_PROXY,SHOPIFY_NO_PROXYenv vars set. Similar to Apollo https://www.apollographql.com/docs/apollo-server/v3/proxy-configuration/Post-release steps
We'll need docs on shopify.dev for this
Measuring impact
How do we know this change was effective? Please choose one:
Checklist
devordeployhave been reflected in the internal flowchart.