@aiyiran/myclaw 1.0.39 → 1.0.41

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/config.js CHANGED
@@ -9,4 +9,7 @@ module.exports = {
9
9
 
10
10
  // 默认控制台地址
11
11
  DEFAULT_URL: 'http://127.0.0.1:18789',
12
+
13
+ // 是否在 prepare / postinstall 时自动执行 patch
14
+ AUTO_PATCH: false,
12
15
  };
package/index.js CHANGED
@@ -340,8 +340,8 @@ if not errorlevel 1 goto :gateway_running
340
340
  REM Gateway not running -> update myclaw first, then start
341
341
  echo Starting...
342
342
  echo.
343
- echo [update] npm update -g @aiyiran/myclaw
344
- call npm update -g @aiyiran/myclaw >nul 2>&1
343
+ echo [update] npm install -g @aiyiran/myclaw@latest
344
+ call npm install -g @aiyiran/myclaw@latest >nul 2>&1
345
345
  echo [update] OK
346
346
  echo.
347
347
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
package/prepare.js CHANGED
@@ -361,10 +361,15 @@ async function run() {
361
361
  }
362
362
 
363
363
  // === Step 4: Patch ===
364
- if (env !== 'windows') {
364
+ const { AUTO_PATCH } = require('./config');
365
+ if (AUTO_PATCH && env !== 'windows') {
365
366
  // Mac/Linux 直接 patch
366
367
  runPatchStep(env);
367
368
  console.log('');
369
+ } else if (!AUTO_PATCH) {
370
+ log('Step 4', 'Patch 已跳过 (AUTO_PATCH=false)');
371
+ console.log(' 手动执行: ' + C.y + 'myclaw patch' + C.nc);
372
+ console.log('');
368
373
  }
369
374
 
370
375
  // === Step 5: Windows 桌面启动器 ===