dsh-unlag 1.9.66 → 1.9.67
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/index.js +18 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1668,10 +1668,25 @@ export async function verifyStartupRows(graph, fetchBody, rows, budgetMs = MAX_V
|
|
|
1668
1668
|
} catch (error) {
|
|
1669
1669
|
return { status: 'blocked', reason: 'network', detail: `${item.url}: ${String(error?.message ?? error)}` }
|
|
1670
1670
|
}
|
|
1671
|
-
|
|
1672
|
-
|
|
1671
|
+
// Reading the answer is the same kind of step as fetching it: a response whose status or body
|
|
1672
|
+
// cannot be read is one this check cannot approve, and saying which script failed beats
|
|
1673
|
+
// abandoning the whole list without a name in the reason.
|
|
1674
|
+
let status = null
|
|
1675
|
+
let readable = true
|
|
1676
|
+
try {
|
|
1677
|
+
status = response?.status ?? null
|
|
1678
|
+
} catch {
|
|
1679
|
+
readable = false
|
|
1680
|
+
}
|
|
1681
|
+
if (!readable || response === null || response === undefined || status !== 200) {
|
|
1682
|
+
return { status: 'blocked', reason: 'missing', detail: `${item.url} answers ${readable ? String(status ?? 'nothing') : 'nothing readable'}` }
|
|
1683
|
+
}
|
|
1684
|
+
let bytes = null
|
|
1685
|
+
try {
|
|
1686
|
+
bytes = Buffer.from(await response.arrayBuffer())
|
|
1687
|
+
} catch (error) {
|
|
1688
|
+
return { status: 'blocked', reason: 'missing', detail: `${item.url} cannot be read: ${String(error?.message ?? error)}` }
|
|
1673
1689
|
}
|
|
1674
|
-
const bytes = Buffer.from(await response.arrayBuffer())
|
|
1675
1690
|
if (bytes.length === 0) return { status: 'blocked', reason: 'empty', detail: `${item.url} answers an empty body` }
|
|
1676
1691
|
totalBytes += bytes.length
|
|
1677
1692
|
if (bytes.length > MAX_SCRIPT_BYTES || totalBytes > MAX_TOTAL_SCRIPT_BYTES) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-unlag",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.67",
|
|
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",
|