import type { CommandModule } from "./types.js";
import { seedCommand } from "./seed/index.js";
import { constraintsCommand } from "./constraints/index.js";
import { tableRegistryCommand } from "./table-registry/index.js";
import { helpCommand } from "./help/index.js";

export const commands: CommandModule[] = [
  seedCommand,
  constraintsCommand,
  tableRegistryCommand,
  helpCommand,
];

export const getCommandByName = (name: string): CommandModule | undefined =>
  commands.find((command) => command.name === name);
