diff --git a/.eslintignore b/.eslintignore index c91110d8ae..82b6ba855e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,2 @@ .eslintrc.js -rollup.main.config.ts -rollup.preload.config.ts -rollup.renderer.config.ts +electron.vite.config.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b2f46171b..4730d3690e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,8 +42,8 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - # Only rollup build without release if it is a fork - - name: Rollup Build + # Only vite build without release if it is a fork, or it is a pull-request + - name: Vite Build if: github.repository == 'th-ch/youtube-music' && github.event_name == 'pull_request' run: | pnpm build diff --git a/electron.vite.config.ts b/electron.vite.config.ts new file mode 100644 index 0000000000..bdaed31184 --- /dev/null +++ b/electron.vite.config.ts @@ -0,0 +1,103 @@ +import { defineConfig, defineViteConfig } from 'electron-vite'; +import builtinModules from 'builtin-modules'; + +import type { UserConfig } from 'vite'; + +export default defineConfig({ + main: defineViteConfig(({ mode }) => { + const commonConfig: UserConfig = { + publicDir: 'assets', + build: { + lib: { + entry: 'src/index.ts', + formats: ['cjs'], + }, + outDir: 'dist/main', + commonjsOptions: { + ignoreDynamicRequires: true, + }, + rollupOptions: { + external: ['electron', 'custom-electron-prompt', ...builtinModules], + input: './src/index.ts', + }, + }, + }; + + if (mode === 'development') { + return commonConfig; + } + + return { + ...commonConfig, + build: { + ...commonConfig.build, + minify: true, + cssMinify: true, + }, + }; + }), + preload: defineViteConfig(({ mode }) => { + const commonConfig: UserConfig = { + build: { + lib: { + entry: 'src/preload.ts', + formats: ['cjs'], + }, + outDir: 'dist/preload', + commonjsOptions: { + ignoreDynamicRequires: true, + }, + rollupOptions: { + external: ['electron', 'custom-electron-prompt', ...builtinModules], + input: './src/preload.ts', + } + }, + }; + + if (mode === 'development') { + return commonConfig; + } + + return { + ...commonConfig, + build: { + ...commonConfig.build, + minify: true, + cssMinify: true, + }, + }; + }), + renderer: defineViteConfig(({ mode }) => { + const commonConfig: UserConfig = { + root: './src/', + build: { + lib: { + entry: 'src/index.html', + formats: ['iife'], + name: 'renderer', + }, + outDir: 'dist/renderer', + commonjsOptions: { + ignoreDynamicRequires: true, + }, + rollupOptions: { + external: ['electron', ...builtinModules], + input: './src/index.html', + }, + }, + }; + + if (mode === 'development') { + return commonConfig; + } + + return { + ...commonConfig, + build: { + ...commonConfig.build, + minify: true, + cssMinify: true, + }, + }; + }), +}); diff --git a/package.json b/package.json index 59a90f8f11..727acce82e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "YouTube Music", "version": "2.2.0", "description": "YouTube Music Desktop App - including custom plugins", - "main": "./dist/index.js", + "main": "./dist/main/index.js", "license": "MIT", "repository": "th-ch/youtube-music", "author": { @@ -17,6 +17,7 @@ "files": [ "!*", "dist", + "assets", "license", "!node_modules", "node_modules/custom-electron-prompt/**", @@ -89,12 +90,11 @@ "scripts": { "test": "playwright test", "test:debug": "cross-env DEBUG=pw:*,-pw:test:protocol playwright test", - "rollup:renderer": "rollup -c rollup.renderer.config.ts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs", - "rollup:preload": "rollup -c rollup.preload.config.ts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs", - "rollup:main": "rollup -c rollup.main.config.ts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs", - "build": "yarpm-pnpm run rollup:renderer && yarpm-pnpm run rollup:preload && yarpm-pnpm run rollup:main", - "start": "yarpm-pnpm run build && electron ./dist/index.js", + "build": "electron-vite build", + "start": "electron-vite preview", "start:debug": "cross-env ELECTRON_ENABLE_LOGGING=1 yarpm-pnpm run start", + "dev": "electron-vite dev", + "dev:debug": "cross-env ELECTRON_ENABLE_LOGGING=1 yarpm-pnpm run dev", "clean": "del-cli dist && del-cli pack", "dist": "yarpm-pnpm run clean && yarpm-pnpm run build && electron-builder --win --mac --linux -p never", "dist:linux": "yarpm-pnpm run clean && yarpm-pnpm run build && electron-builder --linux -p never", @@ -157,6 +157,7 @@ "html-to-text": "9.0.5", "keyboardevent-from-electron-accelerator": "2.0.0", "keyboardevents-areequal": "0.2.2", + "node-html-parser": "6.1.11", "node-id3": "0.2.6", "simple-youtube-age-restriction-bypass": "git+https://github.com/organization/Simple-YouTube-Age-Restriction-Bypass.git#v2.5.8", "vudio": "2.1.1", @@ -165,34 +166,29 @@ }, "devDependencies": { "@playwright/test": "1.39.0", - "@rollup/plugin-commonjs": "25.0.7", - "@rollup/plugin-image": "3.0.3", - "@rollup/plugin-json": "6.0.1", - "@rollup/plugin-node-resolve": "15.2.3", - "@rollup/plugin-terser": "0.4.4", - "@rollup/plugin-typescript": "11.1.5", - "@rollup/plugin-wasm": "6.2.2", "@total-typescript/ts-reset": "0.5.1", "@types/electron-localshortcut": "3.1.2", "@types/howler": "2.2.10", "@types/html-to-text": "9.0.3", "@typescript-eslint/eslint-plugin": "6.9.1", + "bufferutil": "4.0.8", "builtin-modules": "^3.3.0", "cross-env": "7.0.3", "del-cli": "5.1.0", "electron": "27.0.3", "electron-builder": "24.6.4", "electron-devtools-installer": "3.2.0", + "electron-vite": "1.0.28", "eslint": "8.53.0", "eslint-plugin-import": "2.29.0", "eslint-plugin-prettier": "5.0.1", "node-gyp": "10.0.1", "playwright": "1.39.0", "rollup": "4.3.0", - "rollup-plugin-copy": "3.5.0", - "rollup-plugin-import-css": "3.3.5", - "rollup-plugin-string": "3.0.0", "typescript": "5.2.2", + "utf-8-validate": "6.0.3", + "vite": "4.5.0", + "ws": "8.14.2", "yarpm": "1.2.0" }, "auto-changelog": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7a58067689..17b7678009 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,7 +39,7 @@ dependencies: version: 2.1.4 '@xhayper/discord-rpc': specifier: 1.0.24 - version: 1.0.24 + version: 1.0.24(bufferutil@4.0.8)(utf-8-validate@6.0.3) async-mutex: specifier: 0.4.0 version: 0.4.0 @@ -91,6 +91,9 @@ dependencies: keyboardevents-areequal: specifier: 0.2.2 version: 0.2.2 + node-html-parser: + specifier: 6.1.11 + version: 6.1.11 node-id3: specifier: 0.2.6 version: 0.2.6 @@ -111,27 +114,6 @@ devDependencies: '@playwright/test': specifier: 1.39.0 version: 1.39.0 - '@rollup/plugin-commonjs': - specifier: 25.0.7 - version: 25.0.7(rollup@4.3.0) - '@rollup/plugin-image': - specifier: 3.0.3 - version: 3.0.3(rollup@4.3.0) - '@rollup/plugin-json': - specifier: 6.0.1 - version: 6.0.1(rollup@4.3.0) - '@rollup/plugin-node-resolve': - specifier: 15.2.3 - version: 15.2.3(rollup@4.3.0) - '@rollup/plugin-terser': - specifier: 0.4.4 - version: 0.4.4(rollup@4.3.0) - '@rollup/plugin-typescript': - specifier: 11.1.5 - version: 11.1.5(rollup@4.3.0)(typescript@5.2.2) - '@rollup/plugin-wasm': - specifier: 6.2.2 - version: 6.2.2(rollup@4.3.0) '@total-typescript/ts-reset': specifier: 0.5.1 version: 0.5.1 @@ -147,6 +129,9 @@ devDependencies: '@typescript-eslint/eslint-plugin': specifier: 6.9.1 version: 6.9.1(@typescript-eslint/parser@6.7.5)(eslint@8.53.0)(typescript@5.2.2) + bufferutil: + specifier: 4.0.8 + version: 4.0.8 builtin-modules: specifier: ^3.3.0 version: 3.3.0 @@ -165,6 +150,9 @@ devDependencies: electron-devtools-installer: specifier: 3.2.0 version: 3.2.0 + electron-vite: + specifier: 1.0.28 + version: 1.0.28(vite@4.5.0) eslint: specifier: 8.53.0 version: 8.53.0 @@ -183,18 +171,18 @@ devDependencies: rollup: specifier: 4.3.0 version: 4.3.0 - rollup-plugin-copy: - specifier: 3.5.0 - version: 3.5.0 - rollup-plugin-import-css: - specifier: 3.3.5 - version: 3.3.5(rollup@4.3.0) - rollup-plugin-string: - specifier: 3.0.0 - version: 3.0.0 typescript: specifier: 5.2.2 version: 5.2.2 + utf-8-validate: + specifier: 6.0.3 + version: 6.0.3 + vite: + specifier: 4.5.0 + version: 4.5.0 + ws: + specifier: 8.14.2 + version: 8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) yarpm: specifier: 1.2.0 version: 1.2.0 @@ -210,6 +198,14 @@ packages: engines: {node: '>=0.10.0'} dev: true + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 + dev: true + /@assemblyscript/loader@0.17.14: resolution: {integrity: sha512-+PVTOfla/0XMLRTQLJFPg4u40XcdTfon6GGea70hBGi8Pd7ZymIXyVUR+vK8wt5Jb4MVKTKPIz43Myyebw5mZA==} dev: false @@ -222,11 +218,141 @@ packages: chalk: 2.4.2 dev: true + /@babel/compat-data@7.23.2: + resolution: {integrity: sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/core@7.23.2: + resolution: {integrity: sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.23.0 + '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-module-transforms': 7.23.0(@babel/core@7.23.2) + '@babel/helpers': 7.23.2 + '@babel/parser': 7.23.0 + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.2 + '@babel/types': 7.23.0 + convert-source-map: 2.0.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/generator@7.23.0: + resolution: {integrity: sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.0 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 + jsesc: 2.5.2 + dev: true + + /@babel/helper-compilation-targets@7.22.15: + resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/compat-data': 7.23.2 + '@babel/helper-validator-option': 7.22.15 + browserslist: 4.22.1 + lru-cache: 5.1.1 + semver: 6.3.1 + dev: true + + /@babel/helper-environment-visitor@7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-function-name@7.23.0: + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.22.15 + '@babel/types': 7.23.0 + dev: true + + /@babel/helper-hoist-variables@7.22.5: + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.0 + dev: true + + /@babel/helper-module-imports@7.22.15: + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.0 + dev: true + + /@babel/helper-module-transforms@7.23.0(@babel/core@7.23.2): + resolution: {integrity: sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.23.2 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 + dev: true + + /@babel/helper-plugin-utils@7.22.5: + resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-simple-access@7.22.5: + resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.0 + dev: true + + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.0 + dev: true + + /@babel/helper-string-parser@7.22.5: + resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-validator-identifier@7.22.20: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} dev: true + /@babel/helper-validator-option@7.22.15: + resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helpers@7.23.2: + resolution: {integrity: sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.2 + '@babel/types': 7.23.0 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/highlight@7.22.20: resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} engines: {node: '>=6.9.0'} @@ -236,6 +362,24 @@ packages: js-tokens: 4.0.0 dev: true + /@babel/parser@7.23.0: + resolution: {integrity: sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.0 + dev: true + + /@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.23.2): + resolution: {integrity: sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.2 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + /@babel/runtime@7.23.2: resolution: {integrity: sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==} engines: {node: '>=6.9.0'} @@ -243,6 +387,42 @@ packages: regenerator-runtime: 0.14.0 dev: false + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 + dev: true + + /@babel/traverse@7.23.2: + resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.23.0 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.23.0 + '@babel/types': 7.23.0 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/types@7.23.0: + resolution: {integrity: sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@cliqz/adblocker-content@1.26.11: resolution: {integrity: sha512-2p4lDiyoadVjUQDe5Pao4C0agFE5HHjXvsWzXEMG9sDP37Ji3krxsBEUzTkQPC8CuWmOjbzsrUu9rYjKOGupaA==} dependencies: @@ -361,6 +541,204 @@ packages: - supports-color dev: true + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.4.0(eslint@8.53.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -491,13 +869,6 @@ packages: engines: {node: '>=6.0.0'} dev: true - /@jridgewell/source-map@0.3.5: - resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} - dependencies: - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.19 - dev: true - /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true @@ -586,171 +957,46 @@ packages: fast-glob: 3.3.1 is-glob: 4.0.3 open: 9.1.0 - picocolors: 1.0.0 - tslib: 2.6.2 - dev: true - - /@playwright/test@1.39.0: - resolution: {integrity: sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==} - engines: {node: '>=16'} - hasBin: true - dependencies: - playwright: 1.39.0 - dev: true - - /@remusao/guess-url-type@1.2.1: - resolution: {integrity: sha512-rbOqre2jW8STjheOsOaQHLgYBaBZ9Owbdt8NO7WvNZftJlaG3y/K9oOkl8ZUpuFBisIhmBuMEW6c+YrQl5inRA==} - dev: false - - /@remusao/small@1.2.1: - resolution: {integrity: sha512-7MjoGt0TJMVw1GPKgWq6SJPws1SLsUXQRa43Umht+nkyw2jnpy3WpiLNqGdwo5rHr5Wp9B2W/Pm5RQp656UJdw==} - dev: false - - /@remusao/smaz-compress@1.9.1: - resolution: {integrity: sha512-E2f48TwloQu3r6BdLOGF2aczeH7bJ/32oJGqvzT9SKur0cuUnLcZ7ZXP874E2fwmdE+cXzfC7bKzp79cDnmeyw==} - dependencies: - '@remusao/trie': 1.4.1 - dev: false - - /@remusao/smaz-decompress@1.9.1: - resolution: {integrity: sha512-TfjKKprYe3n47od8auhvJ/Ikj9kQTbDTe71ynKlxslrvvUhlIV3VQSuwYuMWMbdz1fIs0H/fxCN1Z8/H3km6/A==} - dev: false - - /@remusao/smaz@1.9.1: - resolution: {integrity: sha512-e6BLuP8oaXCZ9+v46Is4ilAZ/Vq6YLgmBP204Ixgk1qTjXmqvFYG7+AS7v9nsZdGOy96r9DWGFbbDVgMxwu1rA==} - dependencies: - '@remusao/smaz-compress': 1.9.1 - '@remusao/smaz-decompress': 1.9.1 - dev: false - - /@remusao/trie@1.4.1: - resolution: {integrity: sha512-yvwa+aCyYI/UjeD39BnpMypG8N06l86wIDW1/PAc6ihBRnodIfZDwccxQN3n1t74wduzaz74m4ZMHZnB06567Q==} - dev: false - - /@rollup/plugin-commonjs@25.0.7(rollup@4.3.0): - resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: 4.3.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.5(rollup@4.3.0) - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 8.1.0 - is-reference: 1.2.1 - magic-string: 0.30.5 - rollup: 4.3.0 - dev: true - - /@rollup/plugin-image@3.0.3(rollup@4.3.0): - resolution: {integrity: sha512-qXWQwsXpvD4trSb8PeFPFajp8JLpRtqqOeNYRUKnEQNHm7e5UP7fuSRcbjQAJ7wDZBbnJvSdY5ujNBQd9B1iFg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: 4.3.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.5(rollup@4.3.0) - mini-svg-data-uri: 1.4.4 - rollup: 4.3.0 - dev: true - - /@rollup/plugin-json@6.0.1(rollup@4.3.0): - resolution: {integrity: sha512-RgVfl5hWMkxN1h/uZj8FVESvPuBJ/uf6ly6GTj0GONnkfoBN5KC0MSz+PN2OLDgYXMhtG0mWpTrkiOjoxAIevw==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: 4.3.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.5(rollup@4.3.0) - rollup: 4.3.0 - dev: true - - /@rollup/plugin-node-resolve@15.2.3(rollup@4.3.0): - resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: 4.3.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.5(rollup@4.3.0) - '@types/resolve': 1.20.2 - deepmerge: 4.3.1 - is-builtin-module: 3.2.1 - is-module: 1.0.0 - resolve: 1.22.8 - rollup: 4.3.0 - dev: true - - /@rollup/plugin-terser@0.4.4(rollup@4.3.0): - resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: 4.3.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - rollup: 4.3.0 - serialize-javascript: 6.0.1 - smob: 1.4.1 - terser: 5.21.0 - dev: true - - /@rollup/plugin-typescript@11.1.5(rollup@4.3.0)(typescript@5.2.2): - resolution: {integrity: sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: 4.3.0 - tslib: '*' - typescript: '>=3.7.0' - peerDependenciesMeta: - rollup: - optional: true - tslib: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.5(rollup@4.3.0) - resolve: 1.22.8 - rollup: 4.3.0 - typescript: 5.2.2 + picocolors: 1.0.0 + tslib: 2.6.2 dev: true - /@rollup/plugin-wasm@6.2.2(rollup@4.3.0): - resolution: {integrity: sha512-gpC4R1G9Ni92ZIRTexqbhX7U+9estZrbhP+9SRb0DW9xpB9g7j34r+J2hqrcW/lRI7dJaU84MxZM0Rt82tqYPQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: 4.3.0 - peerDependenciesMeta: - rollup: - optional: true + /@playwright/test@1.39.0: + resolution: {integrity: sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==} + engines: {node: '>=16'} + hasBin: true dependencies: - '@rollup/pluginutils': 5.0.5(rollup@4.3.0) - rollup: 4.3.0 + playwright: 1.39.0 dev: true - /@rollup/pluginutils@5.0.5(rollup@4.3.0): - resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: 4.3.0 - peerDependenciesMeta: - rollup: - optional: true + /@remusao/guess-url-type@1.2.1: + resolution: {integrity: sha512-rbOqre2jW8STjheOsOaQHLgYBaBZ9Owbdt8NO7WvNZftJlaG3y/K9oOkl8ZUpuFBisIhmBuMEW6c+YrQl5inRA==} + dev: false + + /@remusao/small@1.2.1: + resolution: {integrity: sha512-7MjoGt0TJMVw1GPKgWq6SJPws1SLsUXQRa43Umht+nkyw2jnpy3WpiLNqGdwo5rHr5Wp9B2W/Pm5RQp656UJdw==} + dev: false + + /@remusao/smaz-compress@1.9.1: + resolution: {integrity: sha512-E2f48TwloQu3r6BdLOGF2aczeH7bJ/32oJGqvzT9SKur0cuUnLcZ7ZXP874E2fwmdE+cXzfC7bKzp79cDnmeyw==} dependencies: - '@types/estree': 1.0.2 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 4.3.0 - dev: true + '@remusao/trie': 1.4.1 + dev: false + + /@remusao/smaz-decompress@1.9.1: + resolution: {integrity: sha512-TfjKKprYe3n47od8auhvJ/Ikj9kQTbDTe71ynKlxslrvvUhlIV3VQSuwYuMWMbdz1fIs0H/fxCN1Z8/H3km6/A==} + dev: false + + /@remusao/smaz@1.9.1: + resolution: {integrity: sha512-e6BLuP8oaXCZ9+v46Is4ilAZ/Vq6YLgmBP204Ixgk1qTjXmqvFYG7+AS7v9nsZdGOy96r9DWGFbbDVgMxwu1rA==} + dependencies: + '@remusao/smaz-compress': 1.9.1 + '@remusao/smaz-decompress': 1.9.1 + dev: false + + /@remusao/trie@1.4.1: + resolution: {integrity: sha512-yvwa+aCyYI/UjeD39BnpMypG8N06l86wIDW1/PAc6ihBRnodIfZDwccxQN3n1t74wduzaz74m4ZMHZnB06567Q==} + dev: false /@rollup/rollup-android-arm-eabi@4.3.0: resolution: {integrity: sha512-/4pns6BYi8MXdwnXM44yoGAcFYVHL/BYlB2q1HXZ6AzH++LaiEVWFpBWQ/glXhbMbv3E3o09igrHFbP/snhAvA==} @@ -903,10 +1149,6 @@ packages: - supports-color dev: true - /@types/estree@1.0.2: - resolution: {integrity: sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==} - dev: true - /@types/filesystem@0.0.33: resolution: {integrity: sha512-2KedRPzwu2K528vFkoXnnWdsG0MtUwPjuA7pRy4vKxlxHEe8qUDZibYHXJKZZr2Cl/ELdCWYqyb/MKwsUuzBWw==} dependencies: @@ -921,25 +1163,12 @@ packages: resolution: {integrity: sha512-NS7izfYOnQI/Opf3YdZSKkI5Ox89SqEffJHK2zfGY2BYEVuWuM6pSwDRglGl4W0SM84oUQfvLyYH4X6EQZAJ2w==} dev: false - /@types/fs-extra@8.1.3: - resolution: {integrity: sha512-7IdV01N0u/CaVO0fuY1YmEg14HQN3+EW8mpNgg6NEfxEl/lzCa5OxlBu3iFsCAdamnYOcTQ7oEi43Xc/67Rgzw==} - dependencies: - '@types/node': 20.8.6 - dev: true - /@types/fs-extra@9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: '@types/node': 20.8.6 dev: true - /@types/glob@7.2.0: - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} - dependencies: - '@types/minimatch': 5.1.2 - '@types/node': 20.8.6 - dev: true - /@types/har-format@1.2.13: resolution: {integrity: sha512-PwBsCBD3lDODn4xpje3Y1di0aDJp4Ww7aSfMRVw6ysnxD4I7Wmq2mBkSKaDtN403hqH5sp6c9xQUvFYY3+lkBg==} dev: false @@ -968,10 +1197,6 @@ packages: dependencies: '@types/node': 20.8.6 - /@types/minimatch@5.1.2: - resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - dev: true - /@types/minimist@1.2.3: resolution: {integrity: sha512-ZYFzrvyWUNhaPomn80dsMNgMeXxNWZBdkuG/hWlUvXvbdUH8ZERNBGXnU87McuGcWDsyzX2aChCv/SVN348k3A==} dev: true @@ -1001,10 +1226,6 @@ packages: dev: true optional: true - /@types/resolve@1.20.2: - resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - dev: true - /@types/responselike@1.0.1: resolution: {integrity: sha512-TiGnitEDxj2X0j+98Eqk5lv/Cij8oHd32bU4D/Yw6AOq7vvTk0gSD2GPj0G/HkvhMoVsdlhYF4yqqlyPBTM6Sg==} dependencies: @@ -1204,12 +1425,12 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@xhayper/discord-rpc@1.0.24: + /@xhayper/discord-rpc@1.0.24(bufferutil@4.0.8)(utf-8-validate@6.0.3): resolution: {integrity: sha512-gzC8OaOSz7cGALSHyyq6nANQvBfyfntbSq+Qh+cNanoKX8ybOj+jWKmDP6PbLVDWoBftTU3JYsWXrLml2df2Hw==} engines: {node: '>=14.18.0'} dependencies: axios: 1.5.1 - ws: 8.14.2 + ws: 8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) transitivePeerDependencies: - bufferutil - debug @@ -1534,6 +1755,10 @@ packages: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} dev: true + /boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + dev: false + /boolean@3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} requiresBuild: true @@ -1571,6 +1796,17 @@ packages: fancy-regex: 0.5.4 dev: false + /browserslist@4.22.1: + resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001561 + electron-to-chromium: 1.4.576 + node-releases: 2.0.13 + update-browserslist-db: 1.0.13(browserslist@4.22.1) + dev: true + /buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} @@ -1591,6 +1827,13 @@ packages: dev: true optional: true + /bufferutil@4.0.8: + resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} + engines: {node: '>=6.14.2'} + requiresBuild: true + dependencies: + node-gyp-build: 4.6.1 + /builder-util-runtime@9.2.1: resolution: {integrity: sha512-2rLv/uQD2x+dJ0J3xtsmI12AlRyk7p45TEbE/6o/fbb633e/S3pPgm+ct+JHsoY7r39dKHnGEFk/AASRFdnXmA==} engines: {node: '>=12.0.0'} @@ -1650,6 +1893,11 @@ packages: eel-wasm: 0.0.15 dev: false + /cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + /cacache@18.0.0: resolution: {integrity: sha512-I7mVOPl3PUCeRub1U8YoGz2Lqv9WOBpobZ8RyWFXmReuILz+3OAyTa5oH3QPdtKZD7N0Yk00aLfzn0qvp8dZ1w==} engines: {node: ^16.14.0 || >=18.0.0} @@ -1709,6 +1957,10 @@ packages: engines: {node: '>=10'} dev: true + /caniuse-lite@1.0.30001561: + resolution: {integrity: sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==} + dev: true + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -1795,10 +2047,6 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} requiresBuild: true - /colorette@1.4.0: - resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} - dev: true - /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} @@ -1809,19 +2057,11 @@ packages: resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} dev: true - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: true - /commander@5.1.0: resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} engines: {node: '>= 6'} dev: true - /commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - dev: true - /compare-version@0.1.2: resolution: {integrity: sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==} engines: {node: '>=0.10.0'} @@ -1854,6 +2094,10 @@ packages: typescript: 4.9.5 dev: true + /convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + dev: true + /core-util-is@1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} requiresBuild: true @@ -1888,6 +2132,21 @@ packages: shebang-command: 2.0.0 which: 2.0.2 + /css-select@5.1.0: + resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 5.0.3 + domutils: 3.1.0 + nth-check: 2.1.1 + dev: false + + /css-what@6.1.0: + resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} + engines: {node: '>= 6'} + dev: false + /custom-electron-prompt@1.5.7(electron@27.0.3): resolution: {integrity: sha512-ptRPJr6CpT06GWLMtg3GD2Lr7gWfXdWI+hR1S39eq+m/mUa2E118YmX6mPCbHdg5QB/W9UVhSpRqBM8FUh1G8w==} peerDependencies: @@ -2000,6 +2259,7 @@ packages: /deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} + dev: false /default-browser-id@3.0.0: resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==} @@ -2296,6 +2556,10 @@ packages: type-fest: 2.19.0 dev: false + /electron-to-chromium@1.4.576: + resolution: {integrity: sha512-yXsZyXJfAqzWk1WKryr0Wl0MN2D47xodPvEEwlVePBnhU5E7raevLQR+E6b9JAD3GfL/7MbAL9ZtWQQPcLx7wA==} + dev: true + /electron-unhandled@4.0.1: resolution: {integrity: sha512-6BsLnBg+i96eUnbaIFZyYdyfNX3f80/Nlfqy34YEMxXT9JP3ddNsNnUeiOF8ezN4+et4t4D37gjghKTP0V3jyw==} dependencies: @@ -2321,6 +2585,28 @@ packages: - supports-color dev: false + /electron-vite@1.0.28(vite@4.5.0): + resolution: {integrity: sha512-cp7nBi6do/jn5SHdL2V71WjxqZ+NXitVqn5bW+TsTEYgAfSUuYYp6INJN854kcgoOj4UrjMqA9cGRTSl79xx0Q==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@swc/core': ^1.0.0 + vite: ^3.0.0 || ^4.0.0 + peerDependenciesMeta: + '@swc/core': + optional: true + dependencies: + '@babel/core': 7.23.2 + '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.23.2) + cac: 6.7.14 + esbuild: 0.18.20 + magic-string: 0.30.5 + picocolors: 1.0.0 + vite: 4.5.0 + transitivePeerDependencies: + - supports-color + dev: true + /electron@27.0.3: resolution: {integrity: sha512-VaB9cI1se+mUtz366NP+zxFVnkHLbCBNO4wwouw3FuGyX/m7/Bv1I89JhWOBv78tC+n11ZYMrVD23Jf6EZgVcg==} engines: {node: '>= 12.20.55'} @@ -2462,6 +2748,36 @@ packages: requiresBuild: true optional: true + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + dev: true + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} @@ -2663,14 +2979,6 @@ packages: engines: {node: '>=4.0'} dev: true - /estree-walker@0.6.1: - resolution: {integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==} - dev: true - - /estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true - /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -2976,6 +3284,11 @@ packages: /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + /gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + dev: true + /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} @@ -3044,17 +3357,6 @@ packages: path-is-absolute: 1.0.1 dev: true - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - dev: true - /global-agent@3.0.0: resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==} engines: {node: '>=10.0'} @@ -3068,6 +3370,11 @@ packages: serialize-error: 7.0.1 optional: true + /globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + dev: true + /globals@13.23.0: resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} engines: {node: '>=8'} @@ -3081,20 +3388,6 @@ packages: dependencies: define-properties: 1.2.1 - /globby@10.0.1: - resolution: {integrity: sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==} - engines: {node: '>=8'} - dependencies: - '@types/glob': 7.2.0 - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.1 - glob: 7.2.3 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 3.0.0 - dev: true - /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -3194,6 +3487,11 @@ packages: function-bind: 1.1.2 dev: true + /he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + dev: false + /hexy@0.2.11: resolution: {integrity: sha512-ciq6hFsSG/Bpt2DmrZJtv+56zpPdnq+NQ4ijEFrveKN0ZG1mhl/LdT1NQZ9se6ty1fACcI4d4vYqC9v8EYpH2A==} hasBin: true @@ -3402,13 +3700,6 @@ packages: call-bind: 1.0.2 has-tostringtag: 1.0.0 - /is-builtin-module@3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} - dependencies: - builtin-modules: 3.3.0 - dev: true - /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -3481,10 +3772,6 @@ packages: resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} dev: false - /is-module@1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - dev: true - /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -3526,17 +3813,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /is-plain-object@3.0.1: - resolution: {integrity: sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==} - engines: {node: '>=0.10.0'} - dev: true - - /is-reference@1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - dependencies: - '@types/estree': 1.0.2 - dev: true - /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -3672,6 +3948,12 @@ packages: resolution: {integrity: sha512-TzO/62Hxeb26QMb4IGlI/5X+QLr9Uqp1FPkwp2+KOICW+Q+vSuFj61c8pkT6wAns4WcK56X7CmSHhJeDGWOqxQ==} dev: false + /jsesc@2.5.2: + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} + hasBin: true + dev: true + /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} @@ -3824,6 +4106,12 @@ packages: resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} engines: {node: 14 || >=16.14} + /lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + dependencies: + yallist: 3.1.1 + dev: true + /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -3955,11 +4243,6 @@ packages: engines: {node: '>=4'} dev: true - /mini-svg-data-uri@1.4.4: - resolution: {integrity: sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==} - hasBin: true - dev: true - /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -4072,6 +4355,12 @@ packages: dev: false optional: true + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -4100,6 +4389,10 @@ packages: formdata-polyfill: 4.0.10 dev: false + /node-gyp-build@4.6.1: + resolution: {integrity: sha512-24vnklJmyRS8ViBNI8KbtK/r/DmXQMRiOMXTNz2nrTnAYUwjmEEbnnpB/+kt+yWRv73bPsSPRFddrcIbAxSiMQ==} + hasBin: true + /node-gyp@10.0.1: resolution: {integrity: sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==} engines: {node: ^16.14.0 || >=18.0.0} @@ -4118,12 +4411,23 @@ packages: transitivePeerDependencies: - supports-color + /node-html-parser@6.1.11: + resolution: {integrity: sha512-FAgwwZ6h0DSDWxfD0Iq1tsDcBCxdJB1nXpLPPxX8YyVWzbfCjKWEzaynF4gZZ/8hziUmp7ZSaKylcn0iKhufUQ==} + dependencies: + css-select: 5.1.0 + he: 1.2.0 + dev: false + /node-id3@0.2.6: resolution: {integrity: sha512-w8GuKXLlPpDjTxLowCt/uYMhRQzED3cg2GdSG1i6RSGKeDzPvxlXeLQuQInKljahPZ0aDnmyX7FX8BbJOM7REg==} dependencies: iconv-lite: 0.6.2 dev: false + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + dev: true + /nopt@7.2.0: resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -4159,6 +4463,12 @@ packages: path-key: 4.0.0 dev: true + /nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + dependencies: + boolbase: 1.0.0 + dev: false + /object-inspect@1.12.3: resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} @@ -4427,6 +4737,15 @@ packages: xmlbuilder: 15.1.1 dev: true + /postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -4486,12 +4805,6 @@ packages: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} - /randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - dependencies: - safe-buffer: 5.2.1 - dev: true - /read-config-file@6.3.2: resolution: {integrity: sha512-M80lpCjnE6Wt6zb98DoW8WHR09nzMSpu8XHtPkiTHrJ5Az9CybfeQhTJ8D7saeBHpGhLPIVyA8lcL6ZmdKwY6Q==} engines: {node: '>=12.0.0'} @@ -4620,39 +4933,6 @@ packages: sprintf-js: 1.1.3 optional: true - /rollup-plugin-copy@3.5.0: - resolution: {integrity: sha512-wI8D5dvYovRMx/YYKtUNt3Yxaw4ORC9xo6Gt9t22kveWz1enG9QrhVlagzwrxSC455xD1dHMKhIJkbsQ7d48BA==} - engines: {node: '>=8.3'} - dependencies: - '@types/fs-extra': 8.1.3 - colorette: 1.4.0 - fs-extra: 8.1.0 - globby: 10.0.1 - is-plain-object: 3.0.1 - dev: true - - /rollup-plugin-import-css@3.3.5(rollup@4.3.0): - resolution: {integrity: sha512-wSfzveEzvUDlVevo70kmVD5Mk785UN55NG4C7VVnrmdE0qZ8apcVVFajyCPfFYSNxq5YkccOcrGUT2T/2HnEcQ==} - engines: {node: '>=16'} - peerDependencies: - rollup: 4.3.0 - dependencies: - '@rollup/pluginutils': 5.0.5(rollup@4.3.0) - rollup: 4.3.0 - dev: true - - /rollup-plugin-string@3.0.0: - resolution: {integrity: sha512-vqyzgn9QefAgeKi+Y4A7jETeIAU1zQmS6VotH6bzm/zmUQEnYkpIGRaOBPY41oiWYV4JyBoGAaBjYMYuv+6wVw==} - dependencies: - rollup-pluginutils: 2.8.2 - dev: true - - /rollup-pluginutils@2.8.2: - resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} - dependencies: - estree-walker: 0.6.1 - dev: true - /rollup@4.3.0: resolution: {integrity: sha512-scIi1NrKLDIYSPK66jjECtII7vIgdAMFmFo8h6qm++I6nN9qDSV35Ku6erzGVqYjx+lj+j5wkusRMr++8SyDZg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -4702,6 +4982,7 @@ packages: /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: false /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} @@ -4765,12 +5046,6 @@ packages: type-fest: 0.20.2 dev: false - /serialize-javascript@6.0.1: - resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} - dependencies: - randombytes: 2.1.0 - dev: true - /set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -4840,10 +5115,6 @@ packages: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} - /smob@1.4.1: - resolution: {integrity: sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==} - dev: true - /socks-proxy-agent@8.0.2: resolution: {integrity: sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==} engines: {node: '>= 14'} @@ -4861,6 +5132,11 @@ packages: ip: 2.0.0 smart-buffer: 4.2.0 + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -5067,17 +5343,6 @@ packages: fs-extra: 10.1.0 dev: true - /terser@5.21.0: - resolution: {integrity: sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==} - engines: {node: '>=10'} - hasBin: true - dependencies: - '@jridgewell/source-map': 0.3.5 - acorn: 8.10.0 - commander: 2.20.3 - source-map-support: 0.5.21 - dev: true - /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -5118,6 +5383,11 @@ packages: rimraf: 3.0.2 dev: true + /to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + dev: true + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -5287,6 +5557,17 @@ packages: yaku: 0.16.7 dev: true + /update-browserslist-db@1.0.13(browserslist@4.22.1): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.22.1 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -5304,6 +5585,13 @@ packages: dev: false optional: true + /utf-8-validate@6.0.3: + resolution: {integrity: sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==} + engines: {node: '>=6.14.2'} + requiresBuild: true + dependencies: + node-gyp-build: 4.6.1 + /utf8-byte-length@1.0.4: resolution: {integrity: sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA==} dev: true @@ -5335,6 +5623,41 @@ packages: dev: true optional: true + /vite@4.5.0: + resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.18.20 + postcss: 8.4.31 + rollup: 4.3.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /vudio@2.1.1: resolution: {integrity: sha512-VkFQcFt/b/kpF5Eg5Sq+oXUo1Zp5aRFF4BSmIrOzau5o+5WMWwX9ae/EGJZstCyZFiCTU5iw1Y+u2BCGW6Y6Jw==} dev: false @@ -5405,7 +5728,7 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - /ws@8.14.2: + /ws@8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3): resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} peerDependencies: @@ -5416,7 +5739,9 @@ packages: optional: true utf-8-validate: optional: true - dev: false + dependencies: + bufferutil: 4.0.8 + utf-8-validate: 6.0.3 /x11@2.3.0: resolution: {integrity: sha512-Ep4DbqZkVHvZNVht+vvELcfdpGKnfh2kZuKdXqyZdtJx3UdvgUGrMQ9lwPNV33tDs86MF4YagC6+E2fZXikF6A==} @@ -5452,6 +5777,10 @@ packages: resolution: {integrity: sha512-Syu3IB3rZvKvYk7yTiyl1bo/jiEFaaStrgv1V2TIJTqYPStSMQVO8EQjg/z+DRzLq/4LIIharNT3iH1hylEIRw==} dev: true + /yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + dev: true + /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} diff --git a/rollup.main.config.ts b/rollup.main.config.ts deleted file mode 100644 index 9836449c56..0000000000 --- a/rollup.main.config.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { defineConfig } from 'rollup'; -import builtinModules from 'builtin-modules'; -import typescript from '@rollup/plugin-typescript'; -import commonjs from '@rollup/plugin-commonjs'; -import nodeResolvePlugin from '@rollup/plugin-node-resolve'; -import json from '@rollup/plugin-json'; -import terser from '@rollup/plugin-terser'; -import { string } from 'rollup-plugin-string'; -import css from 'rollup-plugin-import-css'; -import wasmPlugin from '@rollup/plugin-wasm'; -import copy from 'rollup-plugin-copy'; - -export default defineConfig({ - plugins: [ - typescript({ - module: 'ESNext', - }), - nodeResolvePlugin({ - browser: false, - preferBuiltins: true, - exportConditions: ['node', 'default', 'module', 'import'], - }), - commonjs({ - ignoreDynamicRequires: true, - }), - wasmPlugin({ - maxFileSize: 0, - targetEnv: 'browser', - }), - json(), - string({ - include: '**/*.html', - }), - css(), - copy({ - targets: [ - { src: 'src/error.html', dest: 'dist/' }, - { src: 'assets', dest: 'dist/' }, - ], - }), - terser({ - ecma: 2020, - }), - { - closeBundle() { - if (!process.env.ROLLUP_WATCH) { - setTimeout(() => process.exit(0)); - } - }, - name: 'force-close', - }, - ], - input: './src/index.ts', - output: { - format: 'cjs', - name: '[name].js', - dir: './dist', - }, - external: ['electron', 'custom-electron-prompt', ...builtinModules], -}); diff --git a/rollup.preload.config.ts b/rollup.preload.config.ts deleted file mode 100644 index 0d55a91e89..0000000000 --- a/rollup.preload.config.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { defineConfig } from 'rollup'; -import builtinModules from 'builtin-modules'; -import typescript from '@rollup/plugin-typescript'; -import commonjs from '@rollup/plugin-commonjs'; -import nodeResolvePlugin from '@rollup/plugin-node-resolve'; -import json from '@rollup/plugin-json'; -import terser from '@rollup/plugin-terser'; -import { string } from 'rollup-plugin-string'; -import css from 'rollup-plugin-import-css'; -import wasmPlugin from '@rollup/plugin-wasm'; -import image from '@rollup/plugin-image'; - -export default defineConfig({ - plugins: [ - typescript({ - module: 'ESNext', - }), - nodeResolvePlugin({ - browser: false, - preferBuiltins: true, - }), - commonjs({ - ignoreDynamicRequires: true, - }), - json(), - string({ - include: '**/*.html', - }), - css(), - wasmPlugin({ - maxFileSize: 0, - targetEnv: 'browser', - }), - image({ dom: true }), - terser({ - ecma: 2020, - }), - { - closeBundle() { - if (!process.env.ROLLUP_WATCH) { - setTimeout(() => process.exit(0)); - } - }, - name: 'force-close', - }, - ], - input: './src/preload.ts', - output: { - format: 'cjs', - name: '[name].js', - dir: './dist', - }, - external: ['electron', 'custom-electron-prompt', ...builtinModules], -}); diff --git a/rollup.renderer.config.ts b/rollup.renderer.config.ts deleted file mode 100644 index c363a17e9f..0000000000 --- a/rollup.renderer.config.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { defineConfig } from 'rollup'; -import builtinModules from 'builtin-modules'; -import typescript from '@rollup/plugin-typescript'; -import commonjs from '@rollup/plugin-commonjs'; -import nodeResolvePlugin from '@rollup/plugin-node-resolve'; -import json from '@rollup/plugin-json'; -import terser from '@rollup/plugin-terser'; -import { string } from 'rollup-plugin-string'; -import css from 'rollup-plugin-import-css'; -import wasmPlugin from '@rollup/plugin-wasm'; -import image from '@rollup/plugin-image'; - -export default defineConfig({ - plugins: [ - typescript({ - module: 'ESNext', - }), - nodeResolvePlugin({ - browser: false, - preferBuiltins: true, - }), - commonjs({ - ignoreDynamicRequires: true, - }), - json(), - string({ - include: '**/*.html', - }), - css(), - wasmPlugin({ - maxFileSize: 0, - targetEnv: 'browser', - }), - image({ dom: true }), - terser({ - ecma: 2020, - }), - { - closeBundle() { - if (!process.env.ROLLUP_WATCH) { - setTimeout(() => process.exit(0)); - } - }, - name: 'force-close' - }, - ], - input: './src/renderer.ts', - output: { - format: 'cjs', - name: '[name].js', - dir: './dist', - }, - external: [ - 'electron', - ...builtinModules, - ], -}); diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000000..319d51be88 --- /dev/null +++ b/src/index.html @@ -0,0 +1 @@ + diff --git a/src/index.ts b/src/index.ts index ab88b559d1..5ca5f29055 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,7 @@ import is from 'electron-is'; import unhandled from 'electron-unhandled'; import { autoUpdater } from 'electron-updater'; import electronDebug from 'electron-debug'; +import { parse } from 'node-html-parser'; import config from './config'; import { refreshMenu, setApplicationMenu } from './menu'; @@ -198,7 +199,7 @@ async function createMainWindow() { show: false, webPreferences: { contextIsolation: true, - preload: path.join(__dirname, 'preload.js'), + preload: path.join(__dirname, '..', 'preload', 'preload.js'), ...(isTesting() ? undefined : { @@ -334,12 +335,34 @@ async function createMainWindow() { removeContentSecurityPolicy(); - win.webContents.on('dom-ready', () => { - const rendererScriptPath = path.join(__dirname, 'renderer.js'); - win.webContents.executeJavaScriptInIsolatedWorld(0, [{ - code: fs.readFileSync(rendererScriptPath, 'utf-8') + ';0', - url: url.pathToFileURL(rendererScriptPath).toString(), - }], true); + win.webContents.on('dom-ready', async () => { + // Inject index.html file as string using insertAdjacentHTML + // In dev mode, get string from process.env.VITE_DEV_SERVER_URL, else use fs.readFileSync + if (is.dev() && process.env.ELECTRON_RENDERER_URL) { + // HACK: to make vite work with electron renderer (supports hot reload) + await win.webContents.executeJavaScript(` + console.log('Loading vite from dev server'); + const viteScript = document.createElement('script'); + viteScript.type = 'module'; + viteScript.src = '${process.env.ELECTRON_RENDERER_URL}/@vite/client'; + const rendererScript = document.createElement('script'); + rendererScript.type = 'module'; + rendererScript.src = '${process.env.ELECTRON_RENDERER_URL}/renderer.ts'; + document.body.appendChild(viteScript); + document.body.appendChild(rendererScript); + 0 + `); + } else { + const rendererPath = path.join(__dirname, '..', 'renderer'); + const indexHTML = parse(fs.readFileSync(path.join(rendererPath, 'index.html'), 'utf-8')); + const scriptSrc = indexHTML.querySelector('script')!; + const scriptPath = path.join(rendererPath, scriptSrc.getAttribute('src')!); + const scriptString = fs.readFileSync(scriptPath, 'utf-8'); + await win.webContents.executeJavaScriptInIsolatedWorld(0, [{ + code: scriptString + ';0', + url: url.pathToFileURL(scriptPath).toString(), + }], true); + } }); win.webContents.loadURL(urlToLoad); diff --git a/src/plugins/adblocker/inject.d.ts b/src/plugins/adblocker/inject.d.ts index cda88ca4b5..435d23f7e0 100644 --- a/src/plugins/adblocker/inject.d.ts +++ b/src/plugins/adblocker/inject.d.ts @@ -1,3 +1 @@ -const inject: () => void; - -export default inject; +export const inject: () => void; diff --git a/src/plugins/adblocker/inject.js b/src/plugins/adblocker/inject.js index ccc9ea83c6..edc8b03b91 100644 --- a/src/plugins/adblocker/inject.js +++ b/src/plugins/adblocker/inject.js @@ -7,7 +7,7 @@ Parts of this code is derived from set-constant.js: https://github.com/gorhill/uBlock/blob/5de0ce975753b7565759ac40983d31978d1f84ca/assets/resources/scriptlets.js#L704 */ -module.exports = () => { +export const inject = () => { { const pruner = function (o) { delete o.playerAds; diff --git a/src/plugins/adblocker/preload.ts b/src/plugins/adblocker/preload.ts index c0facb2bb5..57ab024750 100644 --- a/src/plugins/adblocker/preload.ts +++ b/src/plugins/adblocker/preload.ts @@ -1,5 +1,5 @@ import config, { shouldUseBlocklists } from './config'; -import inject from './inject'; +import { inject } from './inject'; import injectCliqzPreload from './inject-cliqz-preload'; import { blockers } from './blocker-types'; diff --git a/src/plugins/captions-selector/front.ts b/src/plugins/captions-selector/front.ts index 95d973ba6f..492ac2c4a7 100644 --- a/src/plugins/captions-selector/front.ts +++ b/src/plugins/captions-selector/front.ts @@ -1,6 +1,6 @@ import configProvider from './config-renderer'; -import CaptionsSettingsButtonHTML from './templates/captions-settings-template.html'; +import CaptionsSettingsButtonHTML from './templates/captions-settings-template.html?raw'; import { ElementFromHtml } from '../utils-renderer'; import { YoutubePlayer } from '../../types/youtube-player'; diff --git a/src/plugins/discord/back.ts b/src/plugins/discord/back.ts index ff1258d1e9..5fdd1565ea 100644 --- a/src/plugins/discord/back.ts +++ b/src/plugins/discord/back.ts @@ -208,8 +208,10 @@ export default ( // if lastSent is more than 5 seconds ago, send the new time if (currentTime - lastSent > 5000) { lastSent = currentTime; - lastSongInfo.elapsedSeconds = t; - updateActivity(lastSongInfo); + if (lastSongInfo) { + lastSongInfo.elapsedSeconds = t; + updateActivity(lastSongInfo); + } } }); }); diff --git a/src/plugins/downloader/front.ts b/src/plugins/downloader/front.ts index ef29862a1e..1b450819cd 100644 --- a/src/plugins/downloader/front.ts +++ b/src/plugins/downloader/front.ts @@ -1,4 +1,4 @@ -import downloadHTML from './templates/download.html'; +import downloadHTML from './templates/download.html?raw'; import defaultConfig from '../../config/defaults'; import { getSongMenu } from '../../providers/dom-elements'; diff --git a/src/plugins/in-app-menu/front.ts b/src/plugins/in-app-menu/front.ts index 885ff4096f..afe9ca0f80 100644 --- a/src/plugins/in-app-menu/front.ts +++ b/src/plugins/in-app-menu/front.ts @@ -1,12 +1,13 @@ import { createPanel } from './menu/panel'; -import logo from './assets/menu.svg'; -import close from './assets/close.svg'; -import minimize from './assets/minimize.svg'; -import maximize from './assets/maximize.svg'; -import unmaximize from './assets/unmaximize.svg'; +import logoRaw from './assets/menu.svg?inline'; +import closeRaw from './assets/close.svg?inline'; +import minimizeRaw from './assets/minimize.svg?inline'; +import maximizeRaw from './assets/maximize.svg?inline'; +import unmaximizeRaw from './assets/unmaximize.svg?inline'; import type { Menu } from 'electron'; +import * as electron from 'electron'; function $(selector: string) { return document.querySelector(selector); @@ -23,6 +24,26 @@ export default async () => { let maximizeButton: HTMLButtonElement; if (isMacOS) titleBar.style.setProperty('--offset-left', '70px'); + const logo = document.createElement('img'); + const close = document.createElement('img'); + const minimize = document.createElement('img'); + const maximize = document.createElement('img'); + const unmaximize = document.createElement('img'); + + if (window.ELECTRON_RENDERER_URL) { + logo.src = window.ELECTRON_RENDERER_URL + '/' + logoRaw; + close.src = window.ELECTRON_RENDERER_URL + '/' + closeRaw; + minimize.src = window.ELECTRON_RENDERER_URL + '/' + minimizeRaw; + maximize.src = window.ELECTRON_RENDERER_URL + '/' + maximizeRaw; + unmaximize.src = window.ELECTRON_RENDERER_URL + '/' + unmaximizeRaw; + } else { + logo.src = logoRaw; + close.src = closeRaw; + minimize.src = minimizeRaw; + maximize.src = maximizeRaw; + unmaximize.src = unmaximizeRaw; + } + logo.classList.add('title-bar-icon'); const logoClick = () => { hideMenu = !hideMenu; diff --git a/src/plugins/navigation/front.ts b/src/plugins/navigation/front.ts index cc03a98be5..cc5c86b111 100644 --- a/src/plugins/navigation/front.ts +++ b/src/plugins/navigation/front.ts @@ -1,5 +1,5 @@ -import forwardHTML from './templates/forward.html'; -import backHTML from './templates/back.html'; +import forwardHTML from './templates/forward.html?raw'; +import backHTML from './templates/back.html?raw'; import { ElementFromHtml } from '../utils-renderer'; diff --git a/src/plugins/notifications/utils.ts b/src/plugins/notifications/utils.ts index d25017c056..a6b3d4b9bb 100644 --- a/src/plugins/notifications/utils.ts +++ b/src/plugins/notifications/utils.ts @@ -7,9 +7,10 @@ import config from './config'; import { cache } from '../../providers/decorators'; import { SongInfo } from '../../providers/song-info'; -import { getAssetsDirectoryLocation } from '../utils'; -const defaultIcon = path.join(getAssetsDirectoryLocation(), 'youtube-music.png'); +import youtubeMusicIcon from '../../../assets/youtube-music.png?asset'; + + const userData = app.getPath('userData'); const temporaryIcon = path.join(userData, 'tempIcon.png'); const temporaryBanner = path.join(userData, 'tempBanner.png'); @@ -45,7 +46,7 @@ const nativeImageToLogo = cache((nativeImage: NativeImage) => { export const notificationImage = (songInfo: SongInfo) => { if (!songInfo.image) { - return defaultIcon; + return youtubeMusicIcon; } if (!config.get('interactive')) { @@ -68,8 +69,9 @@ export const saveImage = cache((img: NativeImage, savePath: string) => { try { fs.writeFileSync(savePath, img.toPNG()); } catch (error: unknown) { - console.log(`Error writing song icon to disk:\n${String(error)}`); - return defaultIcon; + console.error('Error writing song icon to disk:'); + console.trace(error); + return youtubeMusicIcon; } return savePath; diff --git a/src/plugins/picture-in-picture/front.ts b/src/plugins/picture-in-picture/front.ts index 406137a332..b152dd5161 100644 --- a/src/plugins/picture-in-picture/front.ts +++ b/src/plugins/picture-in-picture/front.ts @@ -1,7 +1,7 @@ import { toKeyEvent } from 'keyboardevent-from-electron-accelerator'; import keyEventAreEqual from 'keyboardevents-areequal'; -import pipHTML from './templates/picture-in-picture.html'; +import pipHTML from './templates/picture-in-picture.html?raw'; import { getSongMenu } from '../../providers/dom-elements'; diff --git a/src/plugins/playback-speed/front.ts b/src/plugins/playback-speed/front.ts index b8a0864e06..7ff6a8f8ec 100644 --- a/src/plugins/playback-speed/front.ts +++ b/src/plugins/playback-speed/front.ts @@ -1,4 +1,4 @@ -import sliderHTML from './templates/slider.html'; +import sliderHTML from './templates/slider.html?raw'; import { getSongMenu } from '../../providers/dom-elements'; import { ElementFromHtml } from '../utils-renderer'; diff --git a/src/plugins/quality-changer/front.ts b/src/plugins/quality-changer/front.ts index 404447dc2a..a936ae37fb 100644 --- a/src/plugins/quality-changer/front.ts +++ b/src/plugins/quality-changer/front.ts @@ -1,4 +1,4 @@ -import qualitySettingsTemplate from './templates/qualitySettingsTemplate.html'; +import qualitySettingsTemplate from './templates/qualitySettingsTemplate.html?raw'; import { ElementFromHtml } from '../utils-renderer'; import { YoutubePlayer } from '../../types/youtube-player'; diff --git a/src/plugins/utils.ts b/src/plugins/utils.ts index 26659fcadc..e9d9faa5f8 100644 --- a/src/plugins/utils.ts +++ b/src/plugins/utils.ts @@ -4,10 +4,9 @@ import path from 'node:path'; import { app } from 'electron'; import is from 'electron-is'; -import { ValueOf } from '../utils/type-utils'; import defaultConfig from '../config/defaults'; -export const getAssetsDirectoryLocation = () => path.resolve(__dirname, 'assets'); +export const getAssetsDirectoryLocation = () => path.resolve(__dirname, '..', 'assets'); export const getMediaIconLocation = () => app.isPackaged diff --git a/src/plugins/video-toggle/front.ts b/src/plugins/video-toggle/front.ts index 6dd3a381b0..033fb1de35 100644 --- a/src/plugins/video-toggle/front.ts +++ b/src/plugins/video-toggle/front.ts @@ -1,4 +1,4 @@ -import buttonTemplate from './templates/button_template.html'; +import buttonTemplate from './templates/button_template.html?raw'; import { ElementFromHtml } from '../utils-renderer'; diff --git a/src/preload.ts b/src/preload.ts index 6b19f88432..a2dd466b45 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -48,3 +48,4 @@ contextBridge.exposeInMainWorld('ipcRenderer', { sendToHost: (channel: string, ...args: unknown[]) => ipcRenderer.sendToHost(channel, ...args), }); contextBridge.exposeInMainWorld('reload', () => ipcRenderer.send('reload')); +contextBridge.exposeInMainWorld('ELECTRON_RENDERER_URL', process.env.ELECTRON_RENDERER_URL); diff --git a/src/providers/prompt-options.ts b/src/providers/prompt-options.ts index 895531f3c0..7086c4699c 100644 --- a/src/providers/prompt-options.ts +++ b/src/providers/prompt-options.ts @@ -1,12 +1,8 @@ -import path from 'node:path'; - -import { getAssetsDirectoryLocation } from '../plugins/utils'; - -const iconPath = path.join(getAssetsDirectoryLocation(), 'youtube-music-tray.png'); +import youtubeMusicTrayIcon from '../../assets/youtube-music-tray.png?asset'; const promptOptions = { customStylesheet: 'dark', - icon: iconPath, + icon: youtubeMusicTrayIcon, }; export default () => promptOptions; diff --git a/src/renderer.ts b/src/renderer.ts index 030662258c..809d33eaa8 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -145,7 +145,8 @@ function onApiLoaded() { try { await handler?.(options as never); } catch (error) { - console.error(`Error in plugin "${pluginName}": ${String(error)}`); + console.error(`Error in plugin "${pluginName}"`); + console.trace(error); } } }); diff --git a/src/reset.d.ts b/src/reset.d.ts index ae20968bf5..a6af36781a 100644 --- a/src/reset.d.ts +++ b/src/reset.d.ts @@ -21,6 +21,7 @@ declare global { ipcRenderer: typeof electronIpcRenderer; mainConfig: typeof config; electronIs: typeof is; + ELECTRON_RENDERER_URL: string | undefined; /** * YouTube Music internal variable (Last interaction time) */ diff --git a/src/tray.ts b/src/tray.ts index eedad40056..64d39cef27 100644 --- a/src/tray.ts +++ b/src/tray.ts @@ -1,12 +1,10 @@ -import path from 'node:path'; - import { Menu, nativeImage, Tray } from 'electron'; import { restart } from './providers/app-controls'; import config from './config'; import getSongControls from './providers/song-controls'; -import { getAssetsDirectoryLocation } from './plugins/utils'; +import youtubeMusicTrayIcon from '../assets/youtube-music-tray.png?asset'; import type { MenuTemplate } from './menu'; @@ -41,9 +39,8 @@ export const setUpTray = (app: Electron.App, win: Electron.BrowserWindow) => { } const { playPause, next, previous } = getSongControls(win); - const iconPath = path.join(getAssetsDirectoryLocation(), 'youtube-music-tray.png'); - const trayIcon = nativeImage.createFromPath(iconPath).resize({ + const trayIcon = nativeImage.createFromPath(youtubeMusicTrayIcon).resize({ width: 16, height: 16, }); diff --git a/src/youtube-music.d.ts b/src/youtube-music.d.ts index 6a921443f6..3eb6e491c2 100644 --- a/src/youtube-music.d.ts +++ b/src/youtube-music.d.ts @@ -1,12 +1,19 @@ +/// + declare module '*.html' { const html: string; export default html; } -declare module '*.svg' { - const element: SVGAElement; +declare module '*.html?raw' { + const html: string; - export default element; + export default html; +} +declare module '*.svg?inline' { + const base64: string; + + export default base64; } declare module '*.png' { const element: HTMLImageElement; @@ -15,7 +22,6 @@ declare module '*.png' { } declare module '*.jpg' { const element: HTMLImageElement; - export default element; } declare module '*.css' { @@ -23,15 +29,3 @@ declare module '*.css' { export default css; } - -declare module 'rollup-plugin-string' { - import type { Plugin } from 'rollup'; - - interface PluginOptions { - include?: string[] | string; - exclude?: string[] | string; - minifier?: unknown; - } - - export function string(options?: PluginOptions): Plugin; -} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 766ea7c067..fbb24d0219 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "target": "ESNext", "lib": ["dom", "dom.iterable", "es2022"], "module": "CommonJS", + "types": ["electron-vite/node"], "allowSyntheticDefaultImports": true, "esModuleInterop": true, "resolveJsonModule": true,