dsh-ris-ide 1.8.1 → 1.8.3
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/README.md +2 -2
- package/lib/client.js +569 -98
- package/lib/debug/vendor/README.md +14 -0
- package/lib/debug/vendor/jdwp/client.js +9 -4
- package/lib/debug/vendor/src/jdwp/client.ts +12 -5
- package/lib/index.js +963 -64
- package/lib/redirector.js +76 -4
- package/lib/risd/lifecycle.js +54 -10
- package/lib/risd/ping.js +136 -17
- package/lib/risd/server.js +424 -22
- package/lib/risd/ui.js +218 -129
- package/lib/risd-client.js +4 -1
- package/lib/startup.js +27 -7
- package/package.json +2 -2
- package/test/client-viewer.test.mjs +268 -93
- package/test/clipboard.test.mjs +259 -0
- package/test/debug-engine.test.mjs +3 -1
- package/test/dsh-origin.test.mjs +4 -11
- package/test/dsh-window-refresh.test.mjs +166 -1
- package/test/harness.test.mjs +1 -1
- package/test/helpers/cmd.mjs +29 -0
- package/test/helpers/tgz.mjs +71 -0
- package/test/host-search.test.mjs +18 -11
- package/test/host-tail.test.mjs +190 -25
- package/test/proxy-route.test.mjs +61 -0
- package/test/proxy-window.test.mjs +5 -0
- package/test/proxy.test.mjs +40 -11
- package/test/proxybridge-bundle.test.mjs +1 -59
- package/test/redirector-bundle.test.mjs +21 -67
- package/test/redirector.test.mjs +71 -4
- package/test/risd-api.test.mjs +83 -29
- package/test/risd-bridge-degrade.test.mjs +3 -29
- package/test/risd-cli-home.test.mjs +41 -4
- package/test/risd-engine.test.mjs +13 -50
- package/test/risd-entry.test.mjs +0 -37
- package/test/risd-follow-start.test.mjs +102 -0
- package/test/risd-git.test.mjs +7 -5
- package/test/risd-handoff.test.mjs +6 -50
- package/test/risd-helpers.mjs +150 -3
- package/test/risd-host-p2.test.mjs +2 -30
- package/test/risd-lifecycle.test.mjs +203 -33
- package/test/risd-ping.test.mjs +77 -1
- package/test/risd-programs.test.mjs +4 -34
- package/test/risd-review-p2.test.mjs +0 -13
- package/test/risd-shutdown.test.mjs +5 -38
- package/test/risd-teardown.test.mjs +8 -27
- package/test/risd-ui.test.mjs +205 -14
- package/test/risd-write.test.mjs +2 -1
- package/test/startup-reconcile.test.mjs +44 -8
- package/test/proxy-restart.test.mjs +0 -39
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// The bridge parses its profile when it starts, so a rule-table save can leave old
|
|
2
|
-
// rules intercepting. The daemon page therefore offers "restart bridge" right next
|
|
3
|
-
// to that warning, and both the daemon and the plugin must understand the action.
|
|
4
|
-
import { test } from 'node:test'
|
|
5
|
-
import assert from 'node:assert/strict'
|
|
6
|
-
import { readFileSync } from 'node:fs'
|
|
7
|
-
|
|
8
|
-
const read = (file) => readFileSync(new URL(`../${file}`, import.meta.url), 'utf8')
|
|
9
|
-
|
|
10
|
-
test('the daemon page offers a restart button next to a stale-bridge note', () => {
|
|
11
|
-
const ui = read('lib/risd/ui.js')
|
|
12
|
-
assert.match(ui, /id="bridge-restart"/)
|
|
13
|
-
// The button only appears for notes that say the bridge did not take the new rules.
|
|
14
|
-
assert.match(ui, /未重载\|旧规则/)
|
|
15
|
-
assert.match(ui, /'为什么要重启:'/)
|
|
16
|
-
assert.match(ui, /redirector-restart/)
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
test('the daemon restarts the bridge: stop, settle, start from the new profile', () => {
|
|
20
|
-
const server = read('lib/risd/server.js')
|
|
21
|
-
const at = server.indexOf("action === 'redirector-restart'")
|
|
22
|
-
assert.ok(at > 0, 'daemon must handle redirector-restart')
|
|
23
|
-
const block = server.slice(at, at + 600)
|
|
24
|
-
assert.match(block, /await stopRedirector\(\)/)
|
|
25
|
-
assert.match(block, /setTimeout\(resolve, 300\)/)
|
|
26
|
-
// A page-triggered restart may prompt (it is the user asking); background
|
|
27
|
-
// reconcilers must not (review B-P0-2).
|
|
28
|
-
assert.match(block, /await startRedirectors\(\{ interactive: true \}\)/)
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
test('the plugin forwards the restart action to the daemon and can run it itself', () => {
|
|
32
|
-
const index = read('lib/index.js')
|
|
33
|
-
assert.match(index, /'redirector-restart'/)
|
|
34
|
-
const at = index.indexOf("action === 'redirector-restart'")
|
|
35
|
-
assert.ok(at > 0, 'plugin must handle redirector-restart locally')
|
|
36
|
-
const block = index.slice(at, at + 400)
|
|
37
|
-
assert.match(block, /await stopRedirector\(\)/)
|
|
38
|
-
assert.match(block, /await startRedirectors\(\)/)
|
|
39
|
-
})
|