From 68d81b97b4b91c6225b19080ee9ea48ba281a8fc Mon Sep 17 00:00:00 2001 From: ajnart Date: Sat, 23 Jul 2022 22:22:55 +0200 Subject: [PATCH] :arrow_down: Downgrade NextJS and React Middleware didn't work in v12.2.3. Hopefully the password protection will work again now. --- next.config.js | 3 + package.json | 16 +- src/components/AppShelf/AppShelf.tsx | 6 +- src/components/AppShelf/AppShelfItem.tsx | 2 +- src/components/Settings/ModuleEnabler.tsx | 2 +- src/components/layout/Header.tsx | 4 +- src/components/layout/Widgets.tsx | 6 +- .../modules/system/SystemModule.tsx | 59 ---- src/components/modules/system/index.ts | 1 - src/middleware.ts | 15 -- .../modules.tsx => modules/ModuleTypes.d.ts} | 0 .../modules/calendar/CalendarModule.tsx | 8 +- .../modules/calendar/index.ts | 0 .../modules/calendar/mediaExample.ts | 0 .../modules/common/MediaDisplay.tsx | 4 +- src/{components => }/modules/common/index.ts | 0 .../modules/dashdot/DashdotModule.tsx | 6 +- src/{components => }/modules/dashdot/index.ts | 0 .../modules/date/DateModule.tsx | 6 +- src/{components => }/modules/date/index.ts | 0 .../modules/docker/ContainerActionBar.tsx | 4 +- .../modules/docker/ContainerState.tsx | 0 .../modules/docker/DockerModule.tsx | 4 +- .../modules/docker/DockerTable.tsx | 0 src/{components => }/modules/docker/index.ts | 0 .../modules/downloads/DownloadsModule.tsx | 10 +- .../downloads/TotalDownloadsModule.tsx | 10 +- .../modules/downloads/index.ts | 0 src/{components => }/modules/index.ts | 0 .../modules/moduleWrapper.tsx | 4 +- .../modules/ping/PingModule.tsx | 4 +- src/{components => }/modules/ping/index.ts | 0 src/{components => }/modules/readme.md | 0 .../modules/search/SearchModule.tsx | 4 +- src/{components => }/modules/search/index.ts | 0 .../modules/weather/WeatherInterface.ts | 0 .../modules/weather/WeatherModule.tsx | 4 +- src/{components => }/modules/weather/index.ts | 0 src/pages/_middleware.ts | 16 ++ src/pages/api/docker/container/[id].tsx | 4 +- src/pages/api/modules/systeminfo.ts | 30 --- src/pages/login.tsx | 12 +- src/tools/types.ts | 2 +- yarn.lock | 254 ++++++++---------- 44 files changed, 191 insertions(+), 309 deletions(-) delete mode 100644 src/components/modules/system/SystemModule.tsx delete mode 100644 src/components/modules/system/index.ts delete mode 100644 src/middleware.ts rename src/{components/modules/modules.tsx => modules/ModuleTypes.d.ts} (100%) rename src/{components => }/modules/calendar/CalendarModule.tsx (97%) rename src/{components => }/modules/calendar/index.ts (100%) rename src/{components => }/modules/calendar/mediaExample.ts (100%) rename src/{components => }/modules/common/MediaDisplay.tsx (98%) rename src/{components => }/modules/common/index.ts (100%) rename src/{components => }/modules/dashdot/DashdotModule.tsx (97%) rename src/{components => }/modules/dashdot/index.ts (100%) rename src/{components => }/modules/date/DateModule.tsx (87%) rename src/{components => }/modules/date/index.ts (100%) rename src/{components => }/modules/docker/ContainerActionBar.tsx (96%) rename src/{components => }/modules/docker/ContainerState.tsx (100%) rename src/{components => }/modules/docker/DockerModule.tsx (96%) rename src/{components => }/modules/docker/DockerTable.tsx (100%) rename src/{components => }/modules/docker/index.ts (100%) rename src/{components => }/modules/downloads/DownloadsModule.tsx (95%) rename src/{components => }/modules/downloads/TotalDownloadsModule.tsx (95%) rename src/{components => }/modules/downloads/index.ts (100%) rename src/{components => }/modules/index.ts (100%) rename src/{components => }/modules/moduleWrapper.tsx (98%) rename src/{components => }/modules/ping/PingModule.tsx (96%) rename src/{components => }/modules/ping/index.ts (100%) rename src/{components => }/modules/readme.md (100%) rename src/{components => }/modules/search/SearchModule.tsx (97%) rename src/{components => }/modules/search/index.ts (100%) rename src/{components => }/modules/weather/WeatherInterface.ts (100%) rename src/{components => }/modules/weather/WeatherModule.tsx (98%) rename src/{components => }/modules/weather/index.ts (100%) create mode 100644 src/pages/_middleware.ts delete mode 100644 src/pages/api/modules/systeminfo.ts diff --git a/next.config.js b/next.config.js index 7344769da..59a7bd7a8 100644 --- a/next.config.js +++ b/next.config.js @@ -6,5 +6,8 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({ module.exports = withBundleAnalyzer({ reactStrictMode: false, + experimental: { + outputStandalone: true, + }, output: 'standalone', }); diff --git a/package.json b/package.json index f4d54ca2b..fdd982af7 100644 --- a/package.json +++ b/package.json @@ -40,26 +40,26 @@ "@mantine/prism": "^4.2.12", "@nivo/core": "^0.79.0", "@nivo/line": "^0.79.1", - "@tabler/icons": "^1.76.0", + "@tabler/icons": "^1.78.0", "axios": "^0.27.2", "cookies-next": "^2.1.1", "dayjs": "^1.11.4", "dockerode": "^3.3.2", "framer-motion": "^6.5.1", "js-file-download": "^0.4.12", - "next": "12.2.0", + "next": "12.1.6", "prism-react-renderer": "^1.3.5", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "^17.0.1", + "react-dom": "^17.0.1", "systeminformation": "^5.12.1", "uuid": "^8.3.2" }, "devDependencies": { - "@next/bundle-analyzer": "12.2.0", - "@next/eslint-plugin-next": "12.2.0", + "@next/bundle-analyzer": "^12.1.4", + "@next/eslint-plugin-next": "^12.1.4", "@types/dockerode": "^3.3.9", - "@types/node": "^18.0.6", - "@types/react": "^18.0.15", + "@types/node": "17.0.1", + "@types/react": "17.0.1", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^5.30.7", "@typescript-eslint/parser": "^5.30.7", diff --git a/src/components/AppShelf/AppShelf.tsx b/src/components/AppShelf/AppShelf.tsx index a47346830..2d461663f 100644 --- a/src/components/AppShelf/AppShelf.tsx +++ b/src/components/AppShelf/AppShelf.tsx @@ -14,9 +14,9 @@ import { useLocalStorage } from '@mantine/hooks'; import { useConfig } from '../../tools/state'; import { SortableAppShelfItem, AppShelfItem } from './AppShelfItem'; -import { ModuleMenu, ModuleWrapper } from '../modules/moduleWrapper'; -import { DownloadsModule } from '../modules'; -import DownloadComponent from '../modules/downloads/DownloadsModule'; +import { ModuleMenu, ModuleWrapper } from '../../modules/moduleWrapper'; +import { DownloadsModule } from '../../modules'; +import DownloadComponent from '../../modules/downloads/DownloadsModule'; const useStyles = createStyles((theme, _params) => ({ item: { diff --git a/src/components/AppShelf/AppShelfItem.tsx b/src/components/AppShelf/AppShelfItem.tsx index 109b873c2..e611166c3 100644 --- a/src/components/AppShelf/AppShelfItem.tsx +++ b/src/components/AppShelf/AppShelfItem.tsx @@ -13,7 +13,7 @@ import { useState } from 'react'; import { useSortable } from '@dnd-kit/sortable'; import { CSS } from '@dnd-kit/utilities'; import { serviceItem } from '../../tools/types'; -import PingComponent from '../modules/ping/PingModule'; +import PingComponent from '../../modules/ping/PingModule'; import AppShelfMenu from './AppShelfMenu'; import { useConfig } from '../../tools/state'; diff --git a/src/components/Settings/ModuleEnabler.tsx b/src/components/Settings/ModuleEnabler.tsx index ab07327b3..4e11e6065 100644 --- a/src/components/Settings/ModuleEnabler.tsx +++ b/src/components/Settings/ModuleEnabler.tsx @@ -1,5 +1,5 @@ import { Checkbox, Group, SimpleGrid, Title } from '@mantine/core'; -import * as Modules from '../modules'; +import * as Modules from '../../modules'; import { useConfig } from '../../tools/state'; export default function ModuleEnabler(props: any) { diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 9c78905b9..be3120a8d 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -2,8 +2,8 @@ import { Box, createStyles, Group, Header as Head } from '@mantine/core'; import { useBooleanToggle } from '@mantine/hooks'; import { AddItemShelfButton } from '../AppShelf/AddAppShelfItem'; -import DockerMenuButton from '../modules/docker/DockerModule'; -import SearchBar from '../modules/search/SearchModule'; +import DockerMenuButton from '../../modules/docker/DockerModule'; +import SearchBar from '../../modules/search/SearchModule'; import { SettingsMenuButton } from '../Settings/SettingsMenu'; import { Logo } from './Logo'; diff --git a/src/components/layout/Widgets.tsx b/src/components/layout/Widgets.tsx index 713a27c51..37223fac7 100644 --- a/src/components/layout/Widgets.tsx +++ b/src/components/layout/Widgets.tsx @@ -1,7 +1,7 @@ import { Group } from '@mantine/core'; -import { CalendarModule, DateModule, TotalDownloadsModule, WeatherModule } from '../modules'; -import { DashdotModule } from '../modules/dashdot'; -import { ModuleWrapper } from '../modules/moduleWrapper'; +import { CalendarModule, DateModule, TotalDownloadsModule, WeatherModule } from '../../modules'; +import { DashdotModule } from '../../modules/dashdot'; +import { ModuleWrapper } from '../../modules/moduleWrapper'; export default function Widgets(props: any) { return ( diff --git a/src/components/modules/system/SystemModule.tsx b/src/components/modules/system/SystemModule.tsx deleted file mode 100644 index 8201f36cc..000000000 --- a/src/components/modules/system/SystemModule.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { Center, Group, RingProgress, Title, useMantineTheme } from '@mantine/core'; -import { IconCpu } from '@tabler/icons'; -import { useEffect, useState } from 'react'; -import axios from 'axios'; -import si from 'systeminformation'; -import { useListState } from '@mantine/hooks'; -import { IModule } from '../modules'; -import { useSetSafeInterval } from '../../../tools/hooks/useSetSafeInterval'; - -export const SystemModule: IModule = { - title: 'System info', - description: 'Show the current CPU usage and memory usage', - icon: IconCpu, - component: SystemInfo, -}; - -interface ApiResponse { - cpu: si.Systeminformation.CpuData; - os: si.Systeminformation.OsData; - memory: si.Systeminformation.MemData; - load: si.Systeminformation.CurrentLoadData; -} - -export default function SystemInfo(args: any) { - const [data, setData] = useState(); - const setSafeInterval = useSetSafeInterval(); - // Refresh data every second - useEffect(() => { - setSafeInterval(() => { - axios.get('/api/modules/systeminfo').then((res) => setData(res.data)); - }, 1000); - }, []); - - // Update data every time data changes - const [cpuLoadHistory, cpuLoadHistoryHandlers] = - useListState([]); - - // useEffect(() => { - - // }, [data]); - - const theme = useMantineTheme(); - const currentLoad = data?.load?.currentLoad ?? 0; - - return ( -
- - Current CPU load - {`${currentLoad.toFixed(2)}%`}
} - thickness={15} - roundCaps - sections={[{ value: currentLoad ?? 0, color: 'cyan' }]} - /> - - - ); -} diff --git a/src/components/modules/system/index.ts b/src/components/modules/system/index.ts deleted file mode 100644 index 75d1a257e..000000000 --- a/src/components/modules/system/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { SystemModule } from './SystemModule'; diff --git a/src/middleware.ts b/src/middleware.ts deleted file mode 100644 index 7772a79c8..000000000 --- a/src/middleware.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NextResponse } from 'next/server'; -import type { NextRequest } from 'next/server'; - -// eslint-disable-next-line consistent-return -export function middleware(request: NextRequest) { - // const cookie = request.cookies.get('password'); - // const isPasswordCorrect = cookie === process.env.PASSWORD; - // if ( - // !isPasswordCorrect && - // request.nextUrl.pathname !== '/login' && - // request.nextUrl.pathname !== '/api/configs/trylogin' - // ) { - // return NextResponse.redirect('/login'); - // } -} diff --git a/src/components/modules/modules.tsx b/src/modules/ModuleTypes.d.ts similarity index 100% rename from src/components/modules/modules.tsx rename to src/modules/ModuleTypes.d.ts diff --git a/src/components/modules/calendar/CalendarModule.tsx b/src/modules/calendar/CalendarModule.tsx similarity index 97% rename from src/components/modules/calendar/CalendarModule.tsx rename to src/modules/calendar/CalendarModule.tsx index f90784142..3f7586562 100644 --- a/src/components/modules/calendar/CalendarModule.tsx +++ b/src/modules/calendar/CalendarModule.tsx @@ -12,16 +12,16 @@ import React, { useEffect, useState } from 'react'; import { Calendar } from '@mantine/dates'; import { IconCalendar as CalendarIcon } from '@tabler/icons'; import axios from 'axios'; -import { useConfig } from '../../../tools/state'; -import { IModule } from '../modules'; +import { useConfig } from '../../tools/state'; +import { IModule } from '../ModuleTypes'; import { SonarrMediaDisplay, RadarrMediaDisplay, LidarrMediaDisplay, ReadarrMediaDisplay, } from '../common'; -import { serviceItem } from '../../../tools/types'; -import { useColorTheme } from '../../../tools/color'; +import { serviceItem } from '../../tools/types'; +import { useColorTheme } from '../../tools/color'; export const CalendarModule: IModule = { title: 'Calendar', diff --git a/src/components/modules/calendar/index.ts b/src/modules/calendar/index.ts similarity index 100% rename from src/components/modules/calendar/index.ts rename to src/modules/calendar/index.ts diff --git a/src/components/modules/calendar/mediaExample.ts b/src/modules/calendar/mediaExample.ts similarity index 100% rename from src/components/modules/calendar/mediaExample.ts rename to src/modules/calendar/mediaExample.ts diff --git a/src/components/modules/common/MediaDisplay.tsx b/src/modules/common/MediaDisplay.tsx similarity index 98% rename from src/components/modules/common/MediaDisplay.tsx rename to src/modules/common/MediaDisplay.tsx index 74373a6cc..0ec7b4320 100644 --- a/src/components/modules/common/MediaDisplay.tsx +++ b/src/modules/common/MediaDisplay.tsx @@ -11,8 +11,8 @@ import { } from '@mantine/core'; import { useMediaQuery } from '@mantine/hooks'; import { IconLink as Link } from '@tabler/icons'; -import { useConfig } from '../../../tools/state'; -import { serviceItem } from '../../../tools/types'; +import { useConfig } from '../../tools/state'; +import { serviceItem } from '../../tools/types'; export interface IMedia { overview: string; diff --git a/src/components/modules/common/index.ts b/src/modules/common/index.ts similarity index 100% rename from src/components/modules/common/index.ts rename to src/modules/common/index.ts diff --git a/src/components/modules/dashdot/DashdotModule.tsx b/src/modules/dashdot/DashdotModule.tsx similarity index 97% rename from src/components/modules/dashdot/DashdotModule.tsx rename to src/modules/dashdot/DashdotModule.tsx index 8afb5ec62..35bc005d4 100644 --- a/src/components/modules/dashdot/DashdotModule.tsx +++ b/src/modules/dashdot/DashdotModule.tsx @@ -2,9 +2,9 @@ import { createStyles, useMantineColorScheme, useMantineTheme } from '@mantine/c import { IconCalendar as CalendarIcon } from '@tabler/icons'; import axios from 'axios'; import { useEffect, useState } from 'react'; -import { useConfig } from '../../../tools/state'; -import { serviceItem } from '../../../tools/types'; -import { IModule } from '../modules'; +import { useConfig } from '../../tools/state'; +import { serviceItem } from '../../tools/types'; +import { IModule } from '../ModuleTypes'; const asModule = (t: T) => t; export const DashdotModule = asModule({ diff --git a/src/components/modules/dashdot/index.ts b/src/modules/dashdot/index.ts similarity index 100% rename from src/components/modules/dashdot/index.ts rename to src/modules/dashdot/index.ts diff --git a/src/components/modules/date/DateModule.tsx b/src/modules/date/DateModule.tsx similarity index 87% rename from src/components/modules/date/DateModule.tsx rename to src/modules/date/DateModule.tsx index 3e212af83..54651b19e 100644 --- a/src/components/modules/date/DateModule.tsx +++ b/src/modules/date/DateModule.tsx @@ -2,9 +2,9 @@ import { Group, Text, Title } from '@mantine/core'; import dayjs from 'dayjs'; import { useEffect, useState } from 'react'; import { IconClock as Clock } from '@tabler/icons'; -import { useConfig } from '../../../tools/state'; -import { IModule } from '../modules'; -import { useSetSafeInterval } from '../../../tools/hooks/useSetSafeInterval'; +import { useConfig } from '../../tools/state'; +import { IModule } from '../ModuleTypes'; +import { useSetSafeInterval } from '../../tools/hooks/useSetSafeInterval'; export const DateModule: IModule = { title: 'Date', diff --git a/src/components/modules/date/index.ts b/src/modules/date/index.ts similarity index 100% rename from src/components/modules/date/index.ts rename to src/modules/date/index.ts diff --git a/src/components/modules/docker/ContainerActionBar.tsx b/src/modules/docker/ContainerActionBar.tsx similarity index 96% rename from src/components/modules/docker/ContainerActionBar.tsx rename to src/modules/docker/ContainerActionBar.tsx index 39461472d..a88d970e6 100644 --- a/src/components/modules/docker/ContainerActionBar.tsx +++ b/src/modules/docker/ContainerActionBar.tsx @@ -12,8 +12,8 @@ import { } from '@tabler/icons'; import axios from 'axios'; import Dockerode from 'dockerode'; -import { tryMatchService } from '../../../tools/addToHomarr'; -import { AddAppShelfItemForm } from '../../AppShelf/AddAppShelfItem'; +import { tryMatchService } from '../../tools/addToHomarr'; +import { AddAppShelfItemForm } from '../../components/AppShelf/AddAppShelfItem'; function sendDockerCommand( action: string, diff --git a/src/components/modules/docker/ContainerState.tsx b/src/modules/docker/ContainerState.tsx similarity index 100% rename from src/components/modules/docker/ContainerState.tsx rename to src/modules/docker/ContainerState.tsx diff --git a/src/components/modules/docker/DockerModule.tsx b/src/modules/docker/DockerModule.tsx similarity index 96% rename from src/components/modules/docker/DockerModule.tsx rename to src/modules/docker/DockerModule.tsx index de9bc76f7..617af61fd 100644 --- a/src/components/modules/docker/DockerModule.tsx +++ b/src/modules/docker/DockerModule.tsx @@ -6,8 +6,8 @@ import { IconBrandDocker, IconX } from '@tabler/icons'; import { showNotification } from '@mantine/notifications'; import ContainerActionBar from './ContainerActionBar'; import DockerTable from './DockerTable'; -import { useConfig } from '../../../tools/state'; -import { IModule } from '../modules'; +import { useConfig } from '../../tools/state'; +import { IModule } from '../ModuleTypes'; export const DockerModule: IModule = { title: 'Docker', diff --git a/src/components/modules/docker/DockerTable.tsx b/src/modules/docker/DockerTable.tsx similarity index 100% rename from src/components/modules/docker/DockerTable.tsx rename to src/modules/docker/DockerTable.tsx diff --git a/src/components/modules/docker/index.ts b/src/modules/docker/index.ts similarity index 100% rename from src/components/modules/docker/index.ts rename to src/modules/docker/index.ts diff --git a/src/components/modules/downloads/DownloadsModule.tsx b/src/modules/downloads/DownloadsModule.tsx similarity index 95% rename from src/components/modules/downloads/DownloadsModule.tsx rename to src/modules/downloads/DownloadsModule.tsx index 83137dd00..dbb5b6473 100644 --- a/src/components/modules/downloads/DownloadsModule.tsx +++ b/src/modules/downloads/DownloadsModule.tsx @@ -16,11 +16,11 @@ import axios from 'axios'; import { NormalizedTorrent } from '@ctrl/shared-torrent'; import { useViewportSize } from '@mantine/hooks'; import { showNotification } from '@mantine/notifications'; -import { IModule } from '../modules'; -import { useConfig } from '../../../tools/state'; -import { AddItemShelfButton } from '../../AppShelf/AddAppShelfItem'; -import { useSetSafeInterval } from '../../../tools/hooks/useSetSafeInterval'; -import { humanFileSize } from '../../../tools/humanFileSize'; +import { IModule } from '../ModuleTypes'; +import { useConfig } from '../../tools/state'; +import { AddItemShelfButton } from '../../components/AppShelf/AddAppShelfItem'; +import { useSetSafeInterval } from '../../tools/hooks/useSetSafeInterval'; +import { humanFileSize } from '../../tools/humanFileSize'; export const DownloadsModule: IModule = { title: 'Torrent', diff --git a/src/components/modules/downloads/TotalDownloadsModule.tsx b/src/modules/downloads/TotalDownloadsModule.tsx similarity index 95% rename from src/components/modules/downloads/TotalDownloadsModule.tsx rename to src/modules/downloads/TotalDownloadsModule.tsx index ab25947dc..f6de8aebe 100644 --- a/src/components/modules/downloads/TotalDownloadsModule.tsx +++ b/src/modules/downloads/TotalDownloadsModule.tsx @@ -7,11 +7,11 @@ import { linearGradientDef } from '@nivo/core'; import { Datum, ResponsiveLine } from '@nivo/line'; import { useListState } from '@mantine/hooks'; import { showNotification } from '@mantine/notifications'; -import { AddItemShelfButton } from '../../AppShelf/AddAppShelfItem'; -import { useConfig } from '../../../tools/state'; -import { humanFileSize } from '../../../tools/humanFileSize'; -import { IModule } from '../modules'; -import { useSetSafeInterval } from '../../../tools/hooks/useSetSafeInterval'; +import { AddItemShelfButton } from '../../components/AppShelf/AddAppShelfItem'; +import { useConfig } from '../../tools/state'; +import { humanFileSize } from '../../tools/humanFileSize'; +import { IModule } from '../ModuleTypes'; +import { useSetSafeInterval } from '../../tools/hooks/useSetSafeInterval'; export const TotalDownloadsModule: IModule = { title: 'Download Speed', diff --git a/src/components/modules/downloads/index.ts b/src/modules/downloads/index.ts similarity index 100% rename from src/components/modules/downloads/index.ts rename to src/modules/downloads/index.ts diff --git a/src/components/modules/index.ts b/src/modules/index.ts similarity index 100% rename from src/components/modules/index.ts rename to src/modules/index.ts diff --git a/src/components/modules/moduleWrapper.tsx b/src/modules/moduleWrapper.tsx similarity index 98% rename from src/components/modules/moduleWrapper.tsx rename to src/modules/moduleWrapper.tsx index 6bbd69c86..cb92ded40 100644 --- a/src/components/modules/moduleWrapper.tsx +++ b/src/modules/moduleWrapper.tsx @@ -8,8 +8,8 @@ import { TextInput, useMantineColorScheme, } from '@mantine/core'; -import { useConfig } from '../../tools/state'; -import { IModule } from './modules'; +import { useConfig } from '../tools/state'; +import { IModule } from './ModuleTypes'; function getItems(module: IModule) { const { config, setConfig } = useConfig(); diff --git a/src/components/modules/ping/PingModule.tsx b/src/modules/ping/PingModule.tsx similarity index 96% rename from src/components/modules/ping/PingModule.tsx rename to src/modules/ping/PingModule.tsx index b0c333bfa..cea074dd7 100644 --- a/src/components/modules/ping/PingModule.tsx +++ b/src/modules/ping/PingModule.tsx @@ -3,8 +3,8 @@ import axios, { AxiosResponse } from 'axios'; import { motion } from 'framer-motion'; import { useEffect, useState } from 'react'; import { IconPlug as Plug } from '@tabler/icons'; -import { useConfig } from '../../../tools/state'; -import { IModule } from '../modules'; +import { useConfig } from '../../tools/state'; +import { IModule } from '../ModuleTypes'; export const PingModule: IModule = { title: 'Ping Services', diff --git a/src/components/modules/ping/index.ts b/src/modules/ping/index.ts similarity index 100% rename from src/components/modules/ping/index.ts rename to src/modules/ping/index.ts diff --git a/src/components/modules/readme.md b/src/modules/readme.md similarity index 100% rename from src/components/modules/readme.md rename to src/modules/readme.md diff --git a/src/components/modules/search/SearchModule.tsx b/src/modules/search/SearchModule.tsx similarity index 97% rename from src/components/modules/search/SearchModule.tsx rename to src/modules/search/SearchModule.tsx index 75a206097..c2c180ce2 100644 --- a/src/components/modules/search/SearchModule.tsx +++ b/src/modules/search/SearchModule.tsx @@ -7,8 +7,8 @@ import { IconDownload as Download, } from '@tabler/icons'; import axios from 'axios'; -import { useConfig } from '../../../tools/state'; -import { IModule } from '../modules'; +import { useConfig } from '../../tools/state'; +import { IModule } from '../ModuleTypes'; const useStyles = createStyles((theme) => ({ hide: { diff --git a/src/components/modules/search/index.ts b/src/modules/search/index.ts similarity index 100% rename from src/components/modules/search/index.ts rename to src/modules/search/index.ts diff --git a/src/components/modules/weather/WeatherInterface.ts b/src/modules/weather/WeatherInterface.ts similarity index 100% rename from src/components/modules/weather/WeatherInterface.ts rename to src/modules/weather/WeatherInterface.ts diff --git a/src/components/modules/weather/WeatherModule.tsx b/src/modules/weather/WeatherModule.tsx similarity index 98% rename from src/components/modules/weather/WeatherModule.tsx rename to src/modules/weather/WeatherModule.tsx index 913ae9f8a..eb0cbdb94 100644 --- a/src/components/modules/weather/WeatherModule.tsx +++ b/src/modules/weather/WeatherModule.tsx @@ -13,8 +13,8 @@ import { IconSnowflake as Snowflake, IconSun as Sun, } from '@tabler/icons'; -import { useConfig } from '../../../tools/state'; -import { IModule } from '../modules'; +import { useConfig } from '../../tools/state'; +import { IModule } from '../ModuleTypes'; import { WeatherResponse } from './WeatherInterface'; export const WeatherModule: IModule = { diff --git a/src/components/modules/weather/index.ts b/src/modules/weather/index.ts similarity index 100% rename from src/components/modules/weather/index.ts rename to src/modules/weather/index.ts diff --git a/src/pages/_middleware.ts b/src/pages/_middleware.ts new file mode 100644 index 000000000..5b01cbe38 --- /dev/null +++ b/src/pages/_middleware.ts @@ -0,0 +1,16 @@ +import { NextFetchEvent, NextRequest, NextResponse } from 'next/server'; + +// eslint-disable-next-line consistent-return +export function middleware(req: NextRequest, ev: NextFetchEvent) { + const isCorrectPassword = req.cookies.password === process.env.PASSWORD; + const url = req.nextUrl.clone(); + if ( + !isCorrectPassword && + url.pathname !== '/login' && + process.env.PASSWORD && + url.pathname !== '/api/configs/tryPassword' + ) { + url.pathname = '/login'; + return NextResponse.rewrite(url); + } +} diff --git a/src/pages/api/docker/container/[id].tsx b/src/pages/api/docker/container/[id].tsx index affa8868b..c5fdd4d16 100644 --- a/src/pages/api/docker/container/[id].tsx +++ b/src/pages/api/docker/container/[id].tsx @@ -42,9 +42,7 @@ async function Get(req: NextApiRequest, res: NextApiResponse) { message: `Container ${id} ${action}ed`, }); } catch (err) { - return res.status(500).json( - err, - ); + return res.status(500).json(err); } } diff --git a/src/pages/api/modules/systeminfo.ts b/src/pages/api/modules/systeminfo.ts deleted file mode 100644 index 2e4537e32..000000000 --- a/src/pages/api/modules/systeminfo.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NextApiRequest, NextApiResponse } from 'next'; -import si from 'systeminformation'; - -async function Get(req: NextApiRequest, res: NextApiResponse) { - const [osInfo, cpuInfo, memInfo, cpuLoad] = await Promise.all([ - si.osInfo(), - si.cpu(), - si.mem(), - si.currentLoad(), - ]); - - const sysinfo = { - cpu: cpuInfo, - os: osInfo, - mem: memInfo, - load: cpuLoad, - }; - res.status(200).json(sysinfo); -} - -export default async (req: NextApiRequest, res: NextApiResponse) => { - // Filter out if the reuqest is a POST or a GET - if (req.method === 'GET') { - return Get(req, res); - } - return res.status(405).json({ - statusCode: 405, - message: 'Method not allowed', - }); -}; diff --git a/src/pages/login.tsx b/src/pages/login.tsx index 7a845a769..04bb33c6c 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -5,10 +5,11 @@ import { useForm } from '@mantine/hooks'; import { showNotification, updateNotification } from '@mantine/notifications'; import axios from 'axios'; import { IconCheck, IconX } from '@tabler/icons'; -import { Logo } from '../components/layout/Logo'; +import { useRouter } from 'next/router'; // TODO: Add links to the wiki articles about the login process. export default function AuthenticationTitle() { + const router = useRouter(); const form = useForm({ initialValues: { password: '', @@ -33,7 +34,6 @@ export default function AuthenticationTitle() { > Welcome back! - @@ -72,16 +72,14 @@ export default function AuthenticationTitle() { .then((res) => { setTimeout(() => { if (res.data.success === true) { + router.push('/'); updateNotification({ id: 'load-data', color: 'teal', - title: 'Password correct', + title: 'Password correct, redirecting you...', message: undefined, icon: , - autoClose: 300, - onClose: () => { - window.location.reload(); - }, + autoClose: 1000, }); } if (res.data.success === false) { diff --git a/src/tools/types.ts b/src/tools/types.ts index b0592492a..663263c6e 100644 --- a/src/tools/types.ts +++ b/src/tools/types.ts @@ -1,5 +1,5 @@ import { MantineTheme } from '@mantine/core'; -import { OptionValues } from '../components/modules/modules'; +import { OptionValues } from '../modules/ModuleTypes'; export interface Settings { searchUrl: string; diff --git a/yarn.lock b/yarn.lock index ad7748efa..4e9549474 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1244,118 +1244,111 @@ __metadata: languageName: node linkType: hard -"@next/bundle-analyzer@npm:12.2.0": - version: 12.2.0 - resolution: "@next/bundle-analyzer@npm:12.2.0" +"@next/bundle-analyzer@npm:^12.1.4": + version: 12.2.3 + resolution: "@next/bundle-analyzer@npm:12.2.3" dependencies: webpack-bundle-analyzer: 4.3.0 - checksum: e08770ed2f7bfa4fb38c29d58d1e3ad198fa7e9a8c061ea5e15950dd10576bed0b5b8c19266e18503af1d211a0d8d450b5fed4926f6863135b38e585d6fd1980 + checksum: 86745354ac90ac72d203d0d1051114f90cc7de7b2e64ea1f7129621fd1d9fde36fe00901747b4c56708777023b08b936ded1aaafaf40f1709c3ad3a8c04f1f07 languageName: node linkType: hard -"@next/env@npm:12.2.0": - version: 12.2.0 - resolution: "@next/env@npm:12.2.0" - checksum: 5fb317bdb5eb2d5df12ff55e335368792dba21874c5ece3cabf8cd312cec911a1d54ecf368e69dc08640b0244669b8a98c86cd035c7874b17640602e67c1b9d9 +"@next/env@npm:12.1.6": + version: 12.1.6 + resolution: "@next/env@npm:12.1.6" + checksum: e6a4f189f0d653d13dc7ad510f6c9d2cf690bfd9e07c554bd501b840f8dabc3da5adcab874b0bc01aab86c3647cff4fb84692e3c3b28125af26f0b05cd4c7fcf languageName: node linkType: hard -"@next/eslint-plugin-next@npm:12.2.0": - version: 12.2.0 - resolution: "@next/eslint-plugin-next@npm:12.2.0" +"@next/eslint-plugin-next@npm:^12.1.4": + version: 12.2.3 + resolution: "@next/eslint-plugin-next@npm:12.2.3" dependencies: glob: 7.1.7 - checksum: 2e33b9af79af680fd873d74e91bed397930a91802c1d7a293db757227ebc431d3d856de69477dc178dec8b531635ea69d79b188293024f1371afe6c348dbe647 + checksum: aba5344c477b1a3d361159bbb46812a470f23d7e2ab3d7892ab372c3caad33e6e9c3c7abce45597571a52680eefc1ef451aecac67f469f2062ed78f37b80a3e8 languageName: node linkType: hard -"@next/swc-android-arm-eabi@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-android-arm-eabi@npm:12.2.0" +"@next/swc-android-arm-eabi@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-android-arm-eabi@npm:12.1.6" conditions: os=android & cpu=arm languageName: node linkType: hard -"@next/swc-android-arm64@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-android-arm64@npm:12.2.0" +"@next/swc-android-arm64@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-android-arm64@npm:12.1.6" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-darwin-arm64@npm:12.2.0" +"@next/swc-darwin-arm64@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-darwin-arm64@npm:12.1.6" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-darwin-x64@npm:12.2.0" +"@next/swc-darwin-x64@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-darwin-x64@npm:12.1.6" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-freebsd-x64@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-freebsd-x64@npm:12.2.0" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@next/swc-linux-arm-gnueabihf@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-linux-arm-gnueabihf@npm:12.2.0" +"@next/swc-linux-arm-gnueabihf@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-linux-arm-gnueabihf@npm:12.1.6" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-linux-arm64-gnu@npm:12.2.0" +"@next/swc-linux-arm64-gnu@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-linux-arm64-gnu@npm:12.1.6" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-linux-arm64-musl@npm:12.2.0" +"@next/swc-linux-arm64-musl@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-linux-arm64-musl@npm:12.1.6" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-linux-x64-gnu@npm:12.2.0" +"@next/swc-linux-x64-gnu@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-linux-x64-gnu@npm:12.1.6" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-linux-x64-musl@npm:12.2.0" +"@next/swc-linux-x64-musl@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-linux-x64-musl@npm:12.1.6" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-win32-arm64-msvc@npm:12.2.0" +"@next/swc-win32-arm64-msvc@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-win32-arm64-msvc@npm:12.1.6" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-win32-ia32-msvc@npm:12.2.0" +"@next/swc-win32-ia32-msvc@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-win32-ia32-msvc@npm:12.1.6" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:12.2.0": - version: 12.2.0 - resolution: "@next/swc-win32-x64-msvc@npm:12.2.0" +"@next/swc-win32-x64-msvc@npm:12.1.6": + version: 12.1.6 + resolution: "@next/swc-win32-x64-msvc@npm:12.1.6" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1796,15 +1789,6 @@ __metadata: languageName: node linkType: hard -"@swc/helpers@npm:0.4.2": - version: 0.4.2 - resolution: "@swc/helpers@npm:0.4.2" - dependencies: - tslib: ^2.4.0 - checksum: 0b8c86ad03b17b8fe57dc4498e25dc294ea6bc42558a6b92d8fcd789351dac80199409bef38a2e3ac06aae0fedddfc0ab9c34409acbf74e55d1bbbd74f68b6b7 - languageName: node - linkType: hard - "@szmarczak/http-timer@npm:^5.0.1": version: 5.0.1 resolution: "@szmarczak/http-timer@npm:5.0.1" @@ -1814,9 +1798,9 @@ __metadata: languageName: node linkType: hard -"@tabler/icons@npm:^1.76.0": - version: 1.77.0 - resolution: "@tabler/icons@npm:1.77.0" +"@tabler/icons@npm:^1.78.0": + version: 1.78.0 + resolution: "@tabler/icons@npm:1.78.0" peerDependencies: react: ^16.x || 17.x || 18.x react-dom: ^16.x || 17.x || 18.x @@ -1825,7 +1809,7 @@ __metadata: optional: true react-dom: optional: true - checksum: 8a7c1becec05a91db14848b9046ac5161fc5a9bc5cc96dd3bccdd35c814de664410c7ce0c8171d90db480dd6a1a5a75379762e53bce91a283980048e7ef609cd + checksum: f3789c4681fc7a3520585522afd8306d18ab3ec49077687b956c837f0d088b5c2a68c1bc90ff44f3369e9a5b3f4b4501f1a50133e8dff93e0947cdd53aceefea languageName: node linkType: hard @@ -1987,13 +1971,20 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^18.0.6": +"@types/node@npm:*": version: 18.0.6 resolution: "@types/node@npm:18.0.6" checksum: 780f8885a6b6eb12f4c0246617747fdc37a451931b3c01ce8148d356c0903b705dcb16cc6a914de63d48b0dc1b002c7a3dfae681f580e1761aa551d3cd996813 languageName: node linkType: hard +"@types/node@npm:17.0.1": + version: 17.0.1 + resolution: "@types/node@npm:17.0.1" + checksum: 16a5aa2778e1e49443d272f0da20af66c143337ddb14d9f36d5e7eb1e11ebbf195769d3d495ec5456ec94fe3d0e703c5df1ac279a05c7dc2a1220474467c1103 + languageName: node + linkType: hard + "@types/node@npm:^16.10.2": version: 16.11.45 resolution: "@types/node@npm:16.11.45" @@ -2015,14 +2006,13 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^18.0.15": - version: 18.0.15 - resolution: "@types/react@npm:18.0.15" +"@types/react@npm:17.0.1": + version: 17.0.1 + resolution: "@types/react@npm:17.0.1" dependencies: "@types/prop-types": "*" - "@types/scheduler": "*" csstype: ^3.0.2 - checksum: e22cc388d1c145aa184787e44dc28db4789976c704cd5db475c170bb76a560eb81def5f346cfe750949bb3d43ad88822b8cbb9f19b1286e3795892a8263e7715 + checksum: 592d7a33898550f2139e69c1bb21397ab6f351f406623397cd7f9a4aea20140c779dd23f2934789d40b0bd87995a86c766434ba07bdd1de9533045d0f3596b68 languageName: node linkType: hard @@ -2035,13 +2025,6 @@ __metadata: languageName: node linkType: hard -"@types/scheduler@npm:*": - version: 0.16.2 - resolution: "@types/scheduler@npm:0.16.2" - checksum: b6b4dcfeae6deba2e06a70941860fb1435730576d3689225a421280b7742318d1548b3d22c1f66ab68e414f346a9542f29240bc955b6332c5b11e561077583bc - languageName: node - linkType: hard - "@types/ssh2@npm:*": version: 1.11.5 resolution: "@types/ssh2@npm:1.11.5" @@ -2736,9 +2719,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001332, caniuse-lite@npm:^1.0.30001366": - version: 1.0.30001368 - resolution: "caniuse-lite@npm:1.0.30001368" - checksum: e2a763e7bca8f7a2494f752d0e1a5c0cd1c70ebd18df2eda2bdcf2f908901bbff14f78961ad1cada3eb7af32120ce95aa93f06c5a093d721e787816dc7f5bfaa + version: 1.0.30001369 + resolution: "caniuse-lite@npm:1.0.30001369" + checksum: f3f0eadc0685b399c0cad1116991d4c73d9fa10517ab72c3fb1c5e78fd5a019002f94a6d03b57a530009c69106400bdfa7dc0bddb01569428df67b9c5e411542 languageName: node linkType: hard @@ -3386,9 +3369,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.188": - version: 1.4.198 - resolution: "electron-to-chromium@npm:1.4.198" - checksum: 4ef3e595539779711cbc21fda244825ec344897a2d1e82451b1b8b6d24bc49caab58166aa8ea26fc5fa58f8ae35ffd44fd27c7f0aba65249aaad8e2f3267a7a1 + version: 1.4.199 + resolution: "electron-to-chromium@npm:1.4.199" + checksum: d029a04cd765400bfa245c17e4895e15fcab3fd5c4dff7bfe1ceae9316a06fb4695b7078a50cfd04e0ca77ae27897520e4a8a332c13f7c2fdb2ee4a4b4593199 languageName: node linkType: hard @@ -4494,14 +4477,14 @@ __metadata: "@mantine/next": ^4.2.12 "@mantine/notifications": ^4.2.12 "@mantine/prism": ^4.2.12 - "@next/bundle-analyzer": 12.2.0 - "@next/eslint-plugin-next": 12.2.0 + "@next/bundle-analyzer": ^12.1.4 + "@next/eslint-plugin-next": ^12.1.4 "@nivo/core": ^0.79.0 "@nivo/line": ^0.79.1 - "@tabler/icons": ^1.76.0 + "@tabler/icons": ^1.78.0 "@types/dockerode": ^3.3.9 - "@types/node": ^18.0.6 - "@types/react": ^18.0.15 + "@types/node": 17.0.1 + "@types/react": 17.0.1 "@types/uuid": ^8.3.4 "@typescript-eslint/eslint-plugin": ^5.30.7 "@typescript-eslint/parser": ^5.30.7 @@ -4523,11 +4506,11 @@ __metadata: framer-motion: ^6.5.1 jest: ^28.1.3 js-file-download: ^0.4.12 - next: 12.2.0 + next: 12.1.6 prettier: ^2.7.1 prism-react-renderer: ^1.3.5 - react: ^18.2.0 - react-dom: ^18.2.0 + react: ^17.0.1 + react-dom: ^17.0.1 systeminformation: ^5.12.1 typescript: ^4.7.4 uuid: ^8.3.2 @@ -5956,29 +5939,26 @@ __metadata: languageName: node linkType: hard -"next@npm:12.2.0": - version: 12.2.0 - resolution: "next@npm:12.2.0" +"next@npm:12.1.6": + version: 12.1.6 + resolution: "next@npm:12.1.6" dependencies: - "@next/env": 12.2.0 - "@next/swc-android-arm-eabi": 12.2.0 - "@next/swc-android-arm64": 12.2.0 - "@next/swc-darwin-arm64": 12.2.0 - "@next/swc-darwin-x64": 12.2.0 - "@next/swc-freebsd-x64": 12.2.0 - "@next/swc-linux-arm-gnueabihf": 12.2.0 - "@next/swc-linux-arm64-gnu": 12.2.0 - "@next/swc-linux-arm64-musl": 12.2.0 - "@next/swc-linux-x64-gnu": 12.2.0 - "@next/swc-linux-x64-musl": 12.2.0 - "@next/swc-win32-arm64-msvc": 12.2.0 - "@next/swc-win32-ia32-msvc": 12.2.0 - "@next/swc-win32-x64-msvc": 12.2.0 - "@swc/helpers": 0.4.2 + "@next/env": 12.1.6 + "@next/swc-android-arm-eabi": 12.1.6 + "@next/swc-android-arm64": 12.1.6 + "@next/swc-darwin-arm64": 12.1.6 + "@next/swc-darwin-x64": 12.1.6 + "@next/swc-linux-arm-gnueabihf": 12.1.6 + "@next/swc-linux-arm64-gnu": 12.1.6 + "@next/swc-linux-arm64-musl": 12.1.6 + "@next/swc-linux-x64-gnu": 12.1.6 + "@next/swc-linux-x64-musl": 12.1.6 + "@next/swc-win32-arm64-msvc": 12.1.6 + "@next/swc-win32-ia32-msvc": 12.1.6 + "@next/swc-win32-x64-msvc": 12.1.6 caniuse-lite: ^1.0.30001332 postcss: 8.4.5 styled-jsx: 5.0.2 - use-sync-external-store: 1.1.0 peerDependencies: fibers: ">= 3.1.0" node-sass: ^6.0.0 || ^7.0.0 @@ -5994,8 +5974,6 @@ __metadata: optional: true "@next/swc-darwin-x64": optional: true - "@next/swc-freebsd-x64": - optional: true "@next/swc-linux-arm-gnueabihf": optional: true "@next/swc-linux-arm64-gnu": @@ -6021,7 +5999,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 38456c33935122ac1581367e4982034be23269039a8470a66443d710334336f8f3fb587f25d172d138d84cf18c01d3a76627fb610c2e2e57bd1692277c23fa2b + checksum: 670d544fd47670c29681d10824e6da625e9d4a048e564c8d9cb80d37f33c9ff9b5ca0a53e6d84d8d618b1fe7c9bb4e6b45040cb7e57a5c46b232a8f914425dc1 languageName: node linkType: hard @@ -6547,15 +6525,16 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:^18.2.0": - version: 18.2.0 - resolution: "react-dom@npm:18.2.0" +"react-dom@npm:^17.0.1": + version: 17.0.2 + resolution: "react-dom@npm:17.0.2" dependencies: loose-envify: ^1.1.0 - scheduler: ^0.23.0 + object-assign: ^4.1.1 + scheduler: ^0.20.2 peerDependencies: - react: ^18.2.0 - checksum: 7d323310bea3a91be2965f9468d552f201b1c27891e45ddc2d6b8f717680c95a75ae0bc1e3f5cf41472446a2589a75aed4483aee8169287909fcd59ad149e8cc + react: 17.0.2 + checksum: 1c1eaa3bca7c7228d24b70932e3d7c99e70d1d04e13bb0843bbf321582bc25d7961d6b8a6978a58a598af2af496d1cedcfb1bf65f6b0960a0a8161cb8dab743c languageName: node linkType: hard @@ -6649,12 +6628,13 @@ __metadata: languageName: node linkType: hard -"react@npm:^18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" +"react@npm:^17.0.1": + version: 17.0.2 + resolution: "react@npm:17.0.2" dependencies: loose-envify: ^1.1.0 - checksum: 88e38092da8839b830cda6feef2e8505dec8ace60579e46aa5490fc3dc9bba0bd50336507dc166f43e3afc1c42939c09fe33b25fae889d6f402721dcd78fca1b + object-assign: ^4.1.1 + checksum: b254cc17ce3011788330f7bbf383ab653c6848902d7936a87b09d835d091e3f295f7e9dd1597c6daac5dc80f90e778c8230218ba8ad599f74adcc11e33b9d61b languageName: node linkType: hard @@ -6881,12 +6861,13 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.0": - version: 0.23.0 - resolution: "scheduler@npm:0.23.0" +"scheduler@npm:^0.20.2": + version: 0.20.2 + resolution: "scheduler@npm:0.20.2" dependencies: loose-envify: ^1.1.0 - checksum: d79192eeaa12abef860c195ea45d37cbf2bbf5f66e3c4dcd16f54a7da53b17788a70d109ee3d3dde1a0fd50e6a8fc171f4300356c5aee4fc0171de526bf35f8a + object-assign: ^4.1.1 + checksum: c4b35cf967c8f0d3e65753252d0f260271f81a81e427241295c5a7b783abf4ea9e905f22f815ab66676f5313be0a25f47be582254db8f9241b259213e999b8fc languageName: node linkType: hard @@ -7445,7 +7426,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0": +"tslib@npm:^2.0.0, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1": version: 2.4.0 resolution: "tslib@npm:2.4.0" checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 @@ -7615,15 +7596,6 @@ __metadata: languageName: node linkType: hard -"use-sync-external-store@npm:1.1.0": - version: 1.1.0 - resolution: "use-sync-external-store@npm:1.1.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 8993a0b642f91d7fcdbb02b7b3ac984bd3af4769686f38291fe7fcfe73dfb73d6c64d20dfb7e5e7fbf5a6da8f5392d6f8e5b00c243a04975595946e82c02b883 - languageName: node - linkType: hard - "util-deprecate@npm:^1.0.1, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2"