@fusion/plugin-sdk's package.json points its import entry at
src/index.ts (TS source), and that file imports core/src/plugin-types.js
via relative path. Node 22 ESM has no TS loader so the chain
unraveled at runtime: the plugin loader successfully resolved our
compiled dist/index.js, but the very first `import { definePlugin }
from "@fusion/plugin-sdk"` walked into TS source and fell over.
definePlugin is a pure typed identity function — it adds no runtime
behavior. Inline its source plus a structural copy of the plugin
context/route/manifest types we use, drop the @fusion/plugin-sdk
dependency entirely. The compiled output now imports nothing outside
node:crypto and Node builtins, so it can load anywhere fusion can
spawn ESM modules.
When fusion publishes a compiled SDK build, swap the inline types
back to import statements and restore the workspace dependency.
26 lines
624 B
JSON
26 lines
624 B
JSON
{
|
|
"name": "@fusion-plugin/telemetry-watcher",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"description": "Watches PostHog/Grafana/Sentry signals, classifies anomalies, and opens incident tasks scoped to the sase autonomous engineering pipeline.",
|
|
"keywords": [
|
|
"fusion-plugin"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"import": "./dist/index.js"
|
|
}
|
|
},
|
|
"private": true,
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"test": "vitest run --silent=passed-only --reporter=dot"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^25.5.2",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^3.2.4"
|
|
}
|
|
}
|