From f8841da76f3f49c38db53b02731cae7d8c286f30 Mon Sep 17 00:00:00 2001 From: xmanrui <841206367@qq.com> Date: Sun, 16 Aug 2026 15:42:31 +0800 Subject: [PATCH] fix: preserve the published CLI entry --- package.json | 2 +- scripts/verify-package.mjs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d7cf7e1..4b96be2 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "access": "public" }, "bin": { - "dsh-im": "./bin/dsh-im.mjs" + "dsh-im": "bin/dsh-im.mjs" }, "main": "./lib/index.js", "exports": { diff --git a/scripts/verify-package.mjs b/scripts/verify-package.mjs index ff077d0..0fd74b1 100644 --- a/scripts/verify-package.mjs +++ b/scripts/verify-package.mjs @@ -104,6 +104,9 @@ for (const [name, version] of Object.entries(bundledBuildDependencies)) { if (lock.packages?.['node_modules/protobufjs']?.dev !== true) { throw new Error('protobufjs must remain build-only in the package lock'); } +if (manifest.bin?.['dsh-im'] !== 'bin/dsh-im.mjs') { + throw new Error('package manifest must publish the dsh-im executable'); +} if (/(?:from\s*|import\s*\(|require\s*\()\s*["'](?:@larksuiteoapi\/node-sdk|protobufjs)(?:\/[^"']*)?["']/.test(host)) { throw new Error('host bundle must not import the Feishu SDK or protobufjs at runtime'); }