diff --git a/packages/notify/lib/utils.mjs b/packages/notify/lib/utils.mjs index b61b699..cdfafb4 100644 --- a/packages/notify/lib/utils.mjs +++ b/packages/notify/lib/utils.mjs @@ -168,10 +168,10 @@ function getCommits() { subject, url: `${DEPOT_URL}/git/commit/${hash}`, })), - ({ message }) => message.type, + ({ message }) => message?.type || '未分类', ), ), - ([type]) => configs[type].order, + ([type]) => configs[type]?.order || 99, ).flatMap(([type, list]) => [ { type: 'heading', diff --git a/packages/notify/package.json b/packages/notify/package.json index 8c9145c..dbd593a 100644 --- a/packages/notify/package.json +++ b/packages/notify/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/notify", - "version": "0.2.10", + "version": "0.2.11", "description": "Send releases notifications", "license": "MIT", "author": { @@ -8,15 +8,15 @@ "email": "airkro@qq.com" }, "keywords": [ + "bot", "bring-it", "ci", "cli", "deployment", "dingtalk", "frontend", - "release", - "wechat", - "wecom" + "notify", + "release" ], "homepage": "https://github.com/airkro/bring-it/tree/master/packages/notify", "repository": { diff --git a/packages/npm/.best-shot/config.mjs b/packages/npm/.best-shot/config.mjs index b95fa04..64b131d 100644 --- a/packages/npm/.best-shot/config.mjs +++ b/packages/npm/.best-shot/config.mjs @@ -4,5 +4,6 @@ export const config = { path: 'dist', module: true, }, + copy: ['./src/bin.mjs'], entry: './src/cmd.mjs', }; diff --git a/packages/npm/package.json b/packages/npm/package.json index de93a62..f0ad9e7 100644 --- a/packages/npm/package.json +++ b/packages/npm/package.json @@ -28,6 +28,9 @@ "bugs": { "url": "https://github.com/airkro/bring-it/issues" }, + "bin": { + "bring-it": "dist/bin.mjs" + }, "main": "dist/main.mjs", "files": [ "dist" diff --git a/packages/npm/src/bin.mjs b/packages/npm/src/bin.mjs new file mode 100644 index 0000000..21d7ee5 --- /dev/null +++ b/packages/npm/src/bin.mjs @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +/* eslint-disable n/shebang */ +import '@bring-it/cli/dist/cli.mjs';