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

@ironcorelabs/ironnode

v1.0.0

Published

IronCore Labs SDK for NodeJS Applications

Downloads

249

Readme

IronCore Labs NodeJS SDK

Build Status NPM Version

SDK for using IronCore Labs from your NodeJS server side applications. Read our documentation for further information about how to integrate this library into your server side application. Also check out the integration directory for an example of consuming this library.

Supported Platforms

| | Node 16 | Node 18 | Node 20 | | --------------------- | ------- | ------- | ------- | | Linux x64 glibc | ✓ | ✓ | ✓ | | Linux x64 musl-libc | ✓ | ✓ | ✓ | | Linux arm64 glibc | ✓ | ✓ | ✓ | | Linux arm64 musl-libc | ✓ | ✓ | ✓ | | OSX x64 | ✓ | ✓ | ✓ | | OSX arm64 | ✓ | ✓ | ✓ | | Windows x64 | ✓ | ✓ | ✓ |

Installation

npm install @ironcorelabs/ironnode

This SDK relies on our recrypt-node-binding Node addon library. This library is distributed as a binary which is specific to both an architecture (OSX/Linux/Windows) and Node version (10/12). When you NPM install this SDK it will automatically determine the proper binary to pull down into your node_modules directory based on your architecture and Node version.

This means that you'll need to make sure that the machine that runs npm install to install this library is the architecture/Node version where the code will run. This library will not work if you run npm install on an OSX machine and move the node_modules directory over to a Linux machine, for example.

If the machine you run npm install on is not one of the supported architectures you will get an install failure. If there's an architecture or Node version that you'd like supported that isn't yet available, open a new issue and we'll look into adding support for it.

Types

This library contains a TypeScript definitions file which shows the available classes and methods for this SDK.

Local Development

Integration Testing

In order to run the integration tests for this repo you need to have an IronCore Project, Segment, and Service Key to use. If you haven't yet, sign up for an account and create a set of those to use for testing this library.

Once you have all three items configured, do the following:

  • Copy your Service Key private.key file into the integration directory.
  • Create a project.json file in the integration directory with the following JSON form
{
    "projectId": numeric project ID,
    "segmentId": string segment ID,
    "serviceKeyId": numeric service key ID,
}

Once you have your Service Key private key and config file setup, you can run the yarn start command to kick off an interactive CLI tool. This tool will first let you pick a user operation, either verify, create, or generate device keys. You can verify existing users or create new users from this menu. Before any SDK operations are allowed to run you must generate local device keys. When you pick this option and the keys are generated, they will be stored in a .device.json file in the integration directory. Subsequent CLI runs will ask if you want to use those local device keys.

Unit Testing and Linting

This repo uses NPM scripts in order to run all tests and linting. You can run both the unit tests and linting together by running yarn test.

Linting

TSLint is used to run linting on all source code. In addition this repo has a Prettier configuration to auto-format source code upon save. Prettier should be configured within your IDE before contributing to this project.

yarn run lint

Unit Testing

This repo uses Jest for all unit testing.

yarn run unit

To run a subset of the tests you can use the -t option of Jest to only run tests whose name matches the provided value

yarn run unit -t group

Copyright (c) 2020 IronCore Labs, Inc. All rights reserved.