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

@zincapp/znvault-migrate

v1.0.1

Published

Shared MySQL schema-migration library for ZnVault deployer tooling

Readme

@zincapp/znvault-migrate

Shared MySQL schema-migration library for ZnVault deployer tooling.

Extracts the migration engine (discover .sql files → plan pending/reconcile → acquire lock → apply scaffolding helpers → run → reconcile → drop scaffolding → track in schema_migrations) behind an engine-agnostic EngineAdapter interface, so multiple deployer plugins and the znvault CLI can share one proven migration runner.

Scope: MySQL only. The EngineAdapter interface is engine-agnostic so a PostgreSQL adapter can be added later, but no PostgreSQL adapter is built hereengine: 'postgres' errors at validation. (PostgreSQL has an unsolved ownership-transfer-on-revoke problem that gets its own design.)

Install

npm install @zincapp/znvault-migrate

What it provides

  • runMigrations(ctx, opts, deps) — the top-level entrypoint: mints a dynamic-secrets lease, opens a dedicated connection via the engine adapter, runs the migration engine, and revokes the lease (with a settle delay, revoke-retry, and SIGINT/SIGTERM handlers).
  • MigrationRunner — the engine-agnostic orchestrator (run() / status()).
  • mysqlAdapter — the MySQL EngineAdapter implementation.
  • validateMigrationConfig(cfg) / MigrationConfig — config schema + validation (engine is required; engine: 'postgres' is rejected).

Credential model

Credentials come only from a ZnVault dynamic-secrets lease (config carries a roleId; there are no raw connection-string options). Every run mints an ephemeral, audited lease and revokes it on exit — preserving the clean-revoke posture the scaffolding design depends on.

MySQL scaffolding (ER-4006)

MySQL's DROP USER fails (ER-4006 on 8.4) if the user is the DEFINER of any stored routine. When a scaffoldingFile is configured, the lease user creates the helper procedures at phase start and the runner drops every object that user defines at phase end — so the ephemeral migrate user owns nothing on revoke and DROP USER is always clean.

Development

npm install
npm run build       # tsc
npm test            # vitest run (real-MySQL e2e self-skips without MYSQL_TEST_HOST)
npm run typecheck
npm run lint

# Run the real-MySQL-8.4 e2e + integration tests against a local MySQL:
MYSQL_TEST_HOST=127.0.0.1 MYSQL_TEST_PORT=33306 MYSQL_TEST_DB=zincdb \
  MYSQL_TEST_USER=root MYSQL_TEST_PASSWORD=root npm test

Release

Publishing is handled by GitHub Actions on a version tag (OIDC Trusted Publishing — no npm token):

npm version patch   # or minor/major
git push origin main --tags

License

MIT