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

@feltdb/migration-sherpa

v0.4.4

Published

Fail-closed PostgreSQL to FeltDB-native application-state migration engine

Downloads

466

Readme

FeltDB Migration Sherpa

Configuration-driven PostgreSQL → FeltDB-native application-state migration. Extracted from the Synapse reference migration and designed to fail closed at classification, capability, canonical-state, and semantic-proof gates.

Install

npm install --save-dev @feltdb/migration-sherpa

The package provides both the felt-migrate CLI and a typed ESM API.

Configure

Create felt-migrate.json:

{
  "sourceRoot": ".",
  "schemaFile": "postgres-schema.json",
  "artifactDir": ".feltdb",
  "confidenceThreshold": 0.9,
  "strictStateContract": true,
  "feltDbRuntime": {
    "mode": "node",
    "requiredEnvironment": ["FELTDB_STORAGE_PATH"],
    "healthCheck": "FeltDB checkpoint storage is writable",
    "persistence": "atomic checkpoint"
  },
  "classificationOverrides": {
    "release_events": "HISTORY"
  },
  "stateDomains": [
    {
      "name": "release",
      "authoritativeState": "releases",
      "history": "release_events",
      "tenantKey": "tenant_id"
    }
  ],
  "capabilities": {
    "atomicTransactions": true,
    "immutableHistory": true,
    "deterministicOrdering": true,
    "durablePersistence": true,
    "indexedQueries": true,
    "tenantIsolation": true,
    "idempotentWrites": true,
    "concurrencySafety": true,
    "reconstruction": true,
    "versionConflicts": true,
    "canonicalStateRefresh": true,
    "stateHistorySeparation": true,
    "uiStateContract": true
  }
}

The schema inventory has the shape { "entities": [...] }. Its TypeScript definitions are exported as Entity, Column, and ForeignKey.

Run

npx felt-migrate analyze
npx felt-migrate classify
npx felt-migrate review --approve
npx felt-migrate postgres-scan
npx felt-migrate all

all never crosses a human approval gate automatically. Machine-readable analysis, plans, checkpoints, state contracts, proofs, measurements, reports, and the migration manifest are written beneath .feltdb/.

Programmatic migration

import { migrate } from '@feltdb/migration-sherpa';

const checkpoints = await migrate(
  migrationPlan,
  domainModel,
  postgresSourceAdapter,
  feltDBPrimitiveAdapter,
  previousCheckpoints,
  tenantId,
  telemetry => observability.emit(telemetry),
);

The source and target adapters keep database credentials and runtime choices outside the engine. Migration is deterministic and resumable through checkpoints and idempotency keys. Secret and blob payload columns are removed before target writes; FeltDB receives references, not sensitive or oversized payloads.

Product-specific classifications and state semantics belong in configuration and adapters, never in the package itself.

PostgreSQL-free cutover

The runtime scanner distinguishes application dependencies from permitted migration sources, rollback infrastructure, legacy fallback code, tests, development, and build tooling:

npx felt-migrate postgres-scan
npx felt-migrate config-scan
npx felt-migrate deployment-scan
npx felt-migrate postgres-remove
npx felt-migrate postgres-verify

postgres-remove generates an approval-required configuration plan; it does not silently edit configuration. Classification exceptions are explicit and auditable through runtimeDependencyOverrides, keyed by file, file:line, or dependency identity.

Dynamic verification uses an application-owned module so deployment startup is not hard-coded into the Sherpa:

{
  "runtimeVerificationModule": "./migration/postgres-isolation.js"
}

The module exports createHarness() (or a default factory) returning startWithPostgresBlocked, executeWorkflow, restart, verifyRecovery, postgresConnectionAttempts, and optional cleanup functions. A passing proof requires successful startup, workflow persistence, restart recovery, and zero PostgreSQL connection attempts.