diff --git a/Tasks/DownloadPackageV1/_buildConfigs/Node20/package-lock.json b/Tasks/DownloadPackageV1/_buildConfigs/Node20/package-lock.json index 2696b7070171..721901a5329a 100644 --- a/Tasks/DownloadPackageV1/_buildConfigs/Node20/package-lock.json +++ b/Tasks/DownloadPackageV1/_buildConfigs/Node20/package-lock.json @@ -71,6 +71,15 @@ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.10.tgz", "integrity": "sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A==" }, + "@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "optional": true, + "requires": { + "@types/node": "*" + } + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -257,6 +266,11 @@ "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" + }, "buffer-fill": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", @@ -328,6 +342,14 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, "decompress-zip": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.3.tgz", @@ -383,6 +405,25 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "requires": { + "pend": "~1.2.0" + } + }, "form-data": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", @@ -423,6 +464,25 @@ "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==" }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + }, + "dependencies": { + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -608,6 +668,11 @@ "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", "integrity": "sha512-gUQA33ayi0tuAhr/rJNZPr7Q7uvlBt4gyJPbi0CDcAfIzIrDu1YgGMFgmAu3stJqBpK57m7+RxUbcS+pt59fKQ==" }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -644,6 +709,11 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -915,6 +985,15 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } } } } diff --git a/Tasks/DownloadPackageV1/_buildConfigs/Node20/package.json b/Tasks/DownloadPackageV1/_buildConfigs/Node20/package.json index 310260b167d3..6327a4ff7f4f 100644 --- a/Tasks/DownloadPackageV1/_buildConfigs/Node20/package.json +++ b/Tasks/DownloadPackageV1/_buildConfigs/Node20/package.json @@ -24,7 +24,8 @@ "azure-pipelines-tasks-packaging-common": "3.206.0", "azure-pipelines-tasks-utility-common": "^3.198.1", "decompress-zip": "0.3.3", - "tar-fs": "1.16.3" + "tar-fs": "1.16.3", + "extract-zip": "2.0.1" }, "devDependencies": { "typescript": "5.1.6" diff --git a/Tasks/DownloadPackageV1/packagefile.ts b/Tasks/DownloadPackageV1/packagefile.ts index bc0ce711c419..a2f1706479d3 100644 --- a/Tasks/DownloadPackageV1/packagefile.ts +++ b/Tasks/DownloadPackageV1/packagefile.ts @@ -1,9 +1,15 @@ import * as tl from "azure-pipelines-task-lib/task"; import * as path from "path"; import * as fs from "fs"; +#if NODE20 +import * as extract from 'extract-zip' +#else +var DecompressZip = require('decompress-zip'); +#endif + var tar = require("tar-fs"); var zlib = require("zlib"); -var DecompressZip = require('decompress-zip'); + export class PackageFile { public readonly win: boolean; @@ -62,7 +68,14 @@ export class PackageFile { private async unzip(zipLocation: string, unzipLocation: string): Promise { return new Promise(function(resolve, reject) { tl.debug("Extracting " + zipLocation + " to " + unzipLocation); - +#if NODE20 + tl.debug(`Using extract-zip package for extracting archive`); + extract(zipLocation, { dir: unzipLocation }).then(() => { + resolve(); + }).catch((error) => { + reject(error); + }); +#else var unzipper = new DecompressZip(zipLocation); unzipper.on("error", err => { return reject(tl.loc("ExtractionFailed", err)); @@ -75,6 +88,7 @@ export class PackageFile { unzipper.extract({ path: path.normalize(unzipLocation) }); +#endif }); } } diff --git a/Tasks/DownloadPackageV1/task.json b/Tasks/DownloadPackageV1/task.json index 75f6f446ac31..ba7fbe4e2107 100644 --- a/Tasks/DownloadPackageV1/task.json +++ b/Tasks/DownloadPackageV1/task.json @@ -9,7 +9,7 @@ "author": "ms-vscs-rm", "version": { "Major": 1, - "Minor": 231, + "Minor": 236, "Patch": 0 }, "demands": [], diff --git a/Tasks/DownloadPackageV1/task.loc.json b/Tasks/DownloadPackageV1/task.loc.json index 462355466fab..84dd74ef39e3 100644 --- a/Tasks/DownloadPackageV1/task.loc.json +++ b/Tasks/DownloadPackageV1/task.loc.json @@ -9,7 +9,7 @@ "author": "ms-vscs-rm", "version": { "Major": 1, - "Minor": 231, + "Minor": 236, "Patch": 0 }, "demands": [], diff --git a/_generated/DownloadPackageV1.versionmap.txt b/_generated/DownloadPackageV1.versionmap.txt index 55322652a7bb..de8c510322ee 100644 --- a/_generated/DownloadPackageV1.versionmap.txt +++ b/_generated/DownloadPackageV1.versionmap.txt @@ -1,2 +1,2 @@ -Default|1.231.0 -Node20_229_1|1.231.1 +Default|1.236.0 +Node20_229_1|1.236.1 diff --git a/_generated/DownloadPackageV1/packagefile.ts b/_generated/DownloadPackageV1/packagefile.ts index bc0ce711c419..50c97d0ef138 100644 --- a/_generated/DownloadPackageV1/packagefile.ts +++ b/_generated/DownloadPackageV1/packagefile.ts @@ -1,9 +1,11 @@ import * as tl from "azure-pipelines-task-lib/task"; import * as path from "path"; import * as fs from "fs"; +var DecompressZip = require('decompress-zip'); + var tar = require("tar-fs"); var zlib = require("zlib"); -var DecompressZip = require('decompress-zip'); + export class PackageFile { public readonly win: boolean; @@ -62,7 +64,6 @@ export class PackageFile { private async unzip(zipLocation: string, unzipLocation: string): Promise { return new Promise(function(resolve, reject) { tl.debug("Extracting " + zipLocation + " to " + unzipLocation); - var unzipper = new DecompressZip(zipLocation); unzipper.on("error", err => { return reject(tl.loc("ExtractionFailed", err)); diff --git a/_generated/DownloadPackageV1/task.json b/_generated/DownloadPackageV1/task.json index 177467e04ce1..ff05fd12a21f 100644 --- a/_generated/DownloadPackageV1/task.json +++ b/_generated/DownloadPackageV1/task.json @@ -9,7 +9,7 @@ "author": "ms-vscs-rm", "version": { "Major": 1, - "Minor": 231, + "Minor": 236, "Patch": 0 }, "demands": [], @@ -195,7 +195,7 @@ "Info_ResolvedLatestVersion": "Resolved latest package version: %s" }, "_buildConfigMapping": { - "Default": "1.231.0", - "Node20_229_1": "1.231.1" + "Default": "1.236.0", + "Node20_229_1": "1.236.1" } } \ No newline at end of file diff --git a/_generated/DownloadPackageV1/task.loc.json b/_generated/DownloadPackageV1/task.loc.json index 98413f0dcfb5..b78c1b7e6715 100644 --- a/_generated/DownloadPackageV1/task.loc.json +++ b/_generated/DownloadPackageV1/task.loc.json @@ -9,7 +9,7 @@ "author": "ms-vscs-rm", "version": { "Major": 1, - "Minor": 231, + "Minor": 236, "Patch": 0 }, "demands": [], @@ -195,7 +195,7 @@ "Info_ResolvedLatestVersion": "ms-resource:loc.messages.Info_ResolvedLatestVersion" }, "_buildConfigMapping": { - "Default": "1.231.0", - "Node20_229_1": "1.231.1" + "Default": "1.236.0", + "Node20_229_1": "1.236.1" } } \ No newline at end of file diff --git a/_generated/DownloadPackageV1_Node20/package-lock.json b/_generated/DownloadPackageV1_Node20/package-lock.json index 2696b7070171..721901a5329a 100644 --- a/_generated/DownloadPackageV1_Node20/package-lock.json +++ b/_generated/DownloadPackageV1_Node20/package-lock.json @@ -71,6 +71,15 @@ "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-3.4.10.tgz", "integrity": "sha512-BgeaZuElf7DEYZhWYDTc/XcLZXdVgFkVSTa13BqKvbnmUrxr3TJFKofUxCtDO9UQOdhnV+HPOESdHiHKZOJV1A==" }, + "@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "optional": true, + "requires": { + "@types/node": "*" + } + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -257,6 +266,11 @@ "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" + }, "buffer-fill": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", @@ -328,6 +342,14 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + } + }, "decompress-zip": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.3.tgz", @@ -383,6 +405,25 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "requires": { + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "requires": { + "pend": "~1.2.0" + } + }, "form-data": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", @@ -423,6 +464,25 @@ "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==" }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + }, + "dependencies": { + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -608,6 +668,11 @@ "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", "integrity": "sha512-gUQA33ayi0tuAhr/rJNZPr7Q7uvlBt4gyJPbi0CDcAfIzIrDu1YgGMFgmAu3stJqBpK57m7+RxUbcS+pt59fKQ==" }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -644,6 +709,11 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -915,6 +985,15 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } } } } diff --git a/_generated/DownloadPackageV1_Node20/package.json b/_generated/DownloadPackageV1_Node20/package.json index 310260b167d3..6327a4ff7f4f 100644 --- a/_generated/DownloadPackageV1_Node20/package.json +++ b/_generated/DownloadPackageV1_Node20/package.json @@ -24,7 +24,8 @@ "azure-pipelines-tasks-packaging-common": "3.206.0", "azure-pipelines-tasks-utility-common": "^3.198.1", "decompress-zip": "0.3.3", - "tar-fs": "1.16.3" + "tar-fs": "1.16.3", + "extract-zip": "2.0.1" }, "devDependencies": { "typescript": "5.1.6" diff --git a/_generated/DownloadPackageV1_Node20/packagefile.ts b/_generated/DownloadPackageV1_Node20/packagefile.ts index bc0ce711c419..574ff8bbaffd 100644 --- a/_generated/DownloadPackageV1_Node20/packagefile.ts +++ b/_generated/DownloadPackageV1_Node20/packagefile.ts @@ -1,9 +1,11 @@ import * as tl from "azure-pipelines-task-lib/task"; import * as path from "path"; import * as fs from "fs"; +import * as extract from 'extract-zip' + var tar = require("tar-fs"); var zlib = require("zlib"); -var DecompressZip = require('decompress-zip'); + export class PackageFile { public readonly win: boolean; @@ -62,18 +64,11 @@ export class PackageFile { private async unzip(zipLocation: string, unzipLocation: string): Promise { return new Promise(function(resolve, reject) { tl.debug("Extracting " + zipLocation + " to " + unzipLocation); - - var unzipper = new DecompressZip(zipLocation); - unzipper.on("error", err => { - return reject(tl.loc("ExtractionFailed", err)); - }); - unzipper.on("extract", () => { - tl.debug("Extracted " + zipLocation + " to " + unzipLocation + " successfully"); - return resolve(); - }); - - unzipper.extract({ - path: path.normalize(unzipLocation) + tl.debug(`Using extract-zip package for extracting archive`); + extract(zipLocation, { dir: unzipLocation }).then(() => { + resolve(); + }).catch((error) => { + reject(error); }); }); } diff --git a/_generated/DownloadPackageV1_Node20/task.json b/_generated/DownloadPackageV1_Node20/task.json index 4d1c10a92db2..442e0be901ee 100644 --- a/_generated/DownloadPackageV1_Node20/task.json +++ b/_generated/DownloadPackageV1_Node20/task.json @@ -9,7 +9,7 @@ "author": "ms-vscs-rm", "version": { "Major": 1, - "Minor": 231, + "Minor": 236, "Patch": 1 }, "demands": [], @@ -199,7 +199,7 @@ "Info_ResolvedLatestVersion": "Resolved latest package version: %s" }, "_buildConfigMapping": { - "Default": "1.231.0", - "Node20_229_1": "1.231.1" + "Default": "1.236.0", + "Node20_229_1": "1.236.1" } } \ No newline at end of file diff --git a/_generated/DownloadPackageV1_Node20/task.loc.json b/_generated/DownloadPackageV1_Node20/task.loc.json index bb5d483b50ae..5d460c528e25 100644 --- a/_generated/DownloadPackageV1_Node20/task.loc.json +++ b/_generated/DownloadPackageV1_Node20/task.loc.json @@ -9,7 +9,7 @@ "author": "ms-vscs-rm", "version": { "Major": 1, - "Minor": 231, + "Minor": 236, "Patch": 1 }, "demands": [], @@ -199,7 +199,7 @@ "Info_ResolvedLatestVersion": "ms-resource:loc.messages.Info_ResolvedLatestVersion" }, "_buildConfigMapping": { - "Default": "1.231.0", - "Node20_229_1": "1.231.1" + "Default": "1.236.0", + "Node20_229_1": "1.236.1" } } \ No newline at end of file