generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 208
Expand file tree
/
Copy pathconstants.js
More file actions
137 lines (120 loc) · 3.22 KB
/
constants.js
File metadata and controls
137 lines (120 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
export const STATUS = {
PASS: 'pass',
FAIL: 'fail',
LIMBO: 'limbo',
EMPTY: 'empty',
};
export const STATUS_TO_ICON_MAP = {
[STATUS.PASS]: 'green',
[STATUS.FAIL]: 'red',
[STATUS.LIMBO]: 'orange',
[STATUS.EMPTY]: 'empty',
};
export const SEVERITY = {
CRITICAL: 'critical',
WARNING: 'warning',
};
export const PERFORMANCE_IDS = {
lcpElement: 'lcp-element',
singleBlock: 'single-block',
personalization: 'personalization',
imageSize: 'image-size',
videoPoster: 'video-poster',
fragments: 'fragments',
placeholders: 'placeholders',
icons: 'icons',
};
export const PERFORMANCE_SEVERITIES = {
lcpElement: 'critical',
singleBlock: 'critical',
personalization: 'warning',
imageSize: 'warning',
videoPoster: 'warning',
fragments: 'warning',
placeholders: 'warning',
icons: 'warning',
};
export const SEO_TITLES = {
h1Count: 'H1 count',
title: 'Title size',
canonical: 'Canonical',
description: 'Meta description',
bodySize: 'Body size',
loremIpsum: 'Lorem Ipsum',
links: 'Links',
};
export const SEO_IDS = {
title: 'title',
description: 'description',
h1Count: 'h1-count',
canonical: 'canonical',
bodySize: 'body-size',
loremIpsum: 'lorem-ipsum',
links: 'links',
};
// Alternative IDs for native preflight checkId compatibility
export const SEO_CHECK_IDS = {
title: 'title-size',
description: 'meta-description',
h1Count: 'h1-count',
canonical: 'canonical',
bodySize: 'body-size',
loremIpsum: 'lorem-ipsum',
links: 'broken-links',
};
export const SEO_SEVERITIES = {
title: 'critical',
description: 'critical',
h1Count: 'critical',
canonical: 'warning',
bodySize: 'critical',
loremIpsum: 'critical',
links: 'critical',
};
export const SEO_DESCRIPTIONS = {
title: 'Title size is appropriate.',
description: 'Meta description is present and within the recommended character limit.',
h1Count: 'Found exactly one H1 heading.',
canonical: 'Canonical reference is valid.',
bodySize: 'Body content has a good length.',
loremIpsum: 'No Lorem ipsum is used on the page.',
links: 'Links are valid.',
};
export const STRUCTURE_TITLES = {
navigation: 'Navigation',
footer: 'Footer',
regionSelector: 'Region selector',
georouting: 'Georouting',
breadcrumbs: 'Breadcrumbs',
};
export const STRUCTURE_IDS = {
navigation: 'navigation',
footer: 'footer',
regionSelector: 'region-selector',
georouting: 'georouting',
breadcrumbs: 'breadcrumbs',
};
export const STRUCTURE_SEVERITIES = {
navigation: 'critical',
footer: 'critical',
regionSelector: 'critical',
georouting: 'warning',
breadcrumbs: 'critical',
};
export const PERFORMANCE_TITLES = {
Performance: 'Performance',
LcpEl: 'LCP',
SingleBlock: 'Single Block',
ImageSize: 'Images Size',
VideoPoster: 'Videos',
Fragments: 'Fragments',
Personalization: 'Personalization',
Placeholders: 'Placeholders',
Icons: 'Icons',
};
export const ASSETS_TITLES = { AssetDimensions: 'Asset Dimensions' };
export const ASSETS_IDS = { imageDimensions: 'image-dimensions' };
export const ASSETS_SEVERITIES = { imageDimensions: 'critical' };
export const ASO_TIMEOUT_MS = 60_000;
export const ASO_POLL_INTERVAL_MS = 2_000;
export const ASO_MAX_RETRIES = Math.ceil(ASO_TIMEOUT_MS / ASO_POLL_INTERVAL_MS);