132 lines
5.1 KiB
JSON
132 lines
5.1 KiB
JSON
{
|
|
"name": "@suaveplan/api-openapi",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "OpenAPI 3.1 registry, typed RouteBuilder, schema registry, and document merger for the Suaveplan API. Single source of truth that wires into Hono via OpenAPIRegistry.applyTo(app) — eliminating drift between the introspection registry and the served /openapi.json. Ships StandardResponses spanning the full SuaveplanError statusCode range (400/401/403/404/409/422/429/500/503/504), an ErrorResponseSchema carrying the cause field of SuaveplanError.toJSON(), an instance-only SchemaRegistry (no global singleton) with extend/partial/pick/omit guarded by OPENAPI_INVALID_BASE_SCHEMA, mergeOpenAPIDocuments / prefixPaths / filterPathsByTag / removeInternalRoutes transforms, and a definePluginRoutes helper that registers atomically against both Hono and the registry.",
|
|
"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"
|
|
}
|
|
},
|
|
"./types": {
|
|
"import": {
|
|
"types": "./dist/types/openapi.d.ts",
|
|
"default": "./dist/types/openapi.js"
|
|
}
|
|
},
|
|
"./registry": {
|
|
"import": {
|
|
"types": "./dist/registry/registry.d.ts",
|
|
"default": "./dist/registry/registry.js"
|
|
}
|
|
},
|
|
"./route-factory": {
|
|
"import": {
|
|
"types": "./dist/route-factory/route-factory.d.ts",
|
|
"default": "./dist/route-factory/route-factory.js"
|
|
}
|
|
},
|
|
"./schema-registry": {
|
|
"import": {
|
|
"types": "./dist/schema-registry/schema-registry.d.ts",
|
|
"default": "./dist/schema-registry/schema-registry.js"
|
|
}
|
|
},
|
|
"./merger": {
|
|
"import": {
|
|
"types": "./dist/merger/merger.d.ts",
|
|
"default": "./dist/merger/merger.js"
|
|
}
|
|
},
|
|
"./plugin-integration": {
|
|
"import": {
|
|
"types": "./dist/plugin-integration/plugin-integration.d.ts",
|
|
"default": "./dist/plugin-integration/plugin-integration.js"
|
|
}
|
|
},
|
|
"./emitter": {
|
|
"import": {
|
|
"types": "./dist/emitter/emitter.d.ts",
|
|
"default": "./dist/emitter/emitter.js"
|
|
}
|
|
},
|
|
"./namespacing": {
|
|
"import": {
|
|
"types": "./dist/namespacing/namespacing.d.ts",
|
|
"default": "./dist/namespacing/namespacing.js"
|
|
}
|
|
},
|
|
"./strictness": {
|
|
"import": {
|
|
"types": "./dist/strictness/strictness.d.ts",
|
|
"default": "./dist/strictness/strictness.js"
|
|
}
|
|
},
|
|
"./endpoints": {
|
|
"import": {
|
|
"types": "./dist/endpoints/endpoints.d.ts",
|
|
"default": "./dist/endpoints/endpoints.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-plugin": "workspace:^",
|
|
"@suaveplan/api-schemas": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/types": "workspace:^",
|
|
"hono": "catalog:",
|
|
"tslib": "catalog:build",
|
|
"yaml": "catalog:",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@opentelemetry/sdk-metrics": "1.30.0",
|
|
"@suaveplan/testing": "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"]
|
|
}
|