Socket
Book a DemoInstallSign in
Socket

bluedot-event-emitter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

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

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
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

Package last updated on 13 Nov 2018

Did you know?

Socket

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