Interface: SelfScriptEngine


CloudControl Pro 9 Docs / engines / SelfScriptEngine

Interface: SelfScriptEngine

engines.SelfScriptEngine

Object of the engine that current script running with.

Hierarchy

Table of contents

Properties

Methods

Properties

execArgv

Readonly execArgv: any

Execution arguments. Includes arguments specified when starting engine, or arguments specified when triggering by work manager. For example, if triggered by intent task, the execArgv is {intent: ...}.


executionConfig

Readonly executionConfig: ReadOnlyExecutionConfig

Get the execution config of this engine.

Inherited from

ScriptEngine.executionConfig


id

Readonly id: number

Unique id of engine, different from other engine's id.

Inherited from

ScriptEngine.id


source

Readonly source: any

Source file object of engine.

Inherited from

ScriptEngine.source


sourceFile

Readonly sourceFile: string

Path of engine source file.

Inherited from

ScriptEngine.sourceFile


workingDirectory

Readonly workingDirectory: string

Directory of engine running. Usually is the root directory of project or the parent directory of script file.

Inherited from

ScriptEngine.workingDirectory

Methods

addListener

addListener(event, listener): SelfScriptEngine

Parameters

Name Type
event string
listener (...args: any[]) => void

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.addListener


emit

emit(event, ...args): void

Send event to engine. For nodejs engine, you can use require("engines").myEngine().on("event", () => {}) to listen event; For pro8 engine, you can use $events.on("event", () => {}) to listen event.

Parameters

Name Type Description
event string Event name
...args any[] Event arguments, must be a JSON-able data

Returns

void

Inherited from

ScriptEngine.emit


eventNames

eventNames(): string[]

Returns

string[]

Inherited from

EngineEventTarget.eventNames


forceStop

forceStop(): void

Force stop the engine.

Returns

void

Inherited from

ScriptEngine.forceStop


getMaxListeners

getMaxListeners(): number

Returns

number

Inherited from

EngineEventTarget.getMaxListeners


getTag

getTag(key): any

Returns the tag associated with this engine and the specified key.

Parameters

Name Type
key string

Returns

any

Inherited from

ScriptEngine.getTag


listenerCount

listenerCount(event): number

Parameters

Name Type
event string

Returns

number

Inherited from

EngineEventTarget.listenerCount


listeners

listeners(event): Function[]

Parameters

Name Type
event string

Returns

Function[]

Inherited from

EngineEventTarget.listeners


off

off(event, listener): SelfScriptEngine

Parameters

Name Type
event string
listener (...args: any[]) => void

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.off


on

on(event, listener): SelfScriptEngine

Parameters

Name Type
event string
listener (...args: any[]) => void

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.on


once

once(event, listener): SelfScriptEngine

Parameters

Name Type
event string
listener (...args: any[]) => void

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.once


prependListener

prependListener(event, listener): SelfScriptEngine

Parameters

Name Type
event string
listener (...args: any[]) => void

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.prependListener


prependOnceListener

prependOnceListener(event, listener): SelfScriptEngine

Parameters

Name Type
event string
listener (...args: any[]) => void

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.prependOnceListener


rawListeners

rawListeners(event): Function[]

Parameters

Name Type
event string

Returns

Function[]

Inherited from

EngineEventTarget.rawListeners


removeAllListeners

removeAllListeners(event?): SelfScriptEngine

Parameters

Name Type
event? string

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.removeAllListeners


removeListener

removeListener(event, listener): SelfScriptEngine

Parameters

Name Type
event string
listener (...args: any[]) => void

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.removeListener


setMaxListeners

setMaxListeners(n): SelfScriptEngine

Parameters

Name Type
n number

Returns

SelfScriptEngine

Inherited from

EngineEventTarget.setMaxListeners