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

@andrewheberle/serverless-ssh-ca-testing

v0.25.0

Published

Runs the Serverless SSH CA under Node.js or workerd for end-to-end tests of clients

Downloads

1,683

Readme

@andrewheberle/serverless-ssh-ca-testing

Runs the Serverless SSH CA for end-to-end tests of clients, such as ssh-ca-client.

The CA can be run under:

  • node: Node.js, using the package's Node.js helpers with an in-memory node:sqlite database
  • workerd: the Cloudflare Workers runtime, using the Wrangler test harness with a local D1 database and Secrets Store, as wrangler dev would

Nothing is persisted between runs.

This package is released with @andrewheberle/serverless-ssh-ca and uses whichever version of that package is installed alongside it. To test a client against an unreleased version of the CA, install a tarball from npm pack in its place.

Requirements

Node.js 24 or later.

Usage

npm install --save-dev @andrewheberle/serverless-ssh-ca @andrewheberle/serverless-ssh-ca-testing
npx serverless-ssh-ca-test-server [--runtime node|workerd] config.json

The runtime defaults to node. Clients that start the server from another language can run node node_modules/@andrewheberle/serverless-ssh-ca-testing/dist/cli.js, which avoids the platform-specific shims in node_modules/.bin.

The server exits when its standard input is closed, so it does not outlive the test that started it. If it cannot start, it writes the reason to standard error and exits with status 1.

Configuration

The configuration file is a JSON object:

| Property | Description | |---------------|--------------------------------------------------------------------------| | private_key | The CA private key in OpenSSH format | | bindings | The CA configuration, as the Workers vars (environment variables) | | port_file | Path the port is written to once the CA is listening on 127.0.0.1 | | log_file | Path that log output from the CA and harness is appended to as JSON lines |

The bindings are those documented for the CA, with every value as a string. Under workerd, Wrangler's working files are written to the directory containing the configuration file.

Log file

Each line of the log file is a JSON object with at least level and message. Lines logged by the CA are written as they are, and the harness adds lines whose message starts with harness:

  • {"level":"info","message":"harness request","method":...,"url":...,"status":...} for every request, where url is the path and query. When status is 400 or more, body holds the response body, so a test can check why a request was rejected.
  • {"level":"error","message":"harness ...",...} for a fault, meaning the CA or harness failed rather than rejected a request. Some faults, such as a failure to record an issued certificate, are only visible in the log, so tests should fail if any of these lines appear. A CA log line that indicates a fault is followed by a line with the message harness fault and the original line in line.

Under workerd, the CA's output is copied to the log file every 100ms, so a request may be logged shortly after its response is received.

Programmatic use

import { startTestServer } from "@andrewheberle/serverless-ssh-ca-testing"

const server = await startTestServer("node", "config.json")
// make requests to http://127.0.0.1:${server.port}
await server.close()

Under node the CA's console output is redirected to the log file until the server is closed.