@webx-ui/module-audit 0.1.0
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/LICENSE +21 -0
- package/README.md +26 -0
- package/dist/AuditCompareIssues.d.ts +12 -0
- package/dist/AuditDetails.d.ts +11 -0
- package/dist/AuditFixDialog.d.ts +22 -0
- package/dist/AuditHideDialog.d.ts +21 -0
- package/dist/AuditHostPlaces.d.ts +10 -0
- package/dist/AuditHostsPage.d.ts +11 -0
- package/dist/AuditIssueList.d.ts +20 -0
- package/dist/AuditIssuesPage.d.ts +10 -0
- package/dist/AuditLayout.d.ts +31 -0
- package/dist/AuditOverviewPage.d.ts +10 -0
- package/dist/AuditPageCard.d.ts +24 -0
- package/dist/AuditPagesPage.d.ts +9 -0
- package/dist/AuditRunsPage.d.ts +11 -0
- package/dist/AuditSettingsPage.d.ts +11 -0
- package/dist/api.d.ts +85 -0
- package/dist/fields.d.ts +15 -0
- package/dist/i18n.d.ts +2 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +3279 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +8 -0
- package/dist/module.d.ts +19 -0
- package/dist/style.css +1 -0
- package/dist/types.d.ts +356 -0
- package/package.json +65 -0
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.wx-audit-places[data-v-1b5ca599]{display:flex;flex-direction:column;gap:var(--wx-space-16);min-width:0}.wx-audit-places__group[data-v-1b5ca599]{display:flex;flex-direction:column;gap:var(--wx-space-8);min-width:0}.wx-audit-places__row[data-v-1b5ca599]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-4) var(--wx-space-8);min-width:0}.wx-audit-places__url[data-v-1b5ca599]{min-width:0;overflow-wrap:anywhere}.wx-audit-hosts__host[data-v-44b7e64a]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-8);min-width:0;overflow-wrap:anywhere}[data-v-44b7e64a] .is-stand>td:first-child{box-shadow:inset 3px 0 0 var(--wx-color-danger)}.wx-audit-details[data-v-55c63cfb]{display:flex;flex-direction:column;gap:var(--wx-space-8);min-width:0}.wx-audit-details__scroll[data-v-55c63cfb]{overflow-x:auto}.wx-audit-details__table[data-v-55c63cfb]{width:100%;border-collapse:collapse;font-size:var(--wx-font-size-sm)}.wx-audit-details__table th[data-v-55c63cfb]{color:var(--wx-text-muted);font-weight:400;text-align:left;white-space:nowrap}.wx-audit-details__table th[data-v-55c63cfb],.wx-audit-details__table td[data-v-55c63cfb]{padding:var(--wx-space-4) var(--wx-space-8);border-bottom:1px solid var(--wx-border-muted);vertical-align:top}.wx-audit-details__url[data-v-55c63cfb]{overflow-wrap:anywhere}.wx-audit-fix[data-v-28525af3]{display:flex;flex-direction:column;gap:var(--wx-space-16);min-width:0}.wx-audit-fix__offer[data-v-28525af3]{display:flex;flex-direction:column;gap:var(--wx-space-8);min-width:0}.wx-audit-fix__changes[data-v-28525af3]{width:100%;border-collapse:collapse;font-size:var(--wx-font-size-sm)}.wx-audit-fix__changes th[data-v-28525af3]{padding:var(--wx-space-4) var(--wx-space-8);color:var(--wx-text-muted);font-weight:var(--wx-font-weight-medium);text-align:start;border-bottom:1px solid var(--wx-border-default)}.wx-audit-fix__changes td[data-v-28525af3]{padding:var(--wx-space-6) var(--wx-space-8);vertical-align:top;border-bottom:1px solid var(--wx-border-default);overflow-wrap:anywhere}.wx-audit-fix__field[data-v-28525af3],.wx-audit-fix__count[data-v-28525af3]{color:var(--wx-text-muted)}.wx-audit-fix__value[data-v-28525af3]{white-space:pre-line}.wx-audit-fix__actions[data-v-28525af3]{display:flex;justify-content:flex-end}.wx-audit-hide[data-v-1db364c4],.wx-audit-issues[data-v-23ac6ac8]{display:flex;flex-direction:column;gap:var(--wx-space-12);min-width:0}.wx-audit-issues__item[data-v-23ac6ac8]{display:flex;flex-direction:column;gap:var(--wx-space-6);min-width:0}.wx-audit-issues__head[data-v-23ac6ac8]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-8);min-width:0}.wx-audit-issues__fix[data-v-23ac6ac8],.wx-audit-issues__end[data-v-23ac6ac8]{margin-inline-start:auto}.wx-audit-issues__url[data-v-23ac6ac8]{min-width:0;overflow-wrap:anywhere}.wx-audit-findings__filters[data-v-7f790d95]{display:flex;flex-direction:column;gap:var(--wx-space-8)}.wx-audit-findings__title[data-v-7f790d95]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-6)}.wx-audit-findings__texts[data-v-7f790d95]{display:grid;gap:var(--wx-space-4);margin:0;font-size:var(--wx-font-size-sm)}.wx-audit-findings__texts dt[data-v-7f790d95]{color:var(--wx-text-muted)}.wx-audit-findings__texts dd[data-v-7f790d95]{margin:0 0 var(--wx-space-8)}.wx-audit-overview[data-v-2a1e0d61]{display:flex;flex-direction:column;gap:var(--wx-space-16);container-type:inline-size}.wx-audit-overview__row[data-v-2a1e0d61]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-8) var(--wx-space-12);margin-bottom:var(--wx-space-8)}.wx-audit-overview__end[data-v-2a1e0d61]{margin-left:auto}.wx-audit-overview__summary[data-v-2a1e0d61]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-24)}.wx-audit-overview__stats[data-v-2a1e0d61]{display:flex;flex:1 1 auto;flex-wrap:wrap;gap:var(--wx-space-16) var(--wx-space-32)}.wx-audit-overview__meta[data-v-2a1e0d61]{display:flex;flex-wrap:wrap;gap:var(--wx-space-4);margin-top:var(--wx-space-16)}.wx-audit-overview__url[data-v-2a1e0d61]{min-width:0;overflow-wrap:anywhere}.wx-audit-overview__groups[data-v-2a1e0d61]{display:flex;flex-direction:column;gap:var(--wx-space-8);margin:0;padding:0;list-style:none}.wx-audit-overview__groups li[data-v-2a1e0d61]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--wx-space-8)}.wx-audit-overview__badges[data-v-2a1e0d61],.wx-audit-overview__missing[data-v-2a1e0d61]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-6)}.wx-audit-overview__missing[data-v-2a1e0d61]{margin-top:var(--wx-space-12)}.wx-audit-card[data-v-46e97525]{display:flex;flex-direction:column;gap:var(--wx-space-12);min-width:0}.wx-audit-card__title[data-v-46e97525]{display:inline-flex;align-items:center;gap:var(--wx-space-8);min-width:0}.wx-audit-card__url[data-v-46e97525]{min-width:0;overflow-wrap:anywhere}.wx-audit-card__facts[data-v-46e97525]{display:grid;grid-template-columns:minmax(120px,max-content) minmax(0,1fr);gap:var(--wx-space-6) var(--wx-space-16);margin:var(--wx-space-12) 0 0;font-size:var(--wx-font-size-sm)}.wx-audit-card__facts dt[data-v-46e97525]{color:var(--wx-text-muted)}.wx-audit-card__facts dd[data-v-46e97525]{margin:0;overflow-wrap:anywhere;white-space:pre-line}.wx-audit-card__pairs[data-v-46e97525]{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:var(--wx-space-6) var(--wx-space-8);align-items:baseline}.wx-audit-card__key[data-v-46e97525]{justify-self:end;font-family:var(--wx-font-family-mono)}.wx-audit-card__tags[data-v-46e97525]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-6)}.wx-audit-card__section[data-v-46e97525]{margin-top:var(--wx-space-12);font-weight:var(--wx-font-weight-semibold)}.wx-audit-card__code[data-v-46e97525]{font-family:var(--wx-font-family-mono)}.wx-audit-card__issues[data-v-46e97525]{display:flex;flex-direction:column;gap:var(--wx-space-16);margin-top:var(--wx-space-12)}.wx-audit-card__issue[data-v-46e97525]{display:flex;flex-direction:column;gap:var(--wx-space-6);min-width:0}.wx-audit-card__picture[data-v-46e97525]{display:flex;align-items:center;gap:var(--wx-space-12);min-width:0}.wx-audit-card__thumb[data-v-46e97525]{flex:none}.wx-audit-card__source[data-v-46e97525]{max-height:480px;margin:0;padding:var(--wx-space-8);overflow:auto;border-radius:var(--wx-radius-sm);background:var(--wx-bg-muted);font-family:var(--wx-font-family-mono);font-size:var(--wx-font-size-xs);white-space:pre-wrap;overflow-wrap:anywhere}.wx-audit-card__issue-head[data-v-46e97525]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-8)}.wx-audit-card__extra[data-v-46e97525]{display:inline-flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-8)}.wx-audit-card__recheck[data-v-46e97525]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--wx-space-4) var(--wx-space-12)}.wx-audit-pages__none[data-v-7850735f]{display:block;padding:var(--wx-space-24)}.wx-audit-pages__filters[data-v-7850735f]{display:flex;flex-direction:column;gap:var(--wx-space-8)}.wx-audit-pages__filter[data-v-7850735f]{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) auto;gap:var(--wx-space-4);align-items:center}.wx-audit-pages__picker[data-v-7850735f]{max-height:360px;overflow-y:auto}.wx-audit-pages__long[data-v-7850735f]{overflow-wrap:anywhere}.wx-audit-compare[data-v-02d42bdb]{display:flex;flex-direction:column;gap:var(--wx-space-12);min-width:0}.wx-audit-compare__item[data-v-02d42bdb]{display:flex;flex-direction:column;gap:var(--wx-space-6);min-width:0}.wx-audit-compare__url[data-v-02d42bdb]{min-width:0;overflow-wrap:anywhere}.wx-audit-runs[data-v-abbed1f9]{display:flex;flex-direction:column;gap:var(--wx-space-16);min-width:0}.wx-audit-runs__counts[data-v-abbed1f9]{display:inline-flex;flex-wrap:wrap;gap:var(--wx-space-4)}.wx-audit-runs__pair[data-v-abbed1f9]{display:block;margin-bottom:var(--wx-space-12)}.wx-audit-runs__note[data-v-abbed1f9]{margin-bottom:var(--wx-space-12)}.wx-audit-settings[data-v-4b3f5a3f]{display:flex;flex-direction:column;gap:var(--wx-gap, var(--wx-space-16))}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
export type AuditSeverity = 'error' | 'warning' | 'notice';
|
|
2
|
+
/** `urls` is a recheck of a few addresses, started from the page's card. */
|
|
3
|
+
export type AuditScope = 'full' | 'quick' | 'urls';
|
|
4
|
+
export type AuditRunStatus = 'queued' | 'running' | 'done' | 'failed' | 'cancelled';
|
|
5
|
+
export type AuditStage = 'probes' | 'database' | 'crawl' | 'analyse';
|
|
6
|
+
/** What a run counted, once it is done. */
|
|
7
|
+
export interface AuditCounts {
|
|
8
|
+
severity: Record<AuditSeverity, number>;
|
|
9
|
+
groups: Record<string, Record<AuditSeverity, number>>;
|
|
10
|
+
/** Ids of the checks that ran. */
|
|
11
|
+
checks: string[];
|
|
12
|
+
/** The worst severity of every check that found something. */
|
|
13
|
+
failed: Record<string, AuditSeverity>;
|
|
14
|
+
/** 0–100, each check weighed once by its severity. */
|
|
15
|
+
health: number;
|
|
16
|
+
new: number;
|
|
17
|
+
fixed: number;
|
|
18
|
+
previous_id: number | null;
|
|
19
|
+
sources: {
|
|
20
|
+
searched: string[];
|
|
21
|
+
missing: string[];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface AuditRun {
|
|
25
|
+
id: number;
|
|
26
|
+
status: AuditRunStatus;
|
|
27
|
+
scope: AuditScope;
|
|
28
|
+
base_url: string;
|
|
29
|
+
resolve_to: string | null;
|
|
30
|
+
/** The addresses of a recheck; empty for the other scopes. */
|
|
31
|
+
urls: string[];
|
|
32
|
+
progress: {
|
|
33
|
+
stage: AuditStage | null;
|
|
34
|
+
done: AuditStage[];
|
|
35
|
+
checks: number;
|
|
36
|
+
pages: {
|
|
37
|
+
crawled: number;
|
|
38
|
+
limit: number;
|
|
39
|
+
};
|
|
40
|
+
/** The phase of the crawl: `seed`, `fetch`, `resources`, `checks`. */
|
|
41
|
+
phase?: string | null;
|
|
42
|
+
/** While what the pages load is being asked. */
|
|
43
|
+
resources?: {
|
|
44
|
+
checked: number;
|
|
45
|
+
total: number;
|
|
46
|
+
} | null;
|
|
47
|
+
};
|
|
48
|
+
counts: AuditCounts | null;
|
|
49
|
+
started_by: string | null;
|
|
50
|
+
created_at: string | null;
|
|
51
|
+
started_at: string | null;
|
|
52
|
+
finished_at: string | null;
|
|
53
|
+
error: string | null;
|
|
54
|
+
}
|
|
55
|
+
/** The overview's one call: the run that is going, the last that finished, and the queue. */
|
|
56
|
+
export interface AuditLatest {
|
|
57
|
+
active: AuditRun | null;
|
|
58
|
+
done: AuditRun | null;
|
|
59
|
+
/** The last full run — the one with pages to list. */
|
|
60
|
+
crawled: AuditRun | null;
|
|
61
|
+
/** A run that failed or was cancelled after the last good one. */
|
|
62
|
+
last: AuditRun | null;
|
|
63
|
+
queue: {
|
|
64
|
+
sync: boolean;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** One check that found something, with its three texts in the reader's language. */
|
|
68
|
+
export interface AuditCheckRow {
|
|
69
|
+
id: string;
|
|
70
|
+
group: string;
|
|
71
|
+
severity: AuditSeverity;
|
|
72
|
+
count: number;
|
|
73
|
+
new: number;
|
|
74
|
+
title: string;
|
|
75
|
+
found: string;
|
|
76
|
+
why: string;
|
|
77
|
+
fix: string;
|
|
78
|
+
/** The fixes that can close this check — the screen offers a button when there are any. */
|
|
79
|
+
fixes: string[];
|
|
80
|
+
}
|
|
81
|
+
export type AuditCellType = 'url' | 'status' | 'bool' | 'text' | 'missing' | 'edit';
|
|
82
|
+
export interface AuditDetailsColumn {
|
|
83
|
+
key: string;
|
|
84
|
+
label: string;
|
|
85
|
+
type: AuditCellType;
|
|
86
|
+
}
|
|
87
|
+
/** The expansion of a finding: data, drawn by one component for every check. */
|
|
88
|
+
export interface AuditDetails {
|
|
89
|
+
summary: string | null;
|
|
90
|
+
table: {
|
|
91
|
+
columns: AuditDetailsColumn[];
|
|
92
|
+
rows: Record<string, unknown>[];
|
|
93
|
+
} | null;
|
|
94
|
+
}
|
|
95
|
+
export interface AuditIssue {
|
|
96
|
+
id: number;
|
|
97
|
+
check: string;
|
|
98
|
+
severity: AuditSeverity;
|
|
99
|
+
url: string | null;
|
|
100
|
+
state: 'new' | 'persisting';
|
|
101
|
+
ignored: boolean;
|
|
102
|
+
/** The rule that hides it, on the list of hidden findings. */
|
|
103
|
+
ignore?: AuditIgnoreRule | null;
|
|
104
|
+
/** The fix pressed on it; the finding stays until the next run says it is gone. */
|
|
105
|
+
fixed_with: string | null;
|
|
106
|
+
fixed_at: string | null;
|
|
107
|
+
details: AuditDetails;
|
|
108
|
+
}
|
|
109
|
+
/** One thing a fix changes: a field with its count of replacements, or a setting before and after. */
|
|
110
|
+
export interface AuditFixChange {
|
|
111
|
+
label: string;
|
|
112
|
+
field?: string | null;
|
|
113
|
+
count?: number;
|
|
114
|
+
before?: string | null;
|
|
115
|
+
after?: string | null;
|
|
116
|
+
edit_url?: string | null;
|
|
117
|
+
}
|
|
118
|
+
/** A fix that can close a finding, with what it would change. */
|
|
119
|
+
export interface AuditFixOffer {
|
|
120
|
+
id: string;
|
|
121
|
+
title: string;
|
|
122
|
+
description: string;
|
|
123
|
+
changes: AuditFixChange[];
|
|
124
|
+
total: number;
|
|
125
|
+
note: string | null;
|
|
126
|
+
}
|
|
127
|
+
export interface AuditFixResult {
|
|
128
|
+
id: string;
|
|
129
|
+
applied: boolean;
|
|
130
|
+
changes: AuditFixChange[];
|
|
131
|
+
total: number;
|
|
132
|
+
note: string | null;
|
|
133
|
+
}
|
|
134
|
+
export interface AuditIssueQuery {
|
|
135
|
+
check?: string;
|
|
136
|
+
severity?: AuditSeverity | null;
|
|
137
|
+
group?: string | null;
|
|
138
|
+
/** `hidden` lists what the rules hide instead of what counts. */
|
|
139
|
+
state?: 'new' | 'persisting' | 'hidden' | null;
|
|
140
|
+
page?: number;
|
|
141
|
+
per_page?: number;
|
|
142
|
+
}
|
|
143
|
+
export interface AuditPage<T> {
|
|
144
|
+
data: T[];
|
|
145
|
+
current_page: number;
|
|
146
|
+
last_page: number;
|
|
147
|
+
per_page: number;
|
|
148
|
+
total: number;
|
|
149
|
+
from: number | null;
|
|
150
|
+
to: number | null;
|
|
151
|
+
}
|
|
152
|
+
export type AuditPageSource = 'home' | 'sitemap' | 'registry' | 'link' | 'list';
|
|
153
|
+
export type AuditHostClass = 'own' | 'own_mirror' | 'dev' | 'external';
|
|
154
|
+
/** One crawled address as the pages screen lists it — every field of the snapshot it can show. */
|
|
155
|
+
export interface AuditPageRow {
|
|
156
|
+
id: number;
|
|
157
|
+
url: string;
|
|
158
|
+
status: number | null;
|
|
159
|
+
final_status: number | null;
|
|
160
|
+
redirect_to: string | null;
|
|
161
|
+
source: AuditPageSource;
|
|
162
|
+
depth: number | null;
|
|
163
|
+
indexable: boolean;
|
|
164
|
+
issues: number;
|
|
165
|
+
title: string | null;
|
|
166
|
+
description: string | null;
|
|
167
|
+
h1: string | null;
|
|
168
|
+
canonical: string | null;
|
|
169
|
+
robots_meta: string | null;
|
|
170
|
+
x_robots_tag: string | null;
|
|
171
|
+
lang: string | null;
|
|
172
|
+
content_type: string | null;
|
|
173
|
+
bytes: number | null;
|
|
174
|
+
ttfb_ms: number | null;
|
|
175
|
+
total_ms: number | null;
|
|
176
|
+
compression: string | null;
|
|
177
|
+
word_count: number | null;
|
|
178
|
+
links_in: number;
|
|
179
|
+
links_out_internal: number;
|
|
180
|
+
links_out_external: number;
|
|
181
|
+
images: number;
|
|
182
|
+
images_without_alt: number;
|
|
183
|
+
in_sitemap: boolean;
|
|
184
|
+
in_registry: boolean;
|
|
185
|
+
blocked_by_robots: boolean;
|
|
186
|
+
}
|
|
187
|
+
export type AuditPageField = Exclude<keyof AuditPageRow, 'id'>;
|
|
188
|
+
/** How a field is drawn, filtered and compared. */
|
|
189
|
+
export type AuditFieldType = 'url' | 'text' | 'number' | 'bool' | 'status' | 'source';
|
|
190
|
+
export type AuditFilterOp = 'contains' | 'eq' | 'empty' | 'filled' | 'gt' | 'lt' | 'yes' | 'no';
|
|
191
|
+
export interface AuditFieldFilter {
|
|
192
|
+
field: AuditPageField;
|
|
193
|
+
op: AuditFilterOp;
|
|
194
|
+
value?: string;
|
|
195
|
+
}
|
|
196
|
+
export interface AuditPageQuery {
|
|
197
|
+
search?: string;
|
|
198
|
+
/** `2xx`, `3xx`, `4xx`, `5xx` or `none` — nothing answered. */
|
|
199
|
+
status?: string | null;
|
|
200
|
+
indexable?: boolean | null;
|
|
201
|
+
/** Pages with a finding of this check. */
|
|
202
|
+
check?: string | null;
|
|
203
|
+
filters?: AuditFieldFilter[];
|
|
204
|
+
/** A field, `-field` for descending. */
|
|
205
|
+
sort?: string | null;
|
|
206
|
+
page?: number;
|
|
207
|
+
per_page?: number;
|
|
208
|
+
}
|
|
209
|
+
/** The page's card: the whole snapshot, its findings and how many links lead in and out. */
|
|
210
|
+
export interface AuditPageCard {
|
|
211
|
+
page: AuditPageRow & {
|
|
212
|
+
headers: Record<string, string>;
|
|
213
|
+
h1: string[];
|
|
214
|
+
headings: Record<string, number>;
|
|
215
|
+
hreflang: {
|
|
216
|
+
lang: string;
|
|
217
|
+
url: string;
|
|
218
|
+
}[];
|
|
219
|
+
og: Record<string, string>;
|
|
220
|
+
twitter: Record<string, string>;
|
|
221
|
+
json_ld: AuditJsonLdBlock[];
|
|
222
|
+
error: string | null;
|
|
223
|
+
facts: Record<string, unknown>;
|
|
224
|
+
fetched_at: string | null;
|
|
225
|
+
};
|
|
226
|
+
issues: AuditIssue[];
|
|
227
|
+
counts: {
|
|
228
|
+
issues: number;
|
|
229
|
+
incoming: number;
|
|
230
|
+
outgoing: number;
|
|
231
|
+
images?: number;
|
|
232
|
+
css?: number;
|
|
233
|
+
js?: number;
|
|
234
|
+
microdata?: number;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
/** One JSON-LD block of a page: what it is, and what the types search engines show lack. */
|
|
238
|
+
export interface AuditJsonLdBlock {
|
|
239
|
+
types: string[];
|
|
240
|
+
error: string | null;
|
|
241
|
+
items?: {
|
|
242
|
+
type: string;
|
|
243
|
+
missing: string[];
|
|
244
|
+
recommended: string[];
|
|
245
|
+
}[];
|
|
246
|
+
/** The block as the page printed it, cut. */
|
|
247
|
+
source?: string;
|
|
248
|
+
}
|
|
249
|
+
/** The tabs of the card that list what the page loads. */
|
|
250
|
+
export type AuditResourceTab = 'images' | 'css' | 'js';
|
|
251
|
+
/** Something a page loads, with what it answered when the run asked. */
|
|
252
|
+
export interface AuditResourceRow {
|
|
253
|
+
id: number;
|
|
254
|
+
url: string;
|
|
255
|
+
kind: string;
|
|
256
|
+
alt: string | null;
|
|
257
|
+
host_class: AuditHostClass | null;
|
|
258
|
+
/** False past the run's limit, and for a stand's address — it is not asked. */
|
|
259
|
+
checked: boolean;
|
|
260
|
+
status: number | null;
|
|
261
|
+
error: string | null;
|
|
262
|
+
location: string | null;
|
|
263
|
+
content_type: string | null;
|
|
264
|
+
bytes: number | null;
|
|
265
|
+
cache_control: string | null;
|
|
266
|
+
compression: string | null;
|
|
267
|
+
width: number | null;
|
|
268
|
+
height: number | null;
|
|
269
|
+
}
|
|
270
|
+
/** A link of a page: where it leads (out) or where it comes from (in). */
|
|
271
|
+
export interface AuditLinkRow {
|
|
272
|
+
id: number;
|
|
273
|
+
url: string | null;
|
|
274
|
+
page_id: number | null;
|
|
275
|
+
status: number | null;
|
|
276
|
+
kind: string;
|
|
277
|
+
anchor: string | null;
|
|
278
|
+
rel: string | null;
|
|
279
|
+
target: string | null;
|
|
280
|
+
host: string | null;
|
|
281
|
+
host_class: AuditHostClass | null;
|
|
282
|
+
absolute: boolean;
|
|
283
|
+
}
|
|
284
|
+
/** A rule that hides findings on purpose (decision 9): a check, an address or a mask, and why. */
|
|
285
|
+
export interface AuditIgnoreRule {
|
|
286
|
+
id: number;
|
|
287
|
+
check: string;
|
|
288
|
+
/** An address, a mask (`/search/**`), or empty for every finding of the check. */
|
|
289
|
+
pattern: string;
|
|
290
|
+
reason: string;
|
|
291
|
+
created_by: string | null;
|
|
292
|
+
created_at: string | null;
|
|
293
|
+
/** The check's title in the reader's language — in the list of rules. */
|
|
294
|
+
title?: string;
|
|
295
|
+
/** How many stored findings it hides — in the list of rules. */
|
|
296
|
+
hidden?: number;
|
|
297
|
+
}
|
|
298
|
+
export type AuditComparisonKind = 'new' | 'persisting' | 'fixed';
|
|
299
|
+
/** One check of two runs compared by fingerprint. */
|
|
300
|
+
export interface AuditComparisonRow {
|
|
301
|
+
check: string;
|
|
302
|
+
title: string;
|
|
303
|
+
severity: AuditSeverity;
|
|
304
|
+
new: number;
|
|
305
|
+
persisting: number;
|
|
306
|
+
fixed: number;
|
|
307
|
+
}
|
|
308
|
+
export interface AuditComparison {
|
|
309
|
+
from: AuditRun;
|
|
310
|
+
to: AuditRun;
|
|
311
|
+
checks: AuditComparisonRow[];
|
|
312
|
+
}
|
|
313
|
+
/** One host the site points at, on the «Outgoing» screen. */
|
|
314
|
+
export interface AuditHostRow {
|
|
315
|
+
host: string;
|
|
316
|
+
class: AuditHostClass;
|
|
317
|
+
links: number;
|
|
318
|
+
pages: number;
|
|
319
|
+
/** Links that answered 4xx, 5xx or nothing. */
|
|
320
|
+
broken: number;
|
|
321
|
+
nofollow: number;
|
|
322
|
+
/** Fields in the database that hold an address on it. */
|
|
323
|
+
fields: number;
|
|
324
|
+
/** The earliest run among the snapshots kept that saw it. */
|
|
325
|
+
first_seen: string | null;
|
|
326
|
+
}
|
|
327
|
+
/** A link to a host from a crawled page. */
|
|
328
|
+
export interface AuditHostPage {
|
|
329
|
+
page_id: number;
|
|
330
|
+
page: string;
|
|
331
|
+
url: string;
|
|
332
|
+
kind: string;
|
|
333
|
+
anchor: string | null;
|
|
334
|
+
rel: string | null;
|
|
335
|
+
status: number | null;
|
|
336
|
+
}
|
|
337
|
+
/** A field of the database that holds an address on a host. */
|
|
338
|
+
export interface AuditHostField {
|
|
339
|
+
source: string;
|
|
340
|
+
record_id: string;
|
|
341
|
+
record_label: string;
|
|
342
|
+
field: string;
|
|
343
|
+
locale: string | null;
|
|
344
|
+
url: string;
|
|
345
|
+
published: boolean | number;
|
|
346
|
+
edit_url: string | null;
|
|
347
|
+
}
|
|
348
|
+
export interface AuditHosts {
|
|
349
|
+
crawled_run: number | null;
|
|
350
|
+
database_run: number | null;
|
|
351
|
+
classes: Partial<Record<AuditHostClass, number>>;
|
|
352
|
+
hosts: AuditHostRow[];
|
|
353
|
+
/** With `host`: where it stands. */
|
|
354
|
+
pages?: AuditHostPage[];
|
|
355
|
+
fields?: AuditHostField[];
|
|
356
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webx-ui/module-audit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A site audit for the WebX UI admin panel: the production config, the host, and links to a development stand in the content.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"*.css"
|
|
9
|
+
],
|
|
10
|
+
"keywords": [
|
|
11
|
+
"webx-ui",
|
|
12
|
+
"vue",
|
|
13
|
+
"admin",
|
|
14
|
+
"seo",
|
|
15
|
+
"audit"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/webx-ui/webx-ui.git",
|
|
20
|
+
"directory": "packages/module-audit"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/webx-ui/webx-ui/tree/main/packages/module-audit",
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"main": "./dist/index.js",
|
|
30
|
+
"module": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./style.css": "./dist/style.css",
|
|
38
|
+
"./dist/style.css": "./dist/style.css",
|
|
39
|
+
"./package.json": "./package.json"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"vue": "^3.5.0",
|
|
43
|
+
"vue-router": "^4.5.0"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@webx-ui/core": "^0.36.0",
|
|
47
|
+
"@webx-ui/module-admin": "^0.23.1",
|
|
48
|
+
"@webx-ui/schema": "^0.7.2"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^24.10.1",
|
|
52
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
53
|
+
"typescript": "^5.9.3",
|
|
54
|
+
"vite": "^7.1.14",
|
|
55
|
+
"vite-plugin-dts": "^4.5.4",
|
|
56
|
+
"vue": "^3.5.24",
|
|
57
|
+
"vue-router": "^4.5.1",
|
|
58
|
+
"vue-tsc": "^3.1.3"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "vite build",
|
|
62
|
+
"dev": "vite build --watch",
|
|
63
|
+
"typecheck": "vue-tsc -p tsconfig.json --noEmit"
|
|
64
|
+
}
|
|
65
|
+
}
|