Socket
Socket
Sign inDemoInstall

bluedot-event-emitter

Package Overview
Dependencies
6
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bluedot-event-emitter

Bluedot Event Emitter - https://bluedotinnovation.atlassian.net/wiki/spaces/ENG/pages/317521924/Bluedot+Event+Bus


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Bluedot event bus emitter library

This library publishes messages to bluedot's event bus

Prerequisites

Install NodeJs

brew install node

Install Typescript

npm install typescript -g

Install Typescript lint

npm install tslint

Install dependencies:

npm install

Tests

Includes

  • Joi (https://github.com/hapijs/joi) for object schema validation and
  • Rosie (https://github.com/rosiejs/rosie) for test events generation

To run:

npm test

To check coverage:

npm run test:coverage-check

Build Steps

This starter kit uses Rollup (https://rollupjs.org/guide/en) for module bundling

Build library. NOTE: Update test coverage requirements

npm run build

This will build the

Publish library

npm publish

This will publish a CommonJS module and a ES module in the ./dist directory

Library configuration

Lambda:

// dont need to do anything. cloudformation will need to add permission policy provided
- Fn::ImportValue:
    !Sub '${EventBusStack}-AllowEmitterPolicyARN' // EventBusStack=bluedot-event-bus-dev-1

Bare metal:

include the following in your environment's variable:
AWS_ACCESS_KEY_ID=AKIAINVCEZNEUSKZLE2A
AWS_SECRET_ACCESS_KEY=iELkjPIGh26KWLBEKbTK5M5DiehEjSQJKQv7snmH
REGION=ap-southeast-2
TOPIC_ARN=arn:aws:sns:ap-southeast-2:791031460737:bluedot-config-events-dev-1

Library Usage

CommonJS:

const Test = require('typescript-library-starter-kit').Test

Test.test(payload)

ES:

import { Test } from 'typescript-library-starter-kit'

Test.test(payload)

License

This project is released under The Unlicense, your free to copy this and do what you like.

FAQs

Last updated on 13 Nov 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc