From 235c67ae99e8a2a863bc3970a50c4b96ba91dafd Mon Sep 17 00:00:00 2001 From: enyineer Date: Fri, 10 Oct 2025 10:38:34 +0200 Subject: [PATCH] Add API doc for maybeBootstrapProxy Signed-off-by: enyineer --- packages/cli-common/report.api.md | 3 +++ packages/cli-common/src/proxyBootstrap.ts | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/packages/cli-common/report.api.md b/packages/cli-common/report.api.md index 34f56c3f19..d541166bf1 100644 --- a/packages/cli-common/report.api.md +++ b/packages/cli-common/report.api.md @@ -12,6 +12,9 @@ export function findPaths(searchDir: string): Paths; // @public export function isChildPath(base: string, path: string): boolean; +// @public +export function maybeBootstrapProxy(): void; + // @public export type Paths = { ownDir: string; diff --git a/packages/cli-common/src/proxyBootstrap.ts b/packages/cli-common/src/proxyBootstrap.ts index 6632a9054f..d338611cb1 100644 --- a/packages/cli-common/src/proxyBootstrap.ts +++ b/packages/cli-common/src/proxyBootstrap.ts @@ -14,6 +14,20 @@ * limitations under the License. */ +/** + * This function can be called to setup undici and node-fetch Proxy agents. + * + * You can set GLOBAL_AGENT_HTTP(S)_PROXY to configure a proxy to be used in the + * CLIs. + * + * You can also configure a custom namespace by setting + * GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE which will replace the default + * "GLOBAL_AGENT_" env-var prefix. + * + * Make sure to call this function before any other imports. + * + * @public + */ export function maybeBootstrapProxy() { // see https://www.npmjs.com/package/global-agent const globalAgentNamespace =