import { createCommand } from "commander";

import { tsconfigTranspileMonorepoDependenciesExecute } from "./execute.js";

import type { Command } from "commander";

function tsconfigTranspileMonorepoDependenciesCommand(): Command {
    return createCommand("tsconfig-transpile-monorepo-dependencies")
        .description(
            "Refresh transpile-monorepo-dependencies sections in tsconfig.json files in every monorepo package.",
        )
        .action(async () => {
            await tsconfigTranspileMonorepoDependenciesExecute();
        });
}

export { tsconfigTranspileMonorepoDependenciesCommand };
