Skip to main content

WebdaCliDescriptor

@webda/compiler


Interface: WebdaCliDescriptor

Defined in: definition.ts:546

The application command-line, the webda.cli section of package.json

Example​

"webda": {
"cli": {
"name": "my-runner",
"defaultCommand": "serve",
"exclude": ["Webda/HttpServer:serve", "openapi"]
}
}

Properties​

bin?​

optional bin?: string

Defined in: definition.ts:562

Path of the executable webdac build generates, relative to the package root

Default​

"bin/<name>.mjs"

defaultCommand?​

optional defaultCommand?: string

Defined in: definition.ts:556

Command run when the arguments name none, e.g. "serve". Applied when the CLI runs through runCli (the generated executable), not by webda.


exclude?​

optional exclude?: string[]

Defined in: definition.ts:579

Commands or command providers removed, applied to webda too:

  • "Type:command" drops one provider ("Webda/HttpServer:serve"), e.g. to let a subclass serve instead; it never matches an operation
  • "command" drops the command with its subcommands ("openapi", "config"), or an operation group ("task") or operation ("task get")

include?​

optional include?: string[]

Defined in: definition.ts:571

Commands available, applied before exclude: a command name keeps it with its subcommands ("config" keeps config encrypt). Absent: every command.

Operation commands are selected too: the operation Task.Get is the command task get, so "task" keeps the whole group and "task get" one operation (in any case). A group not listed is hidden and cannot be run.


name?​

optional name?: string

Defined in: definition.ts:551

Program name shown in --help, instead of webda; also names the generated executable (bin/<name>.mjs). Applied when the CLI runs through runCli (the generated executable).