@joinmeow/cli 0.0.1

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.
package/bin/cli.cjs ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+
3
+ // Node.js's built-in fetch (undici) does not respect HTTP_PROXY / HTTPS_PROXY
4
+ // environment variables. Claude.ai and other MCP hosts route traffic through a
5
+ // proxy, so we must configure undici's global dispatcher before any HTTP
6
+ // connections are made.
7
+ const proxyUrl =
8
+ process.env.HTTPS_PROXY ||
9
+ process.env.HTTP_PROXY ||
10
+ process.env.https_proxy ||
11
+ process.env.http_proxy;
12
+
13
+ if (proxyUrl) {
14
+ const { ProxyAgent, setGlobalDispatcher } = require("undici");
15
+ setGlobalDispatcher(new ProxyAgent(proxyUrl));
16
+ }
17
+
18
+ require("../dist/cli.cjs");