@webx-ui/module-audit 0.2.0 → 0.3.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/dist/AuditAddress.d.ts +13 -0
- package/dist/AuditDetails.d.ts +6 -0
- package/dist/AuditHeadings.d.ts +15 -0
- package/dist/AuditHostPlaces.d.ts +6 -3
- package/dist/AuditIssueList.d.ts +3 -0
- package/dist/AuditLinkAttrs.d.ts +12 -0
- package/dist/AuditLinkGroups.d.ts +11 -0
- package/dist/AuditSettingsPage.d.ts +2 -1
- package/dist/AuditStatus.d.ts +14 -0
- package/dist/addresses.d.ts +18 -0
- package/dist/headings.d.ts +20 -0
- package/dist/index.js +2411 -1665
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +22 -1
- package/package.json +4 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LinkType } from '@webx-ui/core';
|
|
2
|
+
/**
|
|
3
|
+
* An address on one line, opened in a new tab: a long one loses its middle rather than wrapping,
|
|
4
|
+
* since the start names the site and the end tells two addresses apart. The whole of it is in the
|
|
5
|
+
* panel's tooltip.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
href: string;
|
|
9
|
+
type?: LinkType;
|
|
10
|
+
strong?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
package/dist/AuditDetails.d.ts
CHANGED
|
@@ -4,9 +4,15 @@ import { AuditDetails } from './types';
|
|
|
4
4
|
* the check gave one, a table whose cells are drawn by their type — an address opens, a code is
|
|
5
5
|
* coloured, a missing value is said in red, an editor link goes to the record in the panel, and
|
|
6
6
|
* markup quoted from the page is shown as code.
|
|
7
|
+
*
|
|
8
|
+
* The columns have widths by their type, not by what they hold, so the tables of one check line
|
|
9
|
+
* up under each other. A `location` address beside a `url` is where that address leads: the row
|
|
10
|
+
* reads as from → to, and a difference of a slash, `www.` or `https` is named.
|
|
7
11
|
*/
|
|
8
12
|
type __VLS_Props = {
|
|
9
13
|
details: AuditDetails;
|
|
14
|
+
/** The count is shown elsewhere (the head of the finding) — the summary line would repeat it. */
|
|
15
|
+
counted?: boolean;
|
|
10
16
|
};
|
|
11
17
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
18
|
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OutlineEntry } from './headings';
|
|
2
|
+
/**
|
|
3
|
+
* The page's headings as a tree: each one indented by its level, in the order the page has them.
|
|
4
|
+
* The indent is the level itself, not the nesting the page managed — so a level the page jumped
|
|
5
|
+
* over is drawn where it should have been, as an empty dashed row, and the gap is seen rather
|
|
6
|
+
* than read about. Above the tree, what departs from the usual order, in plain words.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** `[level, text]` in document order; null on a run crawled before the outline was kept. */
|
|
10
|
+
outline: OutlineEntry[] | null;
|
|
11
|
+
/** How many headings of each level — to tell «none» from «not kept». */
|
|
12
|
+
counts: Record<string, number>;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
|
+
export default _default;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where one host stands, under its row on «Outgoing»: the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Where one host stands, under its row on «Outgoing»: the addresses on it the pages point at, each
|
|
3
|
+
* a card with the pages under it — a font or a profile link sits in the layout and is on every
|
|
4
|
+
* page, so by page it would be the same line forty times — and the fields of the database that
|
|
5
|
+
* hold it, with «Open in the editor». A link's `target` and `rel` sit beside its address, or
|
|
6
|
+
* beside each page when the pages write it differently. Fifty of each, broken links first; a card counts all its
|
|
7
|
+
* pages and lists fifty.
|
|
5
8
|
*/
|
|
6
9
|
type __VLS_Props = {
|
|
7
10
|
host: string;
|
package/dist/AuditIssueList.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ import { AuditIssueQuery } from './types';
|
|
|
4
4
|
* fifty at a time. A check that has fixes gets a button on each address; the dialog shows what
|
|
5
5
|
* it would change before anything does. «Hide» asks for the reason; on the list of hidden ones
|
|
6
6
|
* each says why, and «Show again» removes the rule.
|
|
7
|
+
*
|
|
8
|
+
* Each finding is a card: the address with its count, the table under it. A check of links that
|
|
9
|
+
* redirect can also be read by link — every page loaded, one card per link with its pages.
|
|
7
10
|
*/
|
|
8
11
|
type __VLS_Props = {
|
|
9
12
|
run: number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A link's `target` and `rel`, as they are in the markup: `_blank`, `nofollow`, `noopener`… Nothing
|
|
3
|
+
* when the link has neither — a plain link is the usual case, not an empty cell. `_blank` without
|
|
4
|
+
* `noopener` or `noreferrer` is marked: current browsers add `noopener` themselves, older ones
|
|
5
|
+
* hand the opened page control of this one.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
rel?: string | null;
|
|
9
|
+
target?: string | null;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AuditIssue } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The findings of a redirect check turned inside out: one card per link, the pages it is on
|
|
4
|
+
* under it. A link in the footer or the menu is on every page and is fixed once, in one place —
|
|
5
|
+
* by page, it would be the same row forty times.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
issues: AuditIssue[];
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* The section's settings (§8): where the site is and which hosts are its stands, the limits of
|
|
3
3
|
* the crawl and the paths it leaves out, the thresholds, the nightly run and how much history
|
|
4
4
|
* to keep. The form is the screen the server describes (`audit.settings`), so a project patches
|
|
5
|
-
* a field in the way it does everywhere else; saving is this page's own.
|
|
5
|
+
* a field in the way it does everywhere else; saving is this page's own. «Back» beside «Save» returns
|
|
6
|
+
* to the overview — the tabs above cannot, their «Overview» is already the lit one.
|
|
6
7
|
*/
|
|
7
8
|
type __VLS_Props = {
|
|
8
9
|
base: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BadgeSize } from '@webx-ui/core';
|
|
2
|
+
/**
|
|
3
|
+
* An answer's code as a badge of its colour, and what it means in the tooltip: the name and what
|
|
4
|
+
* to do about it. A code with no line of its own is explained by its class (4xx…); none at all, or
|
|
5
|
+
* 0, is «no answer».
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
code: number | null | undefined;
|
|
9
|
+
size?: BadgeSize;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
size: BadgeSize;
|
|
13
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BadgeType } from '@webx-ui/core';
|
|
2
|
+
/** What tells a redirect's target from its source when the rest of the address is the same. */
|
|
3
|
+
export type AddressDifference = 'slash' | 'www' | 'https';
|
|
4
|
+
/**
|
|
5
|
+
* The small differences between where a link points and where it lands: a trailing slash, `www.`,
|
|
6
|
+
* `http` → `https`. Empty when the addresses differ in anything else (the page really moved) or
|
|
7
|
+
* either is not an address — then there is nothing small to name.
|
|
8
|
+
*/
|
|
9
|
+
export declare function differences(from: string, to: string): AddressDifference[];
|
|
10
|
+
/**
|
|
11
|
+
* An address cut in two for an ellipsis in the middle: the head gives way, the tail stays —
|
|
12
|
+
* the end of an address is what tells two of them apart.
|
|
13
|
+
*/
|
|
14
|
+
export declare function splitMiddle(text: string): [string, string];
|
|
15
|
+
/** The colour of an answer's code. */
|
|
16
|
+
export declare function statusType(value: unknown): BadgeType;
|
|
17
|
+
/** The dictionary key of what an answer means: `code-404`, `code-5xx`, or `code-none`. */
|
|
18
|
+
export declare function statusKey(code: number | null | undefined): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** One heading as the parser kept it: its level and its text. */
|
|
2
|
+
export type OutlineEntry = [number, string];
|
|
3
|
+
/** A row of the drawn tree — a heading, or a level the page jumped over (`missing`). */
|
|
4
|
+
export interface OutlineRow {
|
|
5
|
+
level: number;
|
|
6
|
+
text: string;
|
|
7
|
+
missing: boolean;
|
|
8
|
+
/** For a missing level: the level the page jumped from. */
|
|
9
|
+
after?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The tree to draw: every heading, and between two of them the levels skipped on the way down,
|
|
13
|
+
* so a gap stands where the heading should have been.
|
|
14
|
+
*/
|
|
15
|
+
export declare function outlineRows(outline: OutlineEntry[]): OutlineRow[];
|
|
16
|
+
/**
|
|
17
|
+
* What breaks the usual order — one H1, first; each level one step below the one above; text in
|
|
18
|
+
* every heading — as sentences in the reader's language. Empty when the order is fine.
|
|
19
|
+
*/
|
|
20
|
+
export declare function outlineHints(outline: OutlineEntry[], t: (key: string, params?: Record<string, string | number>) => string): string[];
|