dsh-triage 0.2.0 → 0.3.1
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 +260 -99
- package/dist/audit-data.d.ts.map +1 -1
- package/dist/audit-data.js +5 -2
- package/dist/audit-data.js.map +1 -1
- package/dist/cli.js +352 -27
- package/dist/cli.js.map +1 -1
- package/dist/fix.d.ts +115 -0
- package/dist/fix.d.ts.map +1 -0
- package/dist/fix.js +267 -0
- package/dist/fix.js.map +1 -0
- package/dist/host-audit-route.d.ts +1 -0
- package/dist/host-audit-route.d.ts.map +1 -1
- package/dist/host-audit-route.js +1 -1
- package/dist/host-audit-route.js.map +1 -1
- package/dist/host-summary-route.d.ts +39 -0
- package/dist/host-summary-route.d.ts.map +1 -0
- package/dist/host-summary-route.js +49 -0
- package/dist/host-summary-route.js.map +1 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +71 -17
- package/dist/host.js.map +1 -1
- package/dist/serve.d.ts +49 -14
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +1023 -141
- package/dist/serve.js.map +1 -1
- package/dist/summary.d.ts +78 -0
- package/dist/summary.d.ts.map +1 -0
- package/dist/summary.js +235 -0
- package/dist/summary.js.map +1 -0
- package/package.json +7 -4
package/client.js
CHANGED
|
@@ -15,17 +15,20 @@
|
|
|
15
15
|
* C5 copy goes through ctx.locale.register + bind, side effects through ctx.effect
|
|
16
16
|
* C6 a READ-ONLY tab is an accepted shape upstream, so we do not compete for a slot
|
|
17
17
|
*
|
|
18
|
-
* WHAT
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
18
|
+
* R51 — WHAT CHANGED, AND WHY: until R50 this tab showed a row count, a verdict tally and the
|
|
19
|
+
* sentence "run `dsh-triage audit` in a terminal". The rule it respected was real (the browser
|
|
20
|
+
* cannot compute a verdict), but the conclusion had become reachable by then: R33 opened a
|
|
21
|
+
* read-only route, so the answer could be *computed on the host, by the CLI's own engine*, and
|
|
22
|
+
* merely *displayed* here. The tab now asks `/compat-triage/summary` for
|
|
23
|
+
* `buildProfileSummary()`'s output — the same projection `dsh-triage status` and `serve` print —
|
|
24
|
+
* and renders it. It still decides nothing: every number and every sentence below comes from the
|
|
25
|
+
* payload, and when the payload is missing it says so instead of rendering zeros.
|
|
24
26
|
*
|
|
25
27
|
* DEGRADATION IS THE DEFAULT: every registration is wrapped, and the tab is only registered
|
|
26
28
|
* when the whole contract is present (slots.inject, slots.register, locale.register, a renderer).
|
|
27
29
|
* A missing piece means ZERO registrations — no half-rendered tab, no error page.
|
|
28
30
|
*/
|
|
31
|
+
|
|
29
32
|
window.__ModuleLoader__.load({
|
|
30
33
|
id: 'dsh-triage',
|
|
31
34
|
factory: (require) => {
|
|
@@ -33,38 +36,204 @@ window.__ModuleLoader__.load({
|
|
|
33
36
|
const NS = 'compat-triage'
|
|
34
37
|
/** Services this tab needs; the loader only exposes these to `require`/ctx (C4). */
|
|
35
38
|
const inject = ['slots', 'locale', 'modules']
|
|
39
|
+
/** The read-only route built in R51. One place, so a rename cannot drift between halves. */
|
|
40
|
+
const SUMMARY_URL = '/compat-triage/summary'
|
|
41
|
+
/** How many issues a settings tab may show before it stops being a settings tab. */
|
|
42
|
+
const ISSUES_SHOWN = 3
|
|
43
|
+
/**
|
|
44
|
+
* The pure views, kept so the vm test can render them without a React runtime (see
|
|
45
|
+
* `views()` at the bottom). They are NOT part of the Host contract: the Host only calls
|
|
46
|
+
* `apply`, and everything else here is for our own assertions.
|
|
47
|
+
*/
|
|
48
|
+
let lastViews = null
|
|
36
49
|
|
|
37
50
|
const zh = {
|
|
38
51
|
tab: '分诊台',
|
|
39
|
-
title: '分诊台 ·
|
|
40
|
-
hint: '
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
source: '数据来自宿主只读路由 /compat-triage/
|
|
52
|
+
title: '分诊台 · 这套装会不会坏',
|
|
53
|
+
hint: '结论由命令行同一引擎在宿主侧算好,这里只负责显示。',
|
|
54
|
+
counts: '行 {rows} · 有判定 {judged} · 正常 {go} · 会坏 {denied} · 判不了 {unknown}',
|
|
55
|
+
issues: '要看的地方',
|
|
56
|
+
noIssues: '没有需要你动手的行。',
|
|
57
|
+
reason: '原因',
|
|
58
|
+
unknownSuffix: '不声明支持区间的行不算通过,只能算判不了。',
|
|
59
|
+
more: '还有 {n} 条没在这里列出。',
|
|
60
|
+
next: '下一步',
|
|
61
|
+
source: '数据来自宿主只读路由 /compat-triage/summary,与 `dsh-triage status` 同源。',
|
|
49
62
|
reload: '刷新',
|
|
63
|
+
copy: '复制',
|
|
50
64
|
failed: '读取失败',
|
|
51
|
-
|
|
65
|
+
pending: '正在读宿主…',
|
|
66
|
+
unreachable: '拿不到结论(只读路由没回答)——这不是「没问题」。',
|
|
67
|
+
noWeb: '这个 profile 没有 web 服务,所以没有这条路由;请在终端用 `dsh-triage status`。',
|
|
68
|
+
empty: '这个 home/profile 里一行插件都没有——通常是 --dsh-home / --profile 指错了。',
|
|
69
|
+
errorEmpty: '路由没有返回 summary 字段,因此不显示任何数字。',
|
|
52
70
|
}
|
|
53
71
|
const en = {
|
|
54
72
|
tab: 'Triage',
|
|
55
|
-
title: 'Triage ·
|
|
56
|
-
hint: '
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
source: 'Read from the host route /compat-triage/
|
|
73
|
+
title: 'Triage · will this setup break?',
|
|
74
|
+
hint: 'The conclusion is computed on the host by the same engine as the CLI; this tab only displays it.',
|
|
75
|
+
counts: 'rows {rows} · judged {judged} · fine {go} · will break {denied} · cannot tell {unknown}',
|
|
76
|
+
issues: 'What needs you',
|
|
77
|
+
noIssues: 'Nothing here needs your hands.',
|
|
78
|
+
reason: 'reason',
|
|
79
|
+
unknownSuffix: 'Rows that declare no version range are not a pass — they are "cannot tell".',
|
|
80
|
+
more: '{n} more not listed here.',
|
|
81
|
+
next: 'Next step',
|
|
82
|
+
source: 'Read from the host route /compat-triage/summary, the same projection `dsh-triage status` prints.',
|
|
65
83
|
reload: 'Refresh',
|
|
84
|
+
copy: 'Copy',
|
|
66
85
|
failed: 'Read failed',
|
|
67
|
-
|
|
86
|
+
pending: 'Reading the host…',
|
|
87
|
+
unreachable: 'No conclusion (the read-only route did not answer) — that is not "all good".',
|
|
88
|
+
noWeb: 'This profile serves no web surface, so the route does not exist. Use `dsh-triage status` in a terminal.',
|
|
89
|
+
empty: 'This home/profile yields zero plugin rows — usually --dsh-home / --profile points somewhere else.',
|
|
90
|
+
errorEmpty: 'The route returned no summary field, so no numbers are shown.',
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Fill `{name}` placeholders. A missing value becomes `?`, never `0`. */
|
|
94
|
+
function fill(template, values) {
|
|
95
|
+
return String(template).replace(/\{(\w+)\}/g, (whole, key) =>
|
|
96
|
+
Object.prototype.hasOwnProperty.call(values, key) ? String(values[key]) : '?',
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** A clipboard we do not have is a no-op, not a fake "copied". */
|
|
101
|
+
function copyText(text) {
|
|
102
|
+
const report = (ok, error) => {
|
|
103
|
+
try {
|
|
104
|
+
if (typeof window === 'object' && window !== null) {
|
|
105
|
+
window.__dshTriage = { ...(window.__dshTriage || {}), clipboard: { ok, error: error ?? null } }
|
|
106
|
+
}
|
|
107
|
+
} catch {
|
|
108
|
+
// Recording the outcome is a nicety; the button still works without it.
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
if (typeof navigator === 'object' && navigator !== null && navigator.clipboard) {
|
|
113
|
+
navigator.clipboard.writeText(String(text)).then(
|
|
114
|
+
() => report(true, null),
|
|
115
|
+
// The failure is published, not swallowed: a button that cannot copy must be visible as
|
|
116
|
+
// such to the probe (R51 user test), not merely unhelpful to the person clicking it.
|
|
117
|
+
(error) => report(false, String((error && error.message) || error)),
|
|
118
|
+
)
|
|
119
|
+
return
|
|
120
|
+
}
|
|
121
|
+
report(false, 'navigator.clipboard is unavailable')
|
|
122
|
+
} catch (error) {
|
|
123
|
+
report(false, String((error && error.message) || error))
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The two pure views. Everything they print comes from `copy` (the Host's localization) and
|
|
129
|
+
* `summary` (the Host's projection); nothing here counts, ranks or fills a missing field.
|
|
130
|
+
*/
|
|
131
|
+
function makeViews(jsxRuntime) {
|
|
132
|
+
const jsx = jsxRuntime.jsx
|
|
133
|
+
const jsxs = jsxRuntime.jsxs
|
|
134
|
+
|
|
135
|
+
/** One line per issue: what it is, in everyday words, plus the fix when the engine gave one. */
|
|
136
|
+
function issueRow(issue, copy, index) {
|
|
137
|
+
const children = [
|
|
138
|
+
jsx('code', { children: String(issue.id) }),
|
|
139
|
+
jsx('span', { children: ` — ${String(issue.plain)}` }),
|
|
140
|
+
]
|
|
141
|
+
// The engine's own reason is subordinate to the plain sentence, and labelled as such: a
|
|
142
|
+
// reader must not have to guess which half of the line is the conclusion and which is detail.
|
|
143
|
+
if (typeof issue.line === 'string' && issue.line !== '') {
|
|
144
|
+
children.push(jsx('span', { children: ` · ${copy.reason}: ${issue.line}` }))
|
|
145
|
+
}
|
|
146
|
+
if (typeof issue.fix === 'string' && issue.fix !== '') {
|
|
147
|
+
children.push(jsx('span', { children: ' · ' }))
|
|
148
|
+
children.push(
|
|
149
|
+
jsx('button', {
|
|
150
|
+
type: 'button',
|
|
151
|
+
'data-copy-fix': String(issue.id),
|
|
152
|
+
onClick: () => copyText(issue.fix),
|
|
153
|
+
children: copy.copy,
|
|
154
|
+
}),
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
return jsxs('li', { 'data-issue-kind': String(issue.kind), 'data-issue-index': index, children })
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function summaryView(summary, copy, onRefresh) {
|
|
161
|
+
const counts = summary && summary.counts ? summary.counts : null
|
|
162
|
+
const children = [jsx('h3', { children: copy.title }), jsx('p', { children: copy.hint })]
|
|
163
|
+
children.push(
|
|
164
|
+
jsx('p', {
|
|
165
|
+
'data-triage-tone': String(summary && summary.tone ? summary.tone : 'unknown'),
|
|
166
|
+
children: jsx('strong', { children: String((summary && summary.plain) || (summary && summary.headline) || '') }),
|
|
167
|
+
}),
|
|
168
|
+
)
|
|
169
|
+
if (counts !== null) {
|
|
170
|
+
children.push(
|
|
171
|
+
jsx('p', {
|
|
172
|
+
'data-triage-counts': '1',
|
|
173
|
+
children: fill(copy.counts, {
|
|
174
|
+
rows: counts.rows,
|
|
175
|
+
judged: counts.judged,
|
|
176
|
+
go: counts.go,
|
|
177
|
+
denied: counts.denied,
|
|
178
|
+
unknown: counts.unknown,
|
|
179
|
+
}),
|
|
180
|
+
}),
|
|
181
|
+
)
|
|
182
|
+
// Zero rows is not a clean profile: it is usually the wrong home. Say so (R49's lesson).
|
|
183
|
+
if (counts.rows === 0) children.push(jsx('p', { children: copy.empty }))
|
|
184
|
+
}
|
|
185
|
+
const issues = summary && Array.isArray(summary.issues) ? summary.issues.slice(0, ISSUES_SHOWN) : []
|
|
186
|
+
if (issues.length === 0) children.push(jsx('p', { children: copy.noIssues }))
|
|
187
|
+
else {
|
|
188
|
+
children.push(jsx('h4', { children: copy.issues }))
|
|
189
|
+
children.push(
|
|
190
|
+
jsxs('ul', {
|
|
191
|
+
'data-triage-issues': String(issues.length),
|
|
192
|
+
children: issues.map((issue, index) => issueRow(issue, copy, index)),
|
|
193
|
+
}),
|
|
194
|
+
)
|
|
195
|
+
if (summary.more > 0) children.push(jsx('p', { children: fill(copy.more, { n: summary.more }) }))
|
|
196
|
+
}
|
|
197
|
+
if (counts !== null && counts.unknown > 0) children.push(jsx('p', { children: copy.unknownSuffix }))
|
|
198
|
+
if (summary && Array.isArray(summary.next) && summary.next.length > 0) {
|
|
199
|
+
children.push(jsx('h4', { children: copy.next }))
|
|
200
|
+
children.push(
|
|
201
|
+
jsxs('ul', {
|
|
202
|
+
children: summary.next.map((step) =>
|
|
203
|
+
jsxs('li', {
|
|
204
|
+
// A separator is written INTO the line, not left to the Host's CSS: in the real
|
|
205
|
+
// page the label and the command rendered as one run-together string ("逐行归因dsh-triage why").
|
|
206
|
+
children: [jsx('span', { children: `${String(step.label)} — ` }), jsx('code', { children: String(step.command) })],
|
|
207
|
+
}),
|
|
208
|
+
),
|
|
209
|
+
}),
|
|
210
|
+
)
|
|
211
|
+
}
|
|
212
|
+
children.push(jsx('p', { children: copy.source }))
|
|
213
|
+
children.push(jsx('button', { type: 'button', onClick: onRefresh, children: copy.reload }))
|
|
214
|
+
return jsxs('div', { 'data-triage-tab': 'summary', children })
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* FOUR FAILURES, FOUR SENTENCES. "No route" is a profile shape, "unreadable" is a profile
|
|
219
|
+
* state, "no summary field" is a version skew, "thrown" is a dead process — and none of them
|
|
220
|
+
* is "no problems", which is what a zero-filled table would say.
|
|
221
|
+
*/
|
|
222
|
+
function failureView(result, copy, onRefresh) {
|
|
223
|
+
const kind = result === null ? 'pending' : result.kind
|
|
224
|
+
const children = [jsx('h3', { children: copy.title }), jsx('p', { children: copy.hint })]
|
|
225
|
+
if (kind === 'route-missing') children.push(jsx('p', { children: copy.noWeb }))
|
|
226
|
+
else if (kind === 'no-summary') children.push(jsx('p', { children: copy.errorEmpty }))
|
|
227
|
+
else if (kind === 'pending') children.push(jsx('p', { children: copy.pending }))
|
|
228
|
+
else children.push(jsx('p', { children: copy.unreachable }))
|
|
229
|
+
if (result !== null && result.detail) {
|
|
230
|
+
children.push(jsx('p', { children: `${copy.failed}: ${String(result.detail)}` }))
|
|
231
|
+
}
|
|
232
|
+
children.push(jsx('button', { type: 'button', onClick: onRefresh, children: copy.reload }))
|
|
233
|
+
return jsxs('div', { 'data-triage-tab': 'error', 'data-triage-kind': String(kind), children })
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return { summaryView, failureView }
|
|
68
237
|
}
|
|
69
238
|
|
|
70
239
|
/**
|
|
@@ -74,11 +243,11 @@ window.__ModuleLoader__.load({
|
|
|
74
243
|
function makeTab(react, jsxRuntime) {
|
|
75
244
|
if (react === null || jsxRuntime === null) return null
|
|
76
245
|
const { useState, useEffect, useCallback } = react
|
|
77
|
-
const
|
|
78
|
-
|
|
246
|
+
const views = makeViews(jsxRuntime)
|
|
247
|
+
lastViews = views
|
|
79
248
|
return function CompatTriageTab(props) {
|
|
80
249
|
const copy = props.copy
|
|
81
|
-
const [state, setState] = useState({ status: 'idle',
|
|
250
|
+
const [state, setState] = useState({ status: 'idle', result: null })
|
|
82
251
|
const load = useCallback(() => {
|
|
83
252
|
let cancelled = false
|
|
84
253
|
setState((previous) => ({ ...previous, status: 'loading' }))
|
|
@@ -86,54 +255,25 @@ window.__ModuleLoader__.load({
|
|
|
86
255
|
.then(() => props.load())
|
|
87
256
|
.then((result) => {
|
|
88
257
|
if (cancelled) return
|
|
89
|
-
setState({
|
|
90
|
-
status: result.ok ? 'ready' : 'failed',
|
|
91
|
-
count: result.count ?? null,
|
|
92
|
-
verdicts: result.verdicts ?? null,
|
|
93
|
-
detail: result.detail ?? null,
|
|
94
|
-
})
|
|
258
|
+
setState({ status: result && result.ok ? 'ready' : 'failed', result })
|
|
95
259
|
})
|
|
96
260
|
.catch((error) => {
|
|
97
261
|
if (cancelled) return
|
|
98
|
-
setState({
|
|
262
|
+
setState({
|
|
263
|
+
status: 'failed',
|
|
264
|
+
result: { ok: false, kind: 'thrown', detail: String((error && error.message) || error) },
|
|
265
|
+
})
|
|
99
266
|
})
|
|
100
267
|
return () => {
|
|
101
268
|
cancelled = true
|
|
102
269
|
}
|
|
103
270
|
}, [props])
|
|
104
271
|
useEffect(() => load(), [load])
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
state.verdicts === null
|
|
111
|
-
? copy.verdictsUnknown
|
|
112
|
-
: copy.verdicts
|
|
113
|
-
.replace('{go}', String(state.verdicts.go))
|
|
114
|
-
.replace('{blocked}', String(state.verdicts.blocked))
|
|
115
|
-
.replace('{unknown}', String(state.verdicts.unknown))
|
|
116
|
-
return jsxs('div', {
|
|
117
|
-
children: [
|
|
118
|
-
jsx('h3', { children: copy.title }),
|
|
119
|
-
jsx('p', { children: copy.hint }),
|
|
120
|
-
jsx('p', { children: rowsText }),
|
|
121
|
-
jsx('p', { children: verdictsText }),
|
|
122
|
-
jsx('p', { children: copy.source }),
|
|
123
|
-
jsx('p', { children: copy.rowsFact }),
|
|
124
|
-
jsx('p', {
|
|
125
|
-
children: [
|
|
126
|
-
jsx('code', { children: copy.command }),
|
|
127
|
-
jsx('span', { children: ` — ${copy.commandHint}` }),
|
|
128
|
-
],
|
|
129
|
-
}),
|
|
130
|
-
jsx('p', { children: copy.panel }),
|
|
131
|
-
state.status === 'failed' && state.detail !== null
|
|
132
|
-
? jsx('p', { children: `${copy.failed}: ${state.detail}` })
|
|
133
|
-
: null,
|
|
134
|
-
jsx('button', { type: 'button', onClick: load, children: copy.reload }),
|
|
135
|
-
],
|
|
136
|
-
})
|
|
272
|
+
const result = state.result
|
|
273
|
+
if (state.status !== 'ready' || result === null || result.ok !== true || result.summary === null) {
|
|
274
|
+
return views.failureView(state.status === 'idle' ? null : result, copy, load)
|
|
275
|
+
}
|
|
276
|
+
return views.summaryView(result.summary, copy, load)
|
|
137
277
|
}
|
|
138
278
|
}
|
|
139
279
|
|
|
@@ -185,35 +325,56 @@ window.__ModuleLoader__.load({
|
|
|
185
325
|
if (effect !== null) effect(registerDictionaries, 'compat-triage:dictionaries')
|
|
186
326
|
else registerDictionaries()
|
|
187
327
|
const t = locale.bind(NS)
|
|
328
|
+
/*
|
|
329
|
+
* WHICH LOCALE THE PAYLOAD SHOULD BE READ IN: ask the Host's own binding, do not sniff the
|
|
330
|
+
* browser. `t('tab')` resolving to the zh dictionary means this page is being shown in
|
|
331
|
+
* Chinese, so the Chinese sentences are the correct ones; anything else (a third locale, or
|
|
332
|
+
* a test double) falls back to English, which is also what `summary.en` is for.
|
|
333
|
+
*/
|
|
334
|
+
const activeLocale = t('tab') === zh.tab ? 'zh' : 'en'
|
|
188
335
|
const injected = () => ({
|
|
336
|
+
locale: activeLocale,
|
|
189
337
|
copy: {
|
|
190
338
|
tab: t('tab'),
|
|
191
339
|
title: t('title'),
|
|
192
340
|
hint: t('hint'),
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
341
|
+
counts: t('counts'),
|
|
342
|
+
issues: t('issues'),
|
|
343
|
+
noIssues: t('noIssues'),
|
|
344
|
+
reason: t('reason'),
|
|
345
|
+
unknownSuffix: t('unknownSuffix'),
|
|
346
|
+
more: t('more'),
|
|
347
|
+
next: t('next'),
|
|
200
348
|
source: t('source'),
|
|
201
349
|
reload: t('reload'),
|
|
350
|
+
copy: t('copy'),
|
|
202
351
|
failed: t('failed'),
|
|
203
|
-
|
|
352
|
+
pending: t('pending'),
|
|
353
|
+
unreachable: t('unreachable'),
|
|
354
|
+
noWeb: t('noWeb'),
|
|
355
|
+
empty: t('empty'),
|
|
356
|
+
errorEmpty: t('errorEmpty'),
|
|
204
357
|
},
|
|
205
358
|
/*
|
|
206
|
-
* FACTS FROM THE HOST, NOT JUDGEMENTS MADE HERE (铁律 1).
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
359
|
+
* FACTS FROM THE HOST, NOT JUDGEMENTS MADE HERE (铁律 1). The route answers with the
|
|
360
|
+
* projection `dsh-triage status` prints, built by `buildProfileSummary()` from the same
|
|
361
|
+
* `loadAuditData()` the CLI calls. This function only picks a locale and forwards the
|
|
362
|
+
* failure: it counts nothing and never fills a missing field with a plausible value.
|
|
210
363
|
*/
|
|
211
364
|
load: async () => {
|
|
212
365
|
/** Publish what the tab just showed, so a real page can be asked for it (R33 same-source). */
|
|
213
366
|
const publishData = (result) => {
|
|
214
367
|
try {
|
|
215
368
|
if (typeof window === 'object' && window !== null) {
|
|
216
|
-
window.__dshTriage = {
|
|
369
|
+
window.__dshTriage = {
|
|
370
|
+
...(window.__dshTriage || {}),
|
|
371
|
+
data: {
|
|
372
|
+
ok: result.ok,
|
|
373
|
+
kind: result.kind ?? null,
|
|
374
|
+
tone: result.summary && result.summary.tone ? result.summary.tone : null,
|
|
375
|
+
counts: result.summary && result.summary.counts ? result.summary.counts : null,
|
|
376
|
+
},
|
|
377
|
+
}
|
|
217
378
|
}
|
|
218
379
|
} catch {
|
|
219
380
|
// A frozen window only costs the diagnostic marker, never the tab.
|
|
@@ -222,15 +383,17 @@ window.__ModuleLoader__.load({
|
|
|
222
383
|
}
|
|
223
384
|
let response
|
|
224
385
|
try {
|
|
225
|
-
response = await fetch(
|
|
386
|
+
response = await fetch(SUMMARY_URL, {
|
|
226
387
|
credentials: 'include',
|
|
227
388
|
headers: { accept: 'application/json' },
|
|
228
389
|
})
|
|
229
390
|
} catch (error) {
|
|
230
391
|
// A dead route is a fact to report, not an exception to render: `load` never throws.
|
|
231
|
-
return publishData({ ok: false,
|
|
392
|
+
return publishData({ ok: false, kind: 'thrown', summary: null, detail: String((error && error.message) || error) })
|
|
232
393
|
}
|
|
233
394
|
if (!response.ok) {
|
|
395
|
+
// 404 is the one failure with its own meaning: this profile serves no web surface.
|
|
396
|
+
const kind = response.status === 404 ? 'route-missing' : 'http'
|
|
234
397
|
let detail = `HTTP ${response.status}`
|
|
235
398
|
try {
|
|
236
399
|
const body = await response.json()
|
|
@@ -238,21 +401,14 @@ window.__ModuleLoader__.load({
|
|
|
238
401
|
} catch {
|
|
239
402
|
// A non-JSON error body is still an error; the status is the fact we have.
|
|
240
403
|
}
|
|
241
|
-
return publishData({ ok: false,
|
|
404
|
+
return publishData({ ok: false, kind, summary: null, detail })
|
|
242
405
|
}
|
|
243
406
|
const payload = await response.json()
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
if (verdicts !== null) {
|
|
248
|
-
for (const verdict of verdicts) {
|
|
249
|
-
const conclusion = verdict && verdict.conclusion
|
|
250
|
-
if (conclusion === 'go') tally.go += 1
|
|
251
|
-
else if (conclusion === 'blocked') tally.blocked += 1
|
|
252
|
-
else tally.unknown += 1
|
|
253
|
-
}
|
|
407
|
+
const summary = payload && payload.summary ? payload.summary[activeLocale] || payload.summary.en || null : null
|
|
408
|
+
if (summary === null) {
|
|
409
|
+
return publishData({ ok: false, kind: 'no-summary', summary: null, detail: null })
|
|
254
410
|
}
|
|
255
|
-
return publishData({ ok: true,
|
|
411
|
+
return publishData({ ok: true, kind: null, summary, detail: null })
|
|
256
412
|
},
|
|
257
413
|
})
|
|
258
414
|
slots.inject('settings.plugins.tab', () =>
|
|
@@ -276,7 +432,7 @@ window.__ModuleLoader__.load({
|
|
|
276
432
|
const registered = register(ctx, require)
|
|
277
433
|
publishMarker(
|
|
278
434
|
registered
|
|
279
|
-
? { registered: true, slot: 'settings.plugins.tab', id: NS }
|
|
435
|
+
? { registered: true, slot: 'settings.plugins.tab', id: NS, route: SUMMARY_URL }
|
|
280
436
|
: { registered: false, reason: 'contract-missing', id: NS },
|
|
281
437
|
)
|
|
282
438
|
return registered
|
|
@@ -288,6 +444,11 @@ window.__ModuleLoader__.load({
|
|
|
288
444
|
}
|
|
289
445
|
}
|
|
290
446
|
|
|
291
|
-
|
|
447
|
+
/** Test seam: the pure views, available after a successful registration. */
|
|
448
|
+
function views() {
|
|
449
|
+
return lastViews
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
return { NS, inject, apply, register, views }
|
|
292
453
|
},
|
|
293
454
|
})
|
package/dist/audit-data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-data.d.ts","sourceRoot":"","sources":["../src/audit-data.ts"],"names":[],"mappings":"AA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,CAiE7E;AAED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAEnE;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG,cAAc,CAGzH;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,OAAO,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACvD,SAAS,OAAO,EAAE,CAGpB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACvD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8EzB;AAED,4FAA4F;AAC5F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,UAAU,CAOnE"}
|
package/dist/audit-data.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { readFileSync } from 'node:fs';
|
|
15
15
|
import { homedir, tmpdir } from 'node:os';
|
|
16
|
-
import { compareInventory, extractEntryClaims, extractPresetDeclarations, findEntryIdCollisions, groupClaimsBySource, parseInventorySnapshot, parsePatchYaml, redactEnv, redactPath, redactVerdict, rowTargets, verdictsFromInventory, verdictsFromRowAdmission, } from '@dsh-triage/core';
|
|
16
|
+
import { compareInventory, extractEntryClaims, extractPresetDeclarations, findEntryIdCollisions, groupClaimsBySource, parseInventorySnapshot, parsePatchYaml, redactEnv, redactPath, redactVerdict, rowTargets, verdictsFromInventory, readProfileExemptions, verdictsFromRowAdmission, } from '@dsh-triage/core';
|
|
17
17
|
import { discoverLocalArtifacts } from '@dsh-triage/signals';
|
|
18
18
|
import { findDuplicateCopies, loadComposition, resolveRows } from './load.js';
|
|
19
19
|
/**
|
|
@@ -36,7 +36,10 @@ export async function loadAuditData(input) {
|
|
|
36
36
|
// every row, not only for the denied ones (R8 adversary finding F11).
|
|
37
37
|
const rows = await resolveRows(input.env, rowTargetsOf(claims));
|
|
38
38
|
// T-105: `why` and `audit` must reach the SAME row-level admission conclusion.
|
|
39
|
-
|
|
39
|
+
// A profile can exempt an exact plugin@version for an exact runtime. The loader honours it at
|
|
40
|
+
// boot, so judging the row blind would make this tool disagree with the running profile.
|
|
41
|
+
const exemptions = readProfileExemptions(input.env.profileDir).exemptions;
|
|
42
|
+
const rowVerdicts = verdictsFromRowAdmission({ env: input.env, rows, exemptions, generatedAt: input.stamp });
|
|
40
43
|
let snapshot = null;
|
|
41
44
|
let inventoryVerdicts = [];
|
|
42
45
|
let diff = { missing: [], undeclared: [], ambiguous: [] };
|
package/dist/audit-data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-data.js","sourceRoot":"","sources":["../src/audit-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,SAAS,EACT,UAAU,EACV,aAAa,EACb,UAAU,EACV,qBAAqB,EACrB,wBAAwB,GAOzB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAsB,MAAM,qBAAqB,CAAA;AAChF,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAyC7E;;;;;GAKG;AACH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