ygc-dsh-plugin-autoupdate 0.9.0 → 0.9.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.
Files changed (2) hide show
  1. package/lib/core.js +6 -1
  2. package/package.json +1 -1
package/lib/core.js CHANGED
@@ -14,7 +14,12 @@ import path from 'node:path';
14
14
  import os from 'node:os';
15
15
 
16
16
  export const STATE_DIR = path.join(os.homedir(), '.dsh', 'storages');
17
- export const STATE_FILE = path.join(STATE_DIR, 'plugin-autoupdate.json');
17
+ /**
18
+ * 状态文件位置。允许用环境变量覆盖:
19
+ * 探针/端到端测试会走真实路由,绝不能把测试记录写进用户真实配置。
20
+ */
21
+ export const STATE_FILE =
22
+ process.env.DSH_PLUGIN_AUTOUPDATE_STATE_FILE || path.join(STATE_DIR, 'plugin-autoupdate.json');
18
23
 
19
24
  /** 默认检查间隔(分钟)。 */
20
25
  export const DEFAULT_INTERVAL_MINUTES = 360;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ygc-dsh-plugin-autoupdate",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "type": "module",
5
5
  "description": "DSH 插件自动更新器:定时检查已装插件的新版本并按策略升级;把自己的插件特征(清单+本地副本+本机汇总)同步到共享插件库自己那一格,本机标识与会话同步插件共用,并汇集他人清单供人工选用。",
6
6
  "icon": "icon.svg",