128 lines
4.9 KiB
JSON
128 lines
4.9 KiB
JSON
{
|
|
"name": "@suaveplan/api-plugin-vault",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Per-user vault HTTP plugin for @suaveplan/api. Wraps @suaveplan/vault as a @suaveplan/api-plugin definePlugin descriptor, applies a SurrealQL ownership schema (vault_item + vault_share) at boot via @suaveplan/api-migrations, mounts 5 OpenAPI routes through @suaveplan/api-openapi (CRUD over /vault/items), registers a typed vaultService in the host ServiceRegistry, and scopes every operation to c.get('user').id supplied by @suaveplan/api-plugin-auth. Third instance of the 3-way plug-and-play contract (.surql DDL + Zod boundary schemas + OpenAPI route registration).",
|
|
"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"
|
|
}
|
|
},
|
|
"./routes/routes": {
|
|
"import": {
|
|
"types": "./dist/routes/build-routes.d.ts",
|
|
"default": "./dist/routes/build-routes.js"
|
|
}
|
|
},
|
|
"./services/vault-service": {
|
|
"import": {
|
|
"types": "./dist/services/vault-service.d.ts",
|
|
"default": "./dist/services/vault-service.js"
|
|
}
|
|
},
|
|
"./schemas/vault-item": {
|
|
"import": {
|
|
"types": "./dist/schemas/vault-item.d.ts",
|
|
"default": "./dist/schemas/vault-item.js"
|
|
}
|
|
},
|
|
"./schemas/options": {
|
|
"import": {
|
|
"types": "./dist/schemas/options.d.ts",
|
|
"default": "./dist/schemas/options.js"
|
|
}
|
|
},
|
|
"./schema/schema": {
|
|
"import": {
|
|
"types": "./dist/schema/schema.d.ts",
|
|
"default": "./dist/schema/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": {
|
|
"@hono/zod-openapi": "catalog:server",
|
|
"@opentelemetry/api": "catalog:observability",
|
|
"@suaveplan/api-migrations": "workspace:^",
|
|
"@suaveplan/api-openapi": "workspace:^",
|
|
"@suaveplan/api-plugin": "workspace:^",
|
|
"@suaveplan/api-plugin-auth": "workspace:^",
|
|
"@suaveplan/crypto-vault": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/surrealdb": "workspace:^",
|
|
"@suaveplan/types": "workspace:^",
|
|
"@suaveplan/vault": "workspace:^",
|
|
"hono": "catalog:",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@opentelemetry/sdk-metrics": "1.30.0",
|
|
"@suaveplan/better-auth-surrealdb": "workspace:^",
|
|
"@suaveplan/events": "workspace:^",
|
|
"@suaveplan/testing": "workspace:^",
|
|
"@suaveplan/testing-integration": "workspace:^",
|
|
"@suaveplan/testing-integration-surrealdb": "workspace:^",
|
|
"@types/node": "catalog:",
|
|
"@vitest/coverage-istanbul": "catalog:testing",
|
|
"fast-check": "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"]
|
|
}
|