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

jovo-plugin-inbox

v3.6.1

Published

Downloads

3

Readme

Jovo Inbox Plugin

Installation

npm install --save jovo-plugin-inbox

This plugin uses TypeORM to provide access to various databases. Depending on the SQL Database you use, an additional installation of the database driver is necessary.

MySQL or MariaDB

npm install --save mysql

PostgreSQL or CockraochDB

npm install pg --save

SQLite

npm install --save sqlite3

More databases: https://typeorm.io/#/undefined/installation

Usage

const { JovoInboxPlugin } = require('jovo-plugin-inbox');

app.use(
    new JovoInboxPlugin({
        appId: 'PizzaPlace',
        db: {
			type: 'mysql',
			host: 'host',
			port: 3306,
			username: 'user',
			password: 'pass',
			database: 'jovoinbox',
		},         
    })
);

See https://github.com/typeorm/typeorm/blob/master/docs/connection-options.md for database specific config.

Config

{
    appId: string;
    defaultLocale: string; // defaultLocale for platforms without a locale in the request
    skipPlatforms?: string[]; // platforms where no data is stored, e.g. ['Alexa', 'GoogleAssistant']
    skipLocales?: string[]; // requests from given locales are skipped, e.g. ['de', 'en-US'],
    skipUserIds?: string[]; // users from given ids are skipped, e.g. ['jovo-debugger-user']
    skipRequestObjects?: string[]; // paths to objects in request json, e.g. ['context.System.apiAccessToken']
    skipResponseObjects?: string[]; // paths to objects in response json,
    maskRequestObjects?: string[]; // paths to objects in request json that are masked, e.g. sensitive data like access tokens
    maskResponseObjects?: string[]; // paths to objects in response json that are masked
    maskValue: string | Function; // new value for masked objects
    db: ConnectionOptions; // db connection options 
}

Troubleshooting

Open database connections on AWS Lambda won't let the event loop get empty. The result is a timeout for every request. This can be fixed by adding the following line into the handler method inindex.js / index.ts

exports.handler = async (event, context, callback) => {
  context.callbackWaitsForEmptyEventLoop = false; // <-- ADD THIS
  await app.handle(new Lambda(event, context, callback));
};