dsh-unlag 1.9.71 → 1.9.73

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/client.js +27 -7
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -249,8 +249,11 @@ window.__ModuleLoader__.load({
249
249
  holdReason = null;
250
250
  return 'ok';
251
251
  }
252
+ // The refusal's wording is the app's, read as a key into a table of gates: a key the table does
253
+ // not own (a prototype name, a word from a newer app) falls back to the list rather than to
254
+ // whatever that name happens to resolve to.
252
255
  const reason = data !== null && typeof data === 'object' && typeof data.reason === 'string' ? data.reason : 'list';
253
- held(VERIFY_GATES[reason] ?? 'list');
256
+ held(Object.hasOwn(VERIFY_GATES, reason) ? VERIFY_GATES[reason] : 'list');
254
257
  return 'blocked';
255
258
  }
256
259
 
@@ -270,8 +273,16 @@ window.__ModuleLoader__.load({
270
273
  /** Read every bundle the next boot would load and prove each listed plugin is inside. */
271
274
  async function bundlesCoverStartup(graph) {
272
275
  if (graph === null || typeof graph !== 'object') return held('graph');
273
- const entries = Array.isArray(graph.entries) ? graph.entries : [];
274
- const batches = Array.isArray(graph.batches) ? graph.batches : [];
276
+ // The list is a live object the app re-composes: reading its fields can fail mid-swap, and a
277
+ // list that cannot be read is a held press, not a broken page.
278
+ let entries = [];
279
+ let batches = [];
280
+ try {
281
+ entries = Array.isArray(graph.entries) ? graph.entries : [];
282
+ batches = Array.isArray(graph.batches) ? graph.batches : [];
283
+ } catch {
284
+ return held('graph');
285
+ }
275
286
  if (entries.length === 0 || batches.length === 0) return held('graph');
276
287
  const covered = new Set();
277
288
  const sources = [];
@@ -507,10 +518,19 @@ window.__ModuleLoader__.load({
507
518
  if (saved === null && desktopShellPresent()) {
508
519
  held('list');
509
520
  } else {
510
- const servable =
511
- saved === null
512
- ? await bundlesCoverStartup((await servedBootGraph()) ?? window.__DSH_BOOT__)
513
- : await frozenStartupLooksServable(saved);
521
+ // The document's own boot value is a page value: one that cannot be read leaves the list
522
+ // unread rather than turning a held press into a broken-page notice.
523
+ let own = null;
524
+ try {
525
+ own = window.__DSH_BOOT__ ?? null;
526
+ } catch {
527
+ own = null;
528
+ }
529
+ const fromHost = saved === null ? await servedBootGraph() : null;
530
+ let servable = false;
531
+ if (saved !== null) servable = await frozenStartupLooksServable(saved);
532
+ else if (fromHost === null && own === null) held('list');
533
+ else servable = await bundlesCoverStartup(fromHost ?? own);
514
534
  if (servable) return true;
515
535
  }
516
536
  if (attempt < 2) await new Promise((resolve) => setTimeout(resolve, 300 + attempt * 300)); // ui-copy-ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.71",
3
+ "version": "1.9.73",
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",