@forter/elasticsearch-query-builder v1.4.2
π Elasticsearch Query Builder
A class for building a valid ElasticSearch query search expression, using best practices for each operators.
π¨βπ Installing
Clone from the current repo and then run the following command inside the root folder:
npm iπ§ββοΈ CLI
npm are included as follows:
testruns the unit test suitescommitwizard for creating a commit message that will automatically add interesting stuff to changelog and have a meaning. You may also usegit czif you installcommitizenglobally withnpm i -g commitizensemantic-releasewill be responsible for releasing the proper version to npm and add changelog.watch-testautomatically re-runs your test suite when code insrcortestdirectories changefull-testruns tests, lint fix and outdated module checklintruns ESLint which find problematic patterns in codefix-lintruns ESLint with --fix flag to fix problematic patterns in codeprettierruns prettier opinionated code formatter to align style of codewatch-fix-lintautomatically fix ESLint issues when code insrcortestdirectories changecoverageruns nyc to produce a test coverage reportcheck-outdatedrunsdavidwhich check if package npm dependencies are out of datecheck-vulnerabilities"runsnspwhich check if package npm dependencies have security issues
π€΅ Directory Layout
.
βββ test/ # Unit, integration and load tests
βββ index.js # Node.js file (entery point)
βββ 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.