{ "name": "@suaveplan/api-tenant-resolver-jwt", "version": "0.1.0", "type": "module", "sideEffects": false, "description": "Stage-4 tenant-resolver adapter for the Suaveplan API plugin foundation. Reads the already-resolved `Principal.tenantId` from the per-request context (attached by an earlier `api-auth-*` chain) and projects it into a `TenantContext`. When the configured claim is present the resolver short-circuits the chain; when absent it returns `null` so a header/subdomain resolver can take over. Configurable claim key (default `tenantId`) and strict-mode (`requirePrincipal: true`) that throws `TENANT_RESOLVER_JWT.PRINCIPAL_MISSING_TENANT_ID` instead of advancing.", "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/resolver/resolver.d.ts", "default": "./dist/resolver/resolver.js" } }, "./options": { "import": { "types": "./dist/options/options.d.ts", "default": "./dist/options/options.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/", "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": { "@suaveplan/api-types": "workspace:^", "@suaveplan/error": "workspace:^", "tslib": "catalog:build", "zod": "catalog:forms" }, "devDependencies": { "@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"] }