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

@kindgi/connections-inmemory

v0.8.1

Published

An in-memory ConnectionBinding and ConnectionResolver with a fake app, for development and tests only; refuses to start in production.

Readme

@kindgi/connections-inmemory

An in-memory ConnectionBinding and ConnectionResolver for Kindgi connections, with a fake app in place of Google's or GitHub's servers. It's for development and tests: everything lives in the process, and it refuses to start under NODE_ENV=production unless you pass productionSafe: true for a parity test.

import { createApp } from '@kindgi/api';
import { github } from '@kindgi/connections/github';
import { google } from '@kindgi/connections/google';
import { createInMemoryConnections } from '@kindgi/connections-inmemory';

const connections = createInMemoryConnections({
  entries: [google, github],
  publicUrl: 'http://localhost:3000',
});
const app = createApp({ /* … */ envName: 'local', connections: connections.binding });

A connect without a browser. Start the request, read state from its authorizeUrl, and finish with code: 'ok', or error: 'access_denied' for a decline. Tokens are fake-<connectionId>-<n>.

The fake app (app) answers as an app where everything works, unless a hook says otherwise:

  • exchange: the account and the permissions granted for a code, or 'refused'. refreshToken: false gives no refresh token (a GitHub App ignores it): a finish then keeps one the connection had before; else, for an app whose signIn.refreshToken is 'optional', the connection works until one minute before its token ends (accessEndsAt), and any other app's finish refuses it. expiresIn: false leaves out when the token ends, which a finish left with no refresh token refuses too;
  • renew: 'ok', 'invalid-grant' (the connection needs reconnecting), or 'unavailable' (the call fails with connection-renew-failed);
  • withdraw: a disconnect's revoke, 'ok' or 'failed';
  • installations: the GitHub App installations the person reaches (one by default; none sends the start to the install page);
  • notice: what a notice from the app does. Without it, every notice is refused;
  • lookUp: a number's lookup at a texts connect, 'ok' or 'refused' (the provider refused the registration's credential: connection-app-refused);
  • restoreInbound: putting a number's inbound back at its removal, 'ok' or 'failed' (the connection stays removing: inbound-restore-failed).

seed.app and seed.connection put a registration or a connection in place directly; seed.connection with refreshToken: false is one without a refresh token (only for an 'optional' app). calls lists every call to the fake app, never a token. onConnectComplete is told when a run's connect finishes, as a server completes the run's wait.

Texts. Register the texts entry with token (the provider, the API key's secret by reference, the account's public key), then connect with number: the fake provider looks it up, and the request comes back connected at once, with the account num-<the number's digits>. seed.inbound says where a number's texts go today: a connect without replaceInbound: true is then inbound-in-use, and with it the old inbound is kept, for the removal to put back. seed.credentialRefused marks a number's connection as a server does when the provider refuses the key; a reconnect of the same number makes it work again. Connecting and removing work here; texts come in only on a Kindgi server.

Connection choices. setChoice needs to know a project's agents and flows: pass inProject, which says whether an agent or a flow is one of a project's. Without it, none is, and every choice is refused.

Which company connection a call uses. The resolver takes the run's mailbox's connection, else the agent's or flow's choice, else the only candidate, as a server does. Several and no choice is connection-not-chosen; a picked one that can't serve the call is connection-missing, naming it, never another one.

Apache-2.0.