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

nonstop

v0.1.9

Published

A self-updating service host

Downloads

15

Readme

nonstop

Nonstop is a bootstrapper/service host that self-updates when new packages that match its configured parameters become available in the nonstop-index.

Configuration

Nonstop can be used either as a library or as a command line interface.

As a command, you can configure it via a bootstrap.json file and environment variables.

Note: environment variables take precendent over settings in the file.

Bootstrap file

Defaults are shown here. The index property provides information necessary to contact the package index. The package property allows you to specify filtering information for the package. You shouldn't need to set the architecture or platform as those are detected for you.

{
    "index": {
      "host": "localhost",
      "api": "/api",
      "frequency": 300000,
      "port": 4444,
      "ssl": false,
      "token": ""
    },
    "package": {
      "architecture": detected,
      "branch": "",
      "build": "",
      "owner": "",
      "platform": detected,
      "project": "",
      "releaseOnly": false,
      "version": "",
      "files": "./downloads"
    },
    service: {
      name: sysInfo.name,
      host: {
        ip: '',
        name: ''
      },
      port: {
        local: 9090,
        public: 9090
      },
      tolerance: 5000,
      failures: 1
    }
  }

Environment Variables

| Group | Variable | Default | |-------|-------------|---------| | Index | | | | | INDEX_HOST | "localhost" | | | INDEX_API | "api" | | | INDEX_FREQUENCY | 5000 | | | INDEX_PORT | 4444 | | | INDEX_SSL | false | | | INDEX_TOKEN | "" | | Package | | | | | PACKAGE_OWNER | | | | PACKAGE_PROJECT | | | | PACKAGE_BRANCH | | | | PACKAGE_BUILD | | | | PACKAGE_VERSION | | | | PACKAGE__RELEASE_ONLY | | | | PACKAGE_ARCHITECTURE | detected | | | PACKAGE_PLATFORM | detected | | | PACKAGE_FILES | "./downloads" | | service | | | | | SERVICE_NAME | "service name" | | | SERVICE_HOST_NAME | "service name" | | | SERVICE_HOST_IP | "unspecified | | | SERVICE_PORT_LOCAL | 9090 | | | SERVICE_PORT_PUBLIC | 9090 | | | SERVICE_FAILURES | 1 | | | SERVICE_TOLERANCE | 5000 |

Boot file - boot.yaml|boot.json

nonstop expects a boot file to be contained in any package it downloads which will provide the instructions for how it should start the packaged application. The files can be written in either JSON or YAML syntax.

The boot file consists of two sections: the service boot command and an optional pre-boot command set. The boot command simply tells nonstop how to start the packaged service while the optional pre-boot command set gets fed to drudgeon. Both the boot command and pre-boot commands are expressed using drudgeon's command syntax since it has a flexible means of supporting command and command set variation across platforms.

Note: these examples are super arbitrary and should not be used to infer how you would actually create steps for an actual thing.

JSON

{
  "boot": "node ./src/index.js",
  "preboot": {
    "one": {
      "win32": "gulp check-windows",
      "*": "gulp check"
    },
    "two": "node prep"
  }
}

YAML

boot: "node ./src/index.js",
preboot:
  one:
    win32: "gulp check-windows"
    *: "gulp check"
  two: "node prep"