dsh-autorestart 0.8.5 → 0.8.6
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/CHANGELOG.md +275 -5
- package/README.md +450 -61
- package/assets/icon-9c245e5b.ico +0 -0
- package/assets/icon-rescue-1902bb15.ico +0 -0
- package/assets/icon-rescue-1902bb15.png +0 -0
- package/client.js +2547 -287
- package/cordis.patch.yml +12 -0
- package/docs/README.zh.md +228 -28
- package/docs/platform-matrix.md +171 -55
- package/docs/real-machine-verification-0.8.6.md +202 -0
- package/index.js +13272 -9193
- package/lib/autostart-advice.js +31 -2
- package/lib/backup.js +2598 -66
- package/lib/checkpoint.js +121 -4
- package/lib/cookie-clear.js +260 -0
- package/lib/lifecycle.js +23 -40
- package/lib/plugin-compare.js +499 -0
- package/lib/plugin-failure.js +382 -0
- package/lib/plugin-recover.js +1557 -0
- package/lib/plugin-watch.js +213 -0
- package/lib/rescue-paths.js +982 -56
- package/lib/restart-verdict.js +379 -0
- package/lib/restart.js +244 -7
- package/lib/scheduler-capability.js +19 -3
- package/lib/sleep.js +190 -29
- package/lib/watchdog-disarm.js +46 -2
- package/lib/watchdog-schedule.js +834 -17
- package/lib/watchdog-tier.js +8 -1
- package/lib/watchdog.js +1222 -47
- package/locale/en.json +165 -78
- package/locale/zh.json +165 -78
- package/package.json +3 -2
- package/screenshots.json +6 -6
- package/scripts/README.md +6 -3
- package/scripts/build-icon.mjs +998 -0
- package/scripts/clear-dsh-auth-cookies.mjs +257 -0
- package/scripts/emergency-disable.sh +69 -2
- package/scripts/emergency-toggle.ps1 +85 -69
- package/scripts/rescue-strings.zh.json +36 -18
- package/scripts/restore-profile.ps1 +182 -1
- package/scripts/watchdog.mjs +432 -79
package/lib/autostart-advice.js
CHANGED
|
@@ -28,6 +28,11 @@ export const AUTOSTART_ADVICE_KINDS = Object.freeze({
|
|
|
28
28
|
WINDOWS: 'windows-task',
|
|
29
29
|
/** Linux: a systemd user service (+ the linger hint). */
|
|
30
30
|
LINUX: 'linux-systemd',
|
|
31
|
+
/**
|
|
32
|
+
* Linux WITHOUT systemd: there is no "at login" at all, and the plugin
|
|
33
|
+
* installs nothing (the installer refuses on such a machine).
|
|
34
|
+
*/
|
|
35
|
+
LINUX_NO_SYSTEMD: 'linux-no-systemd',
|
|
31
36
|
/** WSL with systemd: the same, and the linger is the missing piece. */
|
|
32
37
|
WSL_SYSTEMD: 'wsl-systemd',
|
|
33
38
|
/** WSL without systemd: the user has to pick one of two ways. */
|
|
@@ -167,9 +172,33 @@ export function planAutostartAdvice(options = {}) {
|
|
|
167
172
|
}
|
|
168
173
|
}
|
|
169
174
|
|
|
170
|
-
// (4) LINUX (and every other real Linux)
|
|
171
|
-
//
|
|
175
|
+
// (4) LINUX (and every other real Linux).
|
|
176
|
+
//
|
|
177
|
+
// WITH systemd: a user service, and the linger that turns "after a login"
|
|
178
|
+
// into "at boot".
|
|
179
|
+
//
|
|
180
|
+
// WITHOUT systemd (2026-11-02): the advice used to promise the same user
|
|
181
|
+
// service on EVERY Linux — while the installer refuses on a machine with no
|
|
182
|
+
// systemd (`STARTUP_NOT_INSTALLABLE`). The page then promised something the
|
|
183
|
+
// install button could not deliver. Now the advice says what is true: there is
|
|
184
|
+
// no "at login" here, the plugin installs nothing, and the user has to start
|
|
185
|
+
// the host from their own supervisor / init script / rc.local.
|
|
172
186
|
if (kind === HOST_KINDS.LINUX || platform === 'linux') {
|
|
187
|
+
if (!hasSystemd) {
|
|
188
|
+
return {
|
|
189
|
+
kind: AUTOSTART_ADVICE_KINDS.LINUX_NO_SYSTEMD,
|
|
190
|
+
reason: '这台 Linux 没有 systemd:这里没有「登录时自启」这回事,插件不会给你装 systemd 用户服务(这台机器没有 systemd 可装),也不会替你改任何系统配置。'
|
|
191
|
+
+ '想让宿主开机就起来,请用你自己的方式拉起它(rc.local、你的 init 脚本、或你在用的进程守护工具),命令就是启动这个宿主的命令行。',
|
|
192
|
+
notes: [
|
|
193
|
+
'没有 systemd:插件不装任何东西,也没有可以装的东西。',
|
|
194
|
+
'需要你自己拉起宿主(rc.local / init 脚本 / 进程守护工具),用的是启动这个宿主的同一行命令。',
|
|
195
|
+
'插件不会替你改系统配置 —— 这条建议只是告诉你「该怎么办」。',
|
|
196
|
+
],
|
|
197
|
+
commands: [],
|
|
198
|
+
options: [],
|
|
199
|
+
canInstall: false,
|
|
200
|
+
}
|
|
201
|
+
}
|
|
173
202
|
return {
|
|
174
203
|
kind: AUTOSTART_ADVICE_KINDS.LINUX,
|
|
175
204
|
reason: 'Linux 托管端:用 systemd 用户服务(systemctl --user,不需要管理员)。这是「登录后自启」;若要「开机自启」(不必先登录),运行一次 ' + linger + '。',
|