@chbo297/infoflow 2026.5.6 → 2026.5.7-beta.1
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/dist/src/cli.js +1 -1
- package/package.json +1 -1
- package/scripts/lib/deploy-common.sh +5 -4
package/dist/src/cli.js
CHANGED
|
@@ -95,7 +95,7 @@ function installFromRegistry(options, packageName, pluginDir) {
|
|
|
95
95
|
}
|
|
96
96
|
runOrFail("tar", ["-xzf", tarball], tempRoot, options.dryRun);
|
|
97
97
|
runOrFail("mkdir", ["-p", pluginDir], tempRoot, options.dryRun);
|
|
98
|
-
runOrFail("rsync", ["-av", "--delete", `${join(tempRoot, "package")}/`, `${pluginDir}/`, "--exclude", "node_modules"
|
|
98
|
+
runOrFail("rsync", ["-av", "--delete", `${join(tempRoot, "package")}/`, `${pluginDir}/`, "--exclude", "node_modules"], tempRoot, options.dryRun);
|
|
99
99
|
}
|
|
100
100
|
finally {
|
|
101
101
|
if (!options.dryRun)
|
package/package.json
CHANGED
|
@@ -126,8 +126,9 @@ if [ ! -d "$PLUGIN_DIR/dist" ] && [[ "$DRY_RUN" != "true" ]]; then
|
|
|
126
126
|
fi
|
|
127
127
|
echo " ✓ 已检测到构建产物目录:$PLUGIN_DIR/dist"
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
CONFIG_FILE_PATH="${CONFIG_FILE:-}"
|
|
130
|
+
if [ -z "$CONFIG_FILE_PATH" ] || [ ! -f "$CONFIG_FILE_PATH" ]; then
|
|
131
|
+
echo " ✗ 未找到 $CONFIG_FILE_PATH,请先完成 OpenClaw 初始化后再部署"
|
|
131
132
|
exit 1
|
|
132
133
|
fi
|
|
133
134
|
|
|
@@ -139,7 +140,7 @@ fi
|
|
|
139
140
|
echo "==> 更新 OpenClaw 配置"
|
|
140
141
|
node -e "
|
|
141
142
|
const fs = require('fs');
|
|
142
|
-
const cfg = JSON.parse(fs.readFileSync('$
|
|
143
|
+
const cfg = JSON.parse(fs.readFileSync('$CONFIG_FILE_PATH', 'utf8'));
|
|
143
144
|
const id = '$PLUGIN_ID';
|
|
144
145
|
|
|
145
146
|
cfg.plugins = cfg.plugins ?? {};
|
|
@@ -148,7 +149,7 @@ node -e "
|
|
|
148
149
|
else if (!cfg.plugins.entries[id].enabled) cfg.plugins.entries[id].enabled = true;
|
|
149
150
|
|
|
150
151
|
if (Array.isArray(cfg.plugins.allow) && !cfg.plugins.allow.includes(id)) cfg.plugins.allow.push(id);
|
|
151
|
-
fs.writeFileSync('$
|
|
152
|
+
fs.writeFileSync('$CONFIG_FILE_PATH', JSON.stringify(cfg, null, 2) + '\n');
|
|
152
153
|
"
|
|
153
154
|
|
|
154
155
|
echo "==> 检查 OpenClaw gateway 运行状态"
|