🎨 fix imports with new build script
This commit is contained in:
@@ -2,12 +2,12 @@ import "missing-native-js-functions";
|
||||
import dotenv from "dotenv";
|
||||
dotenv.config();
|
||||
import { closeDatabase, Config, initDatabase, initEvent } from "@fosscord/util";
|
||||
import { Server as WebSocketServer } from "ws";
|
||||
import ws from "ws";
|
||||
import { Connection } from "./events/Connection";
|
||||
import http from "http";
|
||||
|
||||
export class Server {
|
||||
public ws: WebSocketServer;
|
||||
public ws: ws.Server;
|
||||
public port: number;
|
||||
public server: http.Server;
|
||||
public production: boolean;
|
||||
@@ -39,7 +39,7 @@ export class Server {
|
||||
});
|
||||
});
|
||||
|
||||
this.ws = new WebSocketServer({
|
||||
this.ws = new ws.Server({
|
||||
maxPayload: 4096,
|
||||
noServer: true,
|
||||
});
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import WS from "ws";
|
||||
import {
|
||||
setHeartbeat,
|
||||
Send,
|
||||
CLOSECODES,
|
||||
OPCODES,
|
||||
WebSocket,
|
||||
} from "@fosscord/gateway";
|
||||
import { WebSocket } from "@fosscord/gateway";
|
||||
import { Send } from "../util/Send";
|
||||
import { CLOSECODES, OPCODES } from "../util/Constants";
|
||||
import { setHeartbeat } from "../util/Heartbeat";
|
||||
import { IncomingMessage } from "http";
|
||||
import { Close } from "./Close";
|
||||
import { Message } from "./Message";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { WebSocket, Payload, CLOSECODES, OPCODES } from "@fosscord/gateway";
|
||||
import { CLOSECODES, OPCODES } from "../util/Constants";
|
||||
import { WebSocket, Payload } from "@fosscord/gateway";
|
||||
var erlpack: any;
|
||||
try {
|
||||
erlpack = require("@yukikaze-bot/erlpack");
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import {
|
||||
User,
|
||||
getPermission,
|
||||
Permissions,
|
||||
Channel,
|
||||
RabbitMQ,
|
||||
listenEvent,
|
||||
EventOpts,
|
||||
ListenEventOpts,
|
||||
Member,
|
||||
} from "@fosscord/util";
|
||||
import { OPCODES, WebSocket, Send } from "@fosscord/gateway";
|
||||
import { OPCODES } from "../util/Constants";
|
||||
import { Send } from "../util/Send";
|
||||
import { WebSocket } from "@fosscord/gateway";
|
||||
import "missing-native-js-functions";
|
||||
import { Channel as AMQChannel } from "amqplib";
|
||||
import { Recipient } from "@fosscord/util";
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { Payload, Send, setHeartbeat, WebSocket } from "@fosscord/gateway";
|
||||
import { Payload, WebSocket } from "@fosscord/gateway";
|
||||
import { setHeartbeat } from "../util/Heartbeat";
|
||||
import { Send } from "../util/Send";
|
||||
|
||||
export async function onHeartbeat(this: WebSocket, data: Payload) {
|
||||
// TODO: validate payload
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import { WebSocket, Payload } from "@fosscord/gateway";
|
||||
import {
|
||||
WebSocket,
|
||||
CLOSECODES,
|
||||
Payload,
|
||||
OPCODES,
|
||||
genSessionId,
|
||||
} from "@fosscord/gateway";
|
||||
import {
|
||||
Channel,
|
||||
checkToken,
|
||||
Guild,
|
||||
Intents,
|
||||
Member,
|
||||
ReadyEventData,
|
||||
@@ -16,16 +8,15 @@ import {
|
||||
Session,
|
||||
EVENTEnum,
|
||||
Config,
|
||||
dbConnection,
|
||||
PublicMemberProjection,
|
||||
PublicMember,
|
||||
ChannelType,
|
||||
PublicUser,
|
||||
PrivateUserProjection,
|
||||
} from "@fosscord/util";
|
||||
import { Send } from "../util/Send";
|
||||
import { CLOSECODES, OPCODES } from "../util/Constants";
|
||||
import { genSessionId } from "../util/SessionUtils";
|
||||
import { setupListener } from "../listener/listener";
|
||||
import { IdentifySchema } from "../schema/Identify";
|
||||
import { Send } from "@fosscord/gateway/util/Send";
|
||||
// import experiments from "./experiments.json";
|
||||
const experiments: any = [];
|
||||
import { check } from "./instanceOf";
|
||||
|
||||
@@ -5,7 +5,9 @@ import {
|
||||
Role,
|
||||
} from "@fosscord/util";
|
||||
import { LazyRequest } from "../schema/LazyRequest";
|
||||
import { WebSocket, Send, OPCODES, Payload } from "@fosscord/gateway";
|
||||
import { Send } from "../util/Send";
|
||||
import { OPCODES } from "../util/Constants";
|
||||
import { WebSocket, Payload } from "@fosscord/gateway";
|
||||
import { check } from "./instanceOf";
|
||||
import "missing-native-js-functions";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user