dsh-unlag 1.9.58 → 1.9.59

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/index.js +12 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1269,7 +1269,12 @@ function serveBundlesAtCurrentRevision(ctx) {
1269
1269
  * from. Only when it has nothing is the same request tried at the revision of the plugin it
1270
1270
  * names, because a chunk is served at its entry's revision and nowhere else.
1271
1271
  */
1272
- const url = String(request?.url ?? '')
1272
+ // Reading the address is the first thing that runs, and a request object that cannot answer it
1273
+ // would reject this async handler before any guard below: it is read as no address instead.
1274
+ let url = ''
1275
+ try {
1276
+ url = String(request?.url ?? '')
1277
+ } catch {}
1273
1278
  // Same reason as the handler shape below: a rejection here is unhandled and ends the process.
1274
1279
  let retargeted = null
1275
1280
  try {
@@ -1315,7 +1320,12 @@ function serveBundlesAtCurrentRevision(ctx) {
1315
1320
  * first, so the served document and the chunks it later asks for are one generation.
1316
1321
  */
1317
1322
  const wrapped = async (req, res) => {
1318
- const originalUrl = String(req?.url ?? '')
1323
+ // Same as the resource shape: an address that cannot be read is no address. Throwing here would
1324
+ // reject the handler the server is awaiting, and a rejection nobody catches ends the process.
1325
+ let originalUrl = ''
1326
+ try {
1327
+ originalUrl = String(req?.url ?? '')
1328
+ } catch {}
1319
1329
  // Reading the table can throw while the plugin set is being swapped. This runs inside an async
1320
1330
  // route handler, where a rejection is an unhandled one and takes the whole app with it, so the
1321
1331
  // failure has to end here: answer the request as the table left it and say why in the log.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.58",
3
+ "version": "1.9.59",
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",