dsh-unlag 1.9.34 → 1.9.36
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/README.md +1 -0
- package/client.js +11 -2
- package/index.js +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ dsh plugin install dsh-unlag
|
|
|
44
44
|
- 排队消息、输入草稿、附件:重建前先提交焦点里的内容;有人没存完就拦下,不硬刷。
|
|
45
45
|
- 有未保存改动、开着弹窗、或下个页面要用的模块读不全:拦下并提示,提示里写明卡在哪一项,宁可不刷。
|
|
46
46
|
- 原来就起不来的插件不挡这一下:换代码照做,日志里点名哪个插件本来就没在跑。
|
|
47
|
+
- 三个开关读不到时不硬刷:提示稍后再试,日志记下是哪一步没读到,绝不谎称代码已是最新。
|
|
47
48
|
- 旧页面记着的启动清单分组变了(装过/卸过插件):按插件逐个补齐再交给新页面,不会因为清单 404 把 App 带走。
|
|
48
49
|
- 从不自己重启或退出 App。
|
|
49
50
|
|
package/client.js
CHANGED
|
@@ -650,8 +650,17 @@ window.__ModuleLoader__.load({
|
|
|
650
650
|
};
|
|
651
651
|
try {
|
|
652
652
|
const settings = await readSettings();
|
|
653
|
-
|
|
654
|
-
|
|
653
|
+
/**
|
|
654
|
+
* Without the switches the press cannot know what it was asked for. Rebuilding anyway would
|
|
655
|
+
* reload the page and leave the code untouched while the notice claimed the code was
|
|
656
|
+
* current, so the press holds instead and says why.
|
|
657
|
+
*/
|
|
658
|
+
if (settings === null) {
|
|
659
|
+
report('held', 'settings');
|
|
660
|
+
return stop('blocked');
|
|
661
|
+
}
|
|
662
|
+
const replace = settings.plugins;
|
|
663
|
+
const rebuild = settings.page;
|
|
655
664
|
// Nothing is switched on: the press says so instead of looking broken.
|
|
656
665
|
if (!replace && !rebuild) {
|
|
657
666
|
report('off');
|
package/index.js
CHANGED
|
@@ -371,6 +371,8 @@ function pluginReloader(ctx, config) {
|
|
|
371
371
|
request.then(settle, settle)
|
|
372
372
|
return request
|
|
373
373
|
}
|
|
374
|
+
/** Whether the bundle route was wrapped when this update started, so a re-wrap is written down. */
|
|
375
|
+
const shimWrappedBefore = bundleShimStatus(ctx).wrapped
|
|
374
376
|
let result = null
|
|
375
377
|
for (let attempt = 0; ; attempt += 1) {
|
|
376
378
|
try {
|
|
@@ -391,6 +393,19 @@ function pluginReloader(ctx, config) {
|
|
|
391
393
|
throw error
|
|
392
394
|
}
|
|
393
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* A recomposition can leave the bundle route owned by a fresh handler. A page started from the
|
|
398
|
+
* launch-time list is then answered by the app's own 404 for a stale set, and the desktop shell
|
|
399
|
+
* treats such an entry as fatal — it exits and takes every running turn with it. Wrapping again
|
|
400
|
+
* here means the time between an update and the next press is never left unwrapped.
|
|
401
|
+
*/
|
|
402
|
+
try {
|
|
403
|
+
ensureBundleShim(ctx)
|
|
404
|
+
if (bundleShimStatus(ctx).wrapped !== true) log('the bundle route is not wrapped after the update; a page started now may not boot')
|
|
405
|
+
else if (shimWrappedBefore !== true) log('the bundle route was wrapped again after the update')
|
|
406
|
+
} catch (error) {
|
|
407
|
+
log(`cannot wrap the bundle route after the update: ${error?.message ?? error}`)
|
|
408
|
+
}
|
|
394
409
|
const warnings = Array.isArray(result?.warnings) ? result.warnings : []
|
|
395
410
|
const pending = Array.isArray(result?.pending) ? result.pending : []
|
|
396
411
|
const restartReason = typeof result?.restartReason === 'string' ? result.restartReason : null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-unlag",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A press applies plugin edits right away and brings a laggy interface back; automatic reloading stays off unless you turn it on, so the press is the only trigger, and nothing restarts.",
|
|
6
6
|
"license": "MIT",
|