Initial Commit
This commit is contained in:
132
packages/api-stack/api/api-plugin-database/package.json
Normal file
132
packages/api-stack/api/api-plugin-database/package.json
Normal file
@@ -0,0 +1,132 @@
|
||||
{
|
||||
"name": "@suaveplan/api-plugin-database",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"description": "SurrealDB-backed database plugin for @suaveplan/api. Pools @suaveplan/surrealdb's SurrealAdapter (implementing @suaveplan/db DatabaseAdapter), runs .surql migrations through @suaveplan/api-migrations under an advisory lock, provides tenant provisioning callables, retry/backoff, RFC 7807 problem-json rendering, and a full OTel surface. Path A wrapper — adapter surface delegates to genesis SurrealAdapter; this plugin owns the orthogonal pool/migration/tenancy/retry/observability concerns.",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"./plugin/plugin": {
|
||||
"import": {
|
||||
"types": "./dist/plugin/plugin.d.ts",
|
||||
"default": "./dist/plugin/plugin.js"
|
||||
}
|
||||
},
|
||||
"./pool/pool": {
|
||||
"import": {
|
||||
"types": "./dist/pool/pool.d.ts",
|
||||
"default": "./dist/pool/pool.js"
|
||||
}
|
||||
},
|
||||
"./migrations/runner": {
|
||||
"import": {
|
||||
"types": "./dist/migrations/runner.d.ts",
|
||||
"default": "./dist/migrations/runner.js"
|
||||
}
|
||||
},
|
||||
"./migrations/lock": {
|
||||
"import": {
|
||||
"types": "./dist/migrations/lock.d.ts",
|
||||
"default": "./dist/migrations/lock.js"
|
||||
}
|
||||
},
|
||||
"./tenancy/tenancy": {
|
||||
"import": {
|
||||
"types": "./dist/tenancy/tenancy.d.ts",
|
||||
"default": "./dist/tenancy/tenancy.js"
|
||||
}
|
||||
},
|
||||
"./retry/retry": {
|
||||
"import": {
|
||||
"types": "./dist/retry/retry.d.ts",
|
||||
"default": "./dist/retry/retry.js"
|
||||
}
|
||||
},
|
||||
"./routes/problem-json": {
|
||||
"import": {
|
||||
"types": "./dist/routes/problem-json.d.ts",
|
||||
"default": "./dist/routes/problem-json.js"
|
||||
}
|
||||
},
|
||||
"./config/config-schema": {
|
||||
"import": {
|
||||
"types": "./dist/config/config-schema.d.ts",
|
||||
"default": "./dist/config/config-schema.js"
|
||||
}
|
||||
},
|
||||
"./error-codes/error-codes": {
|
||||
"import": {
|
||||
"types": "./dist/error-codes/error-codes.d.ts",
|
||||
"default": "./dist/error-codes/error-codes.js"
|
||||
}
|
||||
},
|
||||
"./otel/instruments": {
|
||||
"import": {
|
||||
"types": "./dist/otel/instruments.d.ts",
|
||||
"default": "./dist/otel/instruments.js"
|
||||
}
|
||||
},
|
||||
"./types/types": {
|
||||
"import": {
|
||||
"types": "./dist/types/types.d.ts",
|
||||
"default": "./dist/types/types.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-migrations": "workspace:^",
|
||||
"@suaveplan/api-plugin": "workspace:^",
|
||||
"@suaveplan/db": "workspace:^",
|
||||
"@suaveplan/error": "workspace:^",
|
||||
"@suaveplan/surrealdb": "workspace:^",
|
||||
"@suaveplan/types": "workspace:^",
|
||||
"tslib": "catalog:build",
|
||||
"zod": "catalog:forms"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@opentelemetry/sdk-metrics": "1.30.0",
|
||||
"@suaveplan/events": "workspace:^",
|
||||
"@suaveplan/testing": "workspace:^",
|
||||
"@suaveplan/testing-integration": "workspace:^",
|
||||
"@suaveplan/testing-integration-surrealdb": "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"]
|
||||
}
|
||||
Reference in New Issue
Block a user