@qualweb/cli 0.6.6 → 0.6.8
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 +302 -302
- package/bin/cli.js +16 -16
- package/dist/index.d.ts +2 -2
- package/dist/index.js +72 -72
- package/dist/lib/act-rules.options.json +149 -149
- package/dist/lib/actParser.d.ts +5 -5
- package/dist/lib/actParser.js +68 -68
- package/dist/lib/bpParser.d.ts +5 -5
- package/dist/lib/bpParser.js +52 -52
- package/dist/lib/fileUtils.d.ts +19 -23
- package/dist/lib/fileUtils.d.ts.map +1 -1
- package/dist/lib/fileUtils.js +47 -47
- package/dist/lib/options.d.ts +155 -155
- package/dist/lib/options.js +298 -298
- package/dist/lib/parser.d.ts +4 -4
- package/dist/lib/parser.js +132 -132
- package/dist/lib/parserUtils.d.ts +8 -8
- package/dist/lib/parserUtils.js +68 -68
- package/dist/lib/wcagParser.d.ts +5 -5
- package/dist/lib/wcagParser.js +68 -68
- package/package.json +70 -70
- package/LICENSE +0 -15
package/dist/lib/options.js
CHANGED
|
@@ -1,299 +1,299 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.modules = exports.principles = exports.levels = exports.reports = exports.bps = exports.wcagTechniques = exports.actRules = exports.strings = exports.sections = exports.optionList = void 0;
|
|
7
|
-
const act_rules_options_json_1 = __importDefault(require("./act-rules.options.json"));
|
|
8
|
-
const header = ` _____ _____ _____ __ _ _ _ _____ _____ _____ __ _____
|
|
9
|
-
| | | | _ | | | | | | __| __ | | | | | |
|
|
10
|
-
| | | | | | |__| | | | __| __ -| | --| |__|- -|
|
|
11
|
-
|__ _|_____|__|__|_____|_____|_____|_____| |_____|_____|_____|
|
|
12
|
-
|__| `;
|
|
13
|
-
const strings = {};
|
|
14
|
-
exports.strings = strings;
|
|
15
|
-
const modules = ['act', 'html', 'css', 'bp', 'counter'];
|
|
16
|
-
exports.modules = modules;
|
|
17
|
-
const reports = ['earl', 'earl-a'];
|
|
18
|
-
exports.reports = reports;
|
|
19
|
-
const actRules = [...act_rules_options_json_1.default.qualweb_id, ...act_rules_options_json_1.default.act_id];
|
|
20
|
-
exports.actRules = actRules;
|
|
21
|
-
const wcagTechniques = [
|
|
22
|
-
'QW-WCAG-T1',
|
|
23
|
-
'QW-WCAG-T2',
|
|
24
|
-
'QW-WCAG-T3',
|
|
25
|
-
'QW-WCAG-T4',
|
|
26
|
-
'QW-WCAG-T5',
|
|
27
|
-
'QW-WCAG-T6',
|
|
28
|
-
'QW-WCAG-T7',
|
|
29
|
-
'QW-WCAG-T8',
|
|
30
|
-
'QW-WCAG-T9',
|
|
31
|
-
'QW-WCAG-T10',
|
|
32
|
-
'QW-WCAG-T11',
|
|
33
|
-
'QW-WCAG-T12',
|
|
34
|
-
'QW-WCAG-T13',
|
|
35
|
-
'QW-WCAG-T14',
|
|
36
|
-
'QW-WCAG-T15',
|
|
37
|
-
'QW-WCAG-T16',
|
|
38
|
-
'QW-WCAG-T17',
|
|
39
|
-
'QW-WCAG-T18',
|
|
40
|
-
'QW-WCAG-T19',
|
|
41
|
-
'QW-WCAG-T20',
|
|
42
|
-
'QW-WCAG-T21',
|
|
43
|
-
'QW-WCAG-T22',
|
|
44
|
-
'QW-WCAG-T23',
|
|
45
|
-
'QW-WCAG-T24',
|
|
46
|
-
'QW-WCAG-T25',
|
|
47
|
-
'QW-WCAG-T26',
|
|
48
|
-
'QW-WCAG-T27',
|
|
49
|
-
'QW-WCAG-T28',
|
|
50
|
-
'QW-WCAG-T29',
|
|
51
|
-
'QW-WCAG-T30',
|
|
52
|
-
'QW-WCAG-T31',
|
|
53
|
-
'QW-WCAG-T32'
|
|
54
|
-
];
|
|
55
|
-
exports.wcagTechniques = wcagTechniques;
|
|
56
|
-
const bps = [
|
|
57
|
-
'QW-BP1',
|
|
58
|
-
'QW-BP2',
|
|
59
|
-
'QW-BP4',
|
|
60
|
-
'QW-BP5',
|
|
61
|
-
'QW-BP6',
|
|
62
|
-
'QW-BP7',
|
|
63
|
-
'QW-BP8',
|
|
64
|
-
'QW-BP9',
|
|
65
|
-
'QW-BP10',
|
|
66
|
-
'QW-BP11',
|
|
67
|
-
'QW-BP12',
|
|
68
|
-
'QW-BP13',
|
|
69
|
-
'QW-BP15',
|
|
70
|
-
'QW-BP17',
|
|
71
|
-
'QW-BP18'
|
|
72
|
-
];
|
|
73
|
-
exports.bps = bps;
|
|
74
|
-
const levels = ['A', 'AA', 'AAA'];
|
|
75
|
-
exports.levels = levels;
|
|
76
|
-
const principles = ['Perceivable', 'Operable', 'Understandable', 'Robust'];
|
|
77
|
-
exports.principles = principles;
|
|
78
|
-
const viewport = [
|
|
79
|
-
{
|
|
80
|
-
name: 'viewport',
|
|
81
|
-
alias: 'v',
|
|
82
|
-
description: 'Use custom viewport.',
|
|
83
|
-
type: Boolean
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: 'mobile',
|
|
87
|
-
description: 'Use mobile mode.',
|
|
88
|
-
type: Boolean
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: 'orientation',
|
|
92
|
-
description: 'Orientation of the screen.',
|
|
93
|
-
typeLabel: '{underline portrait or landscape}',
|
|
94
|
-
type: String
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: 'user-agent',
|
|
98
|
-
description: 'User agent for the execution.',
|
|
99
|
-
typeLabel: '{underline user agent string}',
|
|
100
|
-
type: Boolean
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: 'width',
|
|
104
|
-
description: 'Width of the viewport.',
|
|
105
|
-
type: Number
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: 'height',
|
|
109
|
-
description: 'Height of the viewport.',
|
|
110
|
-
type: Number
|
|
111
|
-
}
|
|
112
|
-
];
|
|
113
|
-
const moduleFilters = [
|
|
114
|
-
{
|
|
115
|
-
name: 'act-rules',
|
|
116
|
-
typeLabel: '{underline file-path} or [ QW-ACT-R1 ... QW-ACT-R' + act_rules_options_json_1.default.qualweb_id.length + ' ] or [ ACT Rule ID ]',
|
|
117
|
-
type: String,
|
|
118
|
-
multiple: true,
|
|
119
|
-
description: 'Choose which ACT rules to execute. Can be multiple.'
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: 'exclude-act',
|
|
123
|
-
typeLabel: '{underline file-path} or [ QW-ACT-R1 ... QW-ACT-R' + act_rules_options_json_1.default.qualweb_id.length + ' ] or [ ACT Rule ID ]',
|
|
124
|
-
type: String,
|
|
125
|
-
multiple: true,
|
|
126
|
-
description: 'Choose which ACT rules to exclude. Can be multiple.'
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: 'act-levels',
|
|
130
|
-
typeLabel: '[ ' + levels.join(' | ') + ' ]',
|
|
131
|
-
type: String,
|
|
132
|
-
multiple: true,
|
|
133
|
-
description: 'Choose which conform levels to evaluate for the act rules only. Can be multiple.'
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
name: 'act-principles',
|
|
137
|
-
typeLabel: '[ ' + principles.join(' | ') + ' ]',
|
|
138
|
-
type: String,
|
|
139
|
-
multiple: true,
|
|
140
|
-
description: 'Choose which principles to evaluate for the act rules only. Can be multiple.'
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: 'wcag-techniques',
|
|
144
|
-
typeLabel: '{underline file-path} or [ QW-WCAG-T1 ... QW-WCAG-T' + wcagTechniques.length + ' ]',
|
|
145
|
-
type: String,
|
|
146
|
-
multiple: true,
|
|
147
|
-
description: 'Choose which wcag techniques to execute. Can be multiple.'
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: 'exclude-wcag',
|
|
151
|
-
typeLabel: '{underline file-path} or [ QW-WCAG-T1 ... QW-WCAG-T' + wcagTechniques.length + ' ]',
|
|
152
|
-
type: String,
|
|
153
|
-
multiple: true,
|
|
154
|
-
description: 'Choose which wcag techniques to exclude. Can be multiple.'
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: 'wcag-levels',
|
|
158
|
-
typeLabel: '[ ' + levels.join(' | ') + ' ]',
|
|
159
|
-
type: String,
|
|
160
|
-
multiple: true,
|
|
161
|
-
description: 'Choose which conform levels to evaluate for the wcag techniques only. Can be multiple.'
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
name: 'wcag-principles',
|
|
165
|
-
typeLabel: '[ ' + principles.join(' | ') + ' ]',
|
|
166
|
-
type: String,
|
|
167
|
-
multiple: true,
|
|
168
|
-
description: 'Choose which principles to evaluate for the wcag techniques only. Can be multiple.'
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
name: 'best-practices',
|
|
172
|
-
typeLabel: '{underline file-path} or [ QW-BP1 ... QW-BP' + bps.length + ' ]',
|
|
173
|
-
type: String,
|
|
174
|
-
multiple: true,
|
|
175
|
-
description: 'Choose which best-practices to execute. Can be multiple.'
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
name: 'exclude-bp',
|
|
179
|
-
typeLabel: '{underline file-path} or [ QW-BP1 ... QW-BP' + bps.length + ' ]',
|
|
180
|
-
type: String,
|
|
181
|
-
multiple: true,
|
|
182
|
-
description: 'Choose which best-practices to exclude. Can be multiple.'
|
|
183
|
-
}
|
|
184
|
-
];
|
|
185
|
-
const options = [
|
|
186
|
-
{
|
|
187
|
-
name: 'url',
|
|
188
|
-
alias: 'u',
|
|
189
|
-
type: String,
|
|
190
|
-
typeLabel: '{underline url}',
|
|
191
|
-
description: 'Url to evaluate.'
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: 'file',
|
|
195
|
-
alias: 'f',
|
|
196
|
-
type: String,
|
|
197
|
-
typeLabel: '{underline path-to-file}',
|
|
198
|
-
description: 'File with urls to evaluate.'
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
name: 'crawl',
|
|
202
|
-
alias: 'c',
|
|
203
|
-
type: String,
|
|
204
|
-
typeLabel: '{underline domain}',
|
|
205
|
-
description: 'Domain to crawl.'
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
name: 'module',
|
|
209
|
-
alias: 'm',
|
|
210
|
-
type: String,
|
|
211
|
-
multiple: true,
|
|
212
|
-
typeLabel: '[ ' + modules.join(' | ') + ' ]',
|
|
213
|
-
description: 'Choose which modules to execute. Can be multiple'
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
name: 'report-type',
|
|
217
|
-
alias: 'r',
|
|
218
|
-
type: String,
|
|
219
|
-
typeLabel: '[ ' + reports.join(' | ') + ' ]',
|
|
220
|
-
description: 'Convert the evaluation to `earl` or `earl-a` (earl-aggregated).'
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
name: 'save-name',
|
|
224
|
-
alias: 's',
|
|
225
|
-
type: String,
|
|
226
|
-
typeLabel: '{underline name}',
|
|
227
|
-
description: 'The name to save the aggregated earl reports (earl-a).'
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
name: 'timeout',
|
|
231
|
-
alias: 't',
|
|
232
|
-
type: Number,
|
|
233
|
-
typeLabel: '{underline number}',
|
|
234
|
-
description: 'Timeout for loading page.'
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
name: 'waitUntil',
|
|
238
|
-
alias: 'w',
|
|
239
|
-
type: String,
|
|
240
|
-
typeLabel: '[ load | domcontentloaded | networkidle0 | networkidle2 ]',
|
|
241
|
-
description: 'Specify which events to wait before starting the evaluation. Can be multiple.'
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
name: 'maxParallelEvaluations',
|
|
245
|
-
alias: 'p',
|
|
246
|
-
type: Number,
|
|
247
|
-
typeLabel: '{underline number}',
|
|
248
|
-
description: 'Evaluates multiples urls at the same time.'
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
name: 'json',
|
|
252
|
-
alias: 'j',
|
|
253
|
-
type: String,
|
|
254
|
-
typeLabel: '{underline path-to-json}',
|
|
255
|
-
description: 'Loads a json file with the configs to execute.'
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
name: 'help',
|
|
259
|
-
alias: 'h',
|
|
260
|
-
description: 'Print this usage guide.',
|
|
261
|
-
type: Boolean
|
|
262
|
-
}
|
|
263
|
-
];
|
|
264
|
-
const sections = [
|
|
265
|
-
{
|
|
266
|
-
content: header,
|
|
267
|
-
raw: true
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
header: 'QualWeb CLI',
|
|
271
|
-
content: 'QualWeb command line interface.'
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
header: 'Usage',
|
|
275
|
-
content: [
|
|
276
|
-
'$ qw [OPTION] ...',
|
|
277
|
-
'$ qw [OPTION] ... [-r] ...',
|
|
278
|
-
'$ qw [-m] act [-act-rules | -act-levels | -act-principles] ...',
|
|
279
|
-
'$ qw [-m] wcag [-wcag-techniques | -wcag-levels | -wcag-principles] ...',
|
|
280
|
-
'$ qw [-m] bp [-best-practices] ...'
|
|
281
|
-
]
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
header: 'Options',
|
|
285
|
-
optionList: options
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
header: 'Viewport Options',
|
|
289
|
-
optionList: viewport
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
header: 'Module Filters',
|
|
293
|
-
optionList: moduleFilters
|
|
294
|
-
}
|
|
295
|
-
];
|
|
296
|
-
exports.sections = sections;
|
|
297
|
-
const optionList = [...options, ...viewport, ...moduleFilters];
|
|
298
|
-
exports.optionList = optionList;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.modules = exports.principles = exports.levels = exports.reports = exports.bps = exports.wcagTechniques = exports.actRules = exports.strings = exports.sections = exports.optionList = void 0;
|
|
7
|
+
const act_rules_options_json_1 = __importDefault(require("./act-rules.options.json"));
|
|
8
|
+
const header = ` _____ _____ _____ __ _ _ _ _____ _____ _____ __ _____
|
|
9
|
+
| | | | _ | | | | | | __| __ | | | | | |
|
|
10
|
+
| | | | | | |__| | | | __| __ -| | --| |__|- -|
|
|
11
|
+
|__ _|_____|__|__|_____|_____|_____|_____| |_____|_____|_____|
|
|
12
|
+
|__| `;
|
|
13
|
+
const strings = {};
|
|
14
|
+
exports.strings = strings;
|
|
15
|
+
const modules = ['act', 'html', 'css', 'bp', 'counter'];
|
|
16
|
+
exports.modules = modules;
|
|
17
|
+
const reports = ['earl', 'earl-a'];
|
|
18
|
+
exports.reports = reports;
|
|
19
|
+
const actRules = [...act_rules_options_json_1.default.qualweb_id, ...act_rules_options_json_1.default.act_id];
|
|
20
|
+
exports.actRules = actRules;
|
|
21
|
+
const wcagTechniques = [
|
|
22
|
+
'QW-WCAG-T1',
|
|
23
|
+
'QW-WCAG-T2',
|
|
24
|
+
'QW-WCAG-T3',
|
|
25
|
+
'QW-WCAG-T4',
|
|
26
|
+
'QW-WCAG-T5',
|
|
27
|
+
'QW-WCAG-T6',
|
|
28
|
+
'QW-WCAG-T7',
|
|
29
|
+
'QW-WCAG-T8',
|
|
30
|
+
'QW-WCAG-T9',
|
|
31
|
+
'QW-WCAG-T10',
|
|
32
|
+
'QW-WCAG-T11',
|
|
33
|
+
'QW-WCAG-T12',
|
|
34
|
+
'QW-WCAG-T13',
|
|
35
|
+
'QW-WCAG-T14',
|
|
36
|
+
'QW-WCAG-T15',
|
|
37
|
+
'QW-WCAG-T16',
|
|
38
|
+
'QW-WCAG-T17',
|
|
39
|
+
'QW-WCAG-T18',
|
|
40
|
+
'QW-WCAG-T19',
|
|
41
|
+
'QW-WCAG-T20',
|
|
42
|
+
'QW-WCAG-T21',
|
|
43
|
+
'QW-WCAG-T22',
|
|
44
|
+
'QW-WCAG-T23',
|
|
45
|
+
'QW-WCAG-T24',
|
|
46
|
+
'QW-WCAG-T25',
|
|
47
|
+
'QW-WCAG-T26',
|
|
48
|
+
'QW-WCAG-T27',
|
|
49
|
+
'QW-WCAG-T28',
|
|
50
|
+
'QW-WCAG-T29',
|
|
51
|
+
'QW-WCAG-T30',
|
|
52
|
+
'QW-WCAG-T31',
|
|
53
|
+
'QW-WCAG-T32'
|
|
54
|
+
];
|
|
55
|
+
exports.wcagTechniques = wcagTechniques;
|
|
56
|
+
const bps = [
|
|
57
|
+
'QW-BP1',
|
|
58
|
+
'QW-BP2',
|
|
59
|
+
'QW-BP4',
|
|
60
|
+
'QW-BP5',
|
|
61
|
+
'QW-BP6',
|
|
62
|
+
'QW-BP7',
|
|
63
|
+
'QW-BP8',
|
|
64
|
+
'QW-BP9',
|
|
65
|
+
'QW-BP10',
|
|
66
|
+
'QW-BP11',
|
|
67
|
+
'QW-BP12',
|
|
68
|
+
'QW-BP13',
|
|
69
|
+
'QW-BP15',
|
|
70
|
+
'QW-BP17',
|
|
71
|
+
'QW-BP18'
|
|
72
|
+
];
|
|
73
|
+
exports.bps = bps;
|
|
74
|
+
const levels = ['A', 'AA', 'AAA'];
|
|
75
|
+
exports.levels = levels;
|
|
76
|
+
const principles = ['Perceivable', 'Operable', 'Understandable', 'Robust'];
|
|
77
|
+
exports.principles = principles;
|
|
78
|
+
const viewport = [
|
|
79
|
+
{
|
|
80
|
+
name: 'viewport',
|
|
81
|
+
alias: 'v',
|
|
82
|
+
description: 'Use custom viewport.',
|
|
83
|
+
type: Boolean
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'mobile',
|
|
87
|
+
description: 'Use mobile mode.',
|
|
88
|
+
type: Boolean
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'orientation',
|
|
92
|
+
description: 'Orientation of the screen.',
|
|
93
|
+
typeLabel: '{underline portrait or landscape}',
|
|
94
|
+
type: String
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'user-agent',
|
|
98
|
+
description: 'User agent for the execution.',
|
|
99
|
+
typeLabel: '{underline user agent string}',
|
|
100
|
+
type: Boolean
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'width',
|
|
104
|
+
description: 'Width of the viewport.',
|
|
105
|
+
type: Number
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'height',
|
|
109
|
+
description: 'Height of the viewport.',
|
|
110
|
+
type: Number
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
const moduleFilters = [
|
|
114
|
+
{
|
|
115
|
+
name: 'act-rules',
|
|
116
|
+
typeLabel: '{underline file-path} or [ QW-ACT-R1 ... QW-ACT-R' + act_rules_options_json_1.default.qualweb_id.length + ' ] or [ ACT Rule ID ]',
|
|
117
|
+
type: String,
|
|
118
|
+
multiple: true,
|
|
119
|
+
description: 'Choose which ACT rules to execute. Can be multiple.'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'exclude-act',
|
|
123
|
+
typeLabel: '{underline file-path} or [ QW-ACT-R1 ... QW-ACT-R' + act_rules_options_json_1.default.qualweb_id.length + ' ] or [ ACT Rule ID ]',
|
|
124
|
+
type: String,
|
|
125
|
+
multiple: true,
|
|
126
|
+
description: 'Choose which ACT rules to exclude. Can be multiple.'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: 'act-levels',
|
|
130
|
+
typeLabel: '[ ' + levels.join(' | ') + ' ]',
|
|
131
|
+
type: String,
|
|
132
|
+
multiple: true,
|
|
133
|
+
description: 'Choose which conform levels to evaluate for the act rules only. Can be multiple.'
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'act-principles',
|
|
137
|
+
typeLabel: '[ ' + principles.join(' | ') + ' ]',
|
|
138
|
+
type: String,
|
|
139
|
+
multiple: true,
|
|
140
|
+
description: 'Choose which principles to evaluate for the act rules only. Can be multiple.'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'wcag-techniques',
|
|
144
|
+
typeLabel: '{underline file-path} or [ QW-WCAG-T1 ... QW-WCAG-T' + wcagTechniques.length + ' ]',
|
|
145
|
+
type: String,
|
|
146
|
+
multiple: true,
|
|
147
|
+
description: 'Choose which wcag techniques to execute. Can be multiple.'
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'exclude-wcag',
|
|
151
|
+
typeLabel: '{underline file-path} or [ QW-WCAG-T1 ... QW-WCAG-T' + wcagTechniques.length + ' ]',
|
|
152
|
+
type: String,
|
|
153
|
+
multiple: true,
|
|
154
|
+
description: 'Choose which wcag techniques to exclude. Can be multiple.'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'wcag-levels',
|
|
158
|
+
typeLabel: '[ ' + levels.join(' | ') + ' ]',
|
|
159
|
+
type: String,
|
|
160
|
+
multiple: true,
|
|
161
|
+
description: 'Choose which conform levels to evaluate for the wcag techniques only. Can be multiple.'
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'wcag-principles',
|
|
165
|
+
typeLabel: '[ ' + principles.join(' | ') + ' ]',
|
|
166
|
+
type: String,
|
|
167
|
+
multiple: true,
|
|
168
|
+
description: 'Choose which principles to evaluate for the wcag techniques only. Can be multiple.'
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'best-practices',
|
|
172
|
+
typeLabel: '{underline file-path} or [ QW-BP1 ... QW-BP' + bps.length + ' ]',
|
|
173
|
+
type: String,
|
|
174
|
+
multiple: true,
|
|
175
|
+
description: 'Choose which best-practices to execute. Can be multiple.'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'exclude-bp',
|
|
179
|
+
typeLabel: '{underline file-path} or [ QW-BP1 ... QW-BP' + bps.length + ' ]',
|
|
180
|
+
type: String,
|
|
181
|
+
multiple: true,
|
|
182
|
+
description: 'Choose which best-practices to exclude. Can be multiple.'
|
|
183
|
+
}
|
|
184
|
+
];
|
|
185
|
+
const options = [
|
|
186
|
+
{
|
|
187
|
+
name: 'url',
|
|
188
|
+
alias: 'u',
|
|
189
|
+
type: String,
|
|
190
|
+
typeLabel: '{underline url}',
|
|
191
|
+
description: 'Url to evaluate.'
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'file',
|
|
195
|
+
alias: 'f',
|
|
196
|
+
type: String,
|
|
197
|
+
typeLabel: '{underline path-to-file}',
|
|
198
|
+
description: 'File with urls to evaluate.'
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'crawl',
|
|
202
|
+
alias: 'c',
|
|
203
|
+
type: String,
|
|
204
|
+
typeLabel: '{underline domain}',
|
|
205
|
+
description: 'Domain to crawl.'
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: 'module',
|
|
209
|
+
alias: 'm',
|
|
210
|
+
type: String,
|
|
211
|
+
multiple: true,
|
|
212
|
+
typeLabel: '[ ' + modules.join(' | ') + ' ]',
|
|
213
|
+
description: 'Choose which modules to execute. Can be multiple'
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'report-type',
|
|
217
|
+
alias: 'r',
|
|
218
|
+
type: String,
|
|
219
|
+
typeLabel: '[ ' + reports.join(' | ') + ' ]',
|
|
220
|
+
description: 'Convert the evaluation to `earl` or `earl-a` (earl-aggregated).'
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: 'save-name',
|
|
224
|
+
alias: 's',
|
|
225
|
+
type: String,
|
|
226
|
+
typeLabel: '{underline name}',
|
|
227
|
+
description: 'The name to save the aggregated earl reports (earl-a).'
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'timeout',
|
|
231
|
+
alias: 't',
|
|
232
|
+
type: Number,
|
|
233
|
+
typeLabel: '{underline number}',
|
|
234
|
+
description: 'Timeout for loading page.'
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: 'waitUntil',
|
|
238
|
+
alias: 'w',
|
|
239
|
+
type: String,
|
|
240
|
+
typeLabel: '[ load | domcontentloaded | networkidle0 | networkidle2 ]',
|
|
241
|
+
description: 'Specify which events to wait before starting the evaluation. Can be multiple.'
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: 'maxParallelEvaluations',
|
|
245
|
+
alias: 'p',
|
|
246
|
+
type: Number,
|
|
247
|
+
typeLabel: '{underline number}',
|
|
248
|
+
description: 'Evaluates multiples urls at the same time.'
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: 'json',
|
|
252
|
+
alias: 'j',
|
|
253
|
+
type: String,
|
|
254
|
+
typeLabel: '{underline path-to-json}',
|
|
255
|
+
description: 'Loads a json file with the configs to execute.'
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: 'help',
|
|
259
|
+
alias: 'h',
|
|
260
|
+
description: 'Print this usage guide.',
|
|
261
|
+
type: Boolean
|
|
262
|
+
}
|
|
263
|
+
];
|
|
264
|
+
const sections = [
|
|
265
|
+
{
|
|
266
|
+
content: header,
|
|
267
|
+
raw: true
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
header: 'QualWeb CLI',
|
|
271
|
+
content: 'QualWeb command line interface.'
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
header: 'Usage',
|
|
275
|
+
content: [
|
|
276
|
+
'$ qw [OPTION] ...',
|
|
277
|
+
'$ qw [OPTION] ... [-r] ...',
|
|
278
|
+
'$ qw [-m] act [-act-rules | -act-levels | -act-principles] ...',
|
|
279
|
+
'$ qw [-m] wcag [-wcag-techniques | -wcag-levels | -wcag-principles] ...',
|
|
280
|
+
'$ qw [-m] bp [-best-practices] ...'
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
header: 'Options',
|
|
285
|
+
optionList: options
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
header: 'Viewport Options',
|
|
289
|
+
optionList: viewport
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
header: 'Module Filters',
|
|
293
|
+
optionList: moduleFilters
|
|
294
|
+
}
|
|
295
|
+
];
|
|
296
|
+
exports.sections = sections;
|
|
297
|
+
const optionList = [...options, ...viewport, ...moduleFilters];
|
|
298
|
+
exports.optionList = optionList;
|
|
299
299
|
//# sourceMappingURL=options.js.map
|
package/dist/lib/parser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="@qualweb/types" />
|
|
2
|
-
import { QualwebOptions } from '@qualweb/core';
|
|
3
|
-
declare function parse(): Promise<QualwebOptions>;
|
|
4
|
-
export = parse;
|
|
1
|
+
/// <reference types="@qualweb/types" />
|
|
2
|
+
import { QualwebOptions } from '@qualweb/core';
|
|
3
|
+
declare function parse(): Promise<QualwebOptions>;
|
|
4
|
+
export = parse;
|
|
5
5
|
//# sourceMappingURL=parser.d.ts.map
|