Module

x/yargs/build/lib/command.js>CommandInstance

yargs the modern, pirate-themed successor to optimist.
Go to Latest
class CommandInstance
import { CommandInstance } from "https://dotland.deno.dev/x/yargs@v17.7.1-deno/build/lib/command.js";

Constructors

new
CommandInstance(
usage,
validation,
globalMiddleware,
shim,
)

Methods

addDirectory(
dir,
req,
callerFile,
opts,
)
addHandler(
cmd,
description,
builder,
handler,
commandMiddleware,
deprecated,
)
applyBuilderUpdateUsageAndParse(
isDefaultCommand,
commandHandler,
yargs,
aliases,
parentCommands,
commandIndex,
helpOnly,
helpOrVersionSet,
)
applyMiddlewareAndGetResult(
isDefaultCommand,
commandHandler,
innerArgv,
currentContext,
helpOnly,
aliases,
yargs,
)
extractDesc(unnamed 0)
handleValidationAndGetResult(
isDefaultCommand,
commandHandler,
innerArgv,
currentContext,
aliases,
yargs,
middlewares,
positionalMap,
)
isDefaulted(yargs, key)
isInConfigs(yargs, key)
parseAndUpdateUsage(
isDefaultCommand,
commandHandler,
innerYargs,
parentCommands,
commandIndex,
helpOnly,
)
populatePositional(
positional,
argv,
positionalMap,
)
populatePositionals(
commandHandler,
argv,
context,
yargs,
)
postProcessPositionals(
argv,
positionalMap,
parseOptions,
yargs,
)
runCommand(
command,
yargs,
parsed,
commandIndex,
helpOnly,
helpOrVersionSet,
)
usageFromParentCommandsCommandHandler(parentCommands, commandHandler)