From fd95bdfbe82d8fe20756d393598fb69f3963eb00 Mon Sep 17 00:00:00 2001 From: Frank Mayer Date: Wed, 5 Aug 2026 16:51:44 +0200 Subject: [PATCH 1/2] fix: publish JavaScript plugin entrypoint --- .github/workflows/publish.yml | 8 ++++++++ package.json | 14 ++++++++++---- tsconfig.json | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 289d5e3..94c1fc5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,6 +32,14 @@ jobs: - name: Install dependencies run: bun install + - name: Verify package in Node + run: | + PACKAGE=$(npm pack --silent) + mkdir /tmp/opencode-wakelock-smoke + npm install --prefix /tmp/opencode-wakelock-smoke "$PWD/$PACKAGE" + cd /tmp/opencode-wakelock-smoke + node --input-type=module -e "const plugin = (await import('opencode-wakelock')).default; if (plugin.id !== 'opencode-wakelock' || typeof plugin.server !== 'function') process.exit(1)" + - name: Check if version already published id: check run: | diff --git a/package.json b/package.json index 26daf53..8171f15 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "type": "module", "license": "MIT", - "main": "index.ts", - "version": "0.2.2", + "main": "dist/index.js", + "files": ["dist/index.js"], + "version": "0.2.3", "engines": { "opencode": ">=1.14.0" }, @@ -17,9 +18,14 @@ "type": "git", "url": "git+https://github.com/IgnisDa/opencode-wakelock.git" }, + "scripts": { + "build": "tsc", + "prepack": "npm run build" + }, "devDependencies": { - "@opencode-ai/plugin": "latest", - "bun-types": "latest" + "@opencode-ai/plugin": "1.18.13", + "bun-types": "1.3.14", + "typescript": "7.0.2" }, "keywords": [ "sleep", diff --git a/tsconfig.json b/tsconfig.json index cc85826..1dc7ace 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "target": "ESNext", "module": "ESNext", "moduleResolution": "bundler", + "outDir": "dist", "strict": true, "types": ["bun-types"] } From 57258b14330a41edab5f9aeca1c53325e26558c7 Mon Sep 17 00:00:00 2001 From: Frank Mayer Date: Thu, 6 Aug 2026 17:25:40 +0200 Subject: [PATCH 2/2] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8171f15..170d987 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "prepack": "npm run build" }, "devDependencies": { - "@opencode-ai/plugin": "1.18.13", - "bun-types": "1.3.14", + "@opencode-ai/plugin": "latest", + "bun-types": "latest", "typescript": "7.0.2" }, "keywords": [