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

@haneinfo/common

v0.7.2

Published

Readme

@haneinfo/common

Prisma 6 and 7 consumers

PrismaModule without options retains the Prisma 6 behavior. For Prisma 7, import PrismaModule.forRoot({ adapter }) once in the App's platform composition. The App creates its own @prisma/adapter-pg adapter and configures the connection string, pool, timeout and TLS. Remove other bare PrismaModule imports so the configured module owns the single PrismaService. PRISMA_CLIENT_OPTIONS is an explicit optional injection token; no database configuration is inferred or read by this package. PrismaService forwards the options to the consumer-CWD-resolved generated client, and retains connect/disconnect lifecycle hooks.

Publish the compatibility release before upgrading consumer pins. NestJS 11 and Prisma 6 remain supported; the development tree exercises NestJS 12 and Prisma 7. NestJS 12 requires modern Node with require(esm); logger 5 requires Node 22.12+, NestJS 11.0.8+/12.0.2+, Pino 10 and pino-http 11. Prisma 7 still supports the existing prisma-client-js output used by the consumer resolver.

Prisma 7's runtime DMMF omits enums, documentation, field constraints and relation metadata. Add a second generator to the App's schema folder so prisma:generate preserves the complete datamodel alongside the default client:

generator haneinfoMetadata {
  provider = "node ./node_modules/@haneinfo/common/dist/prisma/prisma-generator.js"
  output   = "../../node_modules/.prisma/haneinfo-metadata"
}

The provider is relative to the backend working directory; the output is relative to backend/prisma/schema. PrismaService and the exported Prisma namespace keep using the App's own generated client. For Prisma 7, common loads this JSON through Node resolution and checks its schema hash against the client's embedded schema. Missing, stale or compact metadata fails explicitly. Prisma 6 continues using its original full DMMF. Drift scripts must import Prisma from @haneinfo/common; importing it directly from @prisma/client still gives compact metadata. Generate both artifacts again in a deployed dependency tree; do not copy another App's snapshot.

HTTP exception envelope

GlobalExceptionFilter retains statusCode, message, traceId, timestamp, path and the existing validation-array details behavior. It adds optional code only for a MechanismError-shaped error or a plain HTTP response with the MechanismError.toJSON() code/message shape. It also forwards exact Web contract codes in the exported WEB_CONTRACT_ERROR_CODES allowlist from plain HTTP response bodies, with a standard status message and no custom details. Mechanism codes must match ^[A-Z][A-Z0-9_]{1,63}$ in its entirety, with no trailing line terminator. Recognition does not import plugin-api or invoke an exception serializer. Generic errors and arbitrary coded Error instances do not acquire code. Direct non-HTTP errors retain their existing HTTP 500 handling.

Only the code is projected. Custom exception properties, issues, diagnostic arrays, mechanism details, suggestions and stacks are never copied into the envelope. The existing message and validation-array details contracts are unchanged; UI consumers should translate known codes and display a generic error otherwise, without rendering backend prose. Server-side logging retains its existing behavior.

Apps mounting this filter receive the additive field after upgrading. Custom filters need their own adoption work; plugin-host-nest does not install or duplicate a global exception filter.

Bounded Form validation errors

For INVALID_DATA with HTTP 422, GlobalExceptionFilter projects only details.fieldErrors ({ path, code } entries) from Form diagnostics. JSON Pointers must address /values/, are limited to 300 characters, and the list is limited to 100 entries. Oversized paths or extra entries are dropped and mark details.truncated. Malformed items and codes outside the Form fill allowlist are skipped. Messages, suggestions, values and raw diagnostics are never projected. Other mechanism details retain their existing protection (only revision conflicts and rate limits).

Blocked definition publish

For PUBLISH_BLOCKED with HTTP 409 (@haneinfo/definition-registry), GlobalExceptionFilter projects details.definitions: one entry per readable blocked definition with its kind, code and reason (invalid for a draft being published, affected for a published definition it would break), and each diagnostic's code and JSON Pointer path only, plus details.unreadableAffectedCount when unreadable published dependents would also break. At most 50 definitions and 100 diagnostics are projected; paths over 300 characters or extra entries are dropped and mark details.truncated. Malformed kinds, codes, diagnostic codes and pointers are skipped. Diagnostic messages and suggestions quote definition content and are never projected.

Pagination query

paginationQuerySchema accepts page from 1 to 10,000, limit from 1 to 100 (default 20) and a search of at most 200 characters; anything outside is a validation error (HTTP 400 through ZodValidationPipe).