firebase-tools 15.22.2 → 15.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/apiv2.js CHANGED
@@ -4,6 +4,7 @@ exports.Client = exports.CLI_OAUTH_PROJECT_NUMBER = exports.GOOG_USER_PROJECT_HE
4
4
  exports.setRefreshToken = setRefreshToken;
5
5
  exports.setAccessToken = setAccessToken;
6
6
  exports.getAccessToken = getAccessToken;
7
+ exports.noKeepAliveAgent = noKeepAliveAgent;
7
8
  const url_1 = require("url");
8
9
  const stream_1 = require("stream");
9
10
  const proxy_agent_1 = require("proxy-agent");
@@ -20,7 +20,17 @@ function getAuthClient(config) {
20
20
  if (authClient) {
21
21
  return authClient;
22
22
  }
23
- authClient = new google_auth_library_1.GoogleAuth(config);
23
+ const authConfig = {
24
+ ...config,
25
+ clientOptions: {
26
+ ...config.clientOptions,
27
+ transporterOptions: {
28
+ ...config.clientOptions?.transporterOptions,
29
+ agent: apiv2.noKeepAliveAgent,
30
+ },
31
+ },
32
+ };
33
+ authClient = new google_auth_library_1.GoogleAuth(authConfig);
24
34
  return authClient;
25
35
  }
26
36
  async function autoAuth(options, authScopes) {