98 lines
3.7 KiB
JSON
98 lines
3.7 KiB
JSON
{
|
|
"name": "@suaveplan/api-audit-stdout",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Stdout `RequestAuditSink` for @suaveplan/api-host. Writes JSON-per-line audit records to a Writable (default process.stdout) with an HMAC-SHA-256 signature over canonical bytes. Implements the design-doc §12.5 audit-record shape, Zod-validated at the boundary, with bounded backpressure (maxQueueMs default 100ms), observable drop counter, and a once-per-minute warning throttle. OTel counters api.audit.records_total{sink=stdout,type,outcome} and api.audit.dropped_total{sink=stdout}. Server-tier — Bun + Node.",
|
|
"license": "MIT",
|
|
"author": "Suaveplan Team",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"./sink": {
|
|
"import": {
|
|
"types": "./dist/sink/sink.d.ts",
|
|
"default": "./dist/sink/sink.js"
|
|
}
|
|
},
|
|
"./schema": {
|
|
"import": {
|
|
"types": "./dist/schema/schema.d.ts",
|
|
"default": "./dist/schema/schema.js"
|
|
}
|
|
},
|
|
"./hmac": {
|
|
"import": {
|
|
"types": "./dist/hmac/hmac.d.ts",
|
|
"default": "./dist/hmac/hmac.js"
|
|
}
|
|
},
|
|
"./options": {
|
|
"import": {
|
|
"types": "./dist/options/options.d.ts",
|
|
"default": "./dist/options/options.js"
|
|
}
|
|
},
|
|
"./instruments": {
|
|
"import": {
|
|
"types": "./dist/instruments/instruments.d.ts",
|
|
"default": "./dist/instruments/instruments.js"
|
|
}
|
|
},
|
|
"./error-codes": {
|
|
"import": {
|
|
"types": "./dist/error-codes/error-codes.d.ts",
|
|
"default": "./dist/error-codes/error-codes.js"
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"test": "vitest run --passWithNoTests",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage --passWithNoTests",
|
|
"lint": "bunx biome check src/ tests/",
|
|
"lint:fix": "bunx biome lint --fix --unsafe --max-diagnostics 500 src/ tests/",
|
|
"format": "bunx biome format --write --max-diagnostics 500 src/ tests/",
|
|
"check": "bunx biome check --write --unsafe --max-diagnostics 500 src/ tests/",
|
|
"typecheck": "bunx tsc --noEmit --composite false -p tsconfig.lib.json",
|
|
"docs:check": "bun run ../../../../scripts/docs-check.ts ."
|
|
},
|
|
"dependencies": {
|
|
"@opentelemetry/api": "catalog:observability",
|
|
"@suaveplan/api-host": "workspace:^",
|
|
"@suaveplan/crypto-hash": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/types": "workspace:^",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@opentelemetry/sdk-metrics": "1.30.0",
|
|
"@suaveplan/testing": "workspace:^",
|
|
"@types/node": "catalog:",
|
|
"@vitest/coverage-istanbul": "catalog:testing",
|
|
"typescript": "catalog:",
|
|
"vite": "catalog:build",
|
|
"vite-plugin-dts": "catalog:build",
|
|
"vitest": "catalog:testing"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://npmjs.fq.io/",
|
|
"access": "public"
|
|
},
|
|
"files": ["dist", "src", "README.md"]
|
|
}
|