1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-22 22:54:22 +00:00

Do more stuff, pending cleanup!

This commit is contained in:
Steffo 2022-06-02 04:26:52 +02:00
parent 8b42c0b004
commit 41d38234fb
Signed by: steffo
GPG key ID: 6965406171929D01
13 changed files with 294 additions and 93 deletions

View file

@ -1,4 +1,4 @@
import axios, { AxiosError } from "axios" import {default as axios, AxiosError } from "axios"
import {default as classNames} from "classnames" import {default as classNames} from "classnames"
import { useTranslation } from "next-i18next" import { useTranslation } from "next-i18next"
import { HTMLProps, useCallback, useState } from "react" import { HTMLProps, useCallback, useState } from "react"
@ -35,7 +35,7 @@ export function ActionLoginTelegram({className, ...props}: HTMLProps<HTMLFormEle
setLogin(response.data as FestaLoginData) setLogin(response.data as FestaLoginData)
localStorage.setItem("login", JSON.stringify(response.data)) localStorage.setItem("login", JSON.stringify(response.data))
}, },
[] [setLogin]
) )
const newClassName = classNames(className, { const newClassName = classNames(className, {

29
components/ErrorBlock.tsx Normal file
View file

@ -0,0 +1,29 @@
import { faCircleExclamation } from "@fortawesome/free-solid-svg-icons";
import { useTranslation } from "next-i18next";
import { FestaIcon } from "./FestaIcon";
type ErrorBlockProps = {
error: JSON,
text?: string
}
export function ErrorBlock(props: ErrorBlockProps) {
const {t} = useTranslation()
return (
<div className="error error-block negative">
<p>
<FestaIcon icon={faCircleExclamation}/>
&nbsp;
<span>
{props.text ?? t("genericError")}
</span>
</p>
<pre>
<code lang="json">
{JSON.stringify(props.error, undefined, 4)}
</code>
</pre>
</div>
)
}

View file

@ -0,0 +1,26 @@
import { faCircleExclamation } from "@fortawesome/free-solid-svg-icons";
import { useTranslation } from "next-i18next";
import { FestaIcon } from "./FestaIcon";
type ErrorInlineProps = {
error: JSON,
text?: string
}
export function ErrorInline(props: ErrorInlineProps) {
const {t} = useTranslation()
return (
<span className="error error-inline negative">
<FestaIcon icon={faCircleExclamation}/>
&nbsp;
<span>
{props.text ?? t("genericError")}
</span>
&nbsp;
<code lang="json">
{JSON.stringify(props.error)}
</code>
</span>
)
}

View file

@ -1,24 +1,41 @@
import { Event } from "@prisma/client"
import { AxiosError } from "axios"
import { useTranslation } from "next-i18next" import { useTranslation } from "next-i18next"
import { useRouter } from "next/router"
import { FormEvent, MouseEventHandler, useCallback, useRef, useState } from "react" import { FormEvent, MouseEventHandler, useCallback, useRef, useState } from "react"
import { useAxios } from "../hooks/useAxios"
import { useAxiosRequest } from "../hooks/useAxiosRequest"
import { ApiError } from "../types/api"
import { FestaLoginData } from "../types/user"
import { Loading } from "./Loading" import { Loading } from "./Loading"
import { useEffect } from "react"
import { ErrorInline } from "./ErrorInline"
import { ErrorBlock } from "./ErrorBlock"
export function EventCreate() { export function EventCreate() {
const {t} = useTranslation() const {t} = useTranslation()
const router = useRouter()
const [name, setName] = useState<string>("") const [name, setName] = useState<string>("")
const [running, setRunning] = useState<boolean>(false) const createEvent = useAxiosRequest<Event>({
method: "POST",
url: "/api/events/",
data: {name}
})
const createEvent = useCallback(() => { // This is a pretty bad hack... or not?
setRunning(true) // Idc, as long as it works
}, useEffect(() => {
[] if(createEvent.error) return
) if(!createEvent.data) return
router.push(`/event/${createEvent.data.slug}`)
})
if(running) return <Loading text={t("eventListCreateRunning")}/> if(createEvent.running) return <Loading text={t("eventListCreateRunning")}/>
return ( return <>
<form <form
className="form-monorow" className="form-monorow"
onSubmit={e => {e.preventDefault(); createEvent()}} onSubmit={e => {e.preventDefault(); createEvent.run()}}
noValidate noValidate
> >
<input <input
@ -33,9 +50,10 @@ export function EventCreate() {
aria-label={t("eventListCreateSubmitLabel")} aria-label={t("eventListCreateSubmitLabel")}
className="positive square-40" className="positive square-40"
value="→" value="→"
onClick={e => createEvent()} onClick={e => createEvent.run()}
disabled={!name} disabled={!name}
/> />
</form> </form>
) {createEvent.error ? <ErrorBlock error={createEvent.error}/> : null}
</>
} }

View file

@ -5,6 +5,7 @@ import { useDefinedContext } from "../utils/definedContext";
export function Postcard() { export function Postcard() {
const [postcard, _] = useDefinedContext(PostcardContext) const [postcard, _] = useDefinedContext(PostcardContext)
/* eslint-disable @next/next/no-img-element */
return ( return (
<img <img
className="postcard" className="postcard"

View file

@ -1,18 +1,29 @@
import {default as axios} from "axios"; import { AxiosInstance, AxiosRequestConfig, default as axios } from "axios";
import { useContext, useMemo } from "react"; import { useContext, useMemo } from "react";
import { LoginContext } from "../contexts/login"; import { LoginContext } from "../contexts/login";
import { FestaLoginData } from "../types/user"; import { FestaLoginData } from "../types/user";
import { useDefinedContext } from "../utils/definedContext";
export function useAxios(data?: FestaLoginData | null) { export function useAxios<D>(config: AxiosRequestConfig<D> = {}, data?: FestaLoginData | null): AxiosInstance {
const loginContext = useContext(LoginContext) const loginContext = useContext(LoginContext)
const headers: {[key: string]: string} = {}
let login = data || loginContext?.[0] let login = data || loginContext?.[0]
if(login) {
headers["Authorization"] = `Bearer ${login.token}`
}
return useMemo(() => axios.create({headers}), [login]) return useMemo(
() => {
console.debug(config, login)
const ax = axios.create({
...config,
headers: {
...(config.headers ?? {}),
Authorization: login ? `Bearer ${login.token}` : false,
},
})
console.debug(ax)
return ax
},
[config, login]
)
} }

75
hooks/useAxiosRequest.ts Normal file
View file

@ -0,0 +1,75 @@
import { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios";
import { useCallback, useReducer } from "react";
import { useAxios } from "./useAxios";
type ReducerActionStart = { type: "start" }
type ReducerActionDone<T, D = any> = { type: "done", response: AxiosResponse<T, D> }
type ReducerActionError<T, D = any> = { type: "error", error: any }
type ReducerAction<T, D = any> = ReducerActionStart | ReducerActionDone<T, D> | ReducerActionError<T, D>
type ReducerState<T, D = any> = {
running: boolean,
response: AxiosResponse<T, D> | undefined,
error: any | undefined,
}
export function useAxiosRequest<T, D = any>(config: AxiosRequestConfig<D> = {}, hookConfig: AxiosRequestConfig<D> = {}) {
const axios = useAxios(hookConfig)
const [state, dispatch] = useReducer(
(prev: ReducerState<T, D>, action: ReducerAction<T, D>) => {
switch (action.type) {
case "start":
return {
running: true,
response: undefined,
error: undefined,
}
case "done":
return {
running: false,
response: action.response,
error: undefined,
}
case "error":
return {
running: false,
response: action.error.response,
error: action.error
}
}
},
{
running: false,
response: undefined,
error: undefined,
}
)
const run = useCallback(
async (funcConfig: AxiosRequestConfig<D> = {}) => {
dispatch({ type: "start" })
try {
throw {potat: "t"}
var response: AxiosResponse<T, D> = await axios.request({ ...config, ...funcConfig })
}
catch (error) {
dispatch({ type: "error", error })
return
}
dispatch({ type: "done", response })
},
[axios, hookConfig]
)
return {
running: state.running,
response: state.response,
data: state.response?.data as T | undefined,
error: state.error,
run,
}
}

View file

@ -19,7 +19,7 @@ const App = ({ Component, pageProps }: AppProps): JSX.Element => {
const [login, setLogin] = useState<FestaLoginData | null>(null) const [login, setLogin] = useState<FestaLoginData | null>(null)
useStoredLogin(setLogin) useStoredLogin(setLogin)
const axios = useAxios(login) const axios = useAxios({}, login)
const swrConfig = { const swrConfig = {
fetcher: async (resource: string, init: AxiosRequestConfig<any>) => { fetcher: async (resource: string, init: AxiosRequestConfig<any>) => {

View file

@ -21,11 +21,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
const which = { const which = {
slug: req.query.slug slug: req.query.slug
} }
const create = {
slug: cryptoRandomString({length: 12, type: "url-safe"}),
creatorId: user.id,
name: req.body.name
}
const update = { const update = {
name: req.body.name name: req.body.name
} }
@ -33,8 +28,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
await restInPeace(req, res, { await restInPeace(req, res, {
model: database.event, model: database.event,
retrieve: {which}, retrieve: {which},
create: {create},
upsert: {which, create, update, before: canEdit},
update: {which, update, before: canEdit}, update: {which, update, before: canEdit},
destroy: {which, before: canEdit}, destroy: {which, before: canEdit},
}) })

30
pages/api/events/index.ts Normal file
View file

@ -0,0 +1,30 @@
import { database } from "../../../utils/prismaClient";
import { NextApiRequest, NextApiResponse } from "next";
import { ApiResult } from "../../../types/api";
import { Model, restInPeace } from "../../../utils/restInPeace";
import { default as cryptoRandomString } from "crypto-random-string";
import { handleInterrupts, Interrupt } from "../../../utils/interrupt";
import { authorizeUser } from "../../../utils/authorizeUser";
import { Event } from "@prisma/client";
export default async function handler(req: NextApiRequest, res: NextApiResponse<ApiResult<Event | Event[]>>) {
handleInterrupts(res, async () => {
const user = await authorizeUser(req)
if (req.body.name.length === 0) {
throw new Interrupt(400, { error: "Name is empty" })
}
const create = {
slug: cryptoRandomString({ length: 12, type: "url-safe" }),
creatorId: user.id,
name: req.body.name
}
await restInPeace(req, res, {
model: database.event,
create: { create },
})
})
}

View file

@ -12,7 +12,9 @@
"eventsInputNamePlaceholder": "Festa a Festà", "eventsInputNamePlaceholder": "Festa a Festà",
"eventsInputSubmitLabel": "Crea evento", "eventsInputSubmitLabel": "Crea evento",
"genericLoading": "Caricamento...", "genericLoading": "Caricamento...",
"genericError": "Si è verificato il seguente errore:",
"eventListError": "Si è verificato il seguente errore durante il recupero dei tuoi eventi:", "eventListError": "Si è verificato il seguente errore durante il recupero dei tuoi eventi:",
"eventListLoading": "Caricamento della lista degli eventi creati in corso...",
"eventListDescription": "Questi sono gli eventi che hai creato:", "eventListDescription": "Questi sono gli eventi che hai creato:",
"eventListCreateAnother": "Se vuoi crearne un altro, inseriscine il nome qui sotto:", "eventListCreateAnother": "Se vuoi crearne un altro, inseriscine il nome qui sotto:",
"eventListCreateFirst": "Inserisci il nome del tuo primo evento qui sotto!", "eventListCreateFirst": "Inserisci il nome del tuo primo evento qui sotto!",

View file

@ -161,3 +161,10 @@ input.negative, button.negative {
column-count: auto; column-count: auto;
column-width: 140px; column-width: 140px;
} }
.error-block pre {
display: inline-block;
margin: 0;
text-align: left;
}

135
yarn.lock
View file

@ -217,7 +217,16 @@
dependencies: dependencies:
"@types/react" "*" "@types/react" "*"
"@types/react@*", "@types/react@18.0.9": "@types/react@*":
version "18.0.10"
resolved "https://registry.npmjs.org/@types/react/-/react-18.0.10.tgz#5692944d4a45e204fb7a981eb1388afe919cf4d0"
integrity sha512-dIugadZuIPrRzvIEevIu7A1smqOAjkSMv8qOfwPt9Ve6i6JT/FQcCHyk2qIAxwsQNKZt5/oGR0T4z9h2dXRAkg==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"
"@types/react@18.0.9":
version "18.0.9" version "18.0.9"
resolved "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz#d6712a38bd6cd83469603e7359511126f122e878" resolved "https://registry.npmjs.org/@types/react/-/react-18.0.9.tgz#d6712a38bd6cd83469603e7359511126f122e878"
integrity sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw== integrity sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw==
@ -232,47 +241,47 @@
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
"@typescript-eslint/parser@^5.21.0": "@typescript-eslint/parser@^5.21.0":
version "5.26.0" version "5.27.0"
resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz#a61b14205fe2ab7533deb4d35e604add9a4ceee2" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.0.tgz#62bb091ed5cf9c7e126e80021bb563dcf36b6b12"
integrity sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q== integrity sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA==
dependencies: dependencies:
"@typescript-eslint/scope-manager" "5.26.0" "@typescript-eslint/scope-manager" "5.27.0"
"@typescript-eslint/types" "5.26.0" "@typescript-eslint/types" "5.27.0"
"@typescript-eslint/typescript-estree" "5.26.0" "@typescript-eslint/typescript-estree" "5.27.0"
debug "^4.3.4" debug "^4.3.4"
"@typescript-eslint/scope-manager@5.26.0": "@typescript-eslint/scope-manager@5.27.0":
version "5.26.0" version "5.27.0"
resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz#44209c7f649d1a120f0717e0e82da856e9871339" resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz#a272178f613050ed62f51f69aae1e19e870a8bbb"
integrity sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw== integrity sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g==
dependencies: dependencies:
"@typescript-eslint/types" "5.26.0" "@typescript-eslint/types" "5.27.0"
"@typescript-eslint/visitor-keys" "5.26.0" "@typescript-eslint/visitor-keys" "5.27.0"
"@typescript-eslint/types@5.26.0": "@typescript-eslint/types@5.27.0":
version "5.26.0" version "5.27.0"
resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz#cb204bb154d3c103d9cc4d225f311b08219469f3" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.0.tgz#c3f44b9dda6177a9554f94a74745ca495ba9c001"
integrity sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA== integrity sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A==
"@typescript-eslint/typescript-estree@5.26.0": "@typescript-eslint/typescript-estree@5.27.0":
version "5.26.0" version "5.27.0"
resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz#16cbceedb0011c2ed4f607255f3ee1e6e43b88c3" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz#7965f5b553c634c5354a47dcce0b40b94611e995"
integrity sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w== integrity sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ==
dependencies: dependencies:
"@typescript-eslint/types" "5.26.0" "@typescript-eslint/types" "5.27.0"
"@typescript-eslint/visitor-keys" "5.26.0" "@typescript-eslint/visitor-keys" "5.27.0"
debug "^4.3.4" debug "^4.3.4"
globby "^11.1.0" globby "^11.1.0"
is-glob "^4.0.3" is-glob "^4.0.3"
semver "^7.3.7" semver "^7.3.7"
tsutils "^3.21.0" tsutils "^3.21.0"
"@typescript-eslint/visitor-keys@5.26.0": "@typescript-eslint/visitor-keys@5.27.0":
version "5.26.0" version "5.27.0"
resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz#7195f756e367f789c0e83035297c45b417b57f57" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz#97aa9a5d2f3df8215e6d3b77f9d214a24db269bd"
integrity sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q== integrity sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA==
dependencies: dependencies:
"@typescript-eslint/types" "5.26.0" "@typescript-eslint/types" "5.27.0"
eslint-visitor-keys "^3.3.0" eslint-visitor-keys "^3.3.0"
acorn-jsx@^5.3.2: acorn-jsx@^5.3.2:
@ -418,9 +427,9 @@ callsites@^3.0.0:
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
caniuse-lite@^1.0.30001332: caniuse-lite@^1.0.30001332:
version "1.0.30001342" version "1.0.30001344"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001342.tgz#87152b1e3b950d1fbf0093e23f00b6c8e8f1da96" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz#8a1e7fdc4db9c2ec79a05e9fd68eb93a761888bb"
integrity sha512-bn6sOCu7L7jcbBbyNhLg0qzXdJ/PMbybZTH/BA6Roet9wxYRm6Tr9D0s0uhLkOZ6MSG+QU6txUgdpr3MXIVqjA== integrity sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g==
chalk@^4.0.0: chalk@^4.0.0:
version "4.1.2" version "4.1.2"
@ -457,17 +466,17 @@ combined-stream@^1.0.8:
concat-map@0.0.1: concat-map@0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
core-js-pure@^3.20.2: core-js-pure@^3.20.2:
version "3.22.7" version "3.22.8"
resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.7.tgz#f58489d9b309fa7b26486a0f70d4ec19a418084e" resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.8.tgz#f2157793b58719196ccf9673cc14f3683adc0957"
integrity sha512-wTriFxiZI+C8msGeh7fJcbC/a0V8fdInN1oS2eK79DMBGs8iIJiXhtFJCiT3rBa8w6zroHWW3p8ArlujZ/Mz+w== integrity sha512-bOxbZIy9S5n4OVH63XaLVXZ49QKicjowDx/UELyJ68vxfCRpYsbyh/WNZNfEfAk+ekA8vSjt+gCDpvh672bc3w==
core-js@^3: core-js@^3:
version "3.22.7" version "3.22.8"
resolved "https://registry.npmjs.org/core-js/-/core-js-3.22.7.tgz#8d6c37f630f6139b8732d10f2c114c3f1d00024f" resolved "https://registry.npmjs.org/core-js/-/core-js-3.22.8.tgz#23f860b1fe60797cc4f704d76c93fea8a2f60631"
integrity sha512-Jt8SReuDKVNZnZEzyEQT5eK6T2RRCXkfTq7Lo09kpm+fHjgGewSbNjV+Wt4yZMhPDdzz2x1ulI5z/w4nxpBseg== integrity sha512-UoGQ/cfzGYIuiq6Z7vWL1HfkE9U9IZ4Ub+0XSiJTCzvbZzgPA69oDF2f+lgJ6dFFLEdjW5O6svvoKzXX23xFkA==
cors@^2.8.5: cors@^2.8.5:
version "2.8.5" version "2.8.5"
@ -865,7 +874,7 @@ fast-json-stable-stringify@^2.0.0:
fast-levenshtein@^2.0.6: fast-levenshtein@^2.0.6:
version "2.0.6" version "2.0.6"
resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
fastq@^1.6.0: fastq@^1.6.0:
version "1.13.0" version "1.13.0"
@ -891,7 +900,7 @@ fill-range@^7.0.1:
find-up@^2.1.0: find-up@^2.1.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==
dependencies: dependencies:
locate-path "^2.0.0" locate-path "^2.0.0"
@ -925,7 +934,7 @@ form-data@^4.0.0:
fs.realpath@^1.0.0: fs.realpath@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
function-bind@^1.1.1: function-bind@^1.1.1:
version "1.1.1" version "1.1.1"
@ -945,7 +954,7 @@ function.prototype.name@^1.1.5:
functional-red-black-tree@^1.0.1: functional-red-black-tree@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==
functions-have-names@^1.2.2: functions-have-names@^1.2.2:
version "1.2.3" version "1.2.3"
@ -1087,9 +1096,9 @@ i18next-fs-backend@^1.1.4:
integrity sha512-/MfAGMP0jHonV966uFf9PkWWuDjPYLIcsipnSO3NxpNtAgRUKLTwvm85fEmsF6hGeu0zbZiCQ3W74jwO6K9uXA== integrity sha512-/MfAGMP0jHonV966uFf9PkWWuDjPYLIcsipnSO3NxpNtAgRUKLTwvm85fEmsF6hGeu0zbZiCQ3W74jwO6K9uXA==
i18next@^21.6.14: i18next@^21.6.14:
version "21.8.4" version "21.8.5"
resolved "https://registry.npmjs.org/i18next/-/i18next-21.8.4.tgz#646e23065752036b38d9fda8898c18139b9e8ebe" resolved "https://registry.npmjs.org/i18next/-/i18next-21.8.5.tgz#b7615f107d9a1492c771dc0e0b8742a80c1d9bec"
integrity sha512-b3LQ5n9V1juu8UItb5x1QTI4OTvNqsNs/wetwQlBvfijEqks+N5HKMKSoevf8w0/RGUrDQ7g4cvVzF8WBp9pUw== integrity sha512-uI5LVG10SBHLVOclr6yY1aCimmrzeZ0dwD73Sio61E8gQEwRmKI7/M8RKM084mNNy7VscKtxzSwELrso8BKv1g==
dependencies: dependencies:
"@babel/runtime" "^7.17.2" "@babel/runtime" "^7.17.2"
@ -1109,12 +1118,12 @@ import-fresh@^3.0.0, import-fresh@^3.2.1:
imurmurhash@^0.1.4: imurmurhash@^0.1.4:
version "0.1.4" version "0.1.4"
resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==
inflight@^1.0.4: inflight@^1.0.4:
version "1.0.6" version "1.0.6"
resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
dependencies: dependencies:
once "^1.3.0" once "^1.3.0"
wrappy "1" wrappy "1"
@ -1170,7 +1179,7 @@ is-date-object@^1.0.1:
is-extglob@^2.1.1: is-extglob@^2.1.1:
version "2.1.1" version "2.1.1"
resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
version "4.0.3" version "4.0.3"
@ -1235,7 +1244,7 @@ is-weakref@^1.0.2:
isexe@^2.0.0: isexe@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==
"js-tokens@^3.0.0 || ^4.0.0": "js-tokens@^3.0.0 || ^4.0.0":
version "4.0.0" version "4.0.0"
@ -1257,7 +1266,7 @@ json-schema-traverse@^0.4.1:
json-stable-stringify-without-jsonify@^1.0.1: json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
json5@^1.0.1: json5@^1.0.1:
version "1.0.1" version "1.0.1"
@ -1282,7 +1291,7 @@ language-subtag-registry@~0.3.2:
language-tags@^1.0.5: language-tags@^1.0.5:
version "1.0.5" version "1.0.5"
resolved "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a" resolved "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a"
integrity sha1-0yHbxNowuovzAk4ED6XBRmH5GTo= integrity sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==
dependencies: dependencies:
language-subtag-registry "~0.3.2" language-subtag-registry "~0.3.2"
@ -1297,7 +1306,7 @@ levn@^0.4.1:
locate-path@^2.0.0: locate-path@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==
dependencies: dependencies:
p-locate "^2.0.0" p-locate "^2.0.0"
path-exists "^3.0.0" path-exists "^3.0.0"
@ -1361,7 +1370,7 @@ minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
ms@2.0.0: ms@2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==
ms@2.1.2: ms@2.1.2:
version "2.1.2" version "2.1.2"
@ -1381,7 +1390,7 @@ nanoid@^3.1.30:
natural-compare@^1.4.0: natural-compare@^1.4.0:
version "1.4.0" version "1.4.0"
resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
next-i18next@^11.0.0: next-i18next@^11.0.0:
version "11.0.0" version "11.0.0"
@ -1422,12 +1431,12 @@ next@12.1.6:
object-assign@^4, object-assign@^4.1.1: object-assign@^4, object-assign@^4.1.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
object-inspect@^1.12.0, object-inspect@^1.9.0: object-inspect@^1.12.0, object-inspect@^1.9.0:
version "1.12.1" version "1.12.2"
resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.1.tgz#28a661153bad7e470e4b01479ef1cb91ce511191" resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
integrity sha512-Y/jF6vnvEtOPGiKD1+q+X0CiUYRQtEHp89MLLUJ7TUivtH8Ugn2+3A7Rynqk7BRsAoqeOQWnFnjpDrKSxDgIGA== integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==
object-keys@^1.1.1: object-keys@^1.1.1:
version "1.1.1" version "1.1.1"
@ -1482,7 +1491,7 @@ object.values@^1.1.5:
once@^1.3.0: once@^1.3.0:
version "1.4.0" version "1.4.0"
resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
dependencies: dependencies:
wrappy "1" wrappy "1"
@ -1508,14 +1517,14 @@ p-limit@^1.1.0:
p-locate@^2.0.0: p-locate@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==
dependencies: dependencies:
p-limit "^1.1.0" p-limit "^1.1.0"
p-try@^1.0.0: p-try@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==
parent-module@^1.0.0: parent-module@^1.0.0:
version "1.0.1" version "1.0.1"
@ -1527,12 +1536,12 @@ parent-module@^1.0.0:
path-exists@^3.0.0: path-exists@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==
path-is-absolute@^1.0.0: path-is-absolute@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
path-key@^3.1.0: path-key@^3.1.0:
version "3.1.1" version "3.1.1"