@chbo297/infoflow 2026.5.5 → 2026.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,7 +42,7 @@ BAIDU_NPM_REGISTRY=http://registry.npm.baidu-int.com bash scripts/deploy.sh
42
42
  发布到 npm 后,可直接通过 `npx` 安装/升级到指定版本:
43
43
 
44
44
  ```bash
45
- npm_config_registry=http://registry.npm.baidu-int.com npx -y @chbo297/infoflow update --version 2026.5.5
45
+ npm_config_registry=http://registry.npm.baidu-int.com npx -y @chbo297/infoflow update --version 2026.5.6
46
46
  ```
47
47
 
48
48
  常用参数:
@@ -64,11 +64,11 @@ npm_config_registry=http://registry.npm.baidu-int.com npx -y @chbo297/infoflow u
64
64
 
65
65
  ### 版本升级、打 tag、推送与 npm 发布流程
66
66
 
67
- 每次发布新版本(例如 `2026.5.5`)建议按以下顺序执行:
67
+ 每次发布新版本(例如 `2026.5.6`)建议按以下顺序执行:
68
68
 
69
69
  ```bash
70
70
  # 1) 修改版本号(会同步 package-lock.json)
71
- npm version 2026.5.5 --no-git-tag-version
71
+ npm version 2026.5.6 --no-git-tag-version
72
72
 
73
73
  # 2) 发布前校验
74
74
  npm run typecheck
@@ -77,12 +77,12 @@ npm run build
77
77
 
78
78
  # 3) 提交版本变更
79
79
  git add package.json package-lock.json README.md scripts src
80
- git commit -m "2026.5.5"
80
+ git commit -m "2026.5.6"
81
81
 
82
82
  # 4) 打 tag 并推送代码与 tag
83
- git tag 2026.5.5
83
+ git tag 2026.5.6
84
84
  git push origin main
85
- git push origin 2026.5.5
85
+ git push origin 2026.5.6
86
86
 
87
87
  # 5) 发布 npm(可按需指定 registry)
88
88
  npm publish
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chbo297/infoflow",
3
- "version": "2026.5.5",
3
+ "version": "2026.5.6",
4
4
  "description": "OpenClaw Infoflow (如流) channel plugin for Baidu enterprise messaging",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -97,12 +97,23 @@ echo "==> 构建插件(确保 build 完成)"
97
97
  if [[ "$DRY_RUN" == "true" ]]; then
98
98
  echo " - dry-run 模式,跳过实际构建"
99
99
  else
100
- if node -e "const p=require('./package.json'); process.exit(p?.scripts?.build ? 0 : 1)"; then
101
- npm run build
100
+ if [ -d "$PLUGIN_DIR/dist" ] && [ ! -f "$PLUGIN_DIR/tsconfig.build.json" ] && [ ! -f "$PLUGIN_DIR/tsconfig.json" ]; then
101
+ echo " - 检测到预编译发布包(无 tsconfig),跳过构建"
102
+ elif node -e "const p=require('./package.json'); process.exit(p?.scripts?.build ? 0 : 1)"; then
103
+ if [ -f "$PLUGIN_DIR/tsconfig.build.json" ] || [ -f "$PLUGIN_DIR/tsconfig.json" ]; then
104
+ npm run build
105
+ elif [ -d "$PLUGIN_DIR/dist" ]; then
106
+ echo " - scripts.build 存在但缺少 tsconfig,使用已存在 dist 产物并跳过构建"
107
+ else
108
+ echo " ✗ scripts.build 存在但缺少 tsconfig 且无 dist 产物"
109
+ exit 1
110
+ fi
102
111
  elif [ -f "$PLUGIN_DIR/tsconfig.build.json" ]; then
103
112
  npx -y -p typescript tsc -p "$PLUGIN_DIR/tsconfig.build.json"
104
113
  elif [ -f "$PLUGIN_DIR/tsconfig.json" ]; then
105
114
  npx -y -p typescript tsc -p "$PLUGIN_DIR/tsconfig.json"
115
+ elif [ -d "$PLUGIN_DIR/dist" ]; then
116
+ echo " - 未检测到构建配置,使用已存在 dist 产物并跳过构建"
106
117
  else
107
118
  echo " ✗ 未检测到 scripts.build 或 tsconfig,无法构建"
108
119
  exit 1