npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@forter/node-orm2-elasticsearch-adapter

v1.15.1

Published

> A driver of search expressions of ElasticSearch, to be used with a package [node-orm2](https://github.com/dresende/node-orm2).

Downloads

38

Readme

🤘 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 mocha
  • full-test runs tests, lint fix and outdated module check
  • lint runs ESLint which find problematic patterns in code
  • fix-lint runs ESLint with --fix flag to fix problematic patterns in code
  • watch-fix-lint automatically fix ESLint issues when code in src or test directories change
  • prettier runs prettier opinionated code formatter to align style of code
  • coverage runs nyc to produce a test coverage report
  • coverage:html runs nyc to produce a test coverage report and generates report in html format
  • check-outdated runs david which check if package npm dependencies are out of date
  • check-vulnerabilities" runs nsp 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.

  1. 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.
  2. 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