fix(ui-parser): emit dist as CJS so the sandboxed worker can load it
tsc emitted ESM `export` syntax that the UI's `new Function(...)` sandbox can't evaluate, so parseStdoutLine never registered and the run window fell back to dumping raw stream-json. Add an esbuild step that overwrites dist/ui-parser.js with a CJS bundle assigning to module.exports. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -25,7 +25,8 @@
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsc && npm run build:ui-parser",
|
||||
"build:ui-parser": "esbuild src/ui-parser.ts --bundle --format=cjs --target=es2020 --outfile=dist/ui-parser.js --log-level=warning",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run",
|
||||
@@ -43,6 +44,7 @@
|
||||
"@paperclipai/adapter-utils": "2026.415.0-canary.7",
|
||||
"@types/node": "^24.6.0",
|
||||
"@vitest/coverage-v8": "^4.1.4",
|
||||
"esbuild": "^0.24.0",
|
||||
"typescript": "^5.7.3",
|
||||
"vitest": "^4.1.4"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user