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

@oimlsmart/platform-server

v0.2.16

Published

The OIML SMART platform server kernel: the store seam (ServerStore + the D1 and SQLite implementations), the canonical D1 migration set both deployments apply, the instance profile, the mailer, the RBAC map, the OIDC/OAuth client cones, and the shared rol

Downloads

5,622

Readme

@oimlsmart/platform-server

The OIML SMART platform server kernel: the modules the certification platform (github.com/oimlsmart/smart) and the identity service (github.com/oimlsmart/identity) both consume, published once to npm so the two repositories never fork them. The boundary is measured, not aspirational: PROGRESS/41-identity-extraction-map.md §2 in the smart repository. Both consumers pin the published semver line; the version pin IS the contract (TODO.repos/01).

What it is

  • store, the ServerStore seam: the interface, every row type, the demo-account plan, installStore/getStore, and StoreUnavailable (the bounded writes' honest timeout error). Worker-safe.
  • store/d1, the Cloudflare D1 implementation: every write/batch/DDL statement races a confirmation budget (DEFAULT_STORE_WRITE_BUDGET_MS = 5 s; the consumer's STORE_WRITE_BUDGET_MS env binding retunes it through resolveStoreWriteBudgetMs + the d1StoreFor/D1ServerStore options) — a timeout throws the seam's StoreUnavailable. Reads stay unbounded. Worker-safe.
  • store/sqlite, the node implementation (better-sqlite3): the server store composed from the sync modules, the entity-store verbs, the raw driver handle, the schema (SQLITE_SCHEMA_PATH), and the migration set's location (MIGRATIONS_DIR). Node-only.
  • migrations/, the canonical D1 migration set. Both deployments point wrangler's migrations_dir at this directory in the consumer's node_modules; the live databases' journals key on the filenames.
  • profile, the deployment profile model (hub / IA / TL / identity): parse, resolve, install, the account seed plan. Worker-safe.
  • profile/node, the file/env profile loader. Node-only (fs).
  • mailer, the transactional mail seam (provider dispatch + the D1 outbox). Worker-safe.
  • rbac, the instance's effective role to permission map (installRbacMap / effectiveRbacMap). Worker-safe.
  • rbac/node, the map's node carriers (INSTANCE_RBAC_JSON, the profile file's rbac: section). Node-only (fs).
  • oidc, the OIDC relying-party client (discovery, PKCE, the code exchange, ID-token validation). Worker-safe.
  • github, the GitHub OAuth cone (state sign/verify, the authorized users declaration, the org-membership check). Worker-safe.
  • session, the oiml-session cookie seam: SESSION_COOKIE, sessionUser(c), sessionCookieOpts(c). Worker-safe.
  • client-info, the request's client context (user agent, IP). Worker-safe.
  • vocab, the shared identity vocabulary: the role model, the role to permission map, the action-permission catalog. Isomorphic.

The worker-safe rule, at package granularity: every subpath except store/sqlite, profile/node and rbac/node carries no node built-ins; a Worker bundle never imports the three node subpaths.

The migration contract

migrations/ is the ONE schema-migration set both deployments apply (the smart platform's D1 databases and the identity service's account registry alike):

  • Expand-only, filename-keyed. A new schema act appends NNNN_name.sql; existing files never change and never renumber. wrangler records applied filenames in each database's d1_migrations journal, so a rename or an edit would split the live history.
  • Duplicate sequence numbers are legal siblings (the wave that landed two stores the same week); apply order is the filename sort.
  • test/migrations.test.ts pins the set's end state to src/store/sqlite/schema.sql (table and column sets), so the SQLite DDL and the D1 journal path can never drift apart inside the package.
  • Consumers read the set's location from MIGRATIONS_DIR (@oimlsmart/platform-server/store/sqlite); deploy configs point at node_modules/@oimlsmart/platform-server/migrations.

Source-form exports

The package ships its TypeScript sources directly (the @oimlsmart/site-shell pattern, no build step): the consumers' toolchains (vite/astro, tsx, vitest, vue-tsc) compile them in place.

Development

npm ci
npm run typecheck
npm test

Releasing

Trusted publishing rides v* tags on this repository (the .github/workflows/release.yml machinery, npm OIDC, no stored token): bump version in package.json on main (the package-lock.json root fields bump with it), tag v<x.y.z> at the merge commit, push the tag. The workflow runs the gates, refuses a tag that does not equal the package version, and publishes with --provenance. The one-time bootstrap (the manual first publish + the npmjs.com trusted publisher enrollment) is done; the runbook is docs/deployment/npm-releases.md in the smart repository.