Update type-rest-client to 1.8.9

This commit is contained in:
Daz DeBoer 2023-02-21 14:12:52 -07:00
parent 48ced99357
commit 9c75b4d3d1
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
3 changed files with 14 additions and 11 deletions

9
dist/index.js vendored
View file

@ -4579,7 +4579,7 @@ class HttpClientResponse {
}
readBody() {
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
let buffer = Buffer.alloc(0);
const chunks = [];
const encodingCharset = util.obtainContentCharset(this);
// Extract Encoding from header: 'content-encoding'
// Match `gzip`, `gzip, deflate` variations of GZIP encoding
@ -4587,9 +4587,10 @@ class HttpClientResponse {
const isGzippedEncoded = new RegExp('(gzip$)|(gzip, *deflate)').test(contentEncoding);
this.message.on('data', function (data) {
const chunk = (typeof data === 'string') ? Buffer.from(data, encodingCharset) : data;
buffer = Buffer.concat([buffer, chunk]);
chunks.push(chunk);
}).on('end', function () {
return __awaiter(this, void 0, void 0, function* () {
const buffer = Buffer.concat(chunks);
if (isGzippedEncoded) { // Process GZipped Response Body HERE
const gunzippedBody = yield util.decompressGzippedContent(buffer, encodingCharset);
resolve(gunzippedBody);
@ -5120,7 +5121,9 @@ function decompressGzippedContent(buffer, charset) {
if (error) {
reject(error);
}
resolve(buffer.toString(charset || 'utf-8'));
else {
resolve(buffer.toString(charset || 'utf-8'));
}
});
}));
});

14
package-lock.json generated
View file

@ -10,7 +10,7 @@
"license": "MIT",
"dependencies": {
"@actions/core": "1.10.0",
"typed-rest-client": "1.8.4",
"typed-rest-client": "1.8.9",
"unhomoglyph": "1.0.6"
},
"devDependencies": {
@ -7287,9 +7287,9 @@
}
},
"node_modules/typed-rest-client": {
"version": "1.8.4",
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz",
"integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==",
"version": "1.8.9",
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz",
"integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==",
"dependencies": {
"qs": "^6.9.1",
"tunnel": "0.0.6",
@ -13180,9 +13180,9 @@
}
},
"typed-rest-client": {
"version": "1.8.4",
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz",
"integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==",
"version": "1.8.9",
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz",
"integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==",
"requires": {
"qs": "^6.9.1",
"tunnel": "0.0.6",

View file

@ -26,7 +26,7 @@
"license": "MIT",
"dependencies": {
"@actions/core": "1.10.0",
"typed-rest-client": "1.8.4",
"typed-rest-client": "1.8.9",
"unhomoglyph": "1.0.6"
},
"devDependencies": {