dsh-unlag 1.9.95 → 1.9.96

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.95",
3
+ "version": "1.9.96",
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",
@@ -172,6 +172,13 @@ const rehearsalOk = rehearsal.threw === undefined && rehearsal.missing !== undef
172
172
 
173
173
  const running = { version: stated.version, code: stated.code, shim: stated.shim }
174
174
  const verdict = await probe.startupLooksServable()
175
+ // The whole decision a press makes before it swaps anything, run against the running app: the
176
+ // startup list it would re-enter on, the page surfaces a press consults, and the other plugins'
177
+ // own saves. `ready` here means a press now would go ahead; the reload route is still never called.
178
+ const pressGate = await probe.prepareInterface().catch((error) => String(error?.message ?? error))
179
+ const pressPath = pressGate === null
180
+ ? { ready: true }
181
+ : { ready: false, held: pressGate === 'blocked' ? `blocked:${probe.startupHoldReason() ?? 'unknown'}` : pressGate }
175
182
  console.log(JSON.stringify({
176
183
  host: HOST,
177
184
  version: running.version,
@@ -180,6 +187,7 @@ console.log(JSON.stringify({
180
187
  rows: rows.length,
181
188
  verdict,
182
189
  holdReason: verdict ? null : probe.startupHoldReason(),
190
+ pressPath,
183
191
  rehearsal: { ok: rehearsalOk, ...rehearsal },
184
192
  asked: requests,
185
193
  contract: Object.fromEntries(contract.map(([label, got, want]) => [label, `${got}${got === want ? '' : ` (wanted ${want})`}`])),