#!/usr/bin/env node
import { getErrorMessage } from "./hub/utils.js";
const AUTOMERGE_INIT_SYNC_DEPRECATION = "using deprecated parameters for `initSync()`; pass a single object instead";
function suppressKnownStartupWarnings() {
    const originalWarn = console.warn;
    console.warn = (...args) => {
        if (args[0] === AUTOMERGE_INIT_SYNC_DEPRECATION) {
            return;
        }
        originalWarn(...args);
    };
    return () => {
        console.warn = originalWarn;
    };
}
export async function runDPiCli(args = process.argv.slice(2)) {
    const restoreWarn = suppressKnownStartupWarnings();
    let runner;
    try {
        runner = await import("./bundled-runner.js");
    }
    finally {
        restoreWarn();
    }
    return runner.runBundledDPiCli(args);
}
void runDPiCli(process.argv.slice(2))
    .then((code) => {
    process.exitCode = code;
})
    .catch((error) => {
    console.error(getErrorMessage(error));
    process.exitCode = 1;
});
//# sourceMappingURL=cli.js.map