Upload files to "src/cli"

This commit is contained in:
2026-07-03 03:18:14 +00:00
parent ebd8d3aab4
commit d85741d18e
5 changed files with 322 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bun
(globalThis as Record<string, unknown>).scramble = (s: string): string => s;
(globalThis as Record<string, unknown>).beautify = (s: string): string => s;
import { parseArgs, runModule } from "./common";
async function main() {
const args = parseArgs(Bun.argv.slice(2));
const token = args.params["github-token"];
if (!token) throw new Error("--github-token required");
// Defaults to dry-run. Pass --live to actually commit.
const live = args.flags.has("live");
const dryRun = !live;
const { RepositoryMutator } = await import("../mutator/repository/index");
const mutator = new RepositoryMutator(token, { dryRun });
return mutator.execute();
}
runModule("RepositoryMutator", main);