fix: preserve the published CLI entry

This commit is contained in:
xmanrui 2026-08-16 15:42:31 +08:00
parent 5e90962b6d
commit f8841da76f
2 changed files with 4 additions and 1 deletions

View file

@ -14,7 +14,7 @@
"access": "public"
},
"bin": {
"dsh-im": "./bin/dsh-im.mjs"
"dsh-im": "bin/dsh-im.mjs"
},
"main": "./lib/index.js",
"exports": {

View file

@ -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');
}