dsh-unlag 1.9.70 → 1.9.72
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/client.js +33 -8
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -270,8 +270,16 @@ window.__ModuleLoader__.load({
|
|
|
270
270
|
/** Read every bundle the next boot would load and prove each listed plugin is inside. */
|
|
271
271
|
async function bundlesCoverStartup(graph) {
|
|
272
272
|
if (graph === null || typeof graph !== 'object') return held('graph');
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
// The list is a live object the app re-composes: reading its fields can fail mid-swap, and a
|
|
274
|
+
// list that cannot be read is a held press, not a broken page.
|
|
275
|
+
let entries = [];
|
|
276
|
+
let batches = [];
|
|
277
|
+
try {
|
|
278
|
+
entries = Array.isArray(graph.entries) ? graph.entries : [];
|
|
279
|
+
batches = Array.isArray(graph.batches) ? graph.batches : [];
|
|
280
|
+
} catch {
|
|
281
|
+
return held('graph');
|
|
282
|
+
}
|
|
275
283
|
if (entries.length === 0 || batches.length === 0) return held('graph');
|
|
276
284
|
const covered = new Set();
|
|
277
285
|
const sources = [];
|
|
@@ -507,10 +515,19 @@ window.__ModuleLoader__.load({
|
|
|
507
515
|
if (saved === null && desktopShellPresent()) {
|
|
508
516
|
held('list');
|
|
509
517
|
} else {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
518
|
+
// The document's own boot value is a page value: one that cannot be read leaves the list
|
|
519
|
+
// unread rather than turning a held press into a broken-page notice.
|
|
520
|
+
let own = null;
|
|
521
|
+
try {
|
|
522
|
+
own = window.__DSH_BOOT__ ?? null;
|
|
523
|
+
} catch {
|
|
524
|
+
own = null;
|
|
525
|
+
}
|
|
526
|
+
const fromHost = saved === null ? await servedBootGraph() : null;
|
|
527
|
+
let servable = false;
|
|
528
|
+
if (saved !== null) servable = await frozenStartupLooksServable(saved);
|
|
529
|
+
else if (fromHost === null && own === null) held('list');
|
|
530
|
+
else servable = await bundlesCoverStartup(fromHost ?? own);
|
|
514
531
|
if (servable) return true;
|
|
515
532
|
}
|
|
516
533
|
if (attempt < 2) await new Promise((resolve) => setTimeout(resolve, 300 + attempt * 300)); // ui-copy-ignore
|
|
@@ -570,8 +587,16 @@ window.__ModuleLoader__.load({
|
|
|
570
587
|
|
|
571
588
|
/** Re-enter the interface on a fresh document, keeping the current view in the address. */
|
|
572
589
|
function reloadFreshPage() {
|
|
573
|
-
|
|
574
|
-
|
|
590
|
+
// The document's own description decides the address it comes back on. A value that cannot be
|
|
591
|
+
// read must cost a readable address, not the rebuild: this runs after the code is already
|
|
592
|
+
// replaced, so throwing here would leave the page on the old document and report a failure.
|
|
593
|
+
let stamp = String(Date.now());
|
|
594
|
+
try {
|
|
595
|
+
const graph = window.__DSH_BOOT__;
|
|
596
|
+
if (typeof graph?.rev === 'string' && graph.rev !== '') stamp = graph.rev;
|
|
597
|
+
} catch {
|
|
598
|
+
stamp = String(Date.now());
|
|
599
|
+
}
|
|
575
600
|
// The address is the page's own; a document whose address cannot be parsed still has to come
|
|
576
601
|
// back as a fresh one, because the code behind it has already been replaced.
|
|
577
602
|
let target = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-unlag",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.72",
|
|
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",
|