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

@distilled.cloud/neon

v1.0.0-rc.15

Published

Readme

@distilled.cloud/neon

An Effect-native SDK generated from Neon's public OpenAPI description. Operations expose typed inputs, outputs, and API errors for Postgres projects and branches, Functions, triggers, storage, managed Auth, Data API, and branch credentials.

import * as Neon from "@distilled.cloud/neon";
import { CredentialsFromEnv } from "@distilled.cloud/neon/Credentials";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as FetchHttpClient from "effect/http/FetchHttpClient";

const projects = Neon.listProjects({ limit: 20 }).pipe(
  Effect.provide(Layer.mergeAll(CredentialsFromEnv, FetchHttpClient.layer)),
);

const result = await Effect.runPromise(projects);
console.log(result.projects.map(({ id, name }) => ({ id, name })));

Spec source

The source is the Neon API OpenAPI document, pinned through specs/spec-mirror-neon. Corrections live in patches/; generated models and TypeScript are committed. From the Distilled repository root, run pnpm generate neon to convert, generate, and format the SDK. Refresh only the Neon spec mirror when updating its source.

Authentication

CredentialsFromEnv reads NEON_API_KEY and the optional NEON_API_BASE_URL. fromApiKey({ apiKey }) supplies an explicit deployment credential. Keep account API keys on trusted deployment infrastructure: they are not end-user authentication and must not be exposed to a browser.

Branch credentials are separate managed API objects. Issue/reveal/rotate responses redact API tokens and S3 secrets. Reveal recovers an existing active credential; rotation changes it and is not a substitute for recovery. Revoked credentials can remain in list responses with revoked_at set.

Function deployments

Functions use a Node.js 24 Fetch entrypoint in an index.mjs ZIP. The deployment operation accepts Blob, Uint8Array, or ArrayBuffer ZIP data without converting binary bytes to text:

const deploy = Neon.createProjectBranchFunctionDeployment({
  project_id: "your-project-id",
  branch_id: "your-branch-id",
  slug: "api",
  runtime: "nodejs24",
  zip: archiveBytes,
  environment: JSON.stringify({ LOG_LEVEL: "info" }),
});

archiveBytes is the ZIP's Uint8Array. The SDK sends environment as a single multipart string. Omitting ZIP requests a configuration-only deployment. Empty environment values are preserved as submitted; the documented deletion value is "".

A successful deployment API response is not proof that invocation serves the requested version. Applications must authenticate public Function requests in their handlers.

Triggers

Trigger creation and updates use a discriminated body, matching the API's schedule and object-created variants:

const trigger = Neon.createProjectBranchTrigger({
  project_id: "your-project-id",
  branch_id: "your-branch-id",
  body: {
    type: "schedule",
    function_slug: "api",
    name: "nightly",
    schedule: { cron: "0 2 * * *" },
    enabled: false,
  },
});

Storage triggers use type: "storage_object_created" and storage_object_created: { bucket_name, prefix }. These trigger HTTP delivery to a Function; the SDK does not provide an exactly-once delivery guarantee.

Storage

Management operations configure branch buckets and presigned object requests. Presigned URLs are redacted; unwrap them only where needed for the request. Object downloads return Uint8Array, preserving binary contents. The protocol does not forward account authorization when following cross-origin download redirects.

For direct S3 clients, Neon credentials are branch-lineage scoped. storage:read grants reads and storage:write grants reads and writes; neither is a bucket- or object-specific policy. Use Neon's branch-specific S3 endpoint with path-style addressing.