From d402d71815585d93fdf92f5362a33e6772c05149 Mon Sep 17 00:00:00 2001 From: marcobaobao Date: Wed, 12 Jun 2024 10:15:50 +0200 Subject: [PATCH] code refactoring, dependencies upgrade --- frontend/package.json | 14 +- frontend/pnpm-lock.yaml | 309 ++++++++++----------- frontend/src/components/DownloadDialog.tsx | 4 +- frontend/src/utils.ts | 5 - 4 files changed, 159 insertions(+), 173 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 2b2f9c5..748fe81 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -19,21 +19,21 @@ "fp-ts": "^2.16.5", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-router-dom": "^6.23.0", + "react-router-dom": "^6.23.1", "react-virtuoso": "^4.7.11", "recoil": "^0.7.7", "rxjs": "^7.8.1" }, "devDependencies": { "@modyfi/vite-plugin-yaml": "^1.1.0", - "@types/node": "^20.11.4", - "@types/react": "^18.2.48", + "@types/node": "^20.14.2", + "@types/react": "^18.3.3", "@types/react-dom": "^18.2.18", "@types/react-helmet": "^6.1.11", "@types/react-router-dom": "^5.3.3", - "@vitejs/plugin-react-swc": "^3.6.0", - "million": "^3.0.6", - "typescript": "^5.4.3", + "@vitejs/plugin-react-swc": "^3.7.0", + "million": "^3.1.11", + "typescript": "^5.4.5", "vite": "^5.2.11" } -} +} \ No newline at end of file diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 5421100..409005f 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: dependencies: '@emotion/react': specifier: ^11.11.4 - version: 11.11.4(@types/react@18.2.48)(react@18.3.1) + version: 11.11.4(@types/react@18.3.3)(react@18.3.1) '@emotion/styled': specifier: ^11.11.5 - version: 11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1) + version: 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@fontsource/roboto': specifier: ^5.0.13 version: 5.0.13 @@ -22,10 +22,10 @@ importers: version: 5.0.18 '@mui/icons-material': specifier: ^5.15.16 - version: 5.15.16(@mui/material@5.15.16(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.2.48)(react@18.3.1) + version: 5.15.16(@mui/material@5.15.16(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) '@mui/material': specifier: ^5.15.16 - version: 5.15.16(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 5.15.16(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) fp-ts: specifier: ^2.16.5 version: 2.16.5 @@ -36,8 +36,8 @@ importers: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) react-router-dom: - specifier: ^6.23.0 - version: 6.23.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: ^6.23.1 + version: 6.23.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-virtuoso: specifier: ^4.7.11 version: 4.7.11(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -50,13 +50,13 @@ importers: devDependencies: '@modyfi/vite-plugin-yaml': specifier: ^1.1.0 - version: 1.1.0(rollup@4.13.0)(vite@5.2.11(@types/node@20.11.4)) + version: 1.1.0(rollup@4.13.0)(vite@5.2.11(@types/node@20.14.2)) '@types/node': - specifier: ^20.11.4 - version: 20.11.4 + specifier: ^20.14.2 + version: 20.14.2 '@types/react': - specifier: ^18.2.48 - version: 18.2.48 + specifier: ^18.3.3 + version: 18.3.3 '@types/react-dom': specifier: ^18.2.18 version: 18.2.18 @@ -67,17 +67,17 @@ importers: specifier: ^5.3.3 version: 5.3.3 '@vitejs/plugin-react-swc': - specifier: ^3.6.0 - version: 3.6.0(vite@5.2.11(@types/node@20.11.4)) + specifier: ^3.7.0 + version: 3.7.0(vite@5.2.11(@types/node@20.14.2)) million: - specifier: ^3.0.6 - version: 3.0.6(rollup@4.13.0) + specifier: ^3.1.11 + version: 3.1.11(rollup@4.13.0) typescript: - specifier: ^5.4.3 - version: 5.4.3 + specifier: ^5.4.5 + version: 5.4.5 vite: specifier: ^5.2.11 - version: 5.2.11(@types/node@20.11.4) + version: 5.2.11(@types/node@20.14.2) packages: @@ -521,8 +521,8 @@ packages: '@popperjs/core@2.11.8': resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} - '@remix-run/router@1.16.0': - resolution: {integrity: sha512-Quz1KOffeEf/zwkCBM3kBtH4ZoZ+pT3xIXBG4PPW/XFtDP7EGhtTiC2+gpL9GnR7+Qdet5Oa6cYSvwKYg6kN9Q==} + '@remix-run/router@1.16.1': + resolution: {integrity: sha512-es2g3dq6Nb07iFxGk5GuHN20RwBZOsuDQN7izWIisUcv9r+d2C5jQxqmgkdebXgReWfiyUabcki6Fg77mSNrig==} engines: {node: '>=14.0.0'} '@rollup/pluginutils@5.1.0': @@ -599,80 +599,80 @@ packages: cpu: [x64] os: [win32] - '@swc/core-darwin-arm64@1.4.8': - resolution: {integrity: sha512-hhQCffRTgzpTIbngSnC30vV6IJVTI9FFBF954WEsshsecVoCGFiMwazBbrkLG+RwXENTrMhgeREEFh6R3KRgKQ==} + '@swc/core-darwin-arm64@1.5.28': + resolution: {integrity: sha512-sP6g63ybzIdOWNDbn51tyHN8EMt7Mb4RMeHQEsXB7wQfDvzhpWB+AbfK6Gs3Q8fwP/pmWIrWW9csKOc1K2Mmkg==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.4.8': - resolution: {integrity: sha512-P3ZBw8Jr8rKhY/J8d+6WqWriqngGTgHwtFeJ8MIakQJTbdYbFgXSZxcvDiERg3psbGeFXaUaPI0GO6BXv9k/OQ==} + '@swc/core-darwin-x64@1.5.28': + resolution: {integrity: sha512-Bd/agp/g7QocQG5AuorOzSC78t8OzeN+pCN/QvJj1CvPhvppjJw6e1vAbOR8vO2vvGi2pvtf3polrYQStJtSiA==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.4.8': - resolution: {integrity: sha512-PP9JIJt19bUWhAGcQW6qMwTjZOcMyzkvZa0/LWSlDm0ORYVLmDXUoeQbGD3e0Zju9UiZxyulnpjEN0ZihJgPTA==} + '@swc/core-linux-arm-gnueabihf@1.5.28': + resolution: {integrity: sha512-Wr3TwPGIveS9/OBWm0r9VAL8wkCR0zQn46J8K01uYCmVhUNK3Muxjs0vQBZaOrGu94mqbj9OXY+gB3W7aDvGdA==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.4.8': - resolution: {integrity: sha512-HvEWnwKHkoVUr5iftWirTApFJ13hGzhAY2CMw4lz9lur2m+zhPviRRED0FCI6T95Knpv7+8eUOr98Z7ctrG6DQ==} + '@swc/core-linux-arm64-gnu@1.5.28': + resolution: {integrity: sha512-8G1ZwVTuLgTAVTMPD+M97eU6WeiRIlGHwKZ5fiJHPBcz1xqIC7jQcEh7XBkobkYoU5OILotls3gzjRt8CMNyDQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.4.8': - resolution: {integrity: sha512-kY8+qa7k/dEeBq9p0Hrta18QnJPpsiJvDQSLNaTIFpdM3aEM9zbkshWz8gaX5VVGUEALowCBUWqmzO4VaqM+2w==} + '@swc/core-linux-arm64-musl@1.5.28': + resolution: {integrity: sha512-0Ajdzb5Fzvz+XUbN5ESeHAz9aHHSYiQcm+vmsDi0TtPHmsalfnqEPZmnK0zPALPJPLQP2dDo4hELeDg3/c3xgA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-x64-gnu@1.4.8': - resolution: {integrity: sha512-0WWyIw432wpO/zeGblwq4f2YWam4pn8Z/Ig4KzHMgthR/KmiLU3f0Z7eo45eVmq5vcU7Os1zi/Zb65OOt09q/w==} + '@swc/core-linux-x64-gnu@1.5.28': + resolution: {integrity: sha512-ueQ9VejnQUM2Pt+vT0IAKoF4vYBWUP6n1KHGdILpoGe3LuafQrqu7RoyQ15C7/AYii7hAeNhTFdf6gLbg8cjFg==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.4.8': - resolution: {integrity: sha512-p4yxvVS05rBNCrBaSTa20KK88vOwtg8ifTW7ec/yoab0bD5EwzzB8KbDmLLxE6uziFa0sdjF0dfRDwSZPex37Q==} + '@swc/core-linux-x64-musl@1.5.28': + resolution: {integrity: sha512-G5th8Mg0az8CbY4GQt9/m5hg2Y0kGIwvQBeVACuLQB6q2Y4txzdiTpjmFqUUhEvvl7Klyx1IHvNhfXs3zpt7PA==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-win32-arm64-msvc@1.4.8': - resolution: {integrity: sha512-jKuXihxAaqUnbFfvPxtmxjdJfs87F1GdBf33il+VUmSyWCP4BE6vW+/ReDAe8sRNsKyrZ3UH1vI5q1n64csBUA==} + '@swc/core-win32-arm64-msvc@1.5.28': + resolution: {integrity: sha512-JezwCGavZ7CkNXx4yInI4kpb71L0zxzxA9BFlmnsGKEEjVQcKc3hFpmIzfFVs+eotlBUwDNb0+Yo9m6Cb7lllA==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.4.8': - resolution: {integrity: sha512-O0wT4AGHrX8aBeH6c2ADMHgagAJc5Kf6W48U5moyYDAkkVnKvtSc4kGhjWhe1Yl0sI0cpYh2In2FxvYsb44eWw==} + '@swc/core-win32-ia32-msvc@1.5.28': + resolution: {integrity: sha512-q8tW5J4RkOkl7vYShnWS//VAb2Ngolfm9WOMaF2GRJUr2Y/Xeb/+cNjdsNOqea2BzW049D5vdP7XPmir3/zUZw==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.4.8': - resolution: {integrity: sha512-C2AYc3A2o+ECciqsJWRgIpp83Vk5EaRzHe7ed/xOWzVd0MsWR+fweEsyOjlmzHfpUxJSi46Ak3/BIZJlhZbXbg==} + '@swc/core-win32-x64-msvc@1.5.28': + resolution: {integrity: sha512-jap6EiB3wG1YE1hyhNr9KLPpH4PGm+5tVMfN0l7fgKtV0ikgpcEN/YF94tru+z5m2HovqYW009+Evq9dcVGmpg==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.4.8': - resolution: {integrity: sha512-uY2RSJcFPgNOEg12RQZL197LZX+MunGiKxsbxmh22VfVxrOYGRvh4mPANFlrD1yb38CgmW1wI6YgIi8LkIwmWg==} + '@swc/core@1.5.28': + resolution: {integrity: sha512-muCdNIqOTURUgYeyyOLYE3ShL8SZO6dw6bhRm6dCvxWzCZOncPc5fB0kjcPXTML+9KJoHL7ks5xg+vsQK+v6ig==} engines: {node: '>=10'} peerDependencies: - '@swc/helpers': ^0.5.0 + '@swc/helpers': '*' peerDependenciesMeta: '@swc/helpers': optional: true - '@swc/counter@0.1.2': - resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - '@swc/types@0.1.5': - resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} + '@swc/types@0.1.8': + resolution: {integrity: sha512-RNFA3+7OJFNYY78x0FYwi1Ow+iF1eF5WvmfY1nXPOEH4R2p/D4Cr1vzje7dNAI2aLFqpv8Wyz4oKSWqIZArpQA==} '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -680,8 +680,8 @@ packages: '@types/history@4.7.11': resolution: {integrity: sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==} - '@types/node@20.11.4': - resolution: {integrity: sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g==} + '@types/node@20.14.2': + resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==} '@types/parse-json@4.0.0': resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} @@ -689,9 +689,6 @@ packages: '@types/prop-types@15.7.11': resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} - '@types/prop-types@15.7.5': - resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} - '@types/react-dom@18.2.18': resolution: {integrity: sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==} @@ -707,14 +704,11 @@ packages: '@types/react-transition-group@4.4.10': resolution: {integrity: sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==} - '@types/react@18.2.48': - resolution: {integrity: sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==} - - '@types/scheduler@0.16.3': - resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==} + '@types/react@18.3.3': + resolution: {integrity: sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==} - '@vitejs/plugin-react-swc@3.6.0': - resolution: {integrity: sha512-XFRbsGgpGxGzEV5i5+vRiro1bwcIaZDIdBRP16qwm+jP68ue/S8FJTBEgOeojtVDYrbSua3XFp71kC8VJE6v+g==} + '@vitejs/plugin-react-swc@3.7.0': + resolution: {integrity: sha512-yrknSb3Dci6svCd/qhHqhFPDSw0QtjumcqdKMoNNzmOl5lMXTTiqzjWtG4Qask2HdvvzaNgSunbQGet8/GrKdA==} peerDependencies: vite: ^4 || ^5 @@ -934,8 +928,8 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - million@3.0.6: - resolution: {integrity: sha512-OLjRVASGOZdyZw2ctBSSOu5kb9PaxafqkueqVvw0iQtUUnTLVRk1EmtqcNAtJWCIm8wn+WGRpDbnp+5Hi8//Kg==} + million@3.1.11: + resolution: {integrity: sha512-6Vh1s0da0PzSqbbp9Zd8yMTIkOWnvBU4vNJCMHTZPXaY3fZ5h+N7s5croS/RBgjJIHz3WQZnvyNBQz7gQ6cqJg==} hasBin: true ms@2.1.2: @@ -997,15 +991,15 @@ packages: react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - react-router-dom@6.23.0: - resolution: {integrity: sha512-Q9YaSYvubwgbal2c9DJKfx6hTNoBp3iJDsl+Duva/DwxoJH+OTXkxGpql4iUK2sla/8z4RpjAm6EWx1qUDuopQ==} + react-router-dom@6.23.1: + resolution: {integrity: sha512-utP+K+aSTtEdbWpC+4gxhdlPFwuEfDKq8ZrPFU65bbRJY+l706qjR7yaidBpo3MSeA/fzwbXWbKBI6ftOnP3OQ==} engines: {node: '>=14.0.0'} peerDependencies: react: '>=16.8' react-dom: '>=16.8' - react-router@6.23.0: - resolution: {integrity: sha512-wPMZ8S2TuPadH0sF5irFGjkNLIcRvOSaEe7v+JER8508dyJumm6XZB1u5kztlX0RVq6AzRVndzqcUh6sFIauzA==} + react-router@6.23.1: + resolution: {integrity: sha512-fzcOaRF69uvqbbM7OhvQyBTFDVrrGlsFdS3AL+1KfIBtGETibHzi3FkoTRyiDJnWNc2VxrfvR+657ROHjaNjqQ==} engines: {node: '>=14.0.0'} peerDependencies: react: '>=16.8' @@ -1103,8 +1097,8 @@ packages: tslib@2.5.2: resolution: {integrity: sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==} - typescript@5.4.3: - resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true @@ -1336,7 +1330,7 @@ snapshots: '@emotion/memoize@0.8.1': {} - '@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1)': + '@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1)': dependencies: '@babel/runtime': 7.23.8 '@emotion/babel-plugin': 11.11.0 @@ -1348,7 +1342,7 @@ snapshots: hoist-non-react-statics: 3.3.2 react: 18.3.1 optionalDependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 '@emotion/serialize@1.1.3': dependencies: @@ -1368,18 +1362,18 @@ snapshots: '@emotion/sheet@1.2.2': {} - '@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1)': + '@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': dependencies: '@babel/runtime': 7.23.8 '@emotion/babel-plugin': 11.11.0 '@emotion/is-prop-valid': 1.2.2 - '@emotion/react': 11.11.4(@types/react@18.2.48)(react@18.3.1) + '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) '@emotion/serialize': 1.1.4 '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.3.1) '@emotion/utils': 1.2.1 react: 18.3.1 optionalDependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 '@emotion/unitless@0.8.1': {} @@ -1498,47 +1492,47 @@ snapshots: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 - '@modyfi/vite-plugin-yaml@1.1.0(rollup@4.13.0)(vite@5.2.11(@types/node@20.11.4))': + '@modyfi/vite-plugin-yaml@1.1.0(rollup@4.13.0)(vite@5.2.11(@types/node@20.14.2))': dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.13.0) js-yaml: 4.1.0 tosource: 2.0.0-alpha.3 - vite: 5.2.11(@types/node@20.11.4) + vite: 5.2.11(@types/node@20.14.2) transitivePeerDependencies: - rollup - '@mui/base@5.0.0-beta.40(@types/react@18.2.48)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/base@5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.5 '@floating-ui/react-dom': 2.0.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/types': 7.2.14(@types/react@18.2.48) - '@mui/utils': 5.15.14(@types/react@18.2.48)(react@18.3.1) + '@mui/types': 7.2.14(@types/react@18.3.3) + '@mui/utils': 5.15.14(@types/react@18.3.3)(react@18.3.1) '@popperjs/core': 2.11.8 clsx: 2.1.0 prop-types: 15.8.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 '@mui/core-downloads-tracker@5.15.16': {} - '@mui/icons-material@5.15.16(@mui/material@5.15.16(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.2.48)(react@18.3.1)': + '@mui/icons-material@5.15.16(@mui/material@5.15.16(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': dependencies: '@babel/runtime': 7.24.5 - '@mui/material': 5.15.16(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/material': 5.15.16(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 optionalDependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 - '@mui/material@5.15.16(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/material@5.15.16(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.5 - '@mui/base': 5.0.0-beta.40(@types/react@18.2.48)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/base': 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/core-downloads-tracker': 5.15.16 - '@mui/system': 5.15.15(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1) - '@mui/types': 7.2.14(@types/react@18.2.48) - '@mui/utils': 5.15.14(@types/react@18.2.48)(react@18.3.1) + '@mui/system': 5.15.15(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@mui/types': 7.2.14(@types/react@18.3.3) + '@mui/utils': 5.15.14(@types/react@18.3.3)(react@18.3.1) '@types/react-transition-group': 4.4.10 clsx: 2.1.0 csstype: 3.1.3 @@ -1548,20 +1542,20 @@ snapshots: react-is: 18.2.0 react-transition-group: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) optionalDependencies: - '@emotion/react': 11.11.4(@types/react@18.2.48)(react@18.3.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1) - '@types/react': 18.2.48 + '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@types/react': 18.3.3 - '@mui/private-theming@5.15.14(@types/react@18.2.48)(react@18.3.1)': + '@mui/private-theming@5.15.14(@types/react@18.3.3)(react@18.3.1)': dependencies: '@babel/runtime': 7.24.5 - '@mui/utils': 5.15.14(@types/react@18.2.48)(react@18.3.1) + '@mui/utils': 5.15.14(@types/react@18.3.3)(react@18.3.1) prop-types: 15.8.1 react: 18.3.1 optionalDependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 - '@mui/styled-engine@5.15.14(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(react@18.3.1)': + '@mui/styled-engine@5.15.14(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.5 '@emotion/cache': 11.11.0 @@ -1569,30 +1563,30 @@ snapshots: prop-types: 15.8.1 react: 18.3.1 optionalDependencies: - '@emotion/react': 11.11.4(@types/react@18.2.48)(react@18.3.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1) + '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) - '@mui/system@5.15.15(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1)': + '@mui/system@5.15.15(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1)': dependencies: '@babel/runtime': 7.24.5 - '@mui/private-theming': 5.15.14(@types/react@18.2.48)(react@18.3.1) - '@mui/styled-engine': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1))(react@18.3.1) - '@mui/types': 7.2.14(@types/react@18.2.48) - '@mui/utils': 5.15.14(@types/react@18.2.48)(react@18.3.1) + '@mui/private-theming': 5.15.14(@types/react@18.3.3)(react@18.3.1) + '@mui/styled-engine': 5.15.14(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(react@18.3.1) + '@mui/types': 7.2.14(@types/react@18.3.3) + '@mui/utils': 5.15.14(@types/react@18.3.3)(react@18.3.1) clsx: 2.1.0 csstype: 3.1.3 prop-types: 15.8.1 react: 18.3.1 optionalDependencies: - '@emotion/react': 11.11.4(@types/react@18.2.48)(react@18.3.1) - '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.2.48)(react@18.3.1))(@types/react@18.2.48)(react@18.3.1) - '@types/react': 18.2.48 + '@emotion/react': 11.11.4(@types/react@18.3.3)(react@18.3.1) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1) + '@types/react': 18.3.3 - '@mui/types@7.2.14(@types/react@18.2.48)': + '@mui/types@7.2.14(@types/react@18.3.3)': optionalDependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 - '@mui/utils@5.15.14(@types/react@18.2.48)(react@18.3.1)': + '@mui/utils@5.15.14(@types/react@18.3.3)(react@18.3.1)': dependencies: '@babel/runtime': 7.24.5 '@types/prop-types': 15.7.11 @@ -1600,11 +1594,11 @@ snapshots: react: 18.3.1 react-is: 18.2.0 optionalDependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 '@popperjs/core@2.11.8': {} - '@remix-run/router@1.16.0': {} + '@remix-run/router@1.16.1': {} '@rollup/pluginutils@5.1.0(rollup@4.13.0)': dependencies: @@ -1653,61 +1647,63 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.13.0': optional: true - '@swc/core-darwin-arm64@1.4.8': + '@swc/core-darwin-arm64@1.5.28': optional: true - '@swc/core-darwin-x64@1.4.8': + '@swc/core-darwin-x64@1.5.28': optional: true - '@swc/core-linux-arm-gnueabihf@1.4.8': + '@swc/core-linux-arm-gnueabihf@1.5.28': optional: true - '@swc/core-linux-arm64-gnu@1.4.8': + '@swc/core-linux-arm64-gnu@1.5.28': optional: true - '@swc/core-linux-arm64-musl@1.4.8': + '@swc/core-linux-arm64-musl@1.5.28': optional: true - '@swc/core-linux-x64-gnu@1.4.8': + '@swc/core-linux-x64-gnu@1.5.28': optional: true - '@swc/core-linux-x64-musl@1.4.8': + '@swc/core-linux-x64-musl@1.5.28': optional: true - '@swc/core-win32-arm64-msvc@1.4.8': + '@swc/core-win32-arm64-msvc@1.5.28': optional: true - '@swc/core-win32-ia32-msvc@1.4.8': + '@swc/core-win32-ia32-msvc@1.5.28': optional: true - '@swc/core-win32-x64-msvc@1.4.8': + '@swc/core-win32-x64-msvc@1.5.28': optional: true - '@swc/core@1.4.8': + '@swc/core@1.5.28': dependencies: - '@swc/counter': 0.1.2 - '@swc/types': 0.1.5 + '@swc/counter': 0.1.3 + '@swc/types': 0.1.8 optionalDependencies: - '@swc/core-darwin-arm64': 1.4.8 - '@swc/core-darwin-x64': 1.4.8 - '@swc/core-linux-arm-gnueabihf': 1.4.8 - '@swc/core-linux-arm64-gnu': 1.4.8 - '@swc/core-linux-arm64-musl': 1.4.8 - '@swc/core-linux-x64-gnu': 1.4.8 - '@swc/core-linux-x64-musl': 1.4.8 - '@swc/core-win32-arm64-msvc': 1.4.8 - '@swc/core-win32-ia32-msvc': 1.4.8 - '@swc/core-win32-x64-msvc': 1.4.8 + '@swc/core-darwin-arm64': 1.5.28 + '@swc/core-darwin-x64': 1.5.28 + '@swc/core-linux-arm-gnueabihf': 1.5.28 + '@swc/core-linux-arm64-gnu': 1.5.28 + '@swc/core-linux-arm64-musl': 1.5.28 + '@swc/core-linux-x64-gnu': 1.5.28 + '@swc/core-linux-x64-musl': 1.5.28 + '@swc/core-win32-arm64-msvc': 1.5.28 + '@swc/core-win32-ia32-msvc': 1.5.28 + '@swc/core-win32-x64-msvc': 1.5.28 - '@swc/counter@0.1.2': {} + '@swc/counter@0.1.3': {} - '@swc/types@0.1.5': {} + '@swc/types@0.1.8': + dependencies: + '@swc/counter': 0.1.3 '@types/estree@1.0.5': {} '@types/history@4.7.11': {} - '@types/node@20.11.4': + '@types/node@20.14.2': dependencies: undici-types: 5.26.5 @@ -1715,43 +1711,38 @@ snapshots: '@types/prop-types@15.7.11': {} - '@types/prop-types@15.7.5': {} - '@types/react-dom@18.2.18': dependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 '@types/react-helmet@6.1.11': dependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 '@types/react-router-dom@5.3.3': dependencies: '@types/history': 4.7.11 - '@types/react': 18.2.48 + '@types/react': 18.3.3 '@types/react-router': 5.1.20 '@types/react-router@5.1.20': dependencies: '@types/history': 4.7.11 - '@types/react': 18.2.48 + '@types/react': 18.3.3 '@types/react-transition-group@4.4.10': dependencies: - '@types/react': 18.2.48 + '@types/react': 18.3.3 - '@types/react@18.2.48': + '@types/react@18.3.3': dependencies: - '@types/prop-types': 15.7.5 - '@types/scheduler': 0.16.3 - csstype: 3.1.2 - - '@types/scheduler@0.16.3': {} + '@types/prop-types': 15.7.11 + csstype: 3.1.3 - '@vitejs/plugin-react-swc@3.6.0(vite@5.2.11(@types/node@20.11.4))': + '@vitejs/plugin-react-swc@3.7.0(vite@5.2.11(@types/node@20.14.2))': dependencies: - '@swc/core': 1.4.8 - vite: 5.2.11(@types/node@20.11.4) + '@swc/core': 1.5.28 + vite: 5.2.11(@types/node@20.14.2) transitivePeerDependencies: - '@swc/helpers' @@ -1962,7 +1953,7 @@ snapshots: dependencies: yallist: 3.1.1 - million@3.0.6(rollup@4.13.0): + million@3.1.11(rollup@4.13.0): dependencies: '@babel/core': 7.23.7 '@babel/types': 7.23.6 @@ -2025,16 +2016,16 @@ snapshots: react-is@18.2.0: {} - react-router-dom@6.23.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-router-dom@6.23.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@remix-run/router': 1.16.0 + '@remix-run/router': 1.16.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-router: 6.23.0(react@18.3.1) + react-router: 6.23.1(react@18.3.1) - react-router@6.23.0(react@18.3.1): + react-router@6.23.1(react@18.3.1): dependencies: - '@remix-run/router': 1.16.0 + '@remix-run/router': 1.16.1 react: 18.3.1 react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): @@ -2127,7 +2118,7 @@ snapshots: tslib@2.5.2: {} - typescript@5.4.3: {} + typescript@5.4.5: {} undici-types@5.26.5: {} @@ -2146,13 +2137,13 @@ snapshots: escalade: 3.1.1 picocolors: 1.0.0 - vite@5.2.11(@types/node@20.11.4): + vite@5.2.11(@types/node@20.14.2): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.13.0 optionalDependencies: - '@types/node': 20.11.4 + '@types/node': 20.14.2 fsevents: 2.3.3 webpack-sources@3.2.3: {} diff --git a/frontend/src/components/DownloadDialog.tsx b/frontend/src/components/DownloadDialog.tsx index c371b07..3a9b033 100644 --- a/frontend/src/components/DownloadDialog.tsx +++ b/frontend/src/components/DownloadDialog.tsx @@ -103,7 +103,7 @@ const DownloadDialog: FC = ({ open, onClose, onDownloadStart }) => { if (pickedBestFormat !== '') codes.push(pickedBestFormat) await new Promise(r => setTimeout(r, 10)) - await client.download({ + client.download({ url: immediate || line, args: `${toFormatArgs(codes)} ${downloadTemplate}`, pathOverride: downloadPath ?? '', @@ -115,7 +115,7 @@ const DownloadDialog: FC = ({ open, onClose, onDownloadStart }) => { resetInput() setDownloadFormats(undefined) onDownloadStart(immediate || line) - }, 250) + }, 100) } setUrl('') diff --git a/frontend/src/utils.ts b/frontend/src/utils.ts index dff658d..525328b 100644 --- a/frontend/src/utils.ts +++ b/frontend/src/utils.ts @@ -1,11 +1,6 @@ import { pipe } from 'fp-ts/lib/function' import type { RPCResponse } from "./types" -/** - * Validate an ip v4 via regex - * @param {string} ipAddr - * @returns ip validity test - */ export function validateIP(ipAddr: string): boolean { let ipRegex = /^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/gm return ipRegex.test(ipAddr)