0.2.0 • Published 5 years ago

@attakei/bugsnag-firebase v0.2.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 years ago

@attakei/bugsnag-firebase

JavaScript Bugsnag wrapper for Cloud Functions.

Description

This package provides Cloud Functions's wrapper that catch errors and notify to Bugsnag.

Wrapper is very simple because only to catch any errors and push to Bugsnag.

Installation

This is published at npmjs. Use npm or yarn

npm install --save @attakei/bugsnag-firebase
yarn add @attakei/bugsnag-firebase

Usage

When you declare endpoint to Cloud Functions, use busnagFunctions from configureBugsnag instead of firebase-functions.

import { configureBugsnag } from '@attakei/bugsnag-firebase';

const bugsnagFunctions = configureBugsnag({
    // Your bugsnag configurations
    apiKey: 'your-api-key',
});

/**
 * bugsnagFunctions has `https.onCall` that behavior same as original firebase-functions.
 */
export A_HTTPS_CALLABLE = bugsnagFunctions.https.onCall((data, ctx) => {
    return 'hello world';
}))

References

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago