Files
modelstudioai__cli/pnpm-workspace.yaml
T
若麒 8a0de83c24 fix: honor HTTP_PROXY / HTTPS_PROXY / NO_PROXY env vars (#35)
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.
2026-06-12 14:53:22 +08:00

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: "*"