112 lines
4.3 KiB
JSON
112 lines
4.3 KiB
JSON
{
|
|
"name": "@suaveplan/api-plugin-example",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Reference plugin for the @suaveplan/api-host plugin foundation. Exercises every contract surface reachable through createTestHost: definePlugin spec, REST routes (public, RBAC-gated, Zod-validated, streaming, idempotent, rate-limited, schema-violation), custom PLUGIN.EXAMPLE.* error codes mapped to HTTP statuses, manifest-declared OTel instruments (counter + histogram + gauge), seeded secrets, tenant-scoped DB, event publish + subscribe handlers. Ships its own integration suite that runs end-to-end against api-host/testing.createTestHost so any host-side change that breaks the plugin contract fails in one place.",
|
|
"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"
|
|
}
|
|
},
|
|
"./wasm": {
|
|
"import": {
|
|
"types": "./dist/wasm/index.d.ts",
|
|
"default": "./dist/wasm/index.js"
|
|
}
|
|
},
|
|
"./domain": {
|
|
"import": {
|
|
"types": "./dist/domain/index.d.ts",
|
|
"default": "./dist/domain/index.js"
|
|
}
|
|
},
|
|
"./plugin/plugin": {
|
|
"import": {
|
|
"types": "./dist/trusted/plugin/plugin.d.ts",
|
|
"default": "./dist/trusted/plugin/plugin.js"
|
|
}
|
|
},
|
|
"./routes/routes": {
|
|
"import": {
|
|
"types": "./dist/trusted/routes/routes.d.ts",
|
|
"default": "./dist/trusted/routes/routes.js"
|
|
}
|
|
},
|
|
"./error-codes/error-codes": {
|
|
"import": {
|
|
"types": "./dist/error-codes/error-codes.d.ts",
|
|
"default": "./dist/error-codes/error-codes.js"
|
|
}
|
|
},
|
|
"./instruments/instruments": {
|
|
"import": {
|
|
"types": "./dist/instruments/instruments.d.ts",
|
|
"default": "./dist/instruments/instruments.js"
|
|
}
|
|
},
|
|
"./events/events": {
|
|
"import": {
|
|
"types": "./dist/trusted/events/events.d.ts",
|
|
"default": "./dist/trusted/events/events.js"
|
|
}
|
|
},
|
|
"./schemas/schemas": {
|
|
"import": {
|
|
"types": "./dist/schemas/schemas.d.ts",
|
|
"default": "./dist/schemas/schemas.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-host": "workspace:^",
|
|
"@suaveplan/api-types": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@opentelemetry/sdk-metrics": "1.30.0",
|
|
"@suaveplan/api-events-in-memory": "workspace:^",
|
|
"@suaveplan/api-router-in-memory": "workspace:^",
|
|
"@suaveplan/api-db-sqlite-memory": "workspace:^",
|
|
"@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", "plugin.json"]
|
|
}
|