npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@futoin/msgbot

v0.3.3

Published

FutoIn Message Bot Reference Implementation

Downloads

3

Readme

About

WORK IN PROGRESS

Reference implementation of:

FTN22: FutoIn Interface - Message Bot
Version: 0.x

Author: Andrey Galkin

Installation for Node.js

Command line:

$ npm install @futoin/msgbot --save

API documentation

Classes

CommandRouterFace

FTN22: Command Router Face

Kind: global class

CommandRouterService

Command Router Service

Kind: global class

new CommandRouterService(options)

C-tor

| Param | Type | Description | | --- | --- | --- | | options | object | passed to superclass c-tor |

PushHandlerFace

FTN22: Push Handler Face

Kind: global class

PushHandlerService

Push Handler Service base

Kind: global class

PushRouterService

Push Router Service base

Kind: global class

ReactHandlerFace

FTN22: React Handler Face

Kind: global class

ReactHandlerService

React Handler Service base

Kind: global class

ServerFace

FTN22: Server Face

Kind: global class

serverFace.getFlavour(asi)

Get type of database

Kind: instance method of ServerFace

| Param | Type | Description | | --- | --- | --- | | asi | AsyncSteps | steps interface |

serverFace.helpers() ⇒ ServerHelpers

Get native server helpers

Kind: instance method of ServerFace
Returns: ServerHelpers - - driver implementation

serverFace.systemIface()

Get native message system interface implementation

Kind: instance method of ServerFace

ServerFace.register(asi, ccm, name, endpoint, [credentials], [options])

CCM registration helper

Kind: static method of ServerFace

| Param | Type | Default | Description | | --- | --- | --- | --- | | asi | AsyncSteps | | steps interface | | ccm | AdvancedCCM | | CCM instance | | name | string | | CCM registration name | | endpoint | * | | see AdvancedCCM#register | | [credentials] | * | | see AdvancedCCM#register | | [options] | object | {} | interface options | | [options.version] | string | "<latest>" | interface version to use |

ServerHelpers

FTN22: Server-specific helpers

Kind: global class

serverHelpers.bold(str) ⇒ string

Get bold text

Kind: instance method of ServerHelpers
Returns: string - bold output

| Param | Type | Description | | --- | --- | --- | | str | string | input |

serverHelpers.italic(str) ⇒ string

Get italic text

Kind: instance method of ServerHelpers
Returns: string - italic output

| Param | Type | Description | | --- | --- | --- | | str | string | input |

serverHelpers.color(str, hexcolor) ⇒ string

Get colored text

Kind: instance method of ServerHelpers
Returns: string - colored output

| Param | Type | Description | | --- | --- | --- | | str | string | input | | hexcolor | string | color code |

serverHelpers.imgUrl(url) ⇒ string

Get image URL embedded into text

Kind: instance method of ServerHelpers
Returns: string - URL output

| Param | Type | Description | | --- | --- | --- | | url | string | input |

serverHelpers.emoji(name) ⇒ string

Get emoji embedded into text

Kind: instance method of ServerHelpers
Returns: string - emoji output

| Param | Type | Description | | --- | --- | --- | | name | string | input |

serverHelpers.line() ⇒ string

Get new line

Kind: instance method of ServerHelpers
Returns: string - new line

serverHelpers.menion(ext_id) ⇒ string

Get actor mention into text

Kind: instance method of ServerHelpers
Returns: string - mention output

| Param | Type | Description | | --- | --- | --- | | ext_id | string | input actor ID |

ServerHelpers.setDriver(flavour, impl)

Add native helper driver

Kind: static method of ServerHelpers

| Param | Type | Description | | --- | --- | --- | | flavour | string | system flavour | | impl | ServerHelpers | driver implementation |

ServerHelpers.getDriver(flavour) ⇒ ServerHelpers

Get native helper driver

Kind: static method of ServerHelpers
Returns: ServerHelpers - driver implementation

| Param | Type | Description | | --- | --- | --- | | flavour | string | system flavour |

ServerService

Server Service

Kind: global class

ServiceApp

Basic bot service app.

Actual bot implementation is expected to inherit this class and override registration functions.

Kind: global class

new ServiceApp(asi, options)

C-tor

| Param | Type | Default | Description | | --- | --- | --- | --- | | asi | AsyncSteps | | AsyncSteps interface | | options | object | {} | options | | [options.ccm] | AdvancedCCM | | external CCM instance | | [options.executor] | Executor | | external executor instance | | [options.ccmOptions] | object | | auto-CCM options | | [options.notExpectedHandler] | callable | | 'notExpected' error handler | | [options.executorOptions] | object | | private auto-Executor options |

serviceApp.ccm() ⇒ AdvancedCCM

CCM instance accessor

Kind: instance method of ServiceApp
Returns: AdvancedCCM - instance

serviceApp.executor() ⇒ Executor

Executor instance accessor

Kind: instance method of ServiceApp
Returns: Executor - instance

serviceApp.close([done])

Shutdown of app and related instances

Kind: instance method of ServiceApp

| Param | Type | Default | Description | | --- | --- | --- | --- | | [done] | callable | | done callback |

serviceApp.newExecutor() ⇒ Executor

Create an instance of executor which is useful to register services.

Kind: instance method of ServiceApp
Returns: Executor - instance

serviceApp._register_logsvc(asi, options)

Override to register custom log service

Kind: instance abstract method of ServiceApp

| Param | Type | Default | Description | | --- | --- | --- | --- | | asi | AsyncSteps | | AsyncSteps interface | | options | object | {} | options |

serviceApp._register_handlers(asi, options)

Override to register custom business logic.

Kind: instance abstract method of ServiceApp

| Param | Type | Default | Description | | --- | --- | --- | --- | | asi | AsyncSteps | | AsyncSteps interface | | options | object | {} | options |

serviceApp._register_servers(asi, options)

Override to register servers.

Kind: instance abstract method of ServiceApp

| Param | Type | Default | Description | | --- | --- | --- | --- | | asi | AsyncSteps | | AsyncSteps interface | | options | object | {} | options |

BaseFace

Base Face with neutral common registration functionality

Kind: global class
Note: Not official API

BaseFace.LATEST_VERSION

Latest supported FTN13 version

Kind: static property of BaseFace

BaseFace.PING_VERSION

Latest supported FTN4 version

Kind: static property of BaseFace

BaseFace.register(as, ccm, name, endpoint, [credentials], [options])

CCM registration helper

Kind: static method of BaseFace

| Param | Type | Default | Description | | --- | --- | --- | --- | | as | AsyncSteps | | steps interface | | ccm | AdvancedCCM | | CCM instance | | name | string | | CCM registration name | | endpoint | * | | see AdvancedCCM#register | | [credentials] | * | | see AdvancedCCM#register | | [options] | object | {} | interface options | | [options.version] | string | "1.0" | interface version to use |

BaseService

Base Service with common registration logic

Kind: global class

new BaseService(options)

C-tor

| Param | Type | Description | | --- | --- | --- | | options | object | passed to superclass c-tor |

BaseService.register(as, executor, options) ⇒ BaseService

Register Service with Executor

Kind: static method of BaseService
Returns: BaseService - instance

| Param | Type | Description | | --- | --- | --- | | as | AsyncSteps | steps interface | | executor | Executor | executor instance | | options | object | implementation defined options |

documented by jsdoc-to-markdown.