update the upload

This commit is contained in:
proddy
2024-08-14 18:53:52 +02:00
parent d5fec4aec8
commit 5a058746bb
11 changed files with 466 additions and 720 deletions

View File

@@ -8,6 +8,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"build-hosted": "typesafe-i18n --no-watch && vite build --mode hosted",
@@ -28,15 +29,14 @@
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"@table-library/react-table-library": "4.1.7",
"alova": "3.0.6",
"alova": "3.0.8",
"async-validator": "^4.2.5",
"jwt-decode": "^4.0.0",
"mime-types": "^2.1.35",
"preact": "^10.23.1",
"preact": "^10.23.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-icons": "^5.2.1",
"react-icons": "^5.3.0",
"react-router-dom": "^6.26.0",
"react-toastify": "^10.0.5",
"typesafe-i18n": "^5.26.2",
@@ -49,17 +49,19 @@
"@preact/preset-vite": "^2.9.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/babel__core": "^7",
"@types/node": "^22.2.0",
"@types/formidable": "^3",
"@types/node": "^22.3.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-router-dom": "^5.3.3",
"concurrently": "^8.2.2",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"formidable": "^3.5.1",
"prettier": "^3.3.3",
"rollup-plugin-visualizer": "^5.12.0",
"terser": "^5.31.5",
"typescript-eslint": "8.0.1",
"terser": "^5.31.6",
"typescript-eslint": "8.1.0",
"vite": "^5.4.0",
"vite-plugin-imagemin": "^0.6.1",
"vite-tsconfig-paths": "^5.0.1"

View File

@@ -22,6 +22,11 @@ export const alovaInstance = createAlova({
method.config.headers.Authorization =
'Bearer ' + localStorage.getItem(ACCESS_TOKEN);
}
// for simualting vrey slow networks
// return new Promise((resolve) => {
// const random = 3000 + Math.random() * 2000;
// setTimeout(resolve, Math.floor(random));
// });
},
responded: {

View File

@@ -1,4 +1,3 @@
import { useState } from 'react';
import { toast } from 'react-toastify';
import DownloadIcon from '@mui/icons-material/GetApp';
@@ -24,28 +23,8 @@ import {
} from 'components';
import { useI18nContext } from 'i18n/i18n-react';
import RestartMonitor from '../status/RestartMonitor';
const UploadDownload = () => {
const { LL } = useI18nContext();
const [restarting, setRestarting] = useState<boolean>();
const [md5, setMd5] = useState<string>();
const {
loading: isUploading,
uploading: progress,
send: sendUpload,
abort: cancelUpload
} = useRequest(SystemApi.uploadFile, {
immediate: false
}).onSuccess(({ data }) => {
if (data) {
setMd5(data.md5 as string);
toast.success(LL.UPLOAD() + ' MD5 ' + LL.SUCCESSFUL());
} else {
setRestarting(true);
}
});
const { send: sendSettings } = useRequest(getSettings(), {
immediate: false
@@ -116,18 +95,6 @@ const UploadDownload = () => {
return data.esp_platform;
};
const startUpload = async (files: File[]) => {
await sendUpload(files[0]).catch((error: Error) => {
if (error.message === 'The user aborted a request') {
toast.warning(LL.UPLOAD() + ' ' + LL.ABORTED());
} else if (error.message === 'Network Error') {
toast.warning('Invalid file extension or incompatible bin file');
} else {
toast.error(error.message);
}
});
};
const saveFile = (json: unknown, endpoint: string) => {
const anchor = document.createElement('a');
anchor.href = URL.createObjectURL(
@@ -241,107 +208,93 @@ const UploadDownload = () => {
{LL.RESTART_TEXT(1)}.
</Typography>
</Box>
{md5 && (
<Box mb={2}>
<Typography variant="body2">{'MD5: ' + md5}</Typography>
</Box>
)}
<SingleUpload
onDrop={startUpload}
onCancel={cancelUpload}
isUploading={isUploading}
progress={progress}
/>
{!isUploading && (
<>
<Typography sx={{ pt: 4, pb: 2 }} variant="h6" color="primary">
{LL.DOWNLOAD(0)}
<SingleUpload />
<Typography sx={{ pt: 4, pb: 2 }} variant="h6" color="primary">
{LL.DOWNLOAD(0)}
</Typography>
<Box color="warning.main">
<Typography mb={1} variant="body2">
{LL.HELP_INFORMATION_4()}
</Typography>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={() => callAPI('system', 'info')}
>
{LL.SUPPORT_INFORMATION(0)}
</Button>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={() => callAPI('system', 'allvalues')}
>
All Values
</Button>
</Box>
<Box color="warning.main">
<Typography mt={2} mb={1} variant="body2">
{LL.DOWNLOAD_SETTINGS_TEXT()}
</Typography>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={downloadSettings}
>
{LL.SETTINGS_OF('')}
</Button>
</Box>
<Box color="warning.main">
<Typography mt={2} mb={1} variant="body2">
{LL.DOWNLOAD_CUSTOMIZATION_TEXT()}
</Typography>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={downloadCustomizations}
>
{LL.CUSTOMIZATIONS()}
</Button>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={downloadEntities}
>
{LL.CUSTOM_ENTITIES(0)}
</Button>
<Box color="warning.main">
<Typography mt={2} mb={1} variant="body2">
{LL.DOWNLOAD_SCHEDULE_TEXT()}
</Typography>
<Box color="warning.main">
<Typography mb={1} variant="body2">
{LL.HELP_INFORMATION_4()}
</Typography>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={() => callAPI('system', 'info')}
>
{LL.SUPPORT_INFORMATION(0)}
</Button>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={() => callAPI('system', 'allvalues')}
>
All Values
</Button>
</Box>
<Box color="warning.main">
<Typography mt={2} mb={1} variant="body2">
{LL.DOWNLOAD_SETTINGS_TEXT()}
</Typography>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={downloadSettings}
>
{LL.SETTINGS_OF('')}
</Button>
</Box>
<Box color="warning.main">
<Typography mt={2} mb={1} variant="body2">
{LL.DOWNLOAD_CUSTOMIZATION_TEXT()}
</Typography>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={downloadCustomizations}
>
{LL.CUSTOMIZATIONS()}
</Button>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={downloadEntities}
>
{LL.CUSTOM_ENTITIES(0)}
</Button>
<Box color="warning.main">
<Typography mt={2} mb={1} variant="body2">
{LL.DOWNLOAD_SCHEDULE_TEXT()}
</Typography>
</Box>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={downloadSchedule}
>
{LL.SCHEDULE(0)}
</Button>
</Box>
</>
)}
</Box>
<Button
sx={{ ml: 2 }}
startIcon={<DownloadIcon />}
variant="outlined"
color="primary"
onClick={downloadSchedule}
>
{LL.SCHEDULE(0)}
</Button>
</Box>
</>
);
};
return (
<SectionContent>{restarting ? <RestartMonitor /> : content()}</SectionContent>
);
return <SectionContent>{content()}</SectionContent>;
};
export default UploadDownload;

View File

@@ -1,117 +1,119 @@
import { Fragment } from 'react';
import { useDropzone } from 'react-dropzone';
import type { DropzoneState } from 'react-dropzone';
import { ChangeEvent, useRef, useState } from 'react';
import { toast } from 'react-toastify';
import CancelIcon from '@mui/icons-material/Cancel';
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
import { Box, Button, LinearProgress, Typography, useTheme } from '@mui/material';
import type { Theme } from '@mui/material';
import UploadIcon from '@mui/icons-material/Upload';
import { Box, Button, LinearProgress, Typography } from '@mui/material';
import type { Progress } from 'alova';
import * as SystemApi from 'api/system';
import { useRequest } from 'alova/client';
import RestartMonitor from 'app/status/RestartMonitor';
import { useI18nContext } from 'i18n/i18n-react';
const getBorderColor = (theme: Theme, props: DropzoneState) => {
if (props.isDragAccept) {
return theme.palette.success.main;
}
if (props.isDragReject) {
return theme.palette.error.main;
}
if (props.isDragActive) {
return theme.palette.info.main;
}
return theme.palette.grey[700];
};
const SingleUpload = () => {
const [md5, setMd5] = useState<string>();
const [restarting, setRestarting] = useState<boolean>();
export interface SingleUploadProps {
onDrop: (acceptedFiles: File[]) => void;
onCancel: () => void;
isUploading: boolean;
progress: Progress;
}
const SingleUpload = ({
onDrop,
onCancel,
isUploading,
progress
}: SingleUploadProps) => {
const uploading = isUploading && progress.total > 0;
const dropzoneState = useDropzone({
onDrop,
accept: {
'application/octet-stream': ['.bin'],
'application/json': ['.json'],
'text/plain': ['.md5']
},
disabled: isUploading,
multiple: false
const {
loading: isUploading,
uploading: progress,
send: sendUpload,
abort: cancelUpload
} = useRequest(SystemApi.uploadFile, {
immediate: false
}).onSuccess(({ data }) => {
if (data) {
setMd5(data.md5 as string);
toast.success(LL.UPLOAD() + ' MD5 ' + LL.SUCCESSFUL());
setFile(undefined);
} else {
setRestarting(true);
}
});
const { getRootProps, getInputProps } = dropzoneState;
const theme = useTheme();
const [file, setFile] = useState<File>();
const inputRef = useRef<HTMLInputElement | null>(null);
const { LL } = useI18nContext();
const progressText = () => {
if (uploading) {
return (
LL.UPLOADING() +
': ' +
Math.round((progress.loaded * 100) / progress.total) +
'%'
);
console.log(progress); // TODO remove
const handleUploadClick = () => {
inputRef.current?.click();
};
const handleFileChange = async (e: ChangeEvent<HTMLInputElement>) => {
if (!e.target.files) {
return;
}
return LL.UPLOAD_DROP_TEXT();
setFile(e.target.files[0]);
await sendUpload(e.target.files[0]).catch((error: Error) => {
if (error.message === 'The user aborted a request') {
toast.warning(LL.UPLOAD() + ' ' + LL.ABORTED());
} else if (error.message === 'Network Error') {
toast.warning('Invalid file extension or incompatible bin file');
} else {
toast.error(error.message);
}
});
};
return (
<Box
{...getRootProps({
sx: {
py: 4,
px: 2,
borderWidth: 2,
borderRadius: 2,
borderStyle: 'dashed',
color: theme.palette.grey[400],
transition: 'border .24s ease-in-out',
width: '100%',
cursor: uploading ? 'default' : 'pointer',
borderColor: getBorderColor(theme, dropzoneState)
}
})}
>
<input {...getInputProps()} />
<Box flexDirection="column" display="flex" alignItems="center">
<CloudUploadIcon fontSize="large" />
<Typography variant="h6">{progressText()}</Typography>
{uploading && (
<Fragment>
<Box width="100%" p={2}>
<LinearProgress
variant="determinate"
value={
progress.total === 0 || progress.loaded === 0
? 0
: progress.loaded <= progress.total
? Math.round((progress.loaded * 100) / progress.total)
: Math.round((progress.total * 100) / progress.loaded)
}
/>
</Box>
<Button
startIcon={<CancelIcon />}
variant="outlined"
color="secondary"
onClick={onCancel}
>
{LL.CANCEL()}
</Button>
</Fragment>
)}
</Box>
</Box>
<>
<input
type="file"
ref={inputRef}
style={{ display: 'none' }}
onChange={handleFileChange}
/>
<Button
sx={{ ml: 2 }}
startIcon={<UploadIcon />}
variant="outlined"
color="secondary"
onClick={handleUploadClick}
>
{file ? LL.UPLOADING() + ` ${file.name}` : LL.UPLOAD()}
</Button>
{isUploading && (
<>
<Box width="100%" p={2}>
<LinearProgress
variant="determinate"
value={
progress.total === 0 || progress.loaded === 0
? 0
: progress.loaded <= progress.total
? Math.round((progress.loaded * 100) / progress.total)
: Math.round((progress.total * 100) / progress.loaded)
}
/>
</Box>
<Button
startIcon={<CancelIcon />}
variant="outlined"
color="secondary"
onClick={cancelUpload}
>
{LL.CANCEL()}
</Button>
</>
)}
{md5 && (
<Box mt={2}>
<Typography variant="body2">{'MD5: ' + md5}</Typography>
</Box>
)}
{restarting && <RestartMonitor />}
</>
);
};

View File

@@ -4,11 +4,13 @@ import { defineConfig } from 'vite';
import viteImagemin from 'vite-plugin-imagemin';
import viteTsconfigPaths from 'vite-tsconfig-paths';
import mockServer from '../mock-api/mockServer.js';
export default defineConfig(({ command, mode }) => {
if (command === 'serve') {
console.log('Preparing for standalone build with server, mode=' + mode);
return {
plugins: [preact(), viteTsconfigPaths()],
plugins: [preact(), viteTsconfigPaths(), mockServer()],
server: {
open: true,
port: mode == 'production' ? 4173 : 3000,
@@ -23,7 +25,6 @@ export default defineConfig(({ command, mode }) => {
changeOrigin: true,
secure: false
},
'/rest/uploadFile': 'http://localhost:3082', // this must come first to work!
'/rest': 'http://localhost:3080'
}
}

View File

@@ -1330,6 +1330,15 @@ __metadata:
languageName: node
linkType: hard
"@types/formidable@npm:^3":
version: 3.4.5
resolution: "@types/formidable@npm:3.4.5"
dependencies:
"@types/node": "npm:*"
checksum: 10c0/733dc59d4d12152ba5fb70751184812345ff08691864dd9b1b7626b9d40045a306021b9721495cafb56cd375da54fecaaebdada98fc390b7406ebb81efe0bfbe
languageName: node
linkType: hard
"@types/glob@npm:^7.1.1":
version: 7.2.0
resolution: "@types/glob@npm:7.2.0"
@@ -1436,7 +1445,7 @@ __metadata:
languageName: node
linkType: hard
"@types/node@npm:*, @types/node@npm:^22.2.0":
"@types/node@npm:*":
version: 22.2.0
resolution: "@types/node@npm:22.2.0"
dependencies:
@@ -1445,6 +1454,15 @@ __metadata:
languageName: node
linkType: hard
"@types/node@npm:^22.3.0":
version: 22.3.0
resolution: "@types/node@npm:22.3.0"
dependencies:
undici-types: "npm:~6.18.2"
checksum: 10c0/855be3b97f4262a84818f889ff898e147dcef4f72b866e3551a8367380cdb63a45cf3929f09d9a0647f62706f8d4772e91a1ecd1bd7c6a80d6744c2b0cbca608
languageName: node
linkType: hard
"@types/parse-json@npm:^4.0.0":
version: 4.0.2
resolution: "@types/parse-json@npm:4.0.2"
@@ -1526,15 +1544,15 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/eslint-plugin@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/eslint-plugin@npm:8.0.1"
"@typescript-eslint/eslint-plugin@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/eslint-plugin@npm:8.1.0"
dependencies:
"@eslint-community/regexpp": "npm:^4.10.0"
"@typescript-eslint/scope-manager": "npm:8.0.1"
"@typescript-eslint/type-utils": "npm:8.0.1"
"@typescript-eslint/utils": "npm:8.0.1"
"@typescript-eslint/visitor-keys": "npm:8.0.1"
"@typescript-eslint/scope-manager": "npm:8.1.0"
"@typescript-eslint/type-utils": "npm:8.1.0"
"@typescript-eslint/utils": "npm:8.1.0"
"@typescript-eslint/visitor-keys": "npm:8.1.0"
graphemer: "npm:^1.4.0"
ignore: "npm:^5.3.1"
natural-compare: "npm:^1.4.0"
@@ -1545,66 +1563,66 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/fd4e11599c4a85d0fbbd0be350f11acaa32d424bc5c2c0b672133266b4b56fc20a78edd0c7b803b4223a1a66736624561a60fee827738118550733d14afb775a
checksum: 10c0/7bbeae588f859b59c34d6a76cac06ef0fa605921b40c5d3b65b94829984280ea84c4dd3f5cb9ce2eb326f5563e9abb4c90ebff05c47f83f4def296c2ea1fa86c
languageName: node
linkType: hard
"@typescript-eslint/parser@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/parser@npm:8.0.1"
"@typescript-eslint/parser@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/parser@npm:8.1.0"
dependencies:
"@typescript-eslint/scope-manager": "npm:8.0.1"
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/typescript-estree": "npm:8.0.1"
"@typescript-eslint/visitor-keys": "npm:8.0.1"
"@typescript-eslint/scope-manager": "npm:8.1.0"
"@typescript-eslint/types": "npm:8.1.0"
"@typescript-eslint/typescript-estree": "npm:8.1.0"
"@typescript-eslint/visitor-keys": "npm:8.1.0"
debug: "npm:^4.3.4"
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/bf93640f06c9d2e09a79d015d2c3303f58a8569a3f6928544feeeaad8825388133b5e44ca017b4480d38c037644cf6390c785129539fe256f55422ae608943b5
checksum: 10c0/b94b2d3ab5ca505484d100701fad6a04a5dc8d595029bac1b9f5b8a4a91d80fd605b0f65d230b36a97ab7e5d55eeb0c28af2ab63929a3e4ab8fdefd2a548c36b
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/scope-manager@npm:8.0.1"
"@typescript-eslint/scope-manager@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/scope-manager@npm:8.1.0"
dependencies:
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/visitor-keys": "npm:8.0.1"
checksum: 10c0/79c00bc726c0c14b800bbbc1c1b88978c2cbeb29d2b06b94a5773f959aafac5cfb37bdb8c3bb80b9fb07fd10440413fce9098f338dce100696a4d3dc1ea6b187
"@typescript-eslint/types": "npm:8.1.0"
"@typescript-eslint/visitor-keys": "npm:8.1.0"
checksum: 10c0/2bcf8cd176a1819bddcae16c572e7da8fba821b995a91cd53d64d8d6b85a17f5a895522f281ba57e34929574bddd4d6684ee3e545ec4e8096be4c3198e253a9a
languageName: node
linkType: hard
"@typescript-eslint/type-utils@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/type-utils@npm:8.0.1"
"@typescript-eslint/type-utils@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/type-utils@npm:8.1.0"
dependencies:
"@typescript-eslint/typescript-estree": "npm:8.0.1"
"@typescript-eslint/utils": "npm:8.0.1"
"@typescript-eslint/typescript-estree": "npm:8.1.0"
"@typescript-eslint/utils": "npm:8.1.0"
debug: "npm:^4.3.4"
ts-api-utils: "npm:^1.3.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/5cbf604044d5cd9cc6e95a2eee5a62803a09f46ccf4aa7293e373a4be8b7b57b470cbc97c1121ef354f842e7fc1d17b30c81bf3540023382ad5e339c9ca3ce15
checksum: 10c0/62753941c4136e8d2daa72fe0410dea48e5317a6f12ece6382ca85e29912bd1b3f739b61d1060fc0a1f8c488dfc905beab4c8b8497951a21c3138a659c7271ec
languageName: node
linkType: hard
"@typescript-eslint/types@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/types@npm:8.0.1"
checksum: 10c0/e7c02d4e153a935c04bfddc0c8fc1618b1c8e9767583cff05a0e063bbacb7f3c8fac2257879c41162fe19094a0de3a567b57969177b2a0c32f39accd4c5601d5
"@typescript-eslint/types@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/types@npm:8.1.0"
checksum: 10c0/ceade44455f45974e68956016c4d1c6626580732f7f9675e14ffa63db80b551752b0df596b20473dae9f0dc6ed966e17417dc2cf36e1a82b6ab0edc97c5eaa50
languageName: node
linkType: hard
"@typescript-eslint/typescript-estree@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/typescript-estree@npm:8.0.1"
"@typescript-eslint/typescript-estree@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/typescript-estree@npm:8.1.0"
dependencies:
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/visitor-keys": "npm:8.0.1"
"@typescript-eslint/types": "npm:8.1.0"
"@typescript-eslint/visitor-keys": "npm:8.1.0"
debug: "npm:^4.3.4"
globby: "npm:^11.1.0"
is-glob: "npm:^4.0.3"
@@ -1614,31 +1632,31 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/12507995dc634a1746b581635e0df9f986ad01e7f0b4482f1f240986e7277ebd301dfe3b59c07da6d1f3d465f9110dc2a61ce50b67a8f31188cad13f7cc3632e
checksum: 10c0/a7bc8275df1c79c4cb14ef086c56674316dd4907efec53eddca35d0b5220428b69c82178ce2d95138da2e398269c8bd0764cae8020a36417e411e35c3c47bc4b
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/utils@npm:8.0.1"
"@typescript-eslint/utils@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/utils@npm:8.1.0"
dependencies:
"@eslint-community/eslint-utils": "npm:^4.4.0"
"@typescript-eslint/scope-manager": "npm:8.0.1"
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/typescript-estree": "npm:8.0.1"
"@typescript-eslint/scope-manager": "npm:8.1.0"
"@typescript-eslint/types": "npm:8.1.0"
"@typescript-eslint/typescript-estree": "npm:8.1.0"
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
checksum: 10c0/9ab4baee82ac74caee18fb687697698043385aea5d0ec4bb34d874a6969eaa3e48f9319ab023cbcb6114f86de17f7360a43460fb4159c61760a2d2984004dd21
checksum: 10c0/c95503a6bdcd98b1ff04d1adbf46377b2036b1c510d90a4a056401f996f775f06c3108c95fb81cd6babc9c97b73b91b8e848f0337bc508de8a49c993582f0e75
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:8.0.1":
version: 8.0.1
resolution: "@typescript-eslint/visitor-keys@npm:8.0.1"
"@typescript-eslint/visitor-keys@npm:8.1.0":
version: 8.1.0
resolution: "@typescript-eslint/visitor-keys@npm:8.1.0"
dependencies:
"@typescript-eslint/types": "npm:8.0.1"
"@typescript-eslint/types": "npm:8.1.0"
eslint-visitor-keys: "npm:^3.4.3"
checksum: 10c0/64c12095a97808bb1e1f5709192b274cac58d6b8fbbf9ec8fafead30f7effef7f0232244ec759298d046e1cd43521b9f3ba37b80618d5184c8b22fae665a7068
checksum: 10c0/b7544dbb0eec1ddbfcd95c04b51b9a739c2e768c16d1c88508f976a2b0d1bc02fefb7491930e06e48073a5c07c6f488cd8403bba3a8b918888b93a88d5ac3869
languageName: node
linkType: hard
@@ -1658,30 +1676,31 @@ __metadata:
"@table-library/react-table-library": "npm:4.1.7"
"@trivago/prettier-plugin-sort-imports": "npm:^4.3.0"
"@types/babel__core": "npm:^7"
"@types/node": "npm:^22.2.0"
"@types/formidable": "npm:^3"
"@types/node": "npm:^22.3.0"
"@types/react": "npm:^18.3.3"
"@types/react-dom": "npm:^18.3.0"
"@types/react-router-dom": "npm:^5.3.3"
alova: "npm:3.0.6"
alova: "npm:3.0.8"
async-validator: "npm:^4.2.5"
concurrently: "npm:^8.2.2"
eslint: "npm:^9.9.0"
eslint-config-prettier: "npm:^9.1.0"
formidable: "npm:^3.5.1"
jwt-decode: "npm:^4.0.0"
mime-types: "npm:^2.1.35"
preact: "npm:^10.23.1"
preact: "npm:^10.23.2"
prettier: "npm:^3.3.3"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
react-dropzone: "npm:^14.2.3"
react-icons: "npm:^5.2.1"
react-icons: "npm:^5.3.0"
react-router-dom: "npm:^6.26.0"
react-toastify: "npm:^10.0.5"
rollup-plugin-visualizer: "npm:^5.12.0"
terser: "npm:^5.31.5"
terser: "npm:^5.31.6"
typesafe-i18n: "npm:^5.26.2"
typescript: "npm:^5.5.4"
typescript-eslint: "npm:8.0.1"
typescript-eslint: "npm:8.1.0"
vite: "npm:^5.4.0"
vite-plugin-imagemin: "npm:^0.6.1"
vite-tsconfig-paths: "npm:^5.0.1"
@@ -1744,13 +1763,13 @@ __metadata:
languageName: node
linkType: hard
"alova@npm:3.0.6":
version: 3.0.6
resolution: "alova@npm:3.0.6"
"alova@npm:3.0.8":
version: 3.0.8
resolution: "alova@npm:3.0.8"
dependencies:
"@alova/shared": "npm:^1.0.4"
rate-limiter-flexible: "npm:^5.0.3"
checksum: 10c0/dec1ceabaedc4c3c42237e03e4fdcd41ada8ad8aeb856ab2a1d428a1daf4559125767a9bd2d20f193ae013063baa59641a6c34dddf7794f7bba1a31e7258968f
checksum: 10c0/7244b0e611153a01ae36a3076a54df2165c9f7a7e44b83378e1d60cd079879b5786f5abfd213cb4ebb9c7a1cc7d763de193d49e21465c2cec9c9cb9912dec9f9
languageName: node
linkType: hard
@@ -1844,6 +1863,13 @@ __metadata:
languageName: node
linkType: hard
"asap@npm:^2.0.0":
version: 2.0.6
resolution: "asap@npm:2.0.6"
checksum: 10c0/c6d5e39fe1f15e4b87677460bd66b66050cd14c772269cee6688824c1410a08ab20254bb6784f9afb75af9144a9f9a7692d49547f4d19d715aeb7c0318f3136d
languageName: node
linkType: hard
"async-validator@npm:^4.2.5":
version: 4.2.5
resolution: "async-validator@npm:4.2.5"
@@ -1851,13 +1877,6 @@ __metadata:
languageName: node
linkType: hard
"attr-accept@npm:^2.2.2":
version: 2.2.2
resolution: "attr-accept@npm:2.2.2"
checksum: 10c0/f77c073ac9616a783f2df814a56f65f1c870193e8da6097139e30b3be84ecc19fb835b93e81315d1da4f19e80721f14e8c8075014205e00abd37b856fe030b80
languageName: node
linkType: hard
"babel-plugin-macros@npm:^3.1.0":
version: 3.1.0
resolution: "babel-plugin-macros@npm:3.1.0"
@@ -2586,6 +2605,16 @@ __metadata:
languageName: node
linkType: hard
"dezalgo@npm:^1.0.4":
version: 1.0.4
resolution: "dezalgo@npm:1.0.4"
dependencies:
asap: "npm:^2.0.0"
wrappy: "npm:1"
checksum: 10c0/8a870ed42eade9a397e6141fe5c025148a59ed52f1f28b1db5de216b4d57f0af7a257070c3af7ce3d5508c1ce9dd5009028a76f4b2cc9370dc56551d2355fad8
languageName: node
linkType: hard
"dir-glob@npm:^3.0.1":
version: 3.0.1
resolution: "dir-glob@npm:3.0.1"
@@ -3446,15 +3475,6 @@ __metadata:
languageName: node
linkType: hard
"file-selector@npm:^0.6.0":
version: 0.6.0
resolution: "file-selector@npm:0.6.0"
dependencies:
tslib: "npm:^2.4.0"
checksum: 10c0/477ca1b56274db9fee1a8a623c4bfef580389726a5fef843af8c1f2f17f70ec2d1e41b29115777c92e120a15f1cca734c6ef36bb48bfa2ee027c68da16cd0d28
languageName: node
linkType: hard
"file-type@npm:5.2.0, file-type@npm:^5.2.0":
version: 5.2.0
resolution: "file-type@npm:5.2.0"
@@ -3594,6 +3614,17 @@ __metadata:
languageName: node
linkType: hard
"formidable@npm:^3.5.1":
version: 3.5.1
resolution: "formidable@npm:3.5.1"
dependencies:
dezalgo: "npm:^1.0.4"
hexoid: "npm:^1.0.0"
once: "npm:^1.4.0"
checksum: 10c0/c02fa1a027876dd9fc5abde16e9c537bec41bc652b362d0b3fd26daaae0615b9a472129c29b328a130d11f543f676acd1b13e6f28f3adc1b088cdaea9fb9e054
languageName: node
linkType: hard
"from2@npm:^2.1.1":
version: 2.3.0
resolution: "from2@npm:2.3.0"
@@ -3989,6 +4020,13 @@ __metadata:
languageName: node
linkType: hard
"hexoid@npm:^1.0.0":
version: 1.0.0
resolution: "hexoid@npm:1.0.0"
checksum: 10c0/9c45e8ba676b9eb88455631ebceec4c829a8374a583410dc735472ab9808bf11339fcd074633c3fa30e420901b894d8a92ffd5e2e21eddd41149546e05a91f69
languageName: node
linkType: hard
"hoist-non-react-statics@npm:^3.3.1":
version: 3.3.2
resolution: "hoist-non-react-statics@npm:3.3.2"
@@ -5593,10 +5631,10 @@ __metadata:
languageName: node
linkType: hard
"preact@npm:^10.23.1":
version: 10.23.1
resolution: "preact@npm:10.23.1"
checksum: 10c0/f0eb37999bfa9cbc725e57e189387c77919fa05d17cdc3c4ff41660298805159867689f1d974eb8e6496288c0212760490d0e6f1c12022e0f5a74d06cc618e85
"preact@npm:^10.23.2":
version: 10.23.2
resolution: "preact@npm:10.23.2"
checksum: 10c0/6e0dc1b38ead7554c99ddec9a32162b456e8f622229413b136042a777445a12d115633cd49d6df83c30b64d721a0ad4d3c71bb468edc759c15799896e96fd9f2
languageName: node
linkType: hard
@@ -5733,25 +5771,12 @@ __metadata:
languageName: node
linkType: hard
"react-dropzone@npm:^14.2.3":
version: 14.2.3
resolution: "react-dropzone@npm:14.2.3"
dependencies:
attr-accept: "npm:^2.2.2"
file-selector: "npm:^0.6.0"
prop-types: "npm:^15.8.1"
peerDependencies:
react: ">= 16.8 || 18.0.0"
checksum: 10c0/6433517c53309aca1bb4f4a535aeee297345ca1e11b123676f46c7682ffab34a3428cbda106448fc92b5c9a5e0fa5d225bc188adebcd4d302366bf6b1f9c3fc1
languageName: node
linkType: hard
"react-icons@npm:^5.2.1":
version: 5.2.1
resolution: "react-icons@npm:5.2.1"
"react-icons@npm:^5.3.0":
version: 5.3.0
resolution: "react-icons@npm:5.3.0"
peerDependencies:
react: "*"
checksum: 10c0/9d52b975afaf27dab07dcaefd50497ba43cc57076fc26ccac5142965e01c7fd0c503a62ea31c3bb710e0b2959a4620c2fed12c3c86960ad8ceb63de7f0085f3a
checksum: 10c0/a53af0de558f0e2bacfbafc973aa8ca1e6a429006a2f83d70becad5be431726a691e096336c95949bb0d967587b145264c5046d2bc1518969dbae731855d0712
languageName: node
linkType: hard
@@ -6657,9 +6682,9 @@ __metadata:
languageName: node
linkType: hard
"terser@npm:^5.31.5":
version: 5.31.5
resolution: "terser@npm:5.31.5"
"terser@npm:^5.31.6":
version: 5.31.6
resolution: "terser@npm:5.31.6"
dependencies:
"@jridgewell/source-map": "npm:^0.3.3"
acorn: "npm:^8.8.2"
@@ -6667,7 +6692,7 @@ __metadata:
source-map-support: "npm:~0.5.20"
bin:
terser: bin/terser
checksum: 10c0/6e7c66c1f4062ee098bff3dc3c396819ebf5f1740f0615be9de39b675a78c732d199f4dcfdcd15bd65f354e37c45bb944360f532a36fe7f7d22f800ca53c2d02
checksum: 10c0/b17d02b65a52a5041430572b3c514475820f5e7590fa93773c0f5b4be601ccf3f6d745bf5a79f3ee58187cf85edf61c24ddf4345783839fccb44c9c8fa9b427e
languageName: node
linkType: hard
@@ -6763,7 +6788,7 @@ __metadata:
languageName: node
linkType: hard
"tslib@npm:^2.1.0, tslib@npm:^2.4.0":
"tslib@npm:^2.1.0":
version: 2.6.3
resolution: "tslib@npm:2.6.3"
checksum: 10c0/2598aef53d9dbe711af75522464b2104724d6467b26a60f2bdac8297d2b5f1f6b86a71f61717384aa8fd897240467aaa7bcc36a0700a0faf751293d1331db39a
@@ -6806,17 +6831,17 @@ __metadata:
languageName: node
linkType: hard
"typescript-eslint@npm:8.0.1":
version: 8.0.1
resolution: "typescript-eslint@npm:8.0.1"
"typescript-eslint@npm:8.1.0":
version: 8.1.0
resolution: "typescript-eslint@npm:8.1.0"
dependencies:
"@typescript-eslint/eslint-plugin": "npm:8.0.1"
"@typescript-eslint/parser": "npm:8.0.1"
"@typescript-eslint/utils": "npm:8.0.1"
"@typescript-eslint/eslint-plugin": "npm:8.1.0"
"@typescript-eslint/parser": "npm:8.1.0"
"@typescript-eslint/utils": "npm:8.1.0"
peerDependenciesMeta:
typescript:
optional: true
checksum: 10c0/dc9df2dd82863b98720b7555c1fa6c2724055a252ce5940655187667253b717be8697bb798742f23701ee6efcd743d5556f00ab9a3af24a0e735df1e8b24e24a
checksum: 10c0/9b5769b95aeca54ae9fa15cd2f0e5656747f643a7be220513555de143ff19d70c5945eb82259a3fb29ab4d37f4d158f7f088e7b2cf98e2e8253a7429ac19d072
languageName: node
linkType: hard
@@ -6857,6 +6882,13 @@ __metadata:
languageName: node
linkType: hard
"undici-types@npm:~6.18.2":
version: 6.18.2
resolution: "undici-types@npm:6.18.2"
checksum: 10c0/dea28163891a5af7624c120107dc07a74c369ee94c6dd1d0de29af061ee129fac4846f97130589f4436b85f6102c73d30328ca908be02626dd8ab9fec5642aba
languageName: node
linkType: hard
"unique-filename@npm:^3.0.0":
version: 3.0.0
resolution: "unique-filename@npm:3.0.0"