Non-Permeable Membrane

    xcraft-core-bus

    5.2.4 • Public • Published

    xcraft-core-bus

    Manage the command and events bus lifecycle and operations.

    The command registry is populated on the bootstrap where a list of command locations is passed. A step looks for all files (in the first directory level and according to a pattern) and load the modules in order to found the xcraftCommands property.

    If this property exists, then the commands are loaded in the registry. Note that all files in the root path of all modules passed to the bus manager are required. You must ensure that it's always safe to require any .js files in the root directory of the modules.

    Built'in commands

    Some command handlers are registered separatly.

    • autoconnect
    • disconnect
    • shutdown
    • error
    • motd

    Only the shutdown command is publicy exposed. It provides a way in order to shutdown the server.

    Commands

    The modules are dynamically loaded on the bus. Some public commands are available in order to control the lifecycle of all modules (excepted this one of course).

    • bus.module.load
    • bus.module.unload
    • bus.module.reload
    • bus.module.watch
    • bus.module.unwatch

    Install

    npm i xcraft-core-bus

    DownloadsWeekly Downloads

    149

    Version

    5.2.4

    License

    MIT

    Unpacked Size

    51.3 kB

    Total Files

    11

    Last publish

    Collaborators

    • nocturnight
    • quarta
    • samlebarbare
    • schroeterm