@net-protocol/cli 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { ProxyAgent, setGlobalDispatcher } from 'undici';
2
3
  import 'dotenv/config';
3
4
  import { Command } from 'commander';
4
5
  import { createRequire } from 'module';
@@ -2935,6 +2936,11 @@ function registerProfileCommand(program2) {
2935
2936
  }
2936
2937
 
2937
2938
  // src/cli/index.ts
2939
+ var proxyUrl = process.env.https_proxy || process.env.HTTPS_PROXY;
2940
+ if (proxyUrl) {
2941
+ const agent = new ProxyAgent(proxyUrl);
2942
+ setGlobalDispatcher(agent);
2943
+ }
2938
2944
  var require2 = createRequire(import.meta.url);
2939
2945
  var { version } = require2("../../package.json");
2940
2946
  var program = new Command();