refactor(cli): convert plugin command to effectCmd (#25473)

This commit is contained in:
Kit Langton
2026-05-02 17:55:13 -04:00
committed by GitHub
parent e318e173d8
commit 0c816eb4b1
2 changed files with 20 additions and 21 deletions

View File

@@ -31,6 +31,7 @@ export const fail = (message: string, exitCode = 1) => Effect.fail(new CliError(
*/
export const effectCmd = <Args, A>(opts: {
command: string | readonly string[]
aliases?: string | readonly string[]
describe: string | false
builder?: (yargs: Argv) => Argv<Args>
/** Defaults to process.cwd(). Override for commands that take a directory positional. */
@@ -39,6 +40,7 @@ export const effectCmd = <Args, A>(opts: {
}) =>
cmd<{}, Args>({
command: opts.command,
aliases: opts.aliases,
describe: opts.describe,
builder: opts.builder as never,
async handler(rawArgs) {