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 🙏

© 2025 – Pkg Stats / Ryan Hefner

eq-order

v0.0.0-development

Published

This takes Solace messages for order updates, transforms the data and calls Equinox

Readme

Solace Template

App Status

Purpose

This project provides a working template for creating NextGen microservices.

Environment vars

This project uses the following environment variables:

| Name | Description | Required | Default Value | Accepted Values | | ------------- | ------------------------------- | -------- | ------------- | --------------- | | NODE_ENV | Environment | Yes | DEV | DEV, TEST, PROD | | PASSWORD | Password for solace | Yes | --- | | TEST_FILE | File to use when running PUB | No | testFile.json | | REFRESH_TOKEN | Token for Equinox API call | Yes | | | SESSION_ID | Session ID for Equinox API call | Yes | |

Pre-requisites

Getting started

Follow these steps to create a new Serverless Lambda project using this template:

1. Clone this project to your local device and remove git control files

Note: We use 'my-project' as the name of your new project

git clone [email protected]:ns-am/templates/serverless-lambda.git <my-project>
cd <my-project>
rm -rf .git

2. Create a new blank project in GitLab

Create it in the correct location based on its domain, stack location and technology.

  1. In the appropriate sub-group select "New project"
  2. Name your project
  3. Select a project description (optional)
  4. Select "Create project"

3. Connect your local project to the gitlab remote project

You can copy and paste the section in the gitlab command line instructions of your new project into the command line of your local project. It will look like the following but will have your project specific details.

cd <your project folder if you are not already there>
git init
git remote add origin <your gitlab project url>
git add .
git commit -m "Initial commit"
git push -u origin master

4. Install npm modules for your project:

# use path from above
cd <my-project>
yarn

5. Application.yaml

The application.yaml file is used by the solace-sync cli tool for building out Solace resources needed by your application.

6. Customize your service

  1. In ``config/default.json```, update the following:
    • serviceName - the name of your service in eqService
    • solace.userName - the name of the solace user assigned to this service
    • solace.clientName - the name of the client associated with this service
  2. In ./transformer.js, build out your custom transformer

7. Create .env file # TODO: looks like this is only used by doPublish.js

This file is used for developing and running your application locally. Do not commit this file to your git repo.

NODE_ENV=dev
PASSWORD=<password>
REFRESH_TOKEN=<token>
SESSION_ID=<sessionid>
  1. Open .env file, and update variable values
  2. Build and run the project
yarn start

Project Structure

The folder structure of this app is explained below:

| Name | Description | | ----------------- | ---------------------------------------------------------------- | | __mocks__ | Contains jest mocks | | __tests__ | Contains jest tests | | config | Application configuration including environment-specific configs | | src | Contains source code | | helpers | Contains code to do a test publish | | src/index.js | Entry point to the application | | Dockerfile | File used by docker to containerize application | | .gitignore | List of files and directories for Git to ignore | | jest.config.js | Configuration options for Jest | | .eslintrc | Configuration options for ES Lint | | .prettierrc | Configuration options for prettier | | package.json | Contains npm dependencies as well as build scripts | | .prettierignore | List of files and directories for prettier to ignore | | cx.config | File needed for common pipeline to pass | | yarn.lock | Yarn state snapshot | | .gitlab-ci.yml | CI pipeline configuration | | node_modules | Contains package dependencies |

Building the project

Running the build

All the different build steps are orchestrated via yarn scripts. yarn scripts basically allow us to call (and chain) terminal commands via npm.

| yarn Script | Description | | ----------- | -------------------------------------------------------------------- | | start | Runs node on src/index.js. Can be invoked with yarn start | | pub | Sends test message. Can be invoked with yarn pub | | test | Runs tests with coverage using jest. Can be invoked with yarn test | | lint | Runs ESLint on project files. Can be invoked with yarn lint |

Testing

The tests and assertions use Jest. Testing also utilizes eslint and prettier plugins.

"@jest/globals": "27.3.1",
"eslint": "8.2.0",
"eslint-plugin-jsdoc": "38.0.4",
"eslint-plugin-json": "3.1.0",
"jest": "28.1.0",
"jest-runner-eslint": "1.0.0",
"jest-runner-prettier": "1.0.0",
"jest-sonar-reporter": "2.0.0",
"prettier": "2.4.1"

Running tests using yarn Scripts

yarn test

ESLint

ESLint is a code linter that helps catch minor code quality and style issues.

ESLint rules

All rules are configured through .eslintrc.

Running ESLint

To run ESLint you can call the ESLint task.

yarn lint  // runs only ES lint

Common Issues