mirror of
https://github.com/gradle/wrapper-validation-action
synced 2024-11-24 01:22:01 +00:00
Update type-rest-client to 1.8.9
This commit is contained in:
parent
48ced99357
commit
9c75b4d3d1
3 changed files with 14 additions and 11 deletions
9
dist/index.js
vendored
9
dist/index.js
vendored
|
@ -4579,7 +4579,7 @@ class HttpClientResponse {
|
||||||
}
|
}
|
||||||
readBody() {
|
readBody() {
|
||||||
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
||||||
let buffer = Buffer.alloc(0);
|
const chunks = [];
|
||||||
const encodingCharset = util.obtainContentCharset(this);
|
const encodingCharset = util.obtainContentCharset(this);
|
||||||
// Extract Encoding from header: 'content-encoding'
|
// Extract Encoding from header: 'content-encoding'
|
||||||
// Match `gzip`, `gzip, deflate` variations of GZIP encoding
|
// Match `gzip`, `gzip, deflate` variations of GZIP encoding
|
||||||
|
@ -4587,9 +4587,10 @@ class HttpClientResponse {
|
||||||
const isGzippedEncoded = new RegExp('(gzip$)|(gzip, *deflate)').test(contentEncoding);
|
const isGzippedEncoded = new RegExp('(gzip$)|(gzip, *deflate)').test(contentEncoding);
|
||||||
this.message.on('data', function (data) {
|
this.message.on('data', function (data) {
|
||||||
const chunk = (typeof data === 'string') ? Buffer.from(data, encodingCharset) : data;
|
const chunk = (typeof data === 'string') ? Buffer.from(data, encodingCharset) : data;
|
||||||
buffer = Buffer.concat([buffer, chunk]);
|
chunks.push(chunk);
|
||||||
}).on('end', function () {
|
}).on('end', function () {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const buffer = Buffer.concat(chunks);
|
||||||
if (isGzippedEncoded) { // Process GZipped Response Body HERE
|
if (isGzippedEncoded) { // Process GZipped Response Body HERE
|
||||||
const gunzippedBody = yield util.decompressGzippedContent(buffer, encodingCharset);
|
const gunzippedBody = yield util.decompressGzippedContent(buffer, encodingCharset);
|
||||||
resolve(gunzippedBody);
|
resolve(gunzippedBody);
|
||||||
|
@ -5120,7 +5121,9 @@ function decompressGzippedContent(buffer, charset) {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
}
|
}
|
||||||
resolve(buffer.toString(charset || 'utf-8'));
|
else {
|
||||||
|
resolve(buffer.toString(charset || 'utf-8'));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -10,7 +10,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "1.10.0",
|
"@actions/core": "1.10.0",
|
||||||
"typed-rest-client": "1.8.4",
|
"typed-rest-client": "1.8.9",
|
||||||
"unhomoglyph": "1.0.6"
|
"unhomoglyph": "1.0.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -7287,9 +7287,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typed-rest-client": {
|
"node_modules/typed-rest-client": {
|
||||||
"version": "1.8.4",
|
"version": "1.8.9",
|
||||||
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz",
|
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz",
|
||||||
"integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==",
|
"integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"qs": "^6.9.1",
|
"qs": "^6.9.1",
|
||||||
"tunnel": "0.0.6",
|
"tunnel": "0.0.6",
|
||||||
|
@ -13180,9 +13180,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typed-rest-client": {
|
"typed-rest-client": {
|
||||||
"version": "1.8.4",
|
"version": "1.8.9",
|
||||||
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz",
|
"resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz",
|
||||||
"integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==",
|
"integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"qs": "^6.9.1",
|
"qs": "^6.9.1",
|
||||||
"tunnel": "0.0.6",
|
"tunnel": "0.0.6",
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "1.10.0",
|
"@actions/core": "1.10.0",
|
||||||
"typed-rest-client": "1.8.4",
|
"typed-rest-client": "1.8.9",
|
||||||
"unhomoglyph": "1.0.6"
|
"unhomoglyph": "1.0.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
Loading…
Reference in a new issue