mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
8a0de83c24
Node's built-in fetch (undici) ignores proxy environment variables, so bl always connected directly and failed with ECONNRESET behind a VPN or corporate proxy. Install an EnvHttpProxyAgent as the global dispatcher at startup, but only when a proxy variable is actually set — behavior is unchanged otherwise. Lowercase variables take precedence over uppercase (curl convention) and NO_PROXY is honored. Values are trimmed and passed explicitly to work around undici reading env vars with ??, where an empty lowercase variable (https_proxy="") masks a configured uppercase one. Invalid proxy URLs fail with a clear usage error instead of a stack trace, and the ECONNRESET hint now suggests exporting HTTPS_PROXY. Tests are fully offline and need no credentials: unit tests cover env parsing, and the e2e test runs a minimal probe (setupProxyFromEnv + a bare fetch) against a .invalid host through a local CONNECT proxy to verify traffic routes through the proxy, NO_PROXY is honored, no dispatcher is installed when unset, and invalid values error clearly.
28 lines
460 B
YAML
28 lines
460 B
YAML
packages:
|
|
- packages/*
|
|
- tools/*
|
|
|
|
catalog:
|
|
"@types/node": ^24
|
|
ajv: ^8.20.0
|
|
boxen: ^8.0.1
|
|
chalk: ^5.6.2
|
|
typescript: ^5
|
|
undici: ^8.4.1
|
|
vite: npm:@voidzero-dev/vite-plus-core@latest
|
|
vite-plus: latest
|
|
vitest: npm:@voidzero-dev/vite-plus-test@latest
|
|
yaml: ^2.8.3
|
|
|
|
catalogMode: prefer
|
|
overrides:
|
|
vite: "catalog:"
|
|
vitest: "catalog:"
|
|
peerDependencyRules:
|
|
allowAny:
|
|
- vite
|
|
- vitest
|
|
allowedVersions:
|
|
vite: "*"
|
|
vitest: "*"
|