@wecode-ai/weibo-openclaw-plugin 2.1.1-beta.0 → 2.1.1-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/bin/install.js +8 -8
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* 版本兼容性:
|
|
11
11
|
* - OpenClaw >= 2026.3.23: 安装最新版本 (2.1.0+)
|
|
12
|
-
* - OpenClaw < 2026.3.23: 安装 2.0.
|
|
12
|
+
* - OpenClaw < 2026.3.23: 安装 2.0.x 系列最新版本
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { execSync, spawn } from 'child_process';
|
|
@@ -17,7 +17,7 @@ import { execSync, spawn } from 'child_process';
|
|
|
17
17
|
const PACKAGE_NAME = '@wecode-ai/weibo-openclaw-plugin';
|
|
18
18
|
const PLUGIN_NAME = 'weibo-openclaw-plugin';
|
|
19
19
|
const VERSION_THRESHOLD = '2026.3.23';
|
|
20
|
-
const
|
|
20
|
+
const LEGACY_VERSION_RANGE = '~2.0.0'; // ~2.0.0 表示 >=2.0.0 <2.1.0,即 2.0.x 系列最新版本
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* 比较两个版本号
|
|
@@ -105,7 +105,7 @@ function showHelp() {
|
|
|
105
105
|
|
|
106
106
|
版本兼容性:
|
|
107
107
|
OpenClaw >= ${VERSION_THRESHOLD}: 安装最新版本的插件
|
|
108
|
-
OpenClaw < ${VERSION_THRESHOLD}: 安装
|
|
108
|
+
OpenClaw < ${VERSION_THRESHOLD}: 安装 2.0.x 系列最新版本的插件
|
|
109
109
|
`);
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -140,9 +140,9 @@ function main() {
|
|
|
140
140
|
console.log(` 版本 >= ${VERSION_THRESHOLD},将更新到最新版本的插件`);
|
|
141
141
|
runPluginCommand('update', PACKAGE_NAME);
|
|
142
142
|
} else {
|
|
143
|
-
console.log(` 版本 < ${VERSION_THRESHOLD},将更新到
|
|
144
|
-
// 对于旧版本,使用 install 命令来"更新"
|
|
145
|
-
runPluginCommand('install', `${PACKAGE_NAME}@${
|
|
143
|
+
console.log(` 版本 < ${VERSION_THRESHOLD},将更新到 2.0.x 系列最新版本的插件`);
|
|
144
|
+
// 对于旧版本,使用 install 命令来"更新"到指定版本范围
|
|
145
|
+
runPluginCommand('install', `${PACKAGE_NAME}@${LEGACY_VERSION_RANGE}`);
|
|
146
146
|
}
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
@@ -152,8 +152,8 @@ function main() {
|
|
|
152
152
|
console.log(` 版本 >= ${VERSION_THRESHOLD},将安装最新版本的插件`);
|
|
153
153
|
runPluginCommand('install', PACKAGE_NAME);
|
|
154
154
|
} else {
|
|
155
|
-
console.log(` 版本 < ${VERSION_THRESHOLD},将安装
|
|
156
|
-
runPluginCommand('install', `${PACKAGE_NAME}@${
|
|
155
|
+
console.log(` 版本 < ${VERSION_THRESHOLD},将安装 2.0.x 系列最新版本的插件`);
|
|
156
|
+
runPluginCommand('install', `${PACKAGE_NAME}@${LEGACY_VERSION_RANGE}`);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|