offline-environment.mjs 419 B

123456789101112131415
  1. // Proxy setup installs undici.fetch over the preloaded offline mock.
  2. // Keep host proxy settings out of isolated CLI children without changing the parent.
  3. export function withoutProxyEnvironment(environment = process.env) {
  4. return {
  5. ...environment,
  6. HTTP_PROXY: "",
  7. HTTPS_PROXY: "",
  8. ALL_PROXY: "",
  9. NO_PROXY: "",
  10. http_proxy: "",
  11. https_proxy: "",
  12. all_proxy: "",
  13. no_proxy: "",
  14. };
  15. }