dsh-unlag 1.9.12 → 1.9.13

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 -1
  2. package/index.js +4 -1
  3. package/package.json +1 -1
package/client.js CHANGED
@@ -118,7 +118,9 @@ window.__ModuleLoader__.load({
118
118
  * the time anyone reads it.
119
119
  */
120
120
  function report(event, gate) {
121
- const query = gate === undefined ? `event=${event}` : `event=${event}&gate=${encodeURIComponent(gate)}`;
121
+ const page = String(window?.__DSH_BOOT__?.rev ?? '').replace(/[^a-z0-9]/gu, '').slice(0, 24);
122
+ const named = gate === undefined ? `event=${event}` : `event=${event}&gate=${encodeURIComponent(gate)}`;
123
+ const query = page === '' ? named : `${named}&rev=${page}`;
122
124
  try {
123
125
  fetch(`${HOST_BASE}/report?${query}`, {
124
126
  method: 'POST', // ui-copy-ignore
package/index.js CHANGED
@@ -1500,7 +1500,10 @@ function serveButton(ctx, controller, config) {
1500
1500
  const event = params.get('event') ?? ''
1501
1501
  // A query comes from outside: one shaped gate keeps a forged line out of the log.
1502
1502
  const gate = (params.get('gate') ?? '').replace(/[^a-z-]/gu, '').slice(0, 24)
1503
- if (event === 'mounted') log('interface rebuilt; the page runs the plugins as served now')
1503
+ // Which generation of the page came up. A rebuild that lands on older bytes then says so.
1504
+ const pageRev = (params.get('rev') ?? '').replace(/[^a-z0-9]/gu, '').slice(0, 24)
1505
+ const from = pageRev === '' ? '' : ` (page ${pageRev})`
1506
+ if (event === 'mounted') log(`interface rebuilt; the page runs the plugins as served now${from}`)
1504
1507
  else if (event === 'rebuild') log('rebuild allowed: the page re-enters on the served modules')
1505
1508
  else if (event === 'held') log(`rebuild held back: ${gate === '' ? 'unknown' : gate}`)
1506
1509
  sendJson(res, 200, { status: 'done' })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.12",
3
+ "version": "1.9.13",
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",