Fix CI
This commit is contained in:
parent
84f7a8c383
commit
b9840cfa3d
@ -23,35 +23,37 @@ export class DebugController {
|
|||||||
.writeStatus("200 OK")
|
.writeStatus("200 OK")
|
||||||
.writeHeader("Content-Type", "application/json")
|
.writeHeader("Content-Type", "application/json")
|
||||||
.end(
|
.end(
|
||||||
stringify(await Promise.all(socketManager.getWorlds().values()), (key: unknown, value: unknown) => {
|
stringify(
|
||||||
if (key === "listeners") {
|
await Promise.all(socketManager.getWorlds().values()),
|
||||||
return "Listeners";
|
(key: unknown, value: unknown) => {
|
||||||
}
|
if (key === "listeners") {
|
||||||
if (key === "socket") {
|
return "Listeners";
|
||||||
return "Socket";
|
|
||||||
}
|
|
||||||
if (key === "batchedMessages") {
|
|
||||||
return "BatchedMessages";
|
|
||||||
}
|
|
||||||
if (value instanceof Map) {
|
|
||||||
const obj: any = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
||||||
for (const [mapKey, mapValue] of value.entries()) {
|
|
||||||
obj[mapKey] = mapValue;
|
|
||||||
}
|
}
|
||||||
return obj;
|
if (key === "socket") {
|
||||||
} else if (value instanceof Set) {
|
return "Socket";
|
||||||
const obj: Array<unknown> = [];
|
}
|
||||||
for (const [setKey, setValue] of value.entries()) {
|
if (key === "batchedMessages") {
|
||||||
obj.push(setValue);
|
return "BatchedMessages";
|
||||||
|
}
|
||||||
|
if (value instanceof Map) {
|
||||||
|
const obj: any = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||||
|
for (const [mapKey, mapValue] of value.entries()) {
|
||||||
|
obj[mapKey] = mapValue;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
} else if (value instanceof Set) {
|
||||||
|
const obj: Array<unknown> = [];
|
||||||
|
for (const [setKey, setValue] of value.entries()) {
|
||||||
|
obj.push(setValue);
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
} else {
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
return obj;
|
|
||||||
} else {
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
);
|
);
|
||||||
|
})().catch((e) => {
|
||||||
})().catch(e => {
|
|
||||||
console.error(e);
|
console.error(e);
|
||||||
res.writeStatus("500");
|
res.writeStatus("500");
|
||||||
res.end("An error occurred");
|
res.end("An error occurred");
|
||||||
|
Loading…
Reference in New Issue
Block a user