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

@foundrynorth/compass-schema

v1.0.41

Published

Canonical Drizzle ORM schema for Foundry Compass (divine-pine database)

Downloads

8,292

Readme

@foundrynorth/compass-schema

Canonical Drizzle ORM schema for the Foundry Compass database (divine-pine-a4rvra4z).

This repo is intentionally lightweight: edit TypeScript in src/, compile to dist/, and publish the package. There are no local database services, Docker Compose files, or migration commands to run here.

Install

npm install @foundrynorth/compass-schema

Usage

import { mediaOrders, partners, plans } from "@foundrynorth/compass-schema";
import { relations } from "@foundrynorth/compass-schema/relations";

| Export | Purpose | |--------|---------| | @foundrynorth/compass-schema | All table and enum definitions | | @foundrynorth/compass-schema/relations | Drizzle relation definitions |

Consumers

  • fn-legacy (Compass) — uses shared/schema.ts as a compatibility shim and Drizzle entrypoint
  • fn-v2 (Trigger.dev tasks)
  • Historical fn-worker usage is migration debt only

Contributor Quick Start

Contributor tooling is standardized on Node 20:

  • .nvmrc pins the local shell version for nvm
  • .devcontainer/devcontainer.json uses the same Node 20 baseline
  • GitHub Actions runs CI on Node 20

The published package still declares node >=18 for consumers, but contributors should use Node 20 so local behavior matches CI.

Local setup

nvm use
npm ci
npm run check
npm run build

Devcontainer setup

Open the repo in a devcontainer if you want an isolated package-only workspace. The container:

  • uses the official Node 20 devcontainer image
  • runs npm ci after creation
  • does not start any local services

After the container is ready:

npm run check
npm run build

Safe Working Rules

  1. This package is the canonical Compass schema source.
  2. fn-legacy owns database migrations for Compass. Do not generate or apply migrations from this repo.
  3. dist/ is committed. When schema or type exports change, rebuild and commit the matching dist/ output with the source change.
  4. Keep git and release work scoped to this package repo. Consumer installs and migration work happen after publish in the consumer repos.

Package Commands

| Command | Purpose | |---------|---------| | npm ci | Install locked dependencies | | npm run check | Type-check without emitting files | | npm run build | Compile src/ to dist/ | | npm version patch | Bump the package version for a patch release | | npm publish | Publish to npm (prepublishOnly runs npm run build) |

Schema Change Workflow

Use this when making a schema or shared-type change in this repo:

  1. Edit the source in src/.
  2. Run npm run check.
  3. Run npm run build.
  4. Review the generated dist/ changes before committing.
  5. Publish a new package version when the change is ready.

This repo stops at the package boundary. Migration generation and database changes happen later from fn-legacy.

Release Workflow

When you are ready to publish:

  1. Verify the package is clean with npm run check and npm run build.
  2. Bump the version with npm version patch (or minor / major as needed).
  3. Publish with npm publish.
  4. Update consumers:
    • cd ~/Developer/fn-legacy && npm install @foundrynorth/compass-schema@latest
    • cd ~/Developer/fn-v2 && pnpm install @foundrynorth/compass-schema@latest
  5. In fn-legacy, run npm run check, then npm run db:generate, review the generated SQL, and run npm run db:migrate.

Full Documentation

See: