dsh-unlag 1.9.41 → 1.9.43
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 +13 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -90,7 +90,13 @@ const DEFAULT_ROOTS = [join(homedir(), '.dsh', 'plugins')]
|
|
|
90
90
|
/** A turn that never goes idle must not turn this into an endless poll. */
|
|
91
91
|
const MAX_DEFERRALS = 40
|
|
92
92
|
const MAX_STARTUP_ROWS = 64
|
|
93
|
-
|
|
93
|
+
/**
|
|
94
|
+
* The longest one startup address may be. The app folds a whole plugin set into one bundle address,
|
|
95
|
+
* and this profile's largest already measured 2.8 KB: one id list up to MAX_BUNDLE_IDS of normal
|
|
96
|
+
* plugin names is about 5 KB, so a bound below that would drop a sound address — and a script the
|
|
97
|
+
* check never reads is a script nothing proved would load in the next document.
|
|
98
|
+
*/
|
|
99
|
+
const MAX_STARTUP_ROW_CHARS = 8192
|
|
94
100
|
/**
|
|
95
101
|
* The largest one startup script may be before a check refuses it. The app serves a whole profile as
|
|
96
102
|
* a few bundles, and those grow with every installed plugin: one profile's largest bundle measured
|
|
@@ -1490,7 +1496,12 @@ export async function verifyStartupRows(graph, fetchBody, rows, budgetMs = MAX_V
|
|
|
1490
1496
|
const wanted = []
|
|
1491
1497
|
for (const row of offered) {
|
|
1492
1498
|
if (typeof row !== 'string' || row === '') continue
|
|
1493
|
-
|
|
1499
|
+
// A row past the bound is a script that will not be read, and a script this check does not read
|
|
1500
|
+
// is one nothing proved the next document could load: refuse the list instead of approving the
|
|
1501
|
+
// part that happened to be readable.
|
|
1502
|
+
if (row.length > MAX_STARTUP_ROW_CHARS) {
|
|
1503
|
+
return { status: 'blocked', reason: 'list', detail: 'the startup list names an address longer than a document loads' }
|
|
1504
|
+
}
|
|
1494
1505
|
const path = row.includes('://') ? row.replace(/^[a-z]+:\/\/[^/]+/iu, '') : row
|
|
1495
1506
|
const url = path.startsWith('/') ? path : `/${path.replace(/^\.?\//u, '')}`
|
|
1496
1507
|
const request = bundleRequest(url)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-unlag",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.43",
|
|
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",
|