diff --git a/.nvmrc b/.nvmrc index 3c03207..2bd5a0a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18 +22 diff --git a/package-lock.json b/package-lock.json index cecac93..19de077 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1581,6 +1581,50 @@ "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==" }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -1672,6 +1716,16 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.13.2", "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.2.tgz", @@ -2061,7 +2115,6 @@ "resolved": "https://registry.npmmirror.com/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "optional": true, - "peer": true, "dependencies": { "@types/node": "*" } @@ -3023,7 +3076,6 @@ "version": "0.2.13", "resolved": "https://registry.npmmirror.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "peer": true, "engines": { "node": "*" } @@ -4146,6 +4198,12 @@ "integrity": "sha512-ilkD8YEnnGh1zJ240uJsW7AzE+2qpbOUYjacomn3AvJ6J4JhKGSZ2nh4wUIXPZrEPppaCLx5jFe8T89Rk8tQ7w==", "dev": true }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", @@ -4195,6 +4253,12 @@ "integrity": "sha512-2Y/RaA1pdgSHpY0YG4TYuYCD2wh97CRvu22eLG3Kz0pgQ/6KbIFTxsTnDc4MH/6hFlg2L/9qXrDMG0nMjP63iw==", "dev": true }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, "node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz", @@ -4207,7 +4271,6 @@ "version": "1.4.4", "resolved": "https://registry.npmmirror.com/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "peer": true, "dependencies": { "once": "^1.4.0" } @@ -4577,7 +4640,6 @@ "version": "2.0.1", "resolved": "https://registry.npmmirror.com/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "peer": true, "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -4597,7 +4659,6 @@ "version": "5.2.0", "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "peer": true, "dependencies": { "pump": "^3.0.0" }, @@ -4661,7 +4722,6 @@ "version": "1.1.0", "resolved": "https://registry.npmmirror.com/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "peer": true, "dependencies": { "pend": "~1.2.0" } @@ -4814,6 +4874,22 @@ "is-callable": "^1.1.3" } }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz", @@ -5403,6 +5479,24 @@ "node": ">=0.10.0" } }, + "node_modules/jackspeak": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/jackspeak/-/jackspeak-4.0.1.tgz", + "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6590,6 +6684,15 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/minisearch": { "version": "7.1.0", "resolved": "https://registry.npmmirror.com/minisearch/-/minisearch-7.1.0.tgz", @@ -6888,6 +6991,12 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", @@ -6945,6 +7054,31 @@ "node": ">=8" } }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.0.0", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-11.0.0.tgz", + "integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==", + "dev": true, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -6961,8 +7095,7 @@ "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "peer": true + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" }, "node_modules/perfect-debounce": { "version": "1.0.0", @@ -7177,7 +7310,6 @@ "version": "3.0.0", "resolved": "https://registry.npmmirror.com/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "peer": true, "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -7785,6 +7917,80 @@ "node": ">=0.6.19" } }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -7796,6 +8002,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-final-newline": { "version": "3.0.0", "resolved": "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz", @@ -8082,6 +8301,10 @@ "node": ">= 0.8" } }, + "node_modules/unzip": { + "resolved": "packages/unzip", + "link": true + }, "node_modules/update-browserslist-db": { "version": "1.0.13", "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", @@ -8544,6 +8767,109 @@ "resolved": "https://registry.npmmirror.com/wildcard/-/wildcard-2.0.1.tgz", "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==" }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", @@ -8590,7 +8916,6 @@ "version": "2.10.0", "resolved": "https://registry.npmmirror.com/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "peer": true, "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -8880,6 +9205,80 @@ "node": ">=18" } }, + "packages/unzip": { + "dependencies": { + "extract-zip": "^2.0.1" + }, + "devDependencies": { + "rimraf": "^6.0.1" + } + }, + "packages/unzip/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "packages/unzip/node_modules/glob": { + "version": "11.0.0", + "resolved": "https://registry.npmmirror.com/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "packages/unzip/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "packages/unzip/node_modules/rimraf": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "dev": true, + "dependencies": { + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "packages/utils": { "name": "@cocos-fe/utils", "version": "1.0.10", diff --git a/packages/unzip/7za.exe b/packages/unzip/7za.exe new file mode 100644 index 0000000..02c3f71 Binary files /dev/null and b/packages/unzip/7za.exe differ diff --git a/packages/unzip/README.md b/packages/unzip/README.md new file mode 100644 index 0000000..ce2c1b1 --- /dev/null +++ b/packages/unzip/README.md @@ -0,0 +1,129 @@ + +## npm 包的对比 + +| | [`yauzl`][ygit] | [`extract-zip`][egit] | [`adm-zip`][agit] | [`unzipper`][ugit] | [`archiver`][argit] | +|-----------------------|:--------------------:|:---------------------:|:------------------------:|:--------------------:|:----------------------:| +| Issues open | [![][yio]][yio_a] | [![][eio]][eio_a] | [![][aio]][aio_a] | [![][uio]][uio_a] | [![][ario]][ario_a] | +| Issues closed | [![][yic]][yic_a] | [![][eic]][eic_a] | [![][eic]][aic_a] | [![][uic]][uic_a] | [![][aric]][aric_a] | +| Downloads | [![][yd]][yd_a] | [![][ed]][ed_a] | [![][ad]][ad_a] | [![][ud]][ud_a] | [![][ard]][ard_a] | +| Bugs | [![][ybug]][ybug_a] | [![][ebug]][ebug_a] | [![][abug]][abug_a] | [![][ubug]][ubug_a] | [![][arbug]][arbug_a] | +| Dependents | [![][ydp]][ydp_a] | [![][edp]][edp_a] | [![][adp]][adp_a] | [![][udp]][udp_a] | [![][ardp]][ardp_a] | +| Install size | [![][ysize]][ysize_a]| [![][esize]][esize_a] | [![][asize]][asize_a] | [![][usize]][usize_a]| [![][arsize]][arsize_a]| +| GitHub stars | [![][ystar]][ygit] | [![][estar]][egit] | [![][astar]][agit] | [![][ustar]][ugit] | [![][arstar]][argit] | +| TypeScript support | [![][yts]][ygit] | [![][ets]][egit] | [![][ats]][agit] | [![][uts]][ugit] | [![][arts]][argit] | +| Last commit | [![][ycm]][ycm_a] | [![][ecm]][ecm_a] | [![][acm]][acm_a] | [![][ucm]][ucm_a] | [![][arcm]][arcm_a] | +| symlink support | :heavy_check_mark: | :heavy_check_mark: | :x: | ? | ? | + + + +[ygit]: https://github.com/thejoshwolfe/yauzl +[egit]: https://github.com/max-mapper/extract-zip +[agit]: https://github.com/cthackers/adm-zip +[ugit]: https://github.com/ZJONSSON/node-unzipper +[argit]: https://github.com/archiverjs/node-archiver + + +[yio]: https://img.shields.io/github/issues-raw/thejoshwolfe/yauzl?color=gray&label +[eio]: https://img.shields.io/github/issues-raw/max-mapper/extract-zip?color=gray&label +[aio]: https://img.shields.io/github/issues-raw/cthackers/adm-zip?color=gray&label +[uio]: https://img.shields.io/github/issues-raw/ZJONSSON/node-unzipper?color=gray&label +[ario]: https://img.shields.io/github/issues-raw/archiverjs/node-archiver?color=gray&label + +[yio_a]: https://github.com/thejoshwolfe/yauzl/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc +[eio_a]: https://github.com/max-mapper/extract-zip/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc +[aio_a]: https://github.com/cthackers/adm-zip/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc +[uio_a]: https://github.com/ZJONSSON/node-unzipper/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc +[ario_a]: https://github.com/archiverjs/node-archiver/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc + + +[yic]: https://img.shields.io/github/issues-closed-raw/thejoshwolfe/yauzl?color=blue&label +[eic]: https://img.shields.io/github/issues-closed-raw/max-mapper/extract-zip?color=blue&label +[aic]: https://img.shields.io/github/issues-closed-raw/cthackers/adm-zip?color=blue&label +[uic]: https://img.shields.io/github/issues-closed-raw/ZJONSSON/node-unzipper?color=blue&label +[aric]: https://img.shields.io/github/issues-closed-raw/archiverjs/node-archiver?color=blue&label + +[yic_a]: https://github.com/thejoshwolfe/yauzl/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc +[eic_a]: https://github.com/max-mapper/extract-zip/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc +[aic_a]: https://github.com/cthackers/adm-zip/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc +[uic_a]: https://github.com/ZJONSSON/node-unzipper/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc +[aric_a]: https://github.com/archiverjs/node-archiver/issues?q=is%3Aissue+is%3Aclosed+sort%3Aupdated-desc + + +[yd]: https://img.shields.io/npm/dm/yauzl?color=darkgreen&label +[ed]: https://img.shields.io/npm/dm/extract-zip?color=darkgreen&label +[ad]: https://img.shields.io/npm/dm/adm-zip?color=darkgreen&label +[ud]: https://img.shields.io/npm/dm/unzipper?color=darkgreen&label +[ard]: https://img.shields.io/npm/dm/archiver?color=darkgreen&label + +[yd_a]: https://www.npmjs.com/package/yauzl +[ed_a]: https://www.npmjs.com/package/extract-zip +[ad_a]: https://www.npmjs.com/package/adm-zip +[ud_a]: https://www.npmjs.com/package/unzipper +[ard_a]: https://www.npmjs.com/package/archiver + + +[ybug]: https://img.shields.io/github/issues-raw/thejoshwolfe/yauzl/bug?color=darkred&label +[ebug]: https://img.shields.io/github/issues-raw/max-mapper/extract-zip/bug?color=darkred&label +[abug]: https://img.shields.io/github/issues-raw/cthackers/adm-zip/bug?color=darkred&label +[ubug]: https://img.shields.io/github/issues-raw/ZJONSSON/node-unzipper/bug-fix?color=darkred&label +[arbug]: https://img.shields.io/github/issues-raw/archiverjs/node-archiver/Bug?color=darkred&label + +[ybug_a]: https://github.com/thejoshwolfe/yauzl/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug +[ebug_a]: https://github.com/max-mapper/extract-zip/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug +[abug_a]: https://github.com/cthackers/adm-zip/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug +[ubug_a]: https://github.com/ZJONSSON/node-unzipper/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22bug-fix%22 +[arbug_a]: https://github.com/archiverjs/node-archiver/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3ABug + + +[ydp]: https://badgen.net/npm/dependents/yauzl?color=orange&label +[edp]: https://badgen.net/npm/dependents/extract-zip?color=orange&label +[adp]: https://badgen.net/npm/dependents/adm-zip?color=orange&label +[udp]: https://badgen.net/npm/dependents/unzipper?color=orange&label +[ardp]: https://badgen.net/npm/dependents/archiver?color=orange&label + +[ydp_a]: https://www.npmjs.com/package/yauzl?activeTab=dependents +[edp_a]: https://www.npmjs.com/package/extract-zip?activeTab=dependents +[adp_a]: https://www.npmjs.com/package/adm-zip?activeTab=dependents +[udp_a]: https://www.npmjs.com/package/unzipper?activeTab=dependents +[ardp_a]: https://www.npmjs.com/package/archiver?activeTab=dependents + + +[ysize]: https://packagephobia.com/badge?p=yauzl +[esize]: https://packagephobia.com/badge?p=extract-zip +[asize]: https://packagephobia.com/badge?p=adm-zip +[usize]: https://packagephobia.com/badge?p=unzipper +[arsize]: https://packagephobia.com/badge?p=archiver + +[ysize_a]: https://packagephobia.com/result?p=yauzl +[esize_a]: https://packagephobia.com/result?p=extract-zip +[asize_a]: https://packagephobia.com/result?p=adm-zip +[usize_a]: https://packagephobia.com/result?p=unzipper +[arsize_a]: https://packagephobia.com/result?p=archiver + + +[ystar]: https://img.shields.io/github/stars/thejoshwolfe/yauzl?color=white&label +[estar]: https://img.shields.io/github/stars/max-mapper/extract-zip?color=white&label +[astar]: https://img.shields.io/github/stars/cthackers/adm-zip?color=white&label +[ustar]: https://img.shields.io/github/stars/ZJONSSON/node-unzipper?color=white&label +[arstar]: https://img.shields.io/github/stars/archiverjs/node-archiver?color=white&label + + + +[yts]: https://badgen.net/npm/types/yauzl?label +[ets]: https://badgen.net/npm/types/extract-zip?label +[ats]: https://badgen.net/npm/types/adm-zip?label +[uts]: https://badgen.net/npm/types/unzipper?label +[arts]: https://badgen.net/npm/types/archiver?label + + +[ycm]: https://img.shields.io/github/last-commit/thejoshwolfe/yauzl?color=gray&label +[ecm]: https://img.shields.io/github/last-commit/max-mapper/extract-zip?color=gray&label +[acm]: https://img.shields.io/github/last-commit/cthackers/adm-zip?color=gray&label +[ucm]: https://img.shields.io/github/last-commit/ZJONSSON/node-unzipper?color=gray&label +[arcm]: https://img.shields.io/github/last-commit/archiverjs/node-archiver?color=gray&label + +[ycm_a]: https://github.com/thejoshwolfe/yauzl/commits +[ecm_a]: https://github.com/max-mapper/extract-zip/commits +[acm_a]: https://github.com/cthackers/adm-zip/commits +[ucm_a]: https://github.com/ZJONSSON/node-unzipper/commits +[arcm_a]: https://github.com/archiverjs/node-archiver/commits diff --git a/packages/unzip/index.js b/packages/unzip/index.js new file mode 100644 index 0000000..626e5c9 --- /dev/null +++ b/packages/unzip/index.js @@ -0,0 +1,41 @@ +import { join } from 'node:path'; +import { homedir } from 'os'; +import { rimraf } from 'rimraf'; +import { unzipDarwin, unzipWin32, unzipNpm } from './unzip.js'; + +const root = process.cwd(); + +const downloads = join(homedir(), 'Downloads'); +const src = join(downloads, 'unzip-test-file.zip'); // 请在下载目录放置一个用于测试的 zip 文件 +const dist = join(root, 'node_modules/0unzip/'); // 解压到 node_modules 不会影响 git + +async function testDarwin() { + if (process.platform !== 'darwin') { + return; + } + await rimraf(dist); + console.time('unzipDarwin'); + await unzipDarwin(src, dist); + console.timeEnd('unzipDarwin'); +} + +async function testWin32() { + if (process.platform !== 'win32') { + return; + } + await rimraf(dist); + console.time('unzipWin32'); + await unzipWin32(src, dist); + console.timeEnd('unzipWin32'); +} + +async function testNpm() { + await rimraf(dist); + console.time('unzipNpm'); + await unzipNpm(src, dist); + console.timeEnd('unzipNpm'); +} + +await testDarwin(); +await testWin32(); +await testNpm(); diff --git a/packages/unzip/package-lock.json b/packages/unzip/package-lock.json new file mode 100644 index 0000000..5662f8f --- /dev/null +++ b/packages/unzip/package-lock.json @@ -0,0 +1,151 @@ +{ + "name": "unzip", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "unzip", + "dependencies": { + "extract-zip": "^2.0.1" + } + }, + "node_modules/@types/node": { + "version": "22.2.0", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.2.0.tgz", + "integrity": "sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==", + "optional": true, + "dependencies": { + "undici-types": "~6.13.0" + } + }, + "node_modules/@types/yauzl": { + "version": "2.10.3", + "resolved": "https://registry.npmmirror.com/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmmirror.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "engines": { + "node": "*" + } + }, + "node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmmirror.com/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "optional": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmmirror.com/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/packages/unzip/package.json b/packages/unzip/package.json new file mode 100644 index 0000000..0a13244 --- /dev/null +++ b/packages/unzip/package.json @@ -0,0 +1,11 @@ +{ + "name": "unzip", + "type": "module", + "main": "index.js", + "dependencies": { + "extract-zip": "^2.0.1" + }, + "devDependencies": { + "rimraf": "^6.0.1" + } +} diff --git a/packages/unzip/unzip.exe b/packages/unzip/unzip.exe new file mode 100644 index 0000000..1e94719 Binary files /dev/null and b/packages/unzip/unzip.exe differ diff --git a/packages/unzip/unzip.js b/packages/unzip/unzip.js new file mode 100644 index 0000000..1db5be0 --- /dev/null +++ b/packages/unzip/unzip.js @@ -0,0 +1,59 @@ +'use strict'; +import { spawn } from 'node:child_process'; +import extract from 'extract-zip'; +import { join } from 'node:path'; + +const root = process.cwd(); + +/** + * @param src + * @param dist + * @returns + */ +export function unzipDarwin(src, dist) { + return new Promise((resolve, reject) => { + const child = spawn('unzip', ['-o', src, '-d', dist]); + + child.stdout.on('data', () => {}); // 必须消费标准输出,否则可能导致进程阻塞或挂起 + child.stderr.on('data', console.error); + + child.on('close', (code) => { + if (code === 0) { + resolve(); + } else { + reject(code); + } + }); + + child.on('error', (err) => { + reject(err); + }); + }); +} + +export function unzipWin32(src, dist) { + return new Promise((resolve, reject) => { + //const child = spawn(join(root, 'unzip.exe'),['-n', src, '-d', dist]); + + const child = spawn(join(root, '7za.exe'), ['x', '-y', '-aoa', src, `-o${dist}`]); + + child.stdout.on('data', () => {}); + child.stderr.on('data', console.error); + + child.on('close', (code) => { + if (code === 0) { + resolve(); + } else { + reject(code); + } + }); + + child.on('error', (err) => { + reject(err); + }); + }); +} + +export function unzipNpm(src, dist) { + return extract(src, { dir: dist }); +}