From 8bb0b84b5e2260dc9bbd6cf90ca4dddeb91b1a02 Mon Sep 17 00:00:00 2001 From: Rory& Date: Sat, 14 Mar 2026 05:43:24 +0100 Subject: [PATCH] Shorten imports --- assets/openapi.json | Bin 963624 -> 963624 bytes assets/schemas.json | Bin 426526 -> 426526 bytes .../#channel_id/messages/#message_id/index.ts | 2 +- .../connections/#connection_name/authorize.ts | 2 +- src/api/routes/guilds/#guild_id/widget.png.ts | 2 +- src/cdn/routes/app-assets.ts | 2 +- src/cdn/routes/app-icons.ts | 2 +- src/cdn/routes/attachments.ts | 4 +-- src/cdn/routes/avatar-decoration-presets.ts | 2 +- src/cdn/routes/avatars.ts | 2 +- src/cdn/routes/badge-icons.ts | 2 +- src/cdn/routes/banners.ts | 2 +- src/cdn/routes/channel-icons.ts | 2 +- src/cdn/routes/discover-splashes.ts | 2 +- src/cdn/routes/discovery-splashes.ts | 2 +- src/cdn/routes/emojis.ts | 2 +- src/cdn/routes/guild-profiles.ts | 2 +- src/cdn/routes/icons.ts | 2 +- src/cdn/routes/role-icons.ts | 2 +- src/cdn/routes/splashes.ts | 2 +- src/cdn/routes/stickers.ts | 2 +- src/cdn/routes/team-icons.ts | 2 +- src/cdn/util/basicCrdFileRouter.ts | 2 +- src/connections/BattleNet/index.ts | 4 +-- src/connections/Discord/index.ts | 4 +-- src/connections/EpicGames/index.ts | 4 +-- src/connections/Facebook/index.ts | 4 +-- src/connections/GitHub/index.ts | 4 +-- src/connections/Reddit/index.ts | 4 +-- src/connections/Spotify/index.ts | 4 +-- src/connections/Twitch/index.ts | 4 +-- src/connections/Twitter/index.ts | 4 +-- src/connections/Xbox/index.ts | 4 +-- src/connections/Youtube/index.ts | 4 +-- src/gateway/Server.ts | 2 +- src/gateway/listener/listener.ts | 4 +-- src/gateway/opcodes/VoiceStateUpdate.ts | 2 +- src/schemas/gateway/LazyRequestSchema.ts | 29 ---------------- .../responses/AccountStandingResponse.ts | 3 +- .../responses/DiscoverableGuildsResponse.ts | 3 +- .../EmailDomainLookupVerifyCodeResponse.ts | 3 +- .../responses/GuildMessagesSearchResponse.ts | 3 +- .../responses/GuildRecommendationsResponse.ts | 3 +- .../responses/HubDirectoryEntriesResponse.ts | 3 +- .../responses/MemberJoinGuildResponse.ts | 2 +- src/schemas/responses/TokenResponse.ts | 3 +- src/schemas/responses/TypedResponses.ts | 3 +- .../responses/WebhookCreateResponse.ts | 3 +- .../uncategorised/ConnectedAccountSchema.ts | 20 +++++++++-- .../GuildSubscriptionsBulkSchema.ts | 31 ++++++++++++++++-- src/util/connections/ConnectionConfig.ts | 2 +- src/util/connections/RefreshableConnection.ts | 2 +- src/util/entities/Attachment.ts | 2 +- src/util/entities/BaseClass.ts | 7 ++-- src/util/entities/ConnectedAccount.ts | 2 +- src/util/entities/Member.ts | 3 +- src/util/entities/Message.ts | 2 +- src/util/interfaces/ConnectedAccount.ts | 18 ---------- src/util/util/Config.ts | 2 +- src/webrtc/Server.ts | 2 +- 60 files changed, 124 insertions(+), 123 deletions(-) diff --git a/assets/openapi.json b/assets/openapi.json index c2718ee8dea94ca5563152e1c0c39cfd4d2de9c5..85292bc338782531e0d4db1501f4b4fbd9870c5f 100644 GIT binary patch delta 1150 zcmZWoT}V@580MUP-}%nwrt>2Ab2fBNgd%aNO*Al33^T}qSWuCQ5dF|vBoT!m1xe<` z zw;Lms_FElJ>~IQSIt4Foyd|{)L|!ljiu&mZT=xqV4#5i>_lON0cZHG7XqDZm8=mru zIOW%Mf6m+q3W8Vt_P`2>Y9fR08nJ+FgRfypg5ID=u;~ezuGHFm4Lgp;$(AAKn-zkq9Np#@EfA|?UNuQ5c=qr` z!+P2UTo0yJ+4cDS1DVX8GexGBT`7nzLa`23T~vv#jCYCn`Zt--=P@M58AY?6E|lao zG*x%x!nliWW^a{p2ugqOtxk?fkD;ekuz-1q8X!DF_W?icg2Io2Q|(Dg_^^gnxipT9 znB3idNM10?xZX{plGaWc8*1Smww|VY^Jng@mnAGcM}2t>b!bU}KZlu{dqMHk0Ch7B z5xFW?v)(y_4LoDq|N7hXGSLpgSf5w}9>3^-#3B7|HHpQzG)nK}k?q8;5h4NRfbel* zfaU>e*@>4eR70CW0nV^?pT3kehMd$k;EfqNodphQ`^bPaccMfm51UOAnoaCypN5_i zByC>VL7Cu6fNf=`EbYhpK~@0!wbZ;D6%f1sEhi}qMa|gc;TG)_j#W0>76O-ohj=N z>3AciXn6Lp;-JnZWuEPPNT-m_K2)<(x*vuThMw=>!-}(7J+7$dON{ukb(sGMfbx&B z!2l~YHbnjOy^VEDwe`dl>WSHQO#hipGFFNkx*EQCpX~%>p?8M4$4~y+CG`kGI=LM%v_MK`aVMu?kq|?tbOB6BI8E#rcW6M7A~;fLjb;i$ z7p{KBy;xancVX_fT%G3hL1?}Nbmsv@ zH~OOmrut6Gc?v1nju{%k3dN6}5wKG%4HN&d{9D%W*b8u?@2PNkOGNm6d!uk>uu2Wk zsWB*6VjVS~+~_*Osp zSqHKYj6u*ijm9CP=OU%Et)}D z-0TaZO;Z9XQcJn{V7ReSD2Y8pKZb75i$$pP7DU}$n|17E?tJ&>obR0P1Ou*Mz%}SM zF1a&=JA-V_C0^_az)#e#P#uGLiW{fPNFELhQ-$|KVCcS20OuN@3|mHN0Uu1w z6~2043Kmxo#%(n_#pG79#ZbH+>^TbQnA!|Ggnu{jzrYlmlJvCR7*epvuGrc_nj%6P zeRr35g(UV9*}%zuk}uW{&|br`xrE?A{To%W+M{Z?$XI@qobm1%E!vbSu7+s`SYAY7 zaC!_};`s!<=vX-sJzwaQ%~DVQpp8(xBk}9*8z6aeNxl) z6ouiR5J|^#Dm%gbhAtjEVK&Yq#q-FAERnPcYEw-xxrRz%B7LQfsa=*+d<2}hum_UG z!F|vdZ!qfO&}lUT)5e*G-_NK9E?i(aV)QV~x=bL`Y9X!W%-oeLX@$xJOa1s749Dx} zt0kwBj$=8}Q~f3+FS{%Mm{4!S9SagKJ-ZGRa=?`XO}1N&ihaHkw;5Y2tt6a%GXHTYKb3e%x#joJ9Zh?8*$FlgWUFRjA5=G@l zXt8FfCQLopJ;YSL_-p-g_NPC~UIKG4vP!Rc4|hf6{N8+pW0pYiy8W5r5o0gop)x&? z%@m?-br9MEwiMrc=}a delta 1221 zcmZXTe@IhN6vw&m{+Mp+UcN2cOteW#DomlW1>rIbOsUl$E+`rn1VND5AAu5SEzKY+ zZg#?G8fE_kIzqWvI4p!@l?I_^%MEL12+k?*H5ei% z8zI}2BhBZ5nh{hW>|^+?yp>jv38g-OI6?o783a7c4u2^vPqn3dao(O%!o>X<{D3Ie zHY$RwXotiUaf?_S-*PHR$R}Pb;W?}MF!2YsZ*bU9AztQ@nJgs}`#e?f(4x8F&M&l! z`_~+NdY=Q@Vu-?W9A8e;1xYtsjJn8z+B+q1^$;o)*)=4XtJIaUKGc!8Lpf9jN;9aw zKwPkLirB=t7V^qGg(SZna;K>d%h#C!E8Vn6Or9qTZl!EyLqcw7fSLjV^^j(Z`EazK zjH`#~NnDx(ri$ct^vA@O*^_*uf;}bA)WT_MB}=qG6b_N78Y7aZ6|QR75cRLgBW!98 zCv~ZwNzcjKDy4&+NQdb#bwOJbqM~Dh%rT{> zLS0B3^=<9fI)DoyXrt1L1K7?7^QA?1VhcYrn+J6xC_Al1RDU9Ob)~jM-x{psH@;?x z=5M4+^{>o4T#7tA>1Euzwmb8~C4NYv;YBjB1Ej#$N(+2oQ zP}U|MAz5^*wpL~ask;jNN3d0Rb!uvy%0&IxfaF2>2$Uj&M~f`IJx(fmoGekPjH}p0 je6ME}IZAweVmN!8*#r-;hCQZmiWVgMB!WwwY=Zp<=T~@6 diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts index 96ff98e18..233d13815 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts @@ -34,7 +34,7 @@ import { import { Request, Response, Router } from "express"; import { HTTPError } from "lambert-server"; import multer from "multer"; -import { handleMessage, postHandleMessage, route } from "../../../../../util"; +import { handleMessage, postHandleMessage, route } from "@spacebar/api"; import { MessageCreateAttachment, MessageCreateCloudAttachment, MessageCreateSchema, MessageEditSchema, ChannelType } from "@spacebar/schemas"; const router = Router({ mergeParams: true }); diff --git a/src/api/routes/connections/#connection_name/authorize.ts b/src/api/routes/connections/#connection_name/authorize.ts index b74fd8619..7d3d03eb4 100644 --- a/src/api/routes/connections/#connection_name/authorize.ts +++ b/src/api/routes/connections/#connection_name/authorize.ts @@ -18,7 +18,7 @@ import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; -import { ConnectionStore, FieldErrors } from "../../../../util"; +import { ConnectionStore, FieldErrors } from "@spacebar/util"; const router = Router({ mergeParams: true }); diff --git a/src/api/routes/guilds/#guild_id/widget.png.ts b/src/api/routes/guilds/#guild_id/widget.png.ts index 875761e64..ee623214c 100644 --- a/src/api/routes/guilds/#guild_id/widget.png.ts +++ b/src/api/routes/guilds/#guild_id/widget.png.ts @@ -24,7 +24,7 @@ import { Request, Response, Router } from "express"; import fs from "fs"; import { HTTPError } from "lambert-server"; import path from "path"; -import { storage } from "../../../../cdn/util/Storage"; +import { storage } from "@spacebar/cdn"; const router: Router = Router({ mergeParams: true }); diff --git a/src/cdn/routes/app-assets.ts b/src/cdn/routes/app-assets.ts index 572cb3aac..149d8b351 100644 --- a/src/cdn/routes/app-assets.ts +++ b/src/cdn/routes/app-assets.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/app-icons.ts b/src/cdn/routes/app-icons.ts index b8ab98b97..b67bc1fb0 100644 --- a/src/cdn/routes/app-icons.ts +++ b/src/cdn/routes/app-icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/attachments.ts b/src/cdn/routes/attachments.ts index 86a7f0c89..87d96a4c6 100644 --- a/src/cdn/routes/attachments.ts +++ b/src/cdn/routes/attachments.ts @@ -21,8 +21,8 @@ import { Request, Response, Router } from "express"; import imageSize from "image-size"; import { HTTPError } from "lambert-server"; import { multer } from "../util/multer"; -import { storage } from "../util/Storage"; -import { CloudAttachment } from "../../util/entities/CloudAttachment"; +import { storage } from "@spacebar/cdn"; +import { CloudAttachment } from "@spacebar/util"; import { fileTypeFromBuffer } from "file-type"; import { cache } from "../util/cache"; diff --git a/src/cdn/routes/avatar-decoration-presets.ts b/src/cdn/routes/avatar-decoration-presets.ts index 736a281d1..591e0ab17 100644 --- a/src/cdn/routes/avatar-decoration-presets.ts +++ b/src/cdn/routes/avatar-decoration-presets.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { HTTPError } from "lambert-server"; import { fileTypeFromBuffer } from "file-type"; import { cache } from "../util/cache"; diff --git a/src/cdn/routes/avatars.ts b/src/cdn/routes/avatars.ts index 793bc45bb..f2d539bdc 100644 --- a/src/cdn/routes/avatars.ts +++ b/src/cdn/routes/avatars.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/badge-icons.ts b/src/cdn/routes/badge-icons.ts index 829baeb18..33134e1a4 100644 --- a/src/cdn/routes/badge-icons.ts +++ b/src/cdn/routes/badge-icons.ts @@ -17,7 +17,7 @@ */ import { Router, Response, Request } from "express"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { HTTPError } from "lambert-server"; import { fileTypeFromBuffer } from "file-type"; import { cache } from "../util/cache"; diff --git a/src/cdn/routes/banners.ts b/src/cdn/routes/banners.ts index 211643f9d..979bdad02 100644 --- a/src/cdn/routes/banners.ts +++ b/src/cdn/routes/banners.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/channel-icons.ts b/src/cdn/routes/channel-icons.ts index 946759dd9..3b85d4e46 100644 --- a/src/cdn/routes/channel-icons.ts +++ b/src/cdn/routes/channel-icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/discover-splashes.ts b/src/cdn/routes/discover-splashes.ts index d9822feb6..e9c07cb19 100644 --- a/src/cdn/routes/discover-splashes.ts +++ b/src/cdn/routes/discover-splashes.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/discovery-splashes.ts b/src/cdn/routes/discovery-splashes.ts index c9f8ddf7f..9d6d81c70 100644 --- a/src/cdn/routes/discovery-splashes.ts +++ b/src/cdn/routes/discovery-splashes.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/emojis.ts b/src/cdn/routes/emojis.ts index 761ad00e6..f11af3bad 100644 --- a/src/cdn/routes/emojis.ts +++ b/src/cdn/routes/emojis.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/guild-profiles.ts b/src/cdn/routes/guild-profiles.ts index 279b43611..9d27debf3 100644 --- a/src/cdn/routes/guild-profiles.ts +++ b/src/cdn/routes/guild-profiles.ts @@ -21,7 +21,7 @@ import crypto from "crypto"; import { Request, Response, Router } from "express"; import { HTTPError } from "lambert-server"; import { multer } from "../util/multer"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { cache } from "../util/cache"; diff --git a/src/cdn/routes/icons.ts b/src/cdn/routes/icons.ts index c98313f41..6ddd49e9d 100644 --- a/src/cdn/routes/icons.ts +++ b/src/cdn/routes/icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/role-icons.ts b/src/cdn/routes/role-icons.ts index 2aaa6197d..f169309c8 100644 --- a/src/cdn/routes/role-icons.ts +++ b/src/cdn/routes/role-icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/splashes.ts b/src/cdn/routes/splashes.ts index 8a501ec4d..a10709d71 100644 --- a/src/cdn/routes/splashes.ts +++ b/src/cdn/routes/splashes.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/stickers.ts b/src/cdn/routes/stickers.ts index 5821db67f..a92069493 100644 --- a/src/cdn/routes/stickers.ts +++ b/src/cdn/routes/stickers.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/routes/team-icons.ts b/src/cdn/routes/team-icons.ts index 103974daa..c0e7e7854 100644 --- a/src/cdn/routes/team-icons.ts +++ b/src/cdn/routes/team-icons.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/cdn/util/basicCrdFileRouter.ts b/src/cdn/util/basicCrdFileRouter.ts index d489f373e..7490d5465 100644 --- a/src/cdn/util/basicCrdFileRouter.ts +++ b/src/cdn/util/basicCrdFileRouter.ts @@ -18,7 +18,7 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@spacebar/util"; -import { storage } from "../util/Storage"; +import { storage } from "@spacebar/cdn"; import { fileTypeFromBuffer } from "file-type"; import { HTTPError } from "lambert-server"; import crypto from "crypto"; diff --git a/src/connections/BattleNet/index.ts b/src/connections/BattleNet/index.ts index 843ab79b3..f7d08cbe8 100644 --- a/src/connections/BattleNet/index.ts +++ b/src/connections/BattleNet/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { BattleNetSettings } from "./BattleNetSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface BattleNetConnectionUser { sub: string; diff --git a/src/connections/Discord/index.ts b/src/connections/Discord/index.ts index ab44f4b31..f209a81bd 100644 --- a/src/connections/Discord/index.ts +++ b/src/connections/Discord/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { DiscordSettings } from "./DiscordSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface UserResponse { id: string; diff --git a/src/connections/EpicGames/index.ts b/src/connections/EpicGames/index.ts index 69c44cb04..959192e64 100644 --- a/src/connections/EpicGames/index.ts +++ b/src/connections/EpicGames/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { EpicGamesSettings } from "./EpicGamesSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; export interface UserResponse { accountId: string; diff --git a/src/connections/Facebook/index.ts b/src/connections/Facebook/index.ts index b661cbe87..29317c2e6 100644 --- a/src/connections/Facebook/index.ts +++ b/src/connections/Facebook/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { FacebookSettings } from "./FacebookSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; export interface FacebookErrorResponse { error: { diff --git a/src/connections/GitHub/index.ts b/src/connections/GitHub/index.ts index 42dc0724f..df64912ae 100644 --- a/src/connections/GitHub/index.ts +++ b/src/connections/GitHub/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { GitHubSettings } from "./GitHubSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface UserResponse { login: string; diff --git a/src/connections/Reddit/index.ts b/src/connections/Reddit/index.ts index 14faf4a6e..781e097a1 100644 --- a/src/connections/Reddit/index.ts +++ b/src/connections/Reddit/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { RedditSettings } from "./RedditSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; export interface UserResponse { verified: boolean; diff --git a/src/connections/Spotify/index.ts b/src/connections/Spotify/index.ts index e1381cf2f..2186396bb 100644 --- a/src/connections/Spotify/index.ts +++ b/src/connections/Spotify/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; +import { ConnectedAccount, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; import wretch from "wretch"; import { SpotifySettings } from "./SpotifySettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; export interface UserResponse { display_name: string; diff --git a/src/connections/Twitch/index.ts b/src/connections/Twitch/index.ts index 84e8b3c04..5952caf1a 100644 --- a/src/connections/Twitch/index.ts +++ b/src/connections/Twitch/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; +import { ConnectedAccount, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; import wretch from "wretch"; import { TwitchSettings } from "./TwitchSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface TwitchConnectionUserResponse { data: { diff --git a/src/connections/Twitter/index.ts b/src/connections/Twitter/index.ts index 46b9289a0..3c79515be 100644 --- a/src/connections/Twitter/index.ts +++ b/src/connections/Twitter/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; +import { ConnectedAccount, ConnectionLoader, DiscordApiErrors, RefreshableConnection } from "@spacebar/util"; import wretch from "wretch"; import { TwitterSettings } from "./TwitterSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface TwitterUserResponse { data: { diff --git a/src/connections/Xbox/index.ts b/src/connections/Xbox/index.ts index 184fe7637..59d4a0054 100644 --- a/src/connections/Xbox/index.ts +++ b/src/connections/Xbox/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { XboxSettings } from "./XboxSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface XboxUserResponse { IssueInstant: string; diff --git a/src/connections/Youtube/index.ts b/src/connections/Youtube/index.ts index de452dffa..2db9289f3 100644 --- a/src/connections/Youtube/index.ts +++ b/src/connections/Youtube/index.ts @@ -16,10 +16,10 @@ along with this program. If not, see . */ -import { ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; +import { ConnectedAccount, Connection, ConnectionLoader, DiscordApiErrors } from "@spacebar/util"; import wretch from "wretch"; import { YoutubeSettings } from "./YoutubeSettings"; -import { ConnectionCallbackSchema } from "@spacebar/schemas"; +import { ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema } from "@spacebar/schemas"; interface YouTubeConnectionChannelListResult { items: { diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts index c6419cfa8..72faa9836 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts @@ -22,7 +22,7 @@ import { checkToken, closeDatabase, Config, initDatabase, initEvent, Rights } fr import ws from "ws"; import { Connection, openConnections } from "./events/Connection"; import http from "http"; -import { cleanupOnStartup } from "./util/Utils"; +import { cleanupOnStartup } from "./util"; import { randomString } from "@spacebar/api"; import { setInterval } from "timers"; diff --git a/src/gateway/listener/listener.ts b/src/gateway/listener/listener.ts index 3a7b626c2..112f55bbf 100644 --- a/src/gateway/listener/listener.ts +++ b/src/gateway/listener/listener.ts @@ -31,11 +31,9 @@ import { Recipient, Relationship, } from "@spacebar/util"; -import { CLOSECODES, OPCODES } from "../util/Constants"; -import { Send } from "../util/Send"; +import { CLOSECODES, OPCODES, Send } from "../util"; import { WebSocket } from "@spacebar/gateway"; import { Channel as AMQChannel } from "amqplib"; -import * as console from "node:console"; import { PublicMember, RelationshipType } from "@spacebar/schemas"; import { bgRedBright } from "picocolors"; diff --git a/src/gateway/opcodes/VoiceStateUpdate.ts b/src/gateway/opcodes/VoiceStateUpdate.ts index 89ead6e7e..678afad8d 100644 --- a/src/gateway/opcodes/VoiceStateUpdate.ts +++ b/src/gateway/opcodes/VoiceStateUpdate.ts @@ -18,7 +18,7 @@ import { Payload, WebSocket } from "@spacebar/gateway"; import { Config, emitEvent, Guild, Member, VoiceServerUpdateEvent, VoiceState, VoiceStateUpdateEvent } from "@spacebar/util"; -import { genVoiceToken } from "../util/SessionUtils"; +import { genVoiceToken } from "@spacebar/gateway"; import { check } from "./instanceOf"; import { Region, VoiceStateUpdateSchema } from "@spacebar/schemas"; // TODO: check if a voice server is setup diff --git a/src/schemas/gateway/LazyRequestSchema.ts b/src/schemas/gateway/LazyRequestSchema.ts index fcefe680e..0433355cc 100644 --- a/src/schemas/gateway/LazyRequestSchema.ts +++ b/src/schemas/gateway/LazyRequestSchema.ts @@ -15,32 +15,3 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ - -export interface LazyRequestSchema { - guild_id: string; - channels?: { - /** - * @items.type integer - * @minItems 2 - * @maxItems 2 - */ - [key: string]: number[][]; // puyo: changed from [number, number] because it breaks openapi - }; - activities?: boolean; - threads?: boolean; - typing?: true; - members?: string[]; - member_updates?: boolean; - thread_member_lists?: unknown[]; -} - -export const LazyRequestSchema = { - guild_id: String, - $activities: Boolean, - $channels: Object, - $typing: Boolean, - $threads: Boolean, - $members: [] as string[], - $member_updates: Boolean, - $thread_member_lists: [] as unknown[], -}; diff --git a/src/schemas/responses/AccountStandingResponse.ts b/src/schemas/responses/AccountStandingResponse.ts index bbb8cd85d..6f29ebef7 100644 --- a/src/schemas/responses/AccountStandingResponse.ts +++ b/src/schemas/responses/AccountStandingResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Attachment } from "../../util/entities"; +// TODO: remove dependency on entities... +import { Attachment } from "@spacebar/util"; export enum AccountStandingState { ALL_GOOD = 100, diff --git a/src/schemas/responses/DiscoverableGuildsResponse.ts b/src/schemas/responses/DiscoverableGuildsResponse.ts index 3e22c992a..02c46f1c6 100644 --- a/src/schemas/responses/DiscoverableGuildsResponse.ts +++ b/src/schemas/responses/DiscoverableGuildsResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Guild } from "../../util/entities"; +// TODO: remove dependency on entities +import { Guild } from "@spacebar/util"; export interface DiscoverableGuildsResponse { total: number; diff --git a/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts b/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts index 6efeaba63..b2400e95d 100644 --- a/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts +++ b/src/schemas/responses/EmailDomainLookupVerifyCodeResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Guild } from "../../util/entities"; +// TODO: remove dependency on entities +import { Guild } from "@spacebar/util"; export interface EmailDomainLookupVerifyCodeResponse { guild: Guild; diff --git a/src/schemas/responses/GuildMessagesSearchResponse.ts b/src/schemas/responses/GuildMessagesSearchResponse.ts index 6777ad8a9..555092ee2 100644 --- a/src/schemas/responses/GuildMessagesSearchResponse.ts +++ b/src/schemas/responses/GuildMessagesSearchResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Attachment, Role } from "../../util/entities"; +// TODO: remove dependency on entities +import { Attachment, Role } from "@spacebar/util"; import { ActionRowComponent, Embed, MessageType, Poll, PublicUser } from "@spacebar/schemas"; export interface GuildMessagesSearchMessage { diff --git a/src/schemas/responses/GuildRecommendationsResponse.ts b/src/schemas/responses/GuildRecommendationsResponse.ts index 04f9d1efc..c8fed0721 100644 --- a/src/schemas/responses/GuildRecommendationsResponse.ts +++ b/src/schemas/responses/GuildRecommendationsResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Guild } from "../../util/entities"; +// TODO: remove dependency on entities +import { Guild } from "@spacebar/util"; export interface GuildRecommendationsResponse { recommended_guilds: Guild[]; diff --git a/src/schemas/responses/HubDirectoryEntriesResponse.ts b/src/schemas/responses/HubDirectoryEntriesResponse.ts index 677199d37..c19b6a141 100644 --- a/src/schemas/responses/HubDirectoryEntriesResponse.ts +++ b/src/schemas/responses/HubDirectoryEntriesResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { Guild } from "../../util/entities"; +// TODO: remove dependency on entities +import { Guild } from "@spacebar/util"; export interface HubDirectoryEntry { author_id: string; diff --git a/src/schemas/responses/MemberJoinGuildResponse.ts b/src/schemas/responses/MemberJoinGuildResponse.ts index 1f9bc8c9a..75081656b 100644 --- a/src/schemas/responses/MemberJoinGuildResponse.ts +++ b/src/schemas/responses/MemberJoinGuildResponse.ts @@ -16,7 +16,7 @@ along with this program. If not, see . */ -import { Emoji, Role, Sticker } from "../../util/entities"; +import { Emoji, Role, Sticker } from "@spacebar/util"; import { GuildCreateResponse } from "@spacebar/schemas"; export interface MemberJoinGuildResponse { diff --git a/src/schemas/responses/TokenResponse.ts b/src/schemas/responses/TokenResponse.ts index 0af06fd11..4a0c0834e 100644 --- a/src/schemas/responses/TokenResponse.ts +++ b/src/schemas/responses/TokenResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { BackupCode, UserSettings } from "../../util/entities"; +// TODO: remove dependency on entities +import { BackupCode, UserSettings } from "@spacebar/util"; export interface TokenResponse { token: string; diff --git a/src/schemas/responses/TypedResponses.ts b/src/schemas/responses/TypedResponses.ts index 13956ec86..13143a9f9 100644 --- a/src/schemas/responses/TypedResponses.ts +++ b/src/schemas/responses/TypedResponses.ts @@ -18,10 +18,11 @@ import { GeneralConfiguration, LimitsConfiguration } from "../../util/config/types"; import { DmChannelDTO } from "../../util/dtos"; -import { Application, BackupCode, Categories, Channel, Emoji, Guild, Invite, Member, Message, Role, Sticker, StickerPack, Template, Webhook } from "../../util/entities"; +import { Application, BackupCode, Categories, Channel, Emoji, Guild, Invite, Member, Message, Role, Sticker, StickerPack, Template, Webhook } from "@spacebar/util"; import { GuildVoiceRegion } from "./GuildVoiceRegionsResponse"; import { GuildBansResponse, GuildCreateResponse, PrivateUser, PublicMember, PublicUser } from "@spacebar/schemas"; +// TODO: remove this entire file! // removes internal properties from the guild class export type APIGuild = Omit; diff --git a/src/schemas/responses/WebhookCreateResponse.ts b/src/schemas/responses/WebhookCreateResponse.ts index 1246c7422..08d997fb9 100644 --- a/src/schemas/responses/WebhookCreateResponse.ts +++ b/src/schemas/responses/WebhookCreateResponse.ts @@ -16,7 +16,8 @@ along with this program. If not, see . */ -import { User, Webhook } from "../../util/entities"; +// TODO: remove dependency on entities +import { User, Webhook } from "@spacebar/util"; export interface WebhookCreateResponse { user: User; diff --git a/src/schemas/uncategorised/ConnectedAccountSchema.ts b/src/schemas/uncategorised/ConnectedAccountSchema.ts index c1d24d70a..a754f9f43 100644 --- a/src/schemas/uncategorised/ConnectedAccountSchema.ts +++ b/src/schemas/uncategorised/ConnectedAccountSchema.ts @@ -16,8 +16,6 @@ along with this program. If not, see . */ -import { ConnectedAccountTokenData } from "../../util/interfaces"; - export interface ConnectedAccountSchema { external_id: string; user_id: string; @@ -34,3 +32,21 @@ export interface ConnectedAccountSchema { metadata_visibility?: number; two_way_link?: boolean; } + +export interface ConnectedAccountCommonOAuthTokenResponse { + access_token: string; + token_type: string; + scope: string; + refresh_token?: string; + expires_in?: number; +} + +export interface ConnectedAccountTokenData { + access_token: string; + token_type?: string; + scope?: string; + refresh_token?: string; + expires_in?: number; + expires_at?: number; + fetched_at: number; +} diff --git a/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts b/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts index 32be9dd0a..272110c5f 100644 --- a/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts +++ b/src/schemas/uncategorised/GuildSubscriptionsBulkSchema.ts @@ -1,5 +1,3 @@ -import { LazyRequestSchema } from "../gateway/LazyRequestSchema"; - export interface GuildSubscriptionsBulkSchema { subscriptions: { [key: string]: GuildSubscriptionSchema }; } @@ -9,3 +7,32 @@ export type GuildSubscriptionSchema = Omit; export const GuildSubscriptionsBulkSchema = { $subscriptions: Object, }; + +export interface LazyRequestSchema { + guild_id: string; + channels?: { + /** + * @items.type integer + * @minItems 2 + * @maxItems 2 + */ + [key: string]: number[][]; // puyo: changed from [number, number] because it breaks openapi + }; + activities?: boolean; + threads?: boolean; + typing?: true; + members?: string[]; + member_updates?: boolean; + thread_member_lists?: unknown[]; +} + +export const LazyRequestSchema = { + guild_id: String, + $activities: Boolean, + $channels: Object, + $typing: Boolean, + $threads: Boolean, + $members: [] as string[], + $member_updates: Boolean, + $thread_member_lists: [] as unknown[], +}; diff --git a/src/util/connections/ConnectionConfig.ts b/src/util/connections/ConnectionConfig.ts index a5e0095ad..c5da3878a 100644 --- a/src/util/connections/ConnectionConfig.ts +++ b/src/util/connections/ConnectionConfig.ts @@ -17,7 +17,7 @@ */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { ConnectionConfigEntity } from "../entities/ConnectionConfigEntity"; +import { ConnectionConfigEntity } from "../entities"; import { OrmUtils } from "../imports"; let config: any; diff --git a/src/util/connections/RefreshableConnection.ts b/src/util/connections/RefreshableConnection.ts index 32cf36acd..3d7761f71 100644 --- a/src/util/connections/RefreshableConnection.ts +++ b/src/util/connections/RefreshableConnection.ts @@ -17,8 +17,8 @@ */ import { ConnectedAccount } from "../entities"; -import { ConnectedAccountCommonOAuthTokenResponse } from "../interfaces"; import { Connection } from "./Connection"; +import { ConnectedAccountCommonOAuthTokenResponse } from "@spacebar/schemas"; /** * A connection that can refresh its token. diff --git a/src/util/entities/Attachment.ts b/src/util/entities/Attachment.ts index c6858eb8e..9dc9c3ac0 100644 --- a/src/util/entities/Attachment.ts +++ b/src/util/entities/Attachment.ts @@ -18,7 +18,7 @@ import { BeforeRemove, Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; import { URL } from "url"; -import { deleteFile } from "../util/cdn"; +import { deleteFile } from "../util"; import { BaseClass } from "./BaseClass"; import { getUrlSignature, NewUrlUserSignatureData, NewUrlSignatureData } from "../Signing"; diff --git a/src/util/entities/BaseClass.ts b/src/util/entities/BaseClass.ts index ad8338e77..24a3aee18 100644 --- a/src/util/entities/BaseClass.ts +++ b/src/util/entities/BaseClass.ts @@ -17,10 +17,9 @@ */ import { BaseEntity, BeforeInsert, BeforeUpdate, Column, ColumnOptions, FindOptionsWhere, ObjectIdColumn, PrimaryColumn } from "typeorm"; -import { Snowflake } from "../util/Snowflake"; -import { getDatabase } from "../util/Database"; -import { OrmUtils } from "../imports/OrmUtils"; -import { annotationsKey, JsonNumber } from "../util/Decorators"; +import { Snowflake, getDatabase } from "../util"; +import { OrmUtils } from "../imports"; +import { annotationsKey } from "../util/Decorators"; export class BaseClassWithoutId extends BaseEntity { private get construct() { diff --git a/src/util/entities/ConnectedAccount.ts b/src/util/entities/ConnectedAccount.ts index 7c5ffb550..6a5fed759 100644 --- a/src/util/entities/ConnectedAccount.ts +++ b/src/util/entities/ConnectedAccount.ts @@ -17,9 +17,9 @@ */ import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; -import { ConnectedAccountTokenData } from "../interfaces"; import { BaseClass } from "./BaseClass"; import { User } from "./User"; +import { ConnectedAccountTokenData } from "@spacebar/schemas"; @Entity({ name: "connected_accounts", diff --git a/src/util/entities/Member.ts b/src/util/entities/Member.ts index 401c51be3..6d93cf5db 100644 --- a/src/util/entities/Member.ts +++ b/src/util/entities/Member.ts @@ -21,8 +21,7 @@ import { BeforeInsert, BeforeUpdate, Column, Entity, Index, JoinColumn, JoinTabl import { Ban, Channel, PublicGuildRelations } from "."; import { ReadyGuildDTO } from "../dtos"; import { GuildCreateEvent, GuildDeleteEvent, GuildMemberAddEvent, GuildMemberRemoveEvent, GuildMemberUpdateEvent, MessageCreateEvent } from "../interfaces"; -import { Config, emitEvent } from "../util"; -import { DiscordApiErrors } from "../util/Constants"; +import { Config, emitEvent, DiscordApiErrors } from "../util"; import { BaseClassWithoutId } from "./BaseClass"; import { Guild } from "./Guild"; import { Message } from "./Message"; diff --git a/src/util/entities/Message.ts b/src/util/entities/Message.ts index bedd5aee8..a4448a14a 100644 --- a/src/util/entities/Message.ts +++ b/src/util/entities/Message.ts @@ -20,7 +20,7 @@ import { User } from "./User"; import { Member } from "./Member"; import { Role } from "./Role"; import { Channel } from "./Channel"; -import { InteractionType } from "../interfaces/Interaction"; +import { InteractionType } from "../interfaces"; import { Application } from "./Application"; import { Column, CreateDateColumn, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, RelationId, FindOneOptions, Raw, Not, BaseEntity, In } from "typeorm"; import { BaseClass } from "./BaseClass"; diff --git a/src/util/interfaces/ConnectedAccount.ts b/src/util/interfaces/ConnectedAccount.ts index 57cda25d2..0433355cc 100644 --- a/src/util/interfaces/ConnectedAccount.ts +++ b/src/util/interfaces/ConnectedAccount.ts @@ -15,21 +15,3 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ - -export interface ConnectedAccountCommonOAuthTokenResponse { - access_token: string; - token_type: string; - scope: string; - refresh_token?: string; - expires_in?: number; -} - -export interface ConnectedAccountTokenData { - access_token: string; - token_type?: string; - scope?: string; - refresh_token?: string; - expires_in?: number; - expires_at?: number; - fetched_at: number; -} diff --git a/src/util/util/Config.ts b/src/util/util/Config.ts index 1cd24b901..27f0b4502 100644 --- a/src/util/util/Config.ts +++ b/src/util/util/Config.ts @@ -20,7 +20,7 @@ import { existsSync } from "fs"; import fs from "fs/promises"; import { OrmUtils } from ".."; import { ConfigValue } from "../config"; -import { ConfigEntity } from "../entities/Config"; +import { ConfigEntity } from "../entities"; import { JsonValue } from "@protobuf-ts/runtime"; // TODO: yaml instead of json diff --git a/src/webrtc/Server.ts b/src/webrtc/Server.ts index bc26f3d19..ff98fe57e 100644 --- a/src/webrtc/Server.ts +++ b/src/webrtc/Server.ts @@ -21,7 +21,7 @@ import { closeDatabase, Config, initDatabase, initEvent } from "@spacebar/util"; import http from "http"; import ws from "ws"; import { Connection } from "./events/Connection"; -import { loadWebRtcLibrary, mediaServer, WRTC_PORT_MAX, WRTC_PORT_MIN, WRTC_PUBLIC_IP } from "./util/MediaServer"; +import { loadWebRtcLibrary, mediaServer, WRTC_PORT_MAX, WRTC_PORT_MIN, WRTC_PUBLIC_IP } from "./util"; import { green, yellow } from "picocolors"; export class Server {