mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
17 lines
461 B
TypeScript
17 lines
461 B
TypeScript
import { type Command, Option } from "commander";
|
|
|
|
export function withConfigOptions(program: Command) {
|
|
return program
|
|
.addOption(new Option("-c, --config <config>", "config file"))
|
|
.addOption(
|
|
new Option("--db-url <db>", "database url, can be any valid sqlite url").conflicts(
|
|
"config",
|
|
),
|
|
);
|
|
}
|
|
|
|
export type WithConfigOptions<CustomOptions = {}> = {
|
|
config?: string;
|
|
dbUrl?: string;
|
|
} & CustomOptions;
|