CodeQL / Analyze (TypeScript) (push) Failing after 1s
test / lint (push) Failing after 1s
test / test-default-version (ubuntu-latest) (push) Failing after 0s
test / test-specific-version (0.3) (push) Failing after 0s
test / test-specific-version (0.3.0) (push) Failing after 1s
test / test-specific-version (0.3.2) (push) Failing after 0s
test / test-specific-version (0.3.x) (push) Failing after 0s
test / test-specific-version (>=0.3.0) (push) Failing after 1s
test / test-semver-range (ubuntu-latest) (push) Failing after 1s
test / test-pep440-version (push) Failing after 0s
test / test-pyproject-file-version (push) Failing after 0s
test / test-malformed-pyproject-file-fallback (push) Failing after 0s
test / test-version-file-version (push) Failing after 0s
test / test-uv-file-version (push) Failing after 0s
test / test-version-file-hash-version (push) Failing after 0s
test / test-tool-versions-file-version (push) Failing after 0s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 1s
test / test-with-explicit-token (push) Failing after 0s
test / test-uvx (push) Failing after 1s
test / test-tool-install (ubuntu-latest) (push) Failing after 0s
test / test-python-version (ubuntu-latest) (push) Failing after 0s
test / test-activate-environment (ubuntu-latest) (push) Failing after 0s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 0s
test / test-musl (push) Failing after 0s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 0s
test / test-setup-cache-requirements-txt (push) Failing after 0s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 0s
test / test-restore-cache-requirements-txt (push) Skipped
test / test-setup-cache-save-cache-false (push) Failing after 0s
test / test-setup-cache-dependency-glob (push) Failing after 0s
test / test-restore-cache-dependency-glob (push) Skipped
test / test-restore-cache-save-cache-false (push) Skipped
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 1s
test / test-setup-cache-restore-cache-false (push) Failing after 0s
test / test-restore-cache-restore-cache-false (push) Skipped
test / test-no-python-version (push) Failing after 0s
test / test-absolute-path (push) Failing after 0s
test / test-custom-manifest-file (push) Failing after 0s
test / test-relative-path (push) Failing after 0s
test / test-default-version (macos-14) (push) Canceled after 0s
test / test-default-version (macos-latest) (push) Canceled after 0s
test / test-default-version (windows-latest) (push) Canceled after 0s
test / test-semver-range (selfhosted-ubuntu-arm64) (push) Canceled after 0s
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Canceled after 0s
test / test-tool-install (macos-14) (push) Canceled after 0s
test / test-tool-install (macos-latest) (push) Canceled after 0s
test / test-tool-install (windows-latest) (push) Canceled after 0s
test / test-tilde-expansion-tool-dirs (push) Canceled after 0s
test / test-python-version (macos-latest) (push) Canceled after 0s
test / test-python-version (windows-latest) (push) Canceled after 0s
test / test-activate-environment (macos-latest) (push) Canceled after 0s
test / test-activate-environment (windows-latest) (push) Canceled after 0s
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Canceled after 0s
test / test-setup-cache (auto, windows-latest) (push) Canceled after 0s
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Canceled after 0s
test / test-setup-cache (false, windows-latest) (push) Canceled after 0s
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Canceled after 0s
test / test-setup-cache (true, windows-latest) (push) Canceled after 0s
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Canceled after 0s
test / test-restore-cache (auto, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (auto, windows-latest) (push) Canceled after 0s
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Canceled after 0s
test / test-restore-cache (false, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (false, windows-latest) (push) Canceled after 0s
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Canceled after 0s
test / test-restore-cache (true, ubuntu-latest) (push) Canceled after 0s
test / test-restore-cache (true, windows-latest) (push) Canceled after 0s
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Canceled after 0s
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Canceled after 0s
test / test-setup-cache-local (push) Canceled after 0s
test / test-restore-cache-local (push) Canceled after 0s
test / test-tilde-expansion-cache-local-path (push) Canceled after 0s
test / test-tilde-expansion-cache-dependency-glob (push) Canceled after 0s
test / cleanup-tilde-expansion-tests (push) Canceled after 0s
test / all-tests-passed (push) Canceled after 0s
Release Drafter / ✏️ Draft release (push) Canceled after 0s
22 lines
546 B
TypeScript
22 lines
546 B
TypeScript
import { ProxyAgent, type RequestInit, fetch as undiciFetch } from "undici";
|
|
|
|
export function getProxyAgent() {
|
|
const httpProxy = process.env.HTTP_PROXY || process.env.http_proxy;
|
|
if (httpProxy) {
|
|
return new ProxyAgent(httpProxy);
|
|
}
|
|
|
|
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
|
|
if (httpsProxy) {
|
|
return new ProxyAgent(httpsProxy);
|
|
}
|
|
|
|
return undefined;
|
|
}
|
|
|
|
export const fetch = async (url: string, opts: RequestInit) =>
|
|
await undiciFetch(url, {
|
|
dispatcher: getProxyAgent(),
|
|
...opts,
|
|
});
|