dsh-unlag 1.9.82 → 1.9.84

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 (3) hide show
  1. package/client.js +3 -0
  2. package/index.js +13 -5
  3. package/package.json +1 -1
package/client.js CHANGED
@@ -299,6 +299,9 @@ window.__ModuleLoader__.load({
299
299
  } catch {
300
300
  return held('graph');
301
301
  }
302
+ // A profile with no plugin at all hands the next document no script to load: a rebuild has
303
+ // nothing to fail, and holding would refuse it with a reason that is not true.
304
+ if (entries.length === 0 && batches.length === 0) return true;
302
305
  if (entries.length === 0 || batches.length === 0) return held('graph');
303
306
  const covered = new Set();
304
307
  const sources = [];
package/index.js CHANGED
@@ -1629,11 +1629,19 @@ export async function verifyStartupRows(graph, fetchBody, rows, budgetMs = MAX_V
1629
1629
  if (graph === null || typeof graph !== 'object' || !Array.isArray(graph.entries)) {
1630
1630
  return { status: 'blocked', reason: 'list', detail: 'the plugin list cannot be read, so no startup row can be checked against it' }
1631
1631
  }
1632
- const entries = new Map(
1633
- (Array.isArray(graph?.entries) ? graph.entries : [])
1634
- .filter((row) => typeof row?.id === 'string' && row.id !== '')
1635
- .map((row) => [row.id, row]),
1636
- )
1632
+ // The list is the running app's own object and it is re-composed while a swap runs, so reading a
1633
+ // row is a step that can fail like any other: a row that cannot be read leaves the list unread,
1634
+ // which is a refusal with a reason, not an exception out of the route.
1635
+ let entries
1636
+ try {
1637
+ entries = new Map(
1638
+ (Array.isArray(graph.entries) ? graph.entries : [])
1639
+ .filter((row) => typeof row?.id === 'string' && row.id !== '')
1640
+ .map((row) => [row.id, row]),
1641
+ )
1642
+ } catch (error) {
1643
+ return { status: 'blocked', reason: 'list', detail: `the plugin list cannot be read: ${String(error?.message ?? error)}` }
1644
+ }
1637
1645
  // A startup list is a handful of addresses. Anything past that bound is not a list this app could
1638
1646
  // boot from, and reading it would turn one request into unbounded work on the process that owns
1639
1647
  // every running turn.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.82",
3
+ "version": "1.9.84",
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",