Skip to main content

@webda/shellReadme | API


Class: WebdaConsole

Constructors

new WebdaConsole()

new WebdaConsole(): WebdaConsole

Returns

WebdaConsole

Properties

app

static app: SourceApplication

Source

packages/shell/src/console/webda.ts:84


debuggerStatus

static debuggerStatus: DebuggerStatus = DebuggerStatus.Stopped

Source

packages/shell/src/console/webda.ts:85


extensions

static extensions: Object = {}

Index signature

[key: string]: WebdaShellExtension

Source

packages/shell/src/console/webda.ts:87


logger

static logger: Logger

Source

packages/shell/src/console/webda.ts:82


onSIGINT

static onSIGINT: () => never = undefined

Returns

never

Source

packages/shell/src/console/webda.ts:86


serverProcess

static serverProcess: ChildProcess

Source

packages/shell/src/console/webda.ts:80


terminal

static terminal: WebdaTerminal

Source

packages/shell/src/console/webda.ts:83


tscCompiler

static tscCompiler: ChildProcess

Source

packages/shell/src/console/webda.ts:81


webda

static webda: WebdaServer

Source

packages/shell/src/console/webda.ts:79

Methods

build()

static build(argv): Promise<void | -1>

Generate the webda.module.json

Parameters

argv: any

Returns

Promise<void | -1>

Source

packages/shell/src/console/webda.ts:797


builtinCommands()

static builtinCommands(): Object

Return the default builin command map

Returns

Object

Source

packages/shell/src/console/webda.ts:847


config()

static config(argv): Promise<number>

If deployment in argument: display or export the configuration Otherwise launch the configuration UI

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:565


configEncrypt()

static configEncrypt(argv): Promise<number>

If deployment in argument: display or export the configuration Otherwise launch the configuration UI

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:586


configurationWatch()

static configurationWatch(callback, deployment?): void

Watch for configuration changes

Parameters

callback: any

deployment?: string

Returns

void

Source

packages/shell/src/console/webda.ts:505


debug()

static debug(argv): Promise<void>

Launch debug on application

Compiling application as it is modified Relaunching the serve command on any new modification

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:391


deploy()

static deploy(argv): Promise<number>

Deploy the new code

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:626


diagram()

static diagram(argv): Promise<0 | -1>

Generate a diagram for the application

Parameters

argv: any

Returns

Promise<0 | -1>

Source

packages/shell/src/console/webda.ts:823


displayHelp()

static displayHelp(parser): void

Display help for parser

Separated into a method to allow override

Parameters

parser: any

Returns

void

Source

packages/shell/src/console/webda.ts:1248


executeShellExtension()

static executeShellExtension(ext, relPath, argv): Promise<any>

Parameters

ext: WebdaShellExtension

extension to execute

relPath: string

relative path of the extension

argv: any

arguments passed to the shell

Returns

Promise<any>

Source

packages/shell/src/console/webda.ts:1258


fakeTerm()

static fakeTerm(): Promise<void>

Print a Fake Terminal to play with @webda/workout

This is a non-supported method therefore no specific unit test as there is no value in it

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:766


generateOpenAPI()

static generateOpenAPI(argv): Promise<void>

Generate the OpenAPI definition in a file

If filename can end with .yml or .json to select the format

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:1335


getApplicationExport()

static getApplicationExport(): Object

Returns

Object

application

application: Object

application.author

application.author: PackageDescriptorAuthor = packageInfo.author

application.name

application.name: string = packageInfo.name

application.version

application.version: string = packageInfo.version

Source

packages/shell/src/console/webda.ts:168


getDebuggerStatus()

static getDebuggerStatus(): DebuggerStatus

Get debugger current status

Returns

DebuggerStatus

Source

packages/shell/src/console/webda.ts:1358


getVersion()

static getVersion(): any

Get shell package version

Returns

any

Source

packages/shell/src/console/webda.ts:522


getYeoman()

static getYeoman(): Promise<any>

Get yeoman

Returns

Promise<any>

Source

packages/shell/src/console/webda.ts:635


handleCommand()

static handleCommand(args, versions, output): Promise<number>

Main command switch

Parse arguments Init logger Create Webda Application Run the command or display help

Parameters

args: any

versions: any

output: WorkerOutput= undefined

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:684


handleCommandInternal()

static handleCommandInternal(args, versions, output): Promise<number>

Parameters

args: any

versions: any

output: WorkerOutput= undefined

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:1046


init()

static init(argv, generatorName): Promise<any>

Generate a new Webda Application based on yeoman

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

generatorName: string= "webda"

Returns

Promise<any>

Source

packages/shell/src/console/webda.ts:645


initLogger()

static initLogger(argv): Promise<void>

Init loggers

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:665


loadExtensions()

static loadExtensions(appPath): number

Parameters

appPath: any

Returns

number

Source

packages/shell/src/console/webda.ts:692


log()

static log(level, ...args): void

Parameters

level: WorkerLogLevel

• ...args: any[]

Returns

void

Source

packages/shell/src/console/webda.ts:1370


models()

static models(argv): Promise<void>

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:182


operations()

static operations(argv): Promise<void>

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:258


output()

static output(...args): void

Parameters

• ...args: any[]

Returns

void

Source

packages/shell/src/console/webda.ts:1366


parser()

static parser(_args): Promise<Argv<Object>>

Parameters

_args: any

Returns

Promise<Argv<Object>>

Source

packages/shell/src/console/webda.ts:89


requireCompilation()

static requireCompilation(): boolean

Add a system to recompile if needed

Returns

boolean

Source

packages/shell/src/console/webda.ts:530


rotateKeys()

static rotateKeys(): Promise<number>

Rotate crypto keys

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:615


schema()

static schema(argv): Promise<void>

Generate a JSON Schema for a symbol

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:747


serve()

static serve(argv): CancelablePromise<void>

Parameters

argv: any

Returns

CancelablePromise<void>

Source

packages/shell/src/console/webda.ts:125


serviceConfig()

static serviceConfig(argv): Promise<number>

Get a service configuration

Parameters

argv: any

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:155


setDebuggerStatus()

static setDebuggerStatus(status): void

Parameters

status: DebuggerStatus

Returns

void

Source

packages/shell/src/console/webda.ts:1362


stopDebugger()

static stopDebugger(): Promise<void>

Stop the debugger and wait for its complete stop

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:1346


store()

static store(argv): Promise<number>

Manage store

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:1291


stores()

static stores(): Promise<number>

Display stores and their managed models

Returns

Promise<number>

Source

packages/shell/src/console/webda.ts:1266


types()

static types(): Promise<void>

Output all types of Deployers, Services and Models

Returns

Promise<void>

Source

packages/shell/src/console/webda.ts:1020


withinMinorVersion()

static withinMinorVersion(package1, package2): boolean

Return if a package is within minor version of each others

Parameters

package1: string

package2: string

Returns

boolean

Source

packages/shell/src/console/webda.ts:1039


worker()

static worker(argv): Promise<void | -1>

Run a method of a service

Parameters

argv: Object

argv.$0: string

The script name or node command

argv._: (string | number)[]

Non-option arguments

Returns

Promise<void | -1>

Source

packages/shell/src/console/webda.ts:341