From 97709eca2a6127965fa12311520690322c94b687 Mon Sep 17 00:00:00 2001 From: baptistecdr Date: Tue, 31 Dec 2024 16:53:00 +0100 Subject: [PATCH] Update aria2 and create debug release --- package-lock.json | 318 ++++++++++++++++++++++++++++++++++++++++++---- package.json | 16 ++- vite.config.ts | 5 + 3 files changed, 306 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index f1c7bafc..52a03990 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "aria2-integration", "version": "4.10.4-SNAPSHOT.0", "dependencies": { - "@baptistecdr/aria2": "4.1.4", + "@baptistecdr/aria2": "5.0.1", "@stdlib/regexp-basename-posix": "0.2.2", "@stdlib/regexp-basename-windows": "0.2.3", "@stdlib/regexp-dirname-posix": "0.2.1", @@ -345,9 +345,9 @@ } }, "node_modules/@baptistecdr/aria2": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@baptistecdr/aria2/-/aria2-4.1.4.tgz", - "integrity": "sha512-yRphx3TfU5mX9VGlRd3Um0ev+8cfZNsasygVSQDK9k+O++iFM3sZKRmSd+dBOXWv1V1GeN0kqauRvchYf+AZYg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@baptistecdr/aria2/-/aria2-5.0.1.tgz", + "integrity": "sha512-kpFfjTerqMPFgYcUccEwQtUtvGt2X8rwwVSp6GJikivVirGzTAqf2TzfyqTLiOxKFqAHeeV2ydUO6akMINr/Ug==", "license": "ISC", "engines": { "node": ">= 20" @@ -4103,6 +4103,21 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -6400,6 +6415,257 @@ "dev": true, "license": "MIT" }, + "node_modules/lightningcss": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.28.2.tgz", + "integrity": "sha512-ePLRrbt3fgjXI5VFZOLbvkLD5ZRuxGKm+wJ3ujCqBtL3NanDHPo/5zicR5uEKAPiIjBYF99BM4K4okvMznjkVA==", + "dev": true, + "license": "MPL-2.0", + "optional": true, + "peer": true, + "dependencies": { + "detect-libc": "^1.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.28.2", + "lightningcss-darwin-x64": "1.28.2", + "lightningcss-freebsd-x64": "1.28.2", + "lightningcss-linux-arm-gnueabihf": "1.28.2", + "lightningcss-linux-arm64-gnu": "1.28.2", + "lightningcss-linux-arm64-musl": "1.28.2", + "lightningcss-linux-x64-gnu": "1.28.2", + "lightningcss-linux-x64-musl": "1.28.2", + "lightningcss-win32-arm64-msvc": "1.28.2", + "lightningcss-win32-x64-msvc": "1.28.2" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.28.2.tgz", + "integrity": "sha512-/8cPSqZiusHSS+WQz0W4NuaqFjquys1x+NsdN/XOHb+idGHJSoJ7SoQTVl3DZuAgtPZwFZgRfb/vd1oi8uX6+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.28.2.tgz", + "integrity": "sha512-R7sFrXlgKjvoEG8umpVt/yutjxOL0z8KWf0bfPT3cYMOW4470xu5qSHpFdIOpRWwl3FKNMUdbKtMUjYt0h2j4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.28.2.tgz", + "integrity": "sha512-l2qrCT+x7crAY+lMIxtgvV10R8VurzHAoUZJaVFSlHrN8kRLTvEg9ObojIDIexqWJQvJcVVV3vfzsEynpiuvgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.28.2.tgz", + "integrity": "sha512-DKMzpICBEKnL53X14rF7hFDu8KKALUJtcKdFUCW5YOlGSiwRSgVoRjM97wUm/E0NMPkzrTi/rxfvt7ruNK8meg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.28.2.tgz", + "integrity": "sha512-nhfjYkfymWZSxdtTNMWyhFk2ImUm0X7NAgJWFwnsYPOfmtWQEapzG/DXZTfEfMjSzERNUNJoQjPAbdqgB+sjiw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.28.2.tgz", + "integrity": "sha512-1SPG1ZTNnphWvAv8RVOymlZ8BDtAg69Hbo7n4QxARvkFVCJAt0cgjAw1Fox0WEhf4PwnyoOBaVH0Z5YNgzt4dA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.28.2.tgz", + "integrity": "sha512-ZhQy0FcO//INWUdo/iEdbefntTdpPVQ0XJwwtdbBuMQe+uxqZoytm9M+iqR9O5noWFaxK+nbS2iR/I80Q2Ofpg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.28.2.tgz", + "integrity": "sha512-alb/j1NMrgQmSFyzTbN1/pvMPM+gdDw7YBuQ5VSgcFDypN3Ah0BzC2dTZbzwzaMdUVDszX6zH5MzjfVN1oGuww==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.28.2.tgz", + "integrity": "sha512-WnwcjcBeAt0jGdjlgbT9ANf30pF0C/QMb1XnLnH272DQU8QXh+kmpi24R55wmWBwaTtNAETZ+m35ohyeMiNt+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.28.2", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.28.2.tgz", + "integrity": "sha512-3piBifyT3avz22o6mDKywQC/OisH2yDK+caHWkiMsF82i3m5wDBadyCjlCQ5VNgzYkxrWZgiaxHDdd5uxsi0/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/lines-and-columns": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", @@ -9528,28 +9794,6 @@ "node": ">=6.9.0" } }, - "node_modules/web-ext/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/webextension-polyfill": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.12.0.tgz", @@ -9727,6 +9971,28 @@ "dev": true, "license": "ISC" }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", diff --git a/package.json b/package.json index 0e5d12e0..91dd0202 100644 --- a/package.json +++ b/package.json @@ -6,21 +6,23 @@ "scripts": { "lint": "biome check", "lint:fix": "biome check --fix --unsafe", - "build:firefox": "tsc && vite build --emptyOutDir && BROWSER=firefox node scripts/generate-manifest.js", - "build:firefox:watch": "nodemon --watch . --exec npm run build:firefox", - "start:firefox": "web-ext run --source-dir ./dist/", - "build:chromium": "tsc && vite build --emptyOutDir && BROWSER=chromium node scripts/generate-manifest.js", - "build:chromium:watch": "nodemon --watch . --exec npm run build:chromium", - "start:chromium": "web-ext run --source-dir ./dist/ -t chromium" + "build:firefox": "tsc && NODE_ENV=production vite build --emptyOutDir && BROWSER=firefox node scripts/generate-manifest.js", + "build:firefox:debug": "tsc && NODE_ENV=development vite build --mode development --emptyOutDir && BROWSER=firefox node scripts/generate-manifest.js", + "build:firefox:watch": "nodemon --watch . --exec npm run build:firefox:debug", + "start:firefox": "web-ext run --source-dir ./dist/ --devtools", + "build:chromium": "tsc && NODE_ENV=production vite build --emptyOutDir && BROWSER=chromium node scripts/generate-manifest.js", + "build:chromium:debug": "tsc && NODE_ENV=development vite build --mode development --emptyOutDir && BROWSER=chromium node scripts/generate-manifest.js", + "build:chromium:watch": "nodemon --watch . --exec npm run build:chromium:debug", + "start:chromium": "web-ext run --source-dir ./dist/ -t chromium --devtools" }, "dependencies": { + "@baptistecdr/aria2": "5.0.1", "@stdlib/regexp-basename-posix": "0.2.2", "@stdlib/regexp-basename-windows": "0.2.3", "@stdlib/regexp-dirname-posix": "0.2.1", "@stdlib/regexp-dirname-windows": "0.2.1", "@testing-library/react": "16.1.0", "@testing-library/user-event": "14.5.2", - "@baptistecdr/aria2": "4.1.4", "bootstrap": "5.3.3", "bootstrap-icons": "1.11.3", "class-transformer": "0.5.1", diff --git a/vite.config.ts b/vite.config.ts index 87c07462..f3b3db1d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,12 +6,17 @@ import tsconfigPaths from "vite-tsconfig-paths"; const r = (...args: string[]) => resolve(__dirname, ...args); +const minify = process.env.NODE_ENV === "production" ? "esbuild" : false; +const cssMinify = process.env.NODE_ENV === "production" ? "esbuild" : false; + // https://vitejs.dev/config/ export default defineConfig({ root: r("src"), publicDir: r("public"), build: { target: "ES2022", + cssMinify, + minify, rollupOptions: { input: { background: r("src/background/background.ts"),