Skip to content

Commit f9946b1

Browse files
authored
Merge pull request #1051 from arduino/dependabot/npm_and_yarn/typed-rest-client-2.1.0
build(deps): bump typed-rest-client from 2.0.2 to 2.1.0
2 parents c7d115e + 968f9c2 commit f9946b1

File tree

4 files changed

+27
-17
lines changed

4 files changed

+27
-17
lines changed

.licenses/npm/typed-rest-client.dep.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: typed-rest-client
3-
version: 2.0.2
3+
version: 2.1.0
44
type: npm
55
summary: Node Rest and Http Clients for use with TypeScript
66
homepage: https://github.com/Microsoft/typed-rest-client#readme

dist/index.js

+18-8
Original file line numberDiff line numberDiff line change
@@ -11783,7 +11783,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
1178311783
});
1178411784
};
1178511785
Object.defineProperty(exports, "__esModule", ({ value: true }));
11786-
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpCodes = void 0;
11786+
exports.HttpClient = exports.HttpClientResponse = exports.HttpCodes = void 0;
11787+
exports.isHttps = isHttps;
1178711788
const url = __nccwpck_require__(7310);
1178811789
const http = __nccwpck_require__(3685);
1178911790
const https = __nccwpck_require__(5687);
@@ -11863,7 +11864,6 @@ function isHttps(requestUrl) {
1186311864
let parsedUrl = url.parse(requestUrl);
1186411865
return parsedUrl.protocol === 'https:';
1186511866
}
11866-
exports.isHttps = isHttps;
1186711867
var EnvironmentVariables;
1186811868
(function (EnvironmentVariables) {
1186911869
EnvironmentVariables["HTTP_PROXY"] = "HTTP_PROXY";
@@ -11880,6 +11880,10 @@ class HttpClient {
1188011880
this._maxRetries = 1;
1188111881
this._keepAlive = false;
1188211882
this._disposed = false;
11883+
this._httpGlobalAgentOptions = {
11884+
keepAlive: false,
11885+
timeout: 30000
11886+
};
1188311887
this.userAgent = userAgent;
1188411888
this.handlers = handlers || [];
1188511889
let no_proxy = process.env[EnvironmentVariables.NO_PROXY];
@@ -11902,6 +11906,9 @@ class HttpClient {
1190211906
this._httpProxyBypassHosts.push(new RegExp(bypass, 'i'));
1190311907
});
1190411908
}
11909+
if (requestOptions.globalAgentOptions) {
11910+
this._httpGlobalAgentOptions = requestOptions.globalAgentOptions;
11911+
}
1190511912
this._certConfig = requestOptions.cert;
1190611913
if (this._certConfig) {
1190711914
// If using cert, need fs
@@ -12212,7 +12219,11 @@ class HttpClient {
1221212219
}
1221312220
// if not using private agent and tunnel agent isn't setup then use global agent
1221412221
if (!agent) {
12215-
agent = usingSsl ? https.globalAgent : http.globalAgent;
12222+
const globalAgentOptions = {
12223+
keepAlive: this._httpGlobalAgentOptions.keepAlive,
12224+
timeout: this._httpGlobalAgentOptions.timeout
12225+
};
12226+
agent = usingSsl ? new https.Agent(globalAgentOptions) : new http.Agent(globalAgentOptions);
1221612227
}
1221712228
if (usingSsl && this._ignoreSslError) {
1221812229
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
@@ -12525,7 +12536,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
1252512536
});
1252612537
};
1252712538
Object.defineProperty(exports, "__esModule", ({ value: true }));
12528-
exports.obtainContentCharset = exports.buildProxyBypassRegexFromEnv = exports.decompressGzippedContent = exports.getUrl = void 0;
12539+
exports.getUrl = getUrl;
12540+
exports.decompressGzippedContent = decompressGzippedContent;
12541+
exports.buildProxyBypassRegexFromEnv = buildProxyBypassRegexFromEnv;
12542+
exports.obtainContentCharset = obtainContentCharset;
1252912543
const qs = __nccwpck_require__(2760);
1253012544
const url = __nccwpck_require__(7310);
1253112545
const path = __nccwpck_require__(1017);
@@ -12563,7 +12577,6 @@ function getUrl(resource, baseUrl, queryParams) {
1256312577
getUrlWithParsedQueryParams(requestUrl, queryParams) :
1256412578
requestUrl;
1256512579
}
12566-
exports.getUrl = getUrl;
1256712580
/**
1256812581
*
1256912582
* @param {string} requestUrl
@@ -12613,7 +12626,6 @@ function decompressGzippedContent(buffer, charset) {
1261312626
}));
1261412627
});
1261512628
}
12616-
exports.decompressGzippedContent = decompressGzippedContent;
1261712629
/**
1261812630
* Builds a RegExp to test urls against for deciding
1261912631
* wether to bypass proxy from an entry of the
@@ -12635,7 +12647,6 @@ function buildProxyBypassRegexFromEnv(bypass) {
1263512647
throw err;
1263612648
}
1263712649
}
12638-
exports.buildProxyBypassRegexFromEnv = buildProxyBypassRegexFromEnv;
1263912650
/**
1264012651
* Obtain Response's Content Charset.
1264112652
* Through inspecting `content-type` response header.
@@ -12659,7 +12670,6 @@ function obtainContentCharset(response) {
1265912670
}
1266012671
return 'utf-8';
1266112672
}
12662-
exports.obtainContentCharset = obtainContentCharset;
1266312673

1266412674

1266512675
/***/ }),

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@actions/core": "^1.10.1",
2020
"@actions/tool-cache": "^2.0.1",
2121
"semver": "^7.6.3",
22-
"typed-rest-client": "^2.0.2"
22+
"typed-rest-client": "^2.1.0"
2323
},
2424
"devDependencies": {
2525
"@actions/io": "^1.1.3",

0 commit comments

Comments
 (0)