dsh-unlag 1.9.43 → 1.9.45

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 (3) hide show
  1. package/README.md +9 -1
  2. package/index.js +4 -0
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -78,5 +78,13 @@ dsh plugin install dsh-unlag
78
78
  ## 测试
79
79
 
80
80
  ```sh
81
- node --test test/*.test.mjs
81
+ npm test
82
82
  ```
83
+
84
+ 对着正在运行的 App 走一遍真实判定(页面半、宿主半都是线上代码,用的是 App 现在渲染的启动清单;只回答「能不能刷」,绝不按按钮):
85
+
86
+ ```sh
87
+ npm run smoke
88
+ ```
89
+
90
+ 没有 App 在监听时打印 `skip` 并退出 0。
package/index.js CHANGED
@@ -1504,6 +1504,10 @@ export async function verifyStartupRows(graph, fetchBody, rows, budgetMs = MAX_V
1504
1504
  }
1505
1505
  const path = row.includes('://') ? row.replace(/^[a-z]+:\/\/[^/]+/iu, '') : row
1506
1506
  const url = path.startsWith('/') ? path : `/${path.replace(/^\.?\//u, '')}`
1507
+ // A list can name the same address more than once, and one address can be most of a profile's
1508
+ // bytes: read each address once so a repeated row cannot make one check read the profile's
1509
+ // scripts tens of times.
1510
+ if (wanted.some((entry) => entry.url === url)) continue
1507
1511
  const request = bundleRequest(url)
1508
1512
  wanted.push({ url, ids: request === null ? [] : request.ids })
1509
1513
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.43",
3
+ "version": "1.9.45",
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",
@@ -50,7 +50,8 @@
50
50
  },
51
51
  "scripts": {
52
52
  "test": "for f in test/*.test.mjs; do node \"$f\" || exit 1; done",
53
- "audit": "eslint --no-config-lookup --rule '{\"no-undef\":\"error\",\"no-unused-vars\":[\"error\",{\"args\":\"none\",\"caughtErrors\":\"none\"}]}' --global window --global document --global navigator --global location --global sessionStorage --global localStorage --global fetch --global Response --global Request --global URL --global URLSearchParams --global AbortController --global CustomEvent --global Event --global setTimeout --global clearTimeout --global setInterval --global clearInterval --global requestAnimationFrame --global queueMicrotask --global structuredClone --global Buffer --global process --global console index.js client.js"
53
+ "audit": "eslint --no-config-lookup --rule '{\"no-undef\":\"error\",\"no-unused-vars\":[\"error\",{\"args\":\"none\",\"caughtErrors\":\"none\"}]}' --global window --global document --global navigator --global location --global sessionStorage --global localStorage --global fetch --global Response --global Request --global URL --global URLSearchParams --global AbortController --global CustomEvent --global Event --global setTimeout --global clearTimeout --global setInterval --global clearInterval --global requestAnimationFrame --global queueMicrotask --global structuredClone --global Buffer --global process --global console index.js client.js",
54
+ "smoke": "node scripts/live-smoke.mjs"
54
55
  },
55
56
  "devDependencies": {
56
57
  "eslint": "9.39.0"