@chbo297/infoflow 2026.5.5 → 2026.5.6-beta.0
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/package.json +1 -1
- package/scripts/lib/deploy-common.sh +13 -2
package/package.json
CHANGED
|
@@ -97,12 +97,23 @@ echo "==> 构建插件(确保 build 完成)"
|
|
|
97
97
|
if [[ "$DRY_RUN" == "true" ]]; then
|
|
98
98
|
echo " - dry-run 模式,跳过实际构建"
|
|
99
99
|
else
|
|
100
|
-
if
|
|
101
|
-
|
|
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
|