1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 10:22:39 +01:00

Remove imports of erlpack in favor of @yukikaze-bot/erlpack due to the former not working on modern node

This commit is contained in:
Emma [it/its]@Rory& 2024-10-29 21:02:03 +01:00
parent 8428d6da6d
commit 25b0a221e1
3 changed files with 6 additions and 21 deletions

View File

@ -31,14 +31,9 @@ import { Config, ErlpackType } from "@spacebar/util";
let erlpack: ErlpackType | null = null;
try {
erlpack = require("erlpack") as ErlpackType;
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import erlpack: ", e);
try {
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
// TODO: check rate limit

View File

@ -29,14 +29,9 @@ const bigIntJson = BigIntJson({ storeAsString: true });
let erlpack: ErlpackType | null = null;
try {
erlpack = require("erlpack") as ErlpackType;
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import erlpack: ", e);
try {
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
export async function Message(this: WebSocket, buffer: WS.Data) {

View File

@ -23,14 +23,9 @@ import path from "path";
import { ErlpackType, JSONReplacer } from "@spacebar/util";
let erlpack: ErlpackType | null = null;
try {
erlpack = require("erlpack") as ErlpackType;
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import erlpack: ", e);
try {
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
} catch (e) {
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
}
// don't care