dsh-unlag 1.9.74 → 1.9.76

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 +37 -5
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -287,9 +287,17 @@ window.__ModuleLoader__.load({
287
287
  const covered = new Set();
288
288
  const sources = [];
289
289
  for (const batch of batches) {
290
- const url = typeof batch?.url === 'string' ? batch.url : '';
290
+ // A batch is read field by field: the list can be the page's own boot object, and a batch
291
+ // whose fields cannot be read leaves that address unproven rather than the page broken.
292
+ let url = '';
293
+ let listed = [];
294
+ try {
295
+ url = typeof batch?.url === 'string' ? batch.url : '';
296
+ listed = Array.isArray(batch?.entries) && batch.entries.every((id) => typeof id === 'string') ? batch.entries : [];
297
+ } catch {
298
+ return held('row');
299
+ }
291
300
  if (url === '') continue;
292
- const listed = Array.isArray(batch.entries) && batch.entries.every((id) => typeof id === 'string') ? batch.entries : [];
293
301
  const ids = listed.length > 0 ? listed : bundledIds(url);
294
302
  if (ids.length === 0) return held('row');
295
303
  let resolved = null;
@@ -303,7 +311,12 @@ window.__ModuleLoader__.load({
303
311
  }
304
312
  if (sources.length === 0) return held('graph');
305
313
  for (const entry of entries) {
306
- const id = typeof entry === 'string' ? entry : entry?.id;
314
+ let id = '';
315
+ try {
316
+ id = typeof entry === 'string' ? entry : entry?.id;
317
+ } catch {
318
+ return held('covers');
319
+ }
307
320
  if (typeof id !== 'string' || !covered.has(id)) return held('covers');
308
321
  }
309
322
  // Reading these bodies here would need a parser the page does not have and would not prove
@@ -400,8 +413,27 @@ window.__ModuleLoader__.load({
400
413
  // The frozen list decides what this document boots. Without the current plugin list there
401
414
  // is nothing to prove every plugin in it still exists, so the page is not rebuilt.
402
415
  if (live === null) return held('graph');
403
- const kept = Array.isArray(frozen.entries) ? frozen.entries : [];
404
- const liveIds = new Set((Array.isArray(live.entries) ? live.entries : []).map((entry) => (typeof entry === 'string' ? entry : entry?.id)));
416
+ // Both lists come from outside this function: the saved one from the shell, the current one
417
+ // from the app. One that cannot be read leaves the comparison unanswered, and each names
418
+ // itself rather than the page.
419
+ let kept = [];
420
+ try {
421
+ kept = Array.isArray(frozen.entries) ? frozen.entries : [];
422
+ } catch {
423
+ return held('list');
424
+ }
425
+ let liveEntries = [];
426
+ try {
427
+ liveEntries = Array.isArray(live.entries) ? live.entries : [];
428
+ } catch {
429
+ return held('graph');
430
+ }
431
+ const liveIds = new Set();
432
+ try {
433
+ for (const entry of liveEntries) liveIds.add(typeof entry === 'string' ? entry : entry?.id);
434
+ } catch {
435
+ return held('graph');
436
+ }
405
437
  let vanished = false;
406
438
  for (const entry of kept) {
407
439
  const id = typeof entry === 'string' ? entry : entry?.id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.74",
3
+ "version": "1.9.76",
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",