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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nuskin/solace-sync

v2.0.0

Published

Sync functionality between solace and Nu Skin microservices

Readme

Solace Sync Library

Purpose

This package provides a series of Configuration as Code solutions for building out resources in Solace:

  • application
    • deleteSolaceApplication
    • getSolaceApplications
    • parseConfig
    • syncApplication
  • queue
    • createQueue
    • deleteSolaceQueue
    • syncQueues
    • getSolaceQueue
    • getSolaceQueues
  • subscription
    • createQueueSubscription
    • deleteSolaceQueueSubscription
    • getSolaceQueueSubscription
    • getSolaceQueueSubscriptions
    • syncQueueSubscriptions
  • event
    • syncEvent
  • schema
    • syncSchema
  • applicationDomain

Install

yarn add @nuskin/solace-sync

Usage

'use strict';

// Import library
const solaceSync = require('@nuskin/solace-sync');

// Get list of applications on Solace
const solaceApplications = await getSolaceApplications();

// Sync applications between config and Solace
const application = await syncApplication(config, solaceApplications);

// Sync queues between config and Solace
const queues = await syncQueues(config['queues']);

// Sync queue subscriptions
const queueSubscriptions = await config['queues'].reduce(
  async (promise, queue) => {
    const accum = await promise;
    if (_.isEmpty(queue['subscriptions'])) return accum;
    const subs = await syncQueueSubscriptions(
      queue['queueName'],
      queue['subscriptions']
    );
    return _.union(accum, subs);
  },
  Promise.resolve([])
);

// Sync events between config and Solace, {source} is the path to begin search for .yaml configuration files
await syncEvents(source);

// Sync schemas between config and Solace, {source} is the path to begin search for .json configuration files
await syncSchemas(source);

Environment vars

This project uses the following environment variables:

| Name | Description | Required |Default Value | Accepted Values | --- | --- | --- | --- | --- | NODE_ENV | specifies the environment in which the application is running | Yes | --- | dev, test, stage, prod | SOLACE_API_TOKEN | Solace rest API token | Yes | --- | | SEMP_BASIC_AUTH | Encoded Basic Auth Credentials for SEMP access | Yes | --- |

Pre-requisites

Install

yarn add @nuskin/solace-sync

Project Structure

The folder structure of this app is explained below:

| Name | Description | --- | --- | __mocks__ | Contains jest mocks | __tests__ | Contains jest tests | src | Contains source code | .gitignore | List of files and directories for Git to ignore | jest.config.js | Configuration options for Jest | jest.util.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 | application.yaml | Configuration file

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

"@babel/core": "7.18.5",
"@jest/globals": "28.1.1",
"@nuskin/docdash": "1.0.1",
"eslint": "8.18.0",
"eslint-config-google": "0.14.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-jsdoc": "39.3.3",
"eslint-plugin-json": "3.1.0",
"eslint-plugin-prettier": "4.0.0",
"jest": "28.1.1",
"jest-runner-eslint": "1.0.1",
"jest-runner-prettier": "1.0.0",
"jest-sonar-reporter": "2.0.0",
"jsdoc": "3.6.10",
"prettier": "2.7.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