Add API doc for maybeBootstrapProxy

Signed-off-by: enyineer <nico.enking@gmail.com>
This commit is contained in:
enyineer
2025-10-10 10:38:34 +02:00
parent c8c2329dd1
commit 235c67ae99
2 changed files with 17 additions and 0 deletions
+14
View File
@@ -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 =