@forter/node-orm2-elasticsearch-adapter v1.15.1
π€ Node ORM2 Elasticsearch Adapter
A driver of search expressions of ElasticSearch, to be used with a package node-orm2.
π¨βπ Installing
Clone from the current repo and then run the following command inside the root folder:
npm i
π§ββοΈ CLI
npm
or make
are included as follows:
test
runs the unit test suites using mochafull-test
runs tests, lint fix and outdated module checklint
runs ESLint which find problematic patterns in codefix-lint
runs ESLint with --fix flag to fix problematic patterns in codewatch-fix-lint
automatically fix ESLint issues when code insrc
ortest
directories changeprettier
runs prettier opinionated code formatter to align style of codecoverage
runs nyc to produce a test coverage reportcoverage:html
runs nyc to produce a test coverage report and generates report in html formatcheck-outdated
runsdavid
which check if package npm dependencies are out of datecheck-vulnerabilities"
runsnsp
which check if package npm dependencies have security issues
π€΅ Application Structure
.
βββ test/ # Unit tests folder
βββ elasticSearchAdapter.js # Node.js file (entery point)
βββ elasticSearchResultFormatter.js # Take the structure returned from ES and format it as array of objects that node-orm2 use.
βββ SQLLikeQueryBuilder.js # A implementation of the node-orm2 driver using elasticsearch expressions
βββ Dockerfile # Commands for building a Docker image for production
βββ Jenkinsfile # Commands for building in Jenkins CI
βββ Makefile # Commands as described below
βββ package.json # The list of project dependencies
π¨ββοΈ Linting
ESLint comes already installed, extending eslint-recommanded. Don't forget to install the appropriate plugin for your editor.
npm run fix-lint
π¨βπ¬ Testing
Mocha is a JavaScript test runner that runs both on Node.js and in the browser. It provides functionality for testing both synchronous and asynchronous code with a very simple and similar interface. To run all tests please do following:
npm test
π Coverage
Istanbul is used to produce a test coverage report. Look inside the coverage
folder after running npm run coverage
to see the results.
npm run coverage
π©βπ Deploying
There is no need to deploy once your tests have passed and your branch has merged with master. However you may have to update your package.json
to the newest version, in the repo that is using this package, depending on how your package.json
is configured.
π·βContributing
Pull requests are welcome. For major changes, please discuss first what you would like to change and why. Please make sure to update tests as appropriate.
- Create a PR and commit using "feat: your message"
- In case version and last tag are not synchronized, update package.json version to the current version.
- After PR got published create another PR and update the package.json version to the most updated version number found at tags and use "chore: your message" to not publish a new lib
11 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago