From 920f78b6509ccc759bbc17c7086e02a7c91b1ad3 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 25 Sep 2021 14:43:28 +0100 Subject: [PATCH] Virtualise server settings user lists. Closes #300 --- package.json | 2 +- src/components/common/user/UserShort.tsx | 33 ++- src/pages/settings/Settings.module.scss | 2 +- src/pages/settings/server/Bans.tsx | 99 +++++---- src/pages/settings/server/Invites.tsx | 108 +++++----- src/pages/settings/server/Members.tsx | 218 ++++++++++---------- src/pages/settings/server/Panes.module.scss | 10 +- yarn.lock | 137 ++---------- 8 files changed, 272 insertions(+), 337 deletions(-) diff --git a/package.json b/package.json index 7f0e12ac..cf73970a 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "react-virtuoso": "^1.10.4", "redux": "^4.1.0", "revolt-api": "0.5.3-alpha.0-patch.0", - "revolt.js": "5.1.0-alpha.4", + "revolt.js": "5.1.0-alpha.6", "rimraf": "^3.0.2", "sass": "^1.35.1", "shade-blend-color": "^1.0.0", diff --git a/src/components/common/user/UserShort.tsx b/src/components/common/user/UserShort.tsx index 29f07900..af9a8f17 100644 --- a/src/components/common/user/UserShort.tsx +++ b/src/components/common/user/UserShort.tsx @@ -5,11 +5,12 @@ import styled from "styled-components"; import { Text } from "preact-i18n"; +import { internalEmit } from "../../../lib/eventEmitter"; + import { useIntermediate } from "../../../context/intermediate/Intermediate"; import { useClient } from "../../../context/revoltjs/RevoltClient"; import UserIcon from "./UserIcon"; -import { internalEmit } from "../../../lib/eventEmitter"; const BotBadge = styled.div` display: inline-block; @@ -29,15 +30,10 @@ const BotBadge = styled.div` type UsernameProps = JSX.HTMLAttributes & { user?: User; prefixAt?: boolean; - showServerIdentity?: boolean; -} + showServerIdentity?: boolean | "both"; +}; export const Username = observer( - ({ - user, - prefixAt, - showServerIdentity, - ...otherProps - }: UsernameProps) => { + ({ user, prefixAt, showServerIdentity, ...otherProps }: UsernameProps) => { let username = user?.username; let color; @@ -52,7 +48,11 @@ export const Username = observer( if (member) { if (member.nickname) { - username = member.nickname; + if (showServerIdentity === "both") { + username = `${member.nickname} (${username})`; + } else { + username = member.nickname; + } } if (member.roles && member.roles.length > 0) { @@ -112,17 +112,12 @@ export default function UserShort({ const handleUserClick = (e: MouseEvent) => { if (e.shiftKey && user?._id) { - e.preventDefault() - internalEmit( - "MessageBox", - "append", - `<@${user?._id}>`, - "mention", - ); + e.preventDefault(); + internalEmit("MessageBox", "append", `<@${user?._id}>`, "mention"); } else { - openProfile() + openProfile(); } - } + }; return ( <> diff --git a/src/pages/settings/Settings.module.scss b/src/pages/settings/Settings.module.scss index 3b475865..23bcd09a 100644 --- a/src/pages/settings/Settings.module.scss +++ b/src/pages/settings/Settings.module.scss @@ -176,12 +176,12 @@ .scrollbox { display: flex; flex-grow: 1; + align-items: stretch; } .contentcontainer { display: flex; gap: 13px; - height: fit-content; max-width: 740px; padding: 80px 32px; width: 100%; diff --git a/src/pages/settings/server/Bans.tsx b/src/pages/settings/server/Bans.tsx index d4d0ed91..29af2fe7 100644 --- a/src/pages/settings/server/Bans.tsx +++ b/src/pages/settings/server/Bans.tsx @@ -1,5 +1,8 @@ import { XCircle } from "@styled-icons/boxicons-regular"; import { observer } from "mobx-react-lite"; +import { Virtuoso } from "react-virtuoso"; +import { Ban } from "revolt-api/types/Servers"; +import { User } from "revolt-api/types/Users"; import { Route } from "revolt.js/dist/api/routes"; import { Server } from "revolt.js/dist/maps/Servers"; @@ -11,12 +14,45 @@ import UserIcon from "../../../components/common/user/UserIcon"; import IconButton from "../../../components/ui/IconButton"; import Preloader from "../../../components/ui/Preloader"; +interface InnerProps { + ban: Ban; + users: Pick[]; + server: Server; + removeSelf: () => void; +} + +const Inner = observer(({ ban, users, server, removeSelf }: InnerProps) => { + const [deleting, setDelete] = useState(false); + const user = users.find((x) => x._id === ban._id.user); + + return ( +
+ + {" "} + {user?.username} + +
+ {ban.reason ?? ( + + )} +
+ { + setDelete(true); + server.unbanUser(ban._id.user).then(removeSelf); + }} + disabled={deleting}> + + +
+ ); +}); + interface Props { server: Server; } export const Bans = observer(({ server }: Props) => { - const [deleting, setDelete] = useState([]); const [data, setData] = useState< Route<"GET", "/servers/id/bans">["response"] | undefined >(undefined); @@ -39,42 +75,31 @@ export const Bans = observer(({ server }: Props) => { {typeof data === "undefined" && } - {data?.bans.map((x) => { - const user = data.users.find((y) => y._id === x._id.user); - - return ( -
-1}> - - - {user?.username} - -
- {x.reason ?? ( - - )} -
- { - setDelete([...deleting, x._id.user]); - - await server.unbanUser(x._id.user); - - setData({ - ...data, - bans: data.bans.filter( - (y) => y._id.user !== x._id.user, - ), - }); - }} - disabled={deleting.indexOf(x._id.user) > -1}> - - -
- ); - })} + {data && ( +
+ ( + { + setData({ + bans: data.bans.filter( + (y) => + y._id.user !== + data.bans[index]._id.user, + ), + users: data.users, + }); + }} + /> + )} + /> +
+ )} ); }); diff --git a/src/pages/settings/server/Invites.tsx b/src/pages/settings/server/Invites.tsx index 5316a95e..4823e3bf 100644 --- a/src/pages/settings/server/Invites.tsx +++ b/src/pages/settings/server/Invites.tsx @@ -1,35 +1,61 @@ import { XCircle } from "@styled-icons/boxicons-regular"; import { observer } from "mobx-react-lite"; -import { ServerInvite } from "revolt-api/types/Invites"; +import { Virtuoso } from "react-virtuoso"; +import { Invite, ServerInvite } from "revolt-api/types/Invites"; import { Server } from "revolt.js/dist/maps/Servers"; import styles from "./Panes.module.scss"; import { Text } from "preact-i18n"; import { useEffect, useState } from "preact/hooks"; -import { useClient } from "../../../context/revoltjs/RevoltClient"; import { getChannelName } from "../../../context/revoltjs/util"; import UserIcon from "../../../components/common/user/UserIcon"; +import { Username } from "../../../components/common/user/UserShort"; import IconButton from "../../../components/ui/IconButton"; import Preloader from "../../../components/ui/Preloader"; +interface InnerProps { + invite: Invite; + server: Server; + removeSelf: () => void; +} + +const Inner = observer(({ invite, server, removeSelf }: InnerProps) => { + const [deleting, setDelete] = useState(false); + + const user = server.client.users.get(invite.creator); + const channel = server.client.channels.get(invite.channel); + + return ( +
+ {invite._id} + + {" "} + + + {channel ? getChannelName(channel, true) : "#??"} + { + setDelete(true); + server.client.deleteInvite(invite._id).then(removeSelf); + }} + disabled={deleting}> + + +
+ ); +}); + interface Props { server: Server; } -export const Invites = observer(({ server }: Props) => { - const [deleting, setDelete] = useState([]); +export const Invites = ({ server }: Props) => { const [invites, setInvites] = useState( undefined, ); - const client = useClient(); - const users = invites?.map((invite) => client.users.get(invite.creator)); - const channels = invites?.map((invite) => - client.channels.get(invite.channel), - ); - useEffect(() => { server.fetchInvites().then(setInvites); }, [server, setInvites]); @@ -51,45 +77,27 @@ export const Invites = observer(({ server }: Props) => { {typeof invites === "undefined" && } - {invites?.map((invite, index) => { - const creator = users![index]; - const channel = channels![index]; - - return ( -
-1}> - {invite._id} - - {" "} - {creator?.username ?? ( - - )} - - - {channel && creator - ? getChannelName(channel, true) - : "#??"} - - { - setDelete([...deleting, invite._id]); - - await client.deleteInvite(invite._id); - - setInvites( - invites?.filter( - (x) => x._id !== invite._id, - ), - ); - }} - disabled={deleting.indexOf(invite._id) > -1}> - - -
- ); - })} + {invites && ( +
+ ( + + setInvites( + invites.filter( + (x) => x._id !== invites[index]._id, + ), + ) + } + /> + )} + /> +
+ )} ); -}); +}; diff --git a/src/pages/settings/server/Members.tsx b/src/pages/settings/server/Members.tsx index 93edf1df..846f4e91 100644 --- a/src/pages/settings/server/Members.tsx +++ b/src/pages/settings/server/Members.tsx @@ -1,139 +1,135 @@ import { ChevronDown } from "@styled-icons/boxicons-regular"; import { isEqual } from "lodash"; import { observer } from "mobx-react-lite"; +import { Virtuoso } from "react-virtuoso"; import { Member } from "revolt.js/dist/maps/Members"; import { Server } from "revolt.js/dist/maps/Servers"; -import { User } from "revolt.js/dist/maps/Users"; import styles from "./Panes.module.scss"; import { Text } from "preact-i18n"; -import { useEffect, useState } from "preact/hooks"; +import { useEffect, useMemo, useState } from "preact/hooks"; import UserIcon from "../../../components/common/user/UserIcon"; +import { Username } from "../../../components/common/user/UserShort"; import Button from "../../../components/ui/Button"; import Checkbox from "../../../components/ui/Checkbox"; import IconButton from "../../../components/ui/IconButton"; +import InputBox from "../../../components/ui/InputBox"; import Overline from "../../../components/ui/Overline"; +interface InnerProps { + member: Member; +} + +const Inner = observer(({ member }: InnerProps) => { + const [open, setOpen] = useState(false); + const [roles, setRoles] = useState(member.roles ?? []); + + useEffect(() => { + setRoles(member.roles ?? []); + }, [member.roles]); + + const server_roles = member.server?.roles ?? {}; + const user = member.user; + return ( + <> +
setOpen(!open)}> + + {" "} + + + + + +
+ {open && ( +
+ Roles + {Object.keys(server_roles).map((key) => { + const role = server_roles[key]; + return ( + { + if (v) { + setRoles([...roles, key]); + } else { + setRoles( + roles.filter((x) => x !== key), + ); + } + }}> + + {role.name} + + + ); + })} + +
+ )} + + ); +}); + interface Props { server: Server; } -export const Members = observer(({ server }: Props) => { - const [selected, setSelected] = useState(); - const [data, setData] = useState< - { members: Member[]; users: User[] } | undefined - >(undefined); +export const Members = ({ server }: Props) => { + const [data, setData] = useState(undefined); + const [query, setQuery] = useState(""); useEffect(() => { - server.fetchMembers().then(setData); + server + .fetchMembers() + .then((data) => data.members) + .then(setData); }, [server, setData]); - const [roles, setRoles] = useState([]); - useEffect(() => { - if (selected) { - setRoles( - data!.members.find((x) => x._id.user === selected)?.roles ?? [], - ); - } - }, [setRoles, selected, data]); + const members = useMemo( + () => + query + ? data?.filter((x) => x.user?.username.includes(query)) + : data, + [data, query], + ); return (
-
- {data?.members.length ?? 0} Members -
- {data && - data.members.length > 0 && - data.members - .map((member) => { - return { - member, - user: data.users.find( - (x) => x._id === member._id.user, - ), - }; - }) - .map(({ member, user }) => ( - // @ts-expect-error brokey - // eslint-disable-next-line react/jsx-no-undef - -
- setSelected( - selected === member._id.user - ? undefined - : member._id.user, - ) - }> - - {" "} - {user?.username ?? ( - - )} - - - - -
- {selected === member._id.user && ( -
- Roles - {Object.keys(server.roles ?? {}).map( - (key) => { - const role = server.roles![key]; - return ( - { - if (v) { - setRoles([ - ...roles, - key, - ]); - } else { - setRoles( - roles.filter( - (x) => - x !== - key, - ), - ); - } - }}> - - {role.name} - - - ); - }, - )} - -
- )} -
- ))} + setQuery(e.currentTarget.value)} + contrast + /> +
{data?.length ?? 0} Members
+ {members && ( +
+ ( + + )} + /> +
+ )}
); -}); +}; diff --git a/src/pages/settings/server/Panes.module.scss b/src/pages/settings/server/Panes.module.scss index 117f8fa2..c457923d 100644 --- a/src/pages/settings/server/Panes.module.scss +++ b/src/pages/settings/server/Panes.module.scss @@ -19,6 +19,7 @@ .userList { gap: 8px; + flex-grow: 1; display: flex; flex-direction: column; @@ -53,6 +54,10 @@ span, code { flex: 1; + + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } code { @@ -85,9 +90,12 @@ .memberView { padding: 10px; - margin: 0 10px; background: var(--background); } + + .virtual { + flex-grow: 1; + } } .roles { diff --git a/yarn.lock b/yarn.lock index 6a3e59bd..61375864 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1712,12 +1712,12 @@ awaitqueue@^2.3.3: resolved "https://registry.yarnpkg.com/awaitqueue/-/awaitqueue-2.3.3.tgz#35e6568970fcac3de1644a2c28abc1074045b570" integrity sha512-RbzQg6VtPUtyErm55iuQLTrBJ2uihy5BKBOEkyBwv67xm5Fn2o/j+Bz+a5BmfSoe2oZ5dcz9Z3fExS8pL+LLhw== -axios@^0.19.2: - version "0.19.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" - integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== +axios@^0.21.4: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: - follow-redirects "1.5.10" + follow-redirects "^1.14.0" babel-eslint@^10.0.1: version "10.1.0" @@ -1967,7 +1967,7 @@ core-js@^3.16.2: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.4.tgz#0fb1029a554fc2688c0963d7c900e188188a78e0" integrity sha512-Tq4GVE6XCjE+hcyW6hPy0ofN3hwtLudz5ZRdrlCnsnD/xkm/PWQRudzYHiKgZKUcefV6Q57fhDHjZHJP5dpfSg== -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -2005,13 +2005,6 @@ dayjs@^1.10.6: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.6.tgz#288b2aa82f2d8418a6c9d4df5898c0737ad02a63" integrity sha512-AztC/IOW4L1Q41A86phW5Thhcrco3xuAA+YX/BLpLWWjRcTj5TOt/QImBLmCKlrF7u7k47arTnOyL6GnbG8Hvw== -debug@=3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" @@ -2067,11 +2060,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -duplexer@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - ejs@^2.6.1: version "2.7.4" resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" @@ -2338,19 +2326,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -event-stream@=3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" - integrity sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE= - dependencies: - duplexer "~0.1.1" - from "~0" - map-stream "~0.1.0" - pause-stream "0.0.11" - split "0.3" - stream-combiner "~0.0.4" - through "~2.3.1" - event-target-shim@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -2447,17 +2422,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" - -from@~0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" - integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= +follow-redirects@^1.14.0: + version "1.14.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379" + integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g== fs-extra@^10.0.0: version "10.0.0" @@ -3054,11 +3022,6 @@ magic-string@^0.25.0, magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" -map-stream@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" - integrity sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ= - markdown-it-emoji@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-2.0.0.tgz#3164ad4c009efd946e98274f7562ad611089a231" @@ -3164,11 +3127,6 @@ mri@^1.1.0: resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.6.tgz#49952e1044db21dbf90f6cd92bc9c9a777d415a6" integrity sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ== -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -3184,11 +3142,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -node-cleanup@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" - integrity sha1-esGavSl+Caf3KnFUXZUbUX5N3iw= - node-releases@^1.1.75: version "1.1.75" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" @@ -3324,13 +3277,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pause-stream@0.0.11: - version "0.0.11" - resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" - integrity sha1-/lo0sMvOErWqaitAPuLnO2AvFEU= - dependencies: - through "~2.3" - picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" @@ -3409,13 +3355,6 @@ prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" -ps-tree@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" - integrity sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA== - dependencies: - event-stream "=3.3.4" - punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -3659,21 +3598,20 @@ revolt-api@0.5.3-alpha.0-patch.0: resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.0-patch.0.tgz#158556832843bb06cb06a4df50ffca24ab64be3b" integrity sha512-76l+kGyrUy6uGMSIziyAHE27r9gD97OEh5gSzb2OJRsQM55TN0NurAsfFIEiB9hUzDDlwsXchtJiqdS4UVAwQw== -revolt.js@5.1.0-alpha.4: - version "5.1.0-alpha.4" - resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.4.tgz#a42ea910352dd475adfed74e18f63b046cc152d4" - integrity sha512-Hxeu748qBOUkYV5oENMqpzZndJizMLwEWl9w/ahxLaxQrGVM1R1P1eKc5VU1h+4MfXbWe+Q5TS0wFZAM5Um6EA== +revolt.js@5.1.0-alpha.6: + version "5.1.0-alpha.6" + resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.6.tgz#bdd1c9f3bdd7e0f45e309a3e1fa5239138e1cb1a" + integrity sha512-XqdP24tGc+En9M8ccWkk74z/v2DBtH7OboTbFQBQTjWIT4fLMP/ox+GLdDVWSF7Zg6M/xPrMbg4oL/nP+xqZHQ== dependencies: - axios "^0.19.2" + axios "^0.21.4" eventemitter3 "^4.0.7" exponential-backoff "^3.1.0" isomorphic-ws "^4.0.1" lodash.defaultsdeep "^4.6.1" lodash.isequal "^4.5.0" mobx "^6.3.2" - tsc-watch "^4.1.0" ulid "^2.3.0" - ws "^7.2.1" + ws "^8.2.2" rimraf@^3.0.2: version "3.0.2" @@ -3877,30 +3815,11 @@ sourcemap-codec@^1.4.4: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== -split@0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" - integrity sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8= - dependencies: - through "2" - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -stream-combiner@~0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" - integrity sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ= - dependencies: - duplexer "~0.1.1" - -string-argv@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.1.2.tgz#c5b7bc03fb2b11983ba3a72333dd0559e77e4738" - integrity sha512-mBqPGEOMNJKXRo7z0keX0wlAhbBAjilUdPW13nN0PecVryZxdHIeM7TqbsSUA7VYuS00HGC6mojP7DlQzfa9ZA== - string-width@^4.2.0: version "4.2.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" @@ -4044,11 +3963,6 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -through@2, through@~2.3, through@~2.3.1: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - tiny-invariant@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" @@ -4095,17 +4009,6 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -tsc-watch@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/tsc-watch/-/tsc-watch-4.5.0.tgz#d6884b932822b2c2ccd37f1c1f3748304566a474" - integrity sha512-aXhN4jY+1YEcn/NwCQ/+fHqU43EqOpW+pS+933EPsVEsrKhvyrodPDIjQsk1a1niFrabAK3RIBrRbAslVefEbQ== - dependencies: - cross-spawn "^7.0.3" - node-cleanup "^2.1.2" - ps-tree "^1.2.0" - string-argv "^0.1.1" - strip-ansi "^6.0.0" - tslib@^1.8.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -4459,10 +4362,10 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -ws@^7.2.1: - version "7.5.4" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.4.tgz#56bfa20b167427e138a7795de68d134fe92e21f9" - integrity sha512-zP9z6GXm6zC27YtspwH99T3qTG7bBFv2VIkeHstMLrLlDJuzA7tQ5ls3OJ1hOGGCzTQPniNJoHXIAOS0Jljohg== +ws@^8.2.2: + version "8.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.2.tgz#ca684330c6dd6076a737250ed81ac1606cb0a63e" + integrity sha512-Q6B6H2oc8QY3llc3cB8kVmQ6pnJWVQbP7Q5algTcIxx7YEpc0oU4NBVHlztA7Ekzfhw2r0rPducMUiCGWKQRzw== yallist@^4.0.0: version "4.0.0"