Skip to main content

@webda/shellReadme | API


Class: WebdaTerminal

Extends

  • Terminal

Constructors

new WebdaTerminal(wo, versions, logo, level, format, tty)

new WebdaTerminal(wo, versions, logo, level, format, tty): WebdaTerminal

Parameters

wo: WorkerOutput

versions: any

logo: string[]= undefined

level: WorkerLogLevel= undefined

format: string= undefined

tty: boolean= undefined

Returns

WebdaTerminal

Overrides

Terminal.constructor

Source

packages/shell/src/console/terminal.ts:6

Properties

_refresh?

_refresh?: Timeout

Inherited from

Terminal._refresh

Source

packages/workout/lib/terminal/terminal.d.ts:34


format?

format?: string

Inherited from

Terminal.format

Source

packages/workout/lib/terminal/terminal.d.ts:20


hasProgress

hasProgress: boolean

Inherited from

Terminal.hasProgress

Source

packages/workout/lib/terminal/terminal.d.ts:15


height

height: number

Inherited from

Terminal.height

Source

packages/workout/lib/terminal/terminal.d.ts:9


history

history: string[]

Inherited from

Terminal.history

Source

packages/workout/lib/terminal/terminal.d.ts:11


historySize

historySize: number

Inherited from

Terminal.historySize

Source

packages/workout/lib/terminal/terminal.d.ts:12


inputValid

inputValid: boolean

Inherited from

Terminal.inputValid

Source

packages/workout/lib/terminal/terminal.d.ts:25


inputValue

inputValue: string

Inherited from

Terminal.inputValue

Source

packages/workout/lib/terminal/terminal.d.ts:22


inputs

inputs: WorkerInput[]

Inherited from

Terminal.inputs

Source

packages/workout/lib/terminal/terminal.d.ts:21


level

level: WorkerLogLevel

Inherited from

Terminal.level

Source

packages/workout/lib/terminal/terminal.d.ts:14


listener

listener: (msg) => void

Contains the WorkerOutput listener

Parameters

msg: WorkerMessage

Returns

void

Inherited from

Terminal.listener

Source

packages/workout/lib/terminal/terminal.d.ts:33


logo: string[]

Inherited from

Terminal.logo

Source

packages/workout/lib/terminal/terminal.d.ts:28


logoWidth

logoWidth: number

Inherited from

Terminal.logoWidth

Source

packages/workout/lib/terminal/terminal.d.ts:29


progressChar

progressChar: number

Inherited from

Terminal.progressChar

Source

packages/workout/lib/terminal/terminal.d.ts:26


progressChars

progressChars: string[]

Inherited from

Terminal.progressChars

Source

packages/workout/lib/terminal/terminal.d.ts:27


progresses

progresses: Object

Index signature

[key: string]: WorkerProgress

Inherited from

Terminal.progresses

Source

packages/workout/lib/terminal/terminal.d.ts:16


reset

reset: boolean

Inherited from

Terminal.reset

Source

packages/workout/lib/terminal/terminal.d.ts:24


rl?

rl?: Interface

Inherited from

Terminal.rl

Source

packages/workout/lib/terminal/terminal.d.ts:23


scrollY

scrollY: number

Inherited from

Terminal.scrollY

Source

packages/workout/lib/terminal/terminal.d.ts:13


title

title: string

Inherited from

Terminal.title

Source

packages/workout/lib/terminal/terminal.d.ts:19


tty

tty: boolean

Inherited from

Terminal.tty

Source

packages/workout/lib/terminal/terminal.d.ts:7


versions

versions: any

Source

packages/shell/src/console/terminal.ts:5


width

width: number

Inherited from

Terminal.width

Source

packages/workout/lib/terminal/terminal.d.ts:10


wo

wo: WorkerOutput

Inherited from

Terminal.wo

Source

packages/workout/lib/terminal/terminal.d.ts:8


refreshSpeed

static refreshSpeed: number

Inherited from

Terminal.refreshSpeed

Source

packages/workout/lib/terminal/terminal.d.ts:35

Methods

clearScreen()

clearScreen(): void

Returns

void

Inherited from

Terminal.clearScreen

Source

packages/workout/lib/terminal/terminal.d.ts:73


close()

close(): void

Returns

void

Inherited from

Terminal.close

Source

packages/workout/lib/terminal/terminal.d.ts:43


displayBar()

displayBar(ratio, barlen): string

Parameters

ratio: number

barlen: number

Returns

string

Inherited from

Terminal.displayBar

Source

packages/workout/lib/terminal/terminal.d.ts:52


displayFooter()

displayFooter(): string

Returns

string

Inherited from

Terminal.displayFooter

Source

packages/workout/lib/terminal/terminal.d.ts:56


displayHistory()

displayHistory(lines, complete?): string

Parameters

lines: number

complete?: boolean

Returns

string

Inherited from

Terminal.displayHistory

Source

packages/workout/lib/terminal/terminal.d.ts:71


displayProgress()

displayProgress(p): string

Parameters

p: WorkerProgress

Returns

string

Inherited from

Terminal.displayProgress

Source

packages/workout/lib/terminal/terminal.d.ts:55


displayScreen()

displayScreen(): Promise<void>

Returns

Promise<void>

Inherited from

Terminal.displayScreen

Source

packages/workout/lib/terminal/terminal.d.ts:72


displayString()

displayString(str, limit): any

Parameters

str: string

limit: number= undefined

Returns

any

Overrides

Terminal.displayString

Source

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


displayTitle()

displayTitle(): string

Returns

string

Inherited from

Terminal.displayTitle

Source

packages/workout/lib/terminal/terminal.d.ts:54


getBar()

getBar(size, complete): string

Parameters

size: number

complete: boolean

Returns

string

Overrides

Terminal.getBar

Source

packages/shell/src/console/terminal.ts:61


getFooterSize()

getFooterSize(): number

Returns

number

Inherited from

Terminal.getFooterSize

Source

packages/workout/lib/terminal/terminal.d.ts:48


getLogo(): string[]

Retrieve current logo

Usefull to add some versions

Returns

string[]

Inherited from

Terminal.getLogo

Source

packages/workout/lib/terminal/terminal.d.ts:70


getTrueLength()

getTrueLength(str): number

Parameters

str: string

Returns

number

Inherited from

Terminal.getTrueLength

Source

packages/workout/lib/terminal/terminal.d.ts:51


handleTitleMessage()

handleTitleMessage(msg): void

Parameters

msg: WorkerMessage

Returns

void

Overrides

Terminal.handleTitleMessage

Source

packages/shell/src/console/terminal.ts:20


log()

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

Parameters

groups: any[]

level: WorkerLogLevel

• ...args: any[]

Returns

void

Inherited from

Terminal.log

Source

packages/workout/lib/terminal/terminal.d.ts:47


onData()

onData(data): void

Parameters

data: string | Buffer

Returns

void

Inherited from

Terminal.onData

Source

packages/workout/lib/terminal/terminal.d.ts:37


pushHistory()

pushHistory(line): void

Parameters

line: string

Returns

void

Inherited from

Terminal.pushHistory

Source

packages/workout/lib/terminal/terminal.d.ts:44


resetTerm()

resetTerm(): void

Returns

void

Inherited from

Terminal.resetTerm

Source

packages/workout/lib/terminal/terminal.d.ts:42


resize()

resize(): void

Returns

void

Inherited from

Terminal.resize

Source

packages/workout/lib/terminal/terminal.d.ts:38


router()

router(msg): Promise<void>

Parameters

msg: WorkerMessage

Returns

Promise<void>

Inherited from

Terminal.router

Source

packages/workout/lib/terminal/terminal.d.ts:45


scrollDown()

scrollDown(increment): void

Parameters

increment: number

Returns

void

Inherited from

Terminal.scrollDown

Source

packages/workout/lib/terminal/terminal.d.ts:40


scrollUp()

scrollUp(increment): void

Parameters

increment: number

Returns

void

Inherited from

Terminal.scrollUp

Source

packages/workout/lib/terminal/terminal.d.ts:39


setDefaultLogo(): void

Returns

void

Source

packages/shell/src/console/terminal.ts:24


setLogo(logo): void

Set the logo to display

How to create logo:

Parameters

logo: string[]

to display

Returns

void

Inherited from

Terminal.setLogo

Source

packages/workout/lib/terminal/terminal.d.ts:64


setTitle()

setTitle(title): void

Parameters

title: string= ""

Returns

void

Overrides

Terminal.setTitle

Source

packages/shell/src/console/terminal.ts:57


stripColorString()

stripColorString(str, limit?): string

Parameters

str: string

limit?: number

Returns

string

Inherited from

Terminal.stripColorString

Source

packages/workout/lib/terminal/terminal.d.ts:49


webdaize()

static webdaize(str, isTTY): any

Colorized any 'da' letters from webda within output

Parameters

str: any

isTTY: boolean= process.stdout.isTTY

Returns

any

Source

packages/shell/src/console/terminal.ts:75