Methods

(async, inner) bajo:afterAllInit()

Run after all plugins are initialized. You can use this hook to do some post-initialization process.

(async, inner) bajo:afterAllStart()

Run after all plugins are started. You can use this hook to do some post-start process.

(async, inner) bajo:afterBoot()

Run after boot process. You can use this hook to do some post-boot process.

(async, inner) bajo:afterBuildCollection(container, items)

Run after collection is built.

Parameters:
NameTypeDescription
containerstring

Collection container name

itemsarray.<object>

Collection items

(async, inner) bajo:afterCollectHooks(hooks)

Run after hooks are collected. You can use this hook to modify the collected hooks before they are recognized as application hooks.

Parameters:
NameTypeDescription
hooksArray.<module:Hook~THook>

Array of hook objects

(async, inner) bajo:afterReadConfig(file, result, options)

Run after all read processes of a configuration file are completed.

Parameters:
NameTypeDescription
filestring

Config file path

resultobject

Resulting config object after parsing

optionsobject

readConfig options

(async, inner) bajo:beforeAllInit()

Run before all plugins are initialized. You can use this hook to do some pre-initialization process.

(async, inner) bajo:beforeAllStart()

Run before all plugins are started. You can use this hook to do some pre-start process.

(async, inner) bajo:beforeBoot()

Run before boot process. You can use this hook to do some pre-boot process.

(async, inner) bajo:beforeBuildCollection(container)

Run before collection is built.

Parameters:
NameTypeDescription
containerstring

Collection container name

(async, inner) bajo:beforeReadConfig(file, options)

Run before a configuration file is read.

Parameters:
NameTypeDescription
filestring

Config file path

optionsobject

readConfig options

(async, inner) {ns}:afterAppletRun(…args)

Run after applet is run. {ns} is the applet's namespace

Parameters:
NameTypeAttributesDescription
argsany<repeatable>

Arguments passed to the applet

(async, inner) {ns}:afterInit()

Run after {ns} plugins are initialized. You can use this hook to do some post-initialization process.

(async, inner) {ns}:afterStart()

Run after {ns} plugins are started. You can use this hook to do some post-start process.

(async, inner) {ns}:beforeAppletRun(…args)

Run before applet is run. {ns} is the applet's namespace

Parameters:
NameTypeAttributesDescription
argsany<repeatable>

Arguments passed to the applet

(async, inner) {ns}:beforeInit()

Run before {ns} plugins are initialized. You can use this hook to do some pre-initialization process.

(async, inner) {ns}:beforeStart()

Run after {ns} plugins are initialized. You can use this hook to do some pre-start process.

Type Definitions

THook

Type:
  • Object
Properties
NameTypeAttributesDefaultDescription
namestring

Hook name

nsstring

Hook namespace

handlerfunction

Hook handler function

levelnumber<optional>
999

Hook level (lower number means higher priority)

srcstring

Hook source (origin plugin namespace). Bajo will set this automatically, any value you set will be overriden.

noWaitboolean<optional>
false

If true, Bajo will not wait for this hook to complete before proceeding to the next hook. Default is false.