dsh-unlag 1.9.67 → 1.9.69

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 +9 -1
  2. package/index.js +3 -0
  3. package/package.json +1 -1
package/client.js CHANGED
@@ -118,7 +118,15 @@ window.__ModuleLoader__.load({
118
118
  * the time anyone reads it.
119
119
  */
120
120
  function report(event, gate, attempt = 0) {
121
- const page = String(window?.__DSH_BOOT__?.rev ?? '').replace(/[^a-z0-9]/gu, '').slice(0, 24);
121
+ // The page description is the app's value, not this plugin's: a boot object whose revision
122
+ // cannot be read must not stop a press from being written down, and this call is the one
123
+ // place a press is recorded at all.
124
+ let page = '';
125
+ try {
126
+ page = String(window?.__DSH_BOOT__?.rev ?? '').replace(/[^a-z0-9]/gu, '').slice(0, 24);
127
+ } catch {
128
+ page = '';
129
+ }
122
130
  const named = gate === undefined ? `event=${event}` : `event=${event}&gate=${encodeURIComponent(gate)}`;
123
131
  const query = page === '' ? named : `${named}&rev=${page}`;
124
132
  /**
package/index.js CHANGED
@@ -1849,6 +1849,9 @@ function serveButton(ctx, controller, config) {
1849
1849
  ensureBundleShim(ctx)
1850
1850
  sendJson(res, 200, { graph: liveBootGraph(ctx) })
1851
1851
  } catch (error) {
1852
+ // A press that cannot read the plugin list has to say so somewhere: the page only learns
1853
+ // that the answer was empty, and this line is what explains it afterwards.
1854
+ log(`cannot describe the plugin list: ${error?.message ?? error}`)
1852
1855
  sendJson(res, 500, { status: 'error', detail: String(error?.message ?? error) })
1853
1856
  }
1854
1857
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.67",
3
+ "version": "1.9.69",
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",