mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 18:32:29 +01:00
Fall back to @yukikaze-bot/erlpack if erlpack cant be found or loaded
This commit is contained in:
parent
28715f7949
commit
3585e9316e
12
flake.lock
12
flake.lock
@ -5,11 +5,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1726560853,
|
||||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723637854,
|
"lastModified": 1728241625,
|
||||||
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
|
"narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
|
"rev": "c31898adf5a8ed202ce5bea9f347b1c6871f32d1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -33,7 +33,12 @@ let erlpack: ErlpackType | null = null;
|
|||||||
try {
|
try {
|
||||||
erlpack = require("erlpack") as ErlpackType;
|
erlpack = require("erlpack") as ErlpackType;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// empty
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: check rate limit
|
// TODO: check rate limit
|
||||||
|
@ -31,7 +31,12 @@ let erlpack: ErlpackType | null = null;
|
|||||||
try {
|
try {
|
||||||
erlpack = require("erlpack") as ErlpackType;
|
erlpack = require("erlpack") as ErlpackType;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// empty
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function Message(this: WebSocket, buffer: WS.Data) {
|
export async function Message(this: WebSocket, buffer: WS.Data) {
|
||||||
|
@ -25,7 +25,12 @@ let erlpack: ErlpackType | null = null;
|
|||||||
try {
|
try {
|
||||||
erlpack = require("erlpack") as ErlpackType;
|
erlpack = require("erlpack") as ErlpackType;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// empty
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// don't care
|
// don't care
|
||||||
|
Loading…
Reference in New Issue
Block a user