dsh-unlag 1.9.75 → 1.9.77
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/client.js +16 -3
- package/index.js +7 -0
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -287,9 +287,17 @@ window.__ModuleLoader__.load({
|
|
|
287
287
|
const covered = new Set();
|
|
288
288
|
const sources = [];
|
|
289
289
|
for (const batch of batches) {
|
|
290
|
-
|
|
290
|
+
// A batch is read field by field: the list can be the page's own boot object, and a batch
|
|
291
|
+
// whose fields cannot be read leaves that address unproven rather than the page broken.
|
|
292
|
+
let url = '';
|
|
293
|
+
let listed = [];
|
|
294
|
+
try {
|
|
295
|
+
url = typeof batch?.url === 'string' ? batch.url : '';
|
|
296
|
+
listed = Array.isArray(batch?.entries) && batch.entries.every((id) => typeof id === 'string') ? batch.entries : [];
|
|
297
|
+
} catch {
|
|
298
|
+
return held('row');
|
|
299
|
+
}
|
|
291
300
|
if (url === '') continue;
|
|
292
|
-
const listed = Array.isArray(batch.entries) && batch.entries.every((id) => typeof id === 'string') ? batch.entries : [];
|
|
293
301
|
const ids = listed.length > 0 ? listed : bundledIds(url);
|
|
294
302
|
if (ids.length === 0) return held('row');
|
|
295
303
|
let resolved = null;
|
|
@@ -303,7 +311,12 @@ window.__ModuleLoader__.load({
|
|
|
303
311
|
}
|
|
304
312
|
if (sources.length === 0) return held('graph');
|
|
305
313
|
for (const entry of entries) {
|
|
306
|
-
|
|
314
|
+
let id = '';
|
|
315
|
+
try {
|
|
316
|
+
id = typeof entry === 'string' ? entry : entry?.id;
|
|
317
|
+
} catch {
|
|
318
|
+
return held('covers');
|
|
319
|
+
}
|
|
307
320
|
if (typeof id !== 'string' || !covered.has(id)) return held('covers');
|
|
308
321
|
}
|
|
309
322
|
// Reading these bodies here would need a parser the page does not have and would not prove
|
package/index.js
CHANGED
|
@@ -1616,6 +1616,13 @@ function parseAsScript(body, name) {
|
|
|
1616
1616
|
* @param rows the startup script addresses, as the next document would request them.
|
|
1617
1617
|
*/
|
|
1618
1618
|
export async function verifyStartupRows(graph, fetchBody, rows, budgetMs = MAX_VERIFY_MS) {
|
|
1619
|
+
// A startup list is checked against the plugin set, so a set that cannot be read at all leaves
|
|
1620
|
+
// nothing to check against: approving anyway would vouch for addresses nothing backs, and the
|
|
1621
|
+
// next document would die on the first one that answers 404. An empty set is still a readable
|
|
1622
|
+
// one — a row it no longer names is served from the retained bundle and reported as left out.
|
|
1623
|
+
if (graph === null || typeof graph !== 'object' || !Array.isArray(graph.entries)) {
|
|
1624
|
+
return { status: 'blocked', reason: 'list', detail: 'the plugin list cannot be read, so no startup row can be checked against it' }
|
|
1625
|
+
}
|
|
1619
1626
|
const entries = new Map(
|
|
1620
1627
|
(Array.isArray(graph?.entries) ? graph.entries : [])
|
|
1621
1628
|
.filter((row) => typeof row?.id === 'string' && row.id !== '')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-unlag",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.77",
|
|
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",
|