@leiyi-works/dsh-auto-restart 0.3.9 → 0.3.11

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 (3) hide show
  1. package/client.js +0 -1
  2. package/index.js +2 -1
  3. package/package.json +1 -1
package/client.js CHANGED
@@ -358,7 +358,6 @@ window.__ModuleLoader__.load({
358
358
  save.busy ? h('p', { style: styles.note }, '正在保存…') : null,
359
359
  statusCard,
360
360
  settingsCard,
361
- h('p', { style: styles.note }, '配置文件:' + (status?.configPath ?? '—')),
362
361
  ),
363
362
  )
364
363
  }
package/index.js CHANGED
@@ -290,7 +290,8 @@ function recordInterrupted(state, reason) {
290
290
  async function resumeInterrupted(ctx, cfg) {
291
291
  const file = interruptedPath()
292
292
  const record = readJsonFile(file)
293
- if (record === null) return
293
+ // readJsonFile returns undefined when the file does not exist; nothing to resume.
294
+ if (record === null || record === undefined || typeof record !== 'object') return
294
295
  try {
295
296
  const entries = Array.isArray(record.entries)
296
297
  ? record.entries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leiyi-works/dsh-auto-restart",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "type": "module",
5
5
  "title": "自动重启",
6
6
  "description": "装/更插件后自动重启 DSH 并回到原会话:检测 profile 插件文件变化,一直等所有会话空闲且最近活动安静,由常驻后台看门狗(登录自启、不碰 WMI)或 WMI 守护先杀主进程再拉起(可最大化窗口),带冷却、试运行、日志和右侧原生侧边栏面板。",