1.39.0 • Published 4 years ago

brandify-core-lib v1.39.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

BRANDIFY CORE LIBRARY

Set of B1 core modules.

Brandify-core-lib contains the core building modules of B1 such as brandify-state-machine, data-cleansing, etc. See documentations on core modules, https://brandify.atlassian.net/wiki/spaces/B2/pages/794886233/BrandifyOne+Platform+Architecture+Diagram+Component+Relationship.

npm.io

Installation

npm i git+ssh://git@bitbucket.org/bitbucket_brandify/brandify-core-lib.git

Command Line Interface

The node code for the command-line-interface is at the root of the project (cli.js)

To execute the application, first install the npm packages:

npm i

Afterwards, execute the application using node. To View the usage information for further execution instructions run:

node cli --help
or
node cli -h

Usage Examples:

node cli locationActionService -h
node cli locationActionService locationAddedActions -e dev -p 2d19da10-13e4-4f6e-bdc4-d6d9716ec1ce|d8138b63-1490-4283-b06c-72b598c6d569|bool--true
node cli locationActionService locationAddAcceptedActions -e dev -p d8138b63-1490-4283-b06c-72b598c6d569|bool--true|jsonfile--./file.txt

Troubleshooting

If you have npm version 5.1 - 5.6, you might encounter a bug in installation IF you already have another package dependency in bitbucket. If you do not have another package dependency that points to our bitbucket repository, then it works fine. The bug cause your previously install bitbuck package dependency to be remove from the "/node_modules" directory.

The fix is to install the latest version of NPM. To install the latest version of NPM, run the following command.

npm i npm@latest

Unit Test

Brandify core lib uses Mocha, Chi, Sinon

Assertion Library Documentation (Chi)

https://www.chaijs.com/guide/installation/

Unit Testing Framework Documentation (Mocha)

https://mochajs.org/

Mocking Library Documentation (sinon)

https://sinonjs.org/

To run all the unit test use the command listed below.

npm test

The command above will run all the test files ending with .test inside the unit-test folder. When creating a new test make sure to include .test.js so that mocha will pick it up. E.G.

brandify-core-lib.test.js

To run only the unit test for a single file use the command listed below.

mocha test/unit-test/pathToTestFile

Release History

  • 0.1.0
    • Initial commit of modules
  • 0.1.1
    • Added Brandify Publisher Library
    • Added fetching of system codes from the db
  • 1.2.3
    • Bug fixes