{ "name": "@suaveplan/api-auth-bearer-static", "version": "0.1.0", "type": "module", "sideEffects": false, "description": "Stage-4 SessionResolver adapter for service-to-service static bearer tokens. Matches Authorization: Bearer against a fixed token→Principal table using constant-time comparison from @suaveplan/crypto-utils; unknown tokens defer to the next chain entry. Supports an optional per-token mutual-TLS gate that rejects when the host did not surface request.tls.peerCertificate. Ships both a direct surface (createBearerStaticResolver) and a worker-proxy surface (createBearerStaticResolverWorkerProxy) over @suaveplan/api-worker-rpc; both pass runAuthSessionConformance from @suaveplan/api-auth/testing. OpenAPI security-scheme contribution (HTTP Bearer). Zod-validated options, AUTH_BEARER_STATIC.* error codes, OTel match counter partitioned by outcome.", "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" } }, "./resolver": { "import": { "types": "./dist/factory/create-bearer-static-resolver.d.ts", "default": "./dist/factory/create-bearer-static-resolver.js" } }, "./proxy": { "import": { "types": "./dist/proxy/create-bearer-static-resolver-worker-proxy.d.ts", "default": "./dist/proxy/create-bearer-static-resolver-worker-proxy.js" } }, "./options": { "import": { "types": "./dist/options/bearer-static-resolver-options.d.ts", "default": "./dist/options/bearer-static-resolver-options.js" } }, "./security-scheme": { "import": { "types": "./dist/security-scheme/security-scheme-contribution.d.ts", "default": "./dist/security-scheme/security-scheme-contribution.js" } }, "./error-codes": { "import": { "types": "./dist/error-codes/error-codes.d.ts", "default": "./dist/error-codes/error-codes.js" } }, "./constant-time": { "import": { "types": "./dist/constant-time/token-match.d.ts", "default": "./dist/constant-time/token-match.js" } }, "./mtls": { "import": { "types": "./dist/mtls/mtls-gate.d.ts", "default": "./dist/mtls/mtls-gate.js" } } }, "scripts": { "build": "vite build", "test": "vitest run --passWithNoTests", "test:watch": "vitest", "test:coverage": "vitest run --coverage --passWithNoTests", "lint": "bunx biome check src/", "lint:fix": "bunx biome lint --fix --unsafe --max-diagnostics 500 src/", "format": "bunx biome format --write --max-diagnostics 500 src/", "check": "bunx biome check --write --unsafe --max-diagnostics 500 src/", "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-auth": "workspace:^", "@suaveplan/api-types": "workspace:^", "@suaveplan/api-worker-rpc": "workspace:^", "@suaveplan/crypto-utils": "workspace:^", "@suaveplan/error": "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"] }