120 lines
4.8 KiB
JSON
120 lines
4.8 KiB
JSON
{
|
|
"name": "@suaveplan/api-auth-better-auth",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Stage-6 Better-Auth adapter for the @suaveplan/api foundation. Ships two independently-wireable factories implementing the auth.session and auth.provider capability contracts against a Better-Auth instance backed by its own Postgres connection. Maps Better-Auth user+session onto the @suaveplan/api Principal contract, mounts canonical PROVIDER_ROUTE_SURFACE routes (translating Better-Auth's /sign-up etc. idiom), exposes a GitHub OAuth flow via Better-Auth's genericOAuth plugin (so the mock OAuth IdP can be wired end-to-end), guards route-prefix collisions against @suaveplan/api-host's reserved-prefix contract, and emits OTel sessions/oauth/mapping instruments. The ./testing subpath re-exports both conformance suites bound to Postgres-backed factories.",
|
|
"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"
|
|
}
|
|
},
|
|
"./error-codes": {
|
|
"import": {
|
|
"types": "./dist/error-codes/error-codes.d.ts",
|
|
"default": "./dist/error-codes/error-codes.js"
|
|
}
|
|
},
|
|
"./options": {
|
|
"import": {
|
|
"types": "./dist/options/options.d.ts",
|
|
"default": "./dist/options/options.js"
|
|
}
|
|
},
|
|
"./session": {
|
|
"import": {
|
|
"types": "./dist/session/create-session.d.ts",
|
|
"default": "./dist/session/create-session.js"
|
|
}
|
|
},
|
|
"./provider": {
|
|
"import": {
|
|
"types": "./dist/provider/create-provider.d.ts",
|
|
"default": "./dist/provider/create-provider.js"
|
|
}
|
|
},
|
|
"./principal": {
|
|
"import": {
|
|
"types": "./dist/principal/map-user-to-principal.d.ts",
|
|
"default": "./dist/principal/map-user-to-principal.js"
|
|
}
|
|
},
|
|
"./instruments": {
|
|
"import": {
|
|
"types": "./dist/instruments/instruments.d.ts",
|
|
"default": "./dist/instruments/instruments.js"
|
|
}
|
|
},
|
|
"./testing": {
|
|
"import": {
|
|
"types": "./dist/testing/testing.d.ts",
|
|
"default": "./dist/testing/testing.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-auth": "workspace:^",
|
|
"@suaveplan/api-auth-provider": "workspace:^",
|
|
"@suaveplan/api-host": "workspace:^",
|
|
"@suaveplan/api-types": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/events": "workspace:^",
|
|
"@suaveplan/logger": "workspace:^",
|
|
"@suaveplan/opentelemetry": "workspace:^",
|
|
"@suaveplan/types": "workspace:^",
|
|
"better-auth": "catalog:auth",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"peerDependencies": {
|
|
"pg": "^8.13.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"pg": { "optional": true }
|
|
},
|
|
"devDependencies": {
|
|
"@opentelemetry/sdk-metrics": "1.30.0",
|
|
"@suaveplan/testing": "workspace:^",
|
|
"@suaveplan/testing-integration-oauth-mock": "workspace:^",
|
|
"@suaveplan/testing-integration-postgres": "workspace:^",
|
|
"@types/node": "catalog:",
|
|
"@types/pg": "^8.11.10",
|
|
"@vitest/coverage-istanbul": "catalog:testing",
|
|
"pg": "^8.13.0",
|
|
"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"]
|
|
}
|