117 lines
4.5 KiB
JSON
117 lines
4.5 KiB
JSON
{
|
|
"name": "@suaveplan/api-worker-host",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"description": "Worker-side runtime that hosts exactly one Suaveplan API plugin inside an isolated Worker thread. Provides the bootstrap entry point that handshakes with the main host, wires capability proxies via @suaveplan/api-worker-rpc, dispatches lifecycle commands (install/start/stop/uninstall/reload) to plugin hooks, and surfaces uncaught exceptions as WORKER_HOST.CRASHED envelopes so the main host's LifecycleDriver can transition the plugin to the crashed state.",
|
|
"license": "MIT",
|
|
"author": "Suaveplan Team",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"./bootstrap": {
|
|
"import": {
|
|
"types": "./dist/bootstrap/bootstrap.d.ts",
|
|
"default": "./dist/bootstrap/bootstrap.js"
|
|
}
|
|
},
|
|
"./capability-proxies": {
|
|
"import": {
|
|
"types": "./dist/capability-proxies/capability-proxies.d.ts",
|
|
"default": "./dist/capability-proxies/capability-proxies.js"
|
|
}
|
|
},
|
|
"./lifecycle": {
|
|
"import": {
|
|
"types": "./dist/lifecycle/lifecycle.d.ts",
|
|
"default": "./dist/lifecycle/lifecycle.js"
|
|
}
|
|
},
|
|
"./crash-detection": {
|
|
"import": {
|
|
"types": "./dist/crash-detection/crash-detection.d.ts",
|
|
"default": "./dist/crash-detection/crash-detection.js"
|
|
}
|
|
},
|
|
"./protocol-extension": {
|
|
"import": {
|
|
"types": "./dist/protocol-extension/protocol-extension.d.ts",
|
|
"default": "./dist/protocol-extension/protocol-extension.js"
|
|
}
|
|
},
|
|
"./error-codes": {
|
|
"import": {
|
|
"types": "./dist/error-codes/error-codes.d.ts",
|
|
"default": "./dist/error-codes/error-codes.js"
|
|
}
|
|
},
|
|
"./testing": {
|
|
"import": {
|
|
"types": "./dist/testing/testing.d.ts",
|
|
"default": "./dist/testing/testing.js"
|
|
}
|
|
}
|
|
},
|
|
"scripts": {
|
|
"build": "vite build",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"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": {
|
|
"@suaveplan/api-lifecycle": "workspace:^",
|
|
"@suaveplan/api-types": "workspace:^",
|
|
"@suaveplan/api-worker-rpc": "workspace:^",
|
|
"@suaveplan/error": "workspace:^",
|
|
"@suaveplan/events": "workspace:^",
|
|
"@suaveplan/logger": "workspace:^",
|
|
"tslib": "catalog:build",
|
|
"zod": "catalog:forms"
|
|
},
|
|
"devDependencies": {
|
|
"@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"
|
|
],
|
|
"suaveplan": {
|
|
"conformanceSkip": [
|
|
"api-lifecycle"
|
|
],
|
|
"conformanceSkipReason": "api-worker-host runs the WORKER-side lifecycle FSM which is intentionally different from the main-host FSM (it lacks `installing`/`uninstalling` transitions since those happen main-side). Reusing main's lifecycle conformance harness would falsely fail; worker-side lifecycle is verified by api-worker-host's own bootstrap/lifecycle tests."
|
|
}
|
|
}
|