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

@generazioneai/audit-catalog

v0.5.0

Published

Catalogo chiuso delle azioni d'audit della piattaforma (codici, categorie, conservazione, campi ammessi in meta) e catena di hash del registro curato. Comune a ID, Ops e GENAI-AUDIT-BE.

Readme

@generazioneai/audit-catalog

Il catalogo chiuso delle azioni del registro d'audit curato della piattaforma e la catena di hash delle sue righe. Prima stava dentro GENAI-ID-BE (src/shared/audit/); ora è comune a ID, Ops (C3) e GENAI-AUDIT-BE (archivio WORM, M2), così un codice e la formula dell'hash esistono in un posto solo. Nessuna dipendenza.

npm i @generazioneai/audit-catalog
import { AUDIT_ACTIONS, auditCategory, minRetentionMonths, chainHash, verifyAuditChain, type AuditActionCode } from '@generazioneai/audit-catalog';

const code: AuditActionCode = 'rbac.system.approved';
auditCategory(code);        // 'security'
minRetentionMonths(code);   // 24 (classe `sec`); le `std` 6, il minimo che un'azienda può impostare
const rowHash = chainHash(prevHash /* null per la prima */, row);

Cosa c'è

  • AUDIT_ACTIONS: codice → { label, category, retention: 'std' | 'sec', meta: campi ammessi }. Un'azione che non è qui non si scrive. meta non porta mai valori di dati personali. Stessi codici di ID, più quelli del Rilascio 2: rbac.role.assigned|revoked|reconciled, rbac.rule.reset, rbac.system.requested|approved|rejected|expired.
  • Dalla 0.5.0 auth.login.succeeded|failed ammettono anche amr (lista di codici), acr (URN del livello) e ssoRequired (login con SPID e CIE), e ci sono le azioni dei quattro occhi dell'archivio WORM (auditArchive.*).
  • AuditActionCode, AuditCategory, AuditRetentionClass, AuditActionDef, AUDIT_CATEGORY_LABELS, AUTH_METHODS.
  • auditActionDef(code), auditCategory(code), minRetentionMonths(code) (null se il codice non c'è), isAuditCategory, actionsOfCategory, auditCatalogView() (la risposta di audit.catalog), AUDIT_RETENTION (13 mesi di serie, 6–84, sec almeno 24).
  • chainHash(prevHash, row) = sha256(prevHash | "GENESIS" + "\n" + JSON canonico dei campi), la formula di ID di oggi (un test riproduce due hash calcolati dal codice di ID: gli hash già scritti restano validi); canonicalJson, GENESIS, verifyAuditChain(rows) (righe in ordine di seq), tipi AuditHashFields e ChainCheck.

hashIp (HMAC dell'IP con la sottochiave di ID_DATA_KEY) resta in ID: dipende dalla chiave del servizio.

Aggiungere un'azione

Si aggiunge in src/catalog.ts (con label, category, retention e i soli meta ammessi), si alza la versione minore e si aggiorna il CHANGELOG. Mai togliere o rinominare un codice: le righe già scritte lo portano.