mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 11:43:07 +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:
parent
8428d6da6d
commit
25b0a221e1
@ -31,14 +31,9 @@ import { Config, ErlpackType } from "@spacebar/util";
|
|||||||
|
|
||||||
let erlpack: ErlpackType | null = null;
|
let erlpack: ErlpackType | null = null;
|
||||||
try {
|
try {
|
||||||
erlpack = require("erlpack") as ErlpackType;
|
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("Failed to import erlpack: ", e);
|
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
|
||||||
try {
|
|
||||||
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
|
|
||||||
} catch (e) {
|
|
||||||
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: check rate limit
|
// TODO: check rate limit
|
||||||
|
@ -29,14 +29,9 @@ const bigIntJson = BigIntJson({ storeAsString: true });
|
|||||||
|
|
||||||
let erlpack: ErlpackType | null = null;
|
let erlpack: ErlpackType | null = null;
|
||||||
try {
|
try {
|
||||||
erlpack = require("erlpack") as ErlpackType;
|
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("Failed to import erlpack: ", e);
|
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
|
||||||
try {
|
|
||||||
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
|
|
||||||
} catch (e) {
|
|
||||||
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function Message(this: WebSocket, buffer: WS.Data) {
|
export async function Message(this: WebSocket, buffer: WS.Data) {
|
||||||
|
@ -23,14 +23,9 @@ import path from "path";
|
|||||||
import { ErlpackType, JSONReplacer } from "@spacebar/util";
|
import { ErlpackType, JSONReplacer } from "@spacebar/util";
|
||||||
let erlpack: ErlpackType | null = null;
|
let erlpack: ErlpackType | null = null;
|
||||||
try {
|
try {
|
||||||
erlpack = require("erlpack") as ErlpackType;
|
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("Failed to import erlpack: ", e);
|
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
|
||||||
try {
|
|
||||||
erlpack = require("@yukikaze-bot/erlpack") as ErlpackType;
|
|
||||||
} catch (e) {
|
|
||||||
console.log("Failed to import @yukikaze-bot/erlpack: ", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't care
|
// don't care
|
||||||
|
Loading…
Reference in New Issue
Block a user