v1.7.2 (#11)
* v1.7.2 - fix node10 and best effort gzip decompression * v1.7.2 - udpate readme for gulp build * v1.7.2 - node resolution
This commit is contained in:
Родитель
9ff108a9f1
Коммит
787d185090
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@microsoft/security-devops-actions-toolkit",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@microsoft/security-devops-actions-toolkit",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "1.10.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@microsoft/security-devops-actions-toolkit",
|
||||
"version": "1.7.0",
|
||||
"version": "1.7.2",
|
||||
"description": "Microsoft Security DevOps for GitHub Actions toolkit.",
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -532,9 +532,13 @@ async function requestJson(url: string, options: Object): Promise<Object> {
|
|||
return new Promise((resolve, reject) => {
|
||||
core.debug(`${options['method'].toUpperCase()} ${url}`);
|
||||
const req = https.request(url, options, async (res) => {
|
||||
// decompress the response if it's gzipped
|
||||
const decompressResponse = await import('decompress-response');
|
||||
res = decompressResponse.default(res);
|
||||
// attempt to decompress the response if it's gzipped
|
||||
try {
|
||||
const decompressResponse = await import('decompress-response');
|
||||
res = decompressResponse.default(res);
|
||||
} catch (error) {
|
||||
core.debug(`Failed to add response decompression: ${error.message}`);
|
||||
}
|
||||
|
||||
if (res.statusCode !== 200) {
|
||||
reject(new Error(`Failed to call: ${url}. Status code: ${res.statusCode}`));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"compilerOptions": {
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node16",
|
||||
"moduleResolution": "nodenext",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
|
|
Загрузка…
Ссылка в новой задаче