c0c4c3f179
Paperclip's plugin loader links the package as ESM, and dist/ui-parser.test.js
contained `import { parseStdoutLine } from "./ui-parser.js"` — but ui-parser.js
is bundled as CJS (see 480f7cf) so Node's ESM linker can't resolve the named
export. Result: adapter install fails with
SyntaxError: The requested module './ui-parser.js' does not provide an
export named 'parseStdoutLine'
Same root cause as c79eea7, just on the test file instead of src/index.ts.
Fix: introduce tsconfig.build.json that extends the base tsconfig and adds
"exclude": ["**/*.test.ts"]. The build script now runs tsc against that
config, so test files don't end up in dist/. tsconfig.json (used by --noEmit
typecheck and vitest) still includes them, so test type-safety is preserved.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
1.2 KiB
JSON
43 lines
1.2 KiB
JSON
{
|
|
"name": "paperclip-adapter-opencode-k8s",
|
|
"version": "0.2.0",
|
|
"description": "Paperclip adapter plugin that runs OpenCode agents as Kubernetes Jobs",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"paperclip": {
|
|
"adapterUiParser": "1.0.0"
|
|
},
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./server": "./dist/server/index.js",
|
|
"./ui-parser": "./dist/ui-parser.js",
|
|
"./cli": "./dist/cli/index.js"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.build.json && 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",
|
|
"test:watch": "vitest"
|
|
},
|
|
"dependencies": {
|
|
"@kubernetes/client-node": "^1.0.0",
|
|
"picocolors": "^1.1.1"
|
|
},
|
|
"peerDependencies": {
|
|
"@paperclipai/adapter-utils": ">=2026.428.0"
|
|
},
|
|
"devDependencies": {
|
|
"@paperclipai/adapter-utils": "^2026.428.0",
|
|
"@types/node": "^24.6.0",
|
|
"@vitest/coverage-v8": "^4.1.5",
|
|
"esbuild": "^0.24.0",
|
|
"typescript": "^5.7.3",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|