2024-06-29 11:58:43 +02:00
|
|
|
import { configureLoggers } from "@/loggers";
|
2024-05-08 02:24:21 +02:00
|
|
|
import { execute } from "@oclif/core";
|
2024-10-04 15:22:48 +02:00
|
|
|
import Start from "./commands/start.ts";
|
2024-05-08 02:10:14 +02:00
|
|
|
|
2024-06-29 11:58:43 +02:00
|
|
|
await configureLoggers();
|
|
|
|
|
|
2024-05-08 02:24:21 +02:00
|
|
|
// Use "explicit" oclif strategy to avoid issues with oclif's module resolver and bundling
|
2024-05-08 02:10:14 +02:00
|
|
|
export const commands = {
|
2024-10-24 18:18:39 +02:00
|
|
|
"user:list": (await import("./commands/user/list.ts")).default,
|
|
|
|
|
"user:delete": (await import("./commands/user/delete.ts")).default,
|
|
|
|
|
"user:create": (await import("./commands/user/create.ts")).default,
|
|
|
|
|
"user:reset": (await import("./commands/user/reset.ts")).default,
|
|
|
|
|
"user:refetch": (await import("./commands/user/refetch.ts")).default,
|
|
|
|
|
"emoji:add": (await import("./commands/emoji/add.ts")).default,
|
|
|
|
|
"emoji:delete": (await import("./commands/emoji/delete.ts")).default,
|
|
|
|
|
"emoji:list": (await import("./commands/emoji/list.ts")).default,
|
|
|
|
|
"emoji:import": (await import("./commands/emoji/import.ts")).default,
|
|
|
|
|
"index:rebuild": (await import("./commands/index/rebuild.ts")).default,
|
|
|
|
|
"federation:instance:fetch": (
|
|
|
|
|
await import("./commands/federation/instance/fetch.ts")
|
|
|
|
|
).default,
|
|
|
|
|
"federation:user:finger": (
|
|
|
|
|
await import("./commands/federation/user/finger.ts")
|
|
|
|
|
).default,
|
|
|
|
|
"federation:user:fetch": (
|
|
|
|
|
await import("./commands/federation/user/fetch.ts")
|
|
|
|
|
).default,
|
|
|
|
|
"generate-keys": (await import("./commands/generate-keys.ts")).default,
|
2024-05-13 23:36:46 +02:00
|
|
|
start: Start,
|
2024-05-08 02:10:14 +02:00
|
|
|
};
|
2024-05-08 02:30:45 +02:00
|
|
|
|
|
|
|
|
if (import.meta.path === Bun.main) {
|
|
|
|
|
await execute({ dir: import.meta.url });
|
|
|
|
|
}
|