@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.
@@ -1,133 +1,133 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const options_1 = require("./options");
6
- const fileUtils_1 = require("./fileUtils");
7
- const parserUtils_1 = require("./parserUtils");
8
- const actParser_1 = __importDefault(require("./actParser"));
9
- const wcagParser_1 = __importDefault(require("./wcagParser"));
10
- const bpParser_1 = __importDefault(require("./bpParser"));
11
- const command_line_args_1 = __importDefault(require("command-line-args"));
12
- const set_value_1 = __importDefault(require("set-value"));
13
- function parseInputMethods(mainOptions, options) {
14
- if (mainOptions.url) {
15
- options.url = mainOptions.url;
16
- }
17
- if (mainOptions.file) {
18
- options.file = mainOptions.file;
19
- }
20
- if (mainOptions.crawl) {
21
- options.crawl = mainOptions.crawl;
22
- }
23
- }
24
- function parseModules(mainOptions, options) {
25
- if (mainOptions.module) {
26
- options.execute = {};
27
- const modulesToExecute = mainOptions.module;
28
- for (const module of modulesToExecute !== null && modulesToExecute !== void 0 ? modulesToExecute : []) {
29
- if (!options_1.modules.includes(module.replace(',', '').trim())) {
30
- (0, parserUtils_1.printError)('Module ' + module.replace(',', '').trim() + ' does not exist.');
31
- }
32
- else {
33
- const mod = module.replace(',', '').trim();
34
- switch (mod) {
35
- case 'act':
36
- options.execute.act = true;
37
- break;
38
- case 'wcag':
39
- options.execute.wcag = true;
40
- break;
41
- case 'bp':
42
- options.execute.bp = true;
43
- break;
44
- break;
45
- case 'counter':
46
- options.execute.counter = true;
47
- break;
48
- default:
49
- (0, parserUtils_1.printError)('Module ' + mod + ' does not exist.');
50
- break;
51
- }
52
- }
53
- }
54
- }
55
- }
56
- function parseViewport(mainOptions, options) {
57
- if (mainOptions.viewport) {
58
- options.viewport = {
59
- mobile: false,
60
- landscape: true,
61
- userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firefox/22.0',
62
- resolution: {
63
- width: 1366,
64
- height: 768
65
- }
66
- };
67
- if (mainOptions.mobile) {
68
- options.viewport.mobile = mainOptions.mobile;
69
- }
70
- if (mainOptions.orientation) {
71
- options.viewport.landscape = mainOptions.orientation !== 'portrait';
72
- }
73
- if (mainOptions['user-agent']) {
74
- options.viewport.userAgent = mainOptions['user-agent'];
75
- }
76
- if (mainOptions.width) {
77
- (0, set_value_1.default)(options, 'viewport.resolution.width', mainOptions.width);
78
- }
79
- if (mainOptions.height) {
80
- (0, set_value_1.default)(options, 'viewport.resolution.height', mainOptions.height);
81
- }
82
- }
83
- }
84
- function parseSystemOptions(mainOptions, options) {
85
- if (mainOptions.timeout) {
86
- options.timeout = mainOptions.timeout;
87
- }
88
- if (mainOptions.waitUntil) {
89
- options.waitUntil = mainOptions.waitUntil.split(' ');
90
- }
91
- if (mainOptions.maxParallelEvaluations) {
92
- options.maxParallelEvaluations = mainOptions.maxParallelEvaluations;
93
- }
94
- }
95
- function parseReportType(mainOptions, options) {
96
- const reportType = 'report-type';
97
- if (mainOptions[reportType]) {
98
- options.report = mainOptions[reportType];
99
- if (!options_1.reports.includes(mainOptions[reportType])) {
100
- (0, parserUtils_1.printError)('Wrong report type selected.');
101
- }
102
- }
103
- }
104
- function parseSaveName(mainOptions, options) {
105
- if (mainOptions['save-name']) {
106
- options['save-name'] = mainOptions['save-name'];
107
- }
108
- }
109
- async function parse() {
110
- let mainOptions = (0, command_line_args_1.default)(options_1.optionList, { stopAtFirstUnknown: true });
111
- const options = {};
112
- if (mainOptions._unknown) {
113
- (0, parserUtils_1.printHelp)();
114
- }
115
- if (mainOptions.json) {
116
- mainOptions = await (0, fileUtils_1.readJsonFile)(mainOptions['json']);
117
- }
118
- parseInputMethods(mainOptions, options);
119
- parseModules(mainOptions, options);
120
- parseViewport(mainOptions, options);
121
- parseSystemOptions(mainOptions, options);
122
- parseReportType(mainOptions, options);
123
- parseSaveName(mainOptions, options);
124
- await (0, actParser_1.default)(mainOptions, options);
125
- await (0, wcagParser_1.default)(mainOptions, options);
126
- await (0, bpParser_1.default)(mainOptions, options);
127
- if (mainOptions.help) {
128
- (0, parserUtils_1.printHelp)();
129
- }
130
- return options;
131
- }
132
- module.exports = parse;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const options_1 = require("./options");
6
+ const fileUtils_1 = require("./fileUtils");
7
+ const parserUtils_1 = require("./parserUtils");
8
+ const actParser_1 = __importDefault(require("./actParser"));
9
+ const wcagParser_1 = __importDefault(require("./wcagParser"));
10
+ const bpParser_1 = __importDefault(require("./bpParser"));
11
+ const command_line_args_1 = __importDefault(require("command-line-args"));
12
+ const set_value_1 = __importDefault(require("set-value"));
13
+ function parseInputMethods(mainOptions, options) {
14
+ if (mainOptions.url) {
15
+ options.url = mainOptions.url;
16
+ }
17
+ if (mainOptions.file) {
18
+ options.file = mainOptions.file;
19
+ }
20
+ if (mainOptions.crawl) {
21
+ options.crawl = mainOptions.crawl;
22
+ }
23
+ }
24
+ function parseModules(mainOptions, options) {
25
+ if (mainOptions.module) {
26
+ options.execute = {};
27
+ const modulesToExecute = mainOptions.module;
28
+ for (const module of modulesToExecute !== null && modulesToExecute !== void 0 ? modulesToExecute : []) {
29
+ if (!options_1.modules.includes(module.replace(',', '').trim())) {
30
+ (0, parserUtils_1.printError)('Module ' + module.replace(',', '').trim() + ' does not exist.');
31
+ }
32
+ else {
33
+ const mod = module.replace(',', '').trim();
34
+ switch (mod) {
35
+ case 'act':
36
+ options.execute.act = true;
37
+ break;
38
+ case 'wcag':
39
+ options.execute.wcag = true;
40
+ break;
41
+ case 'bp':
42
+ options.execute.bp = true;
43
+ break;
44
+ break;
45
+ case 'counter':
46
+ options.execute.counter = true;
47
+ break;
48
+ default:
49
+ (0, parserUtils_1.printError)('Module ' + mod + ' does not exist.');
50
+ break;
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ function parseViewport(mainOptions, options) {
57
+ if (mainOptions.viewport) {
58
+ options.viewport = {
59
+ mobile: false,
60
+ landscape: true,
61
+ userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20100101 Firefox/22.0',
62
+ resolution: {
63
+ width: 1366,
64
+ height: 768
65
+ }
66
+ };
67
+ if (mainOptions.mobile) {
68
+ options.viewport.mobile = mainOptions.mobile;
69
+ }
70
+ if (mainOptions.orientation) {
71
+ options.viewport.landscape = mainOptions.orientation !== 'portrait';
72
+ }
73
+ if (mainOptions['user-agent']) {
74
+ options.viewport.userAgent = mainOptions['user-agent'];
75
+ }
76
+ if (mainOptions.width) {
77
+ (0, set_value_1.default)(options, 'viewport.resolution.width', mainOptions.width);
78
+ }
79
+ if (mainOptions.height) {
80
+ (0, set_value_1.default)(options, 'viewport.resolution.height', mainOptions.height);
81
+ }
82
+ }
83
+ }
84
+ function parseSystemOptions(mainOptions, options) {
85
+ if (mainOptions.timeout) {
86
+ options.timeout = mainOptions.timeout;
87
+ }
88
+ if (mainOptions.waitUntil) {
89
+ options.waitUntil = mainOptions.waitUntil.split(' ');
90
+ }
91
+ if (mainOptions.maxParallelEvaluations) {
92
+ options.maxParallelEvaluations = mainOptions.maxParallelEvaluations;
93
+ }
94
+ }
95
+ function parseReportType(mainOptions, options) {
96
+ const reportType = 'report-type';
97
+ if (mainOptions[reportType]) {
98
+ options.report = mainOptions[reportType];
99
+ if (!options_1.reports.includes(mainOptions[reportType])) {
100
+ (0, parserUtils_1.printError)('Wrong report type selected.');
101
+ }
102
+ }
103
+ }
104
+ function parseSaveName(mainOptions, options) {
105
+ if (mainOptions['save-name']) {
106
+ options['save-name'] = mainOptions['save-name'];
107
+ }
108
+ }
109
+ async function parse() {
110
+ let mainOptions = (0, command_line_args_1.default)(options_1.optionList, { stopAtFirstUnknown: true });
111
+ const options = {};
112
+ if (mainOptions._unknown) {
113
+ (0, parserUtils_1.printHelp)();
114
+ }
115
+ if (mainOptions.json) {
116
+ mainOptions = await (0, fileUtils_1.readJsonFile)(mainOptions['json']);
117
+ }
118
+ parseInputMethods(mainOptions, options);
119
+ parseModules(mainOptions, options);
120
+ parseViewport(mainOptions, options);
121
+ parseSystemOptions(mainOptions, options);
122
+ parseReportType(mainOptions, options);
123
+ parseSaveName(mainOptions, options);
124
+ await (0, actParser_1.default)(mainOptions, options);
125
+ await (0, wcagParser_1.default)(mainOptions, options);
126
+ await (0, bpParser_1.default)(mainOptions, options);
127
+ if (mainOptions.help) {
128
+ (0, parserUtils_1.printHelp)();
129
+ }
130
+ return options;
131
+ }
132
+ module.exports = parse;
133
133
  //# sourceMappingURL=parser.js.map
@@ -1,9 +1,9 @@
1
- declare function printHelp(): void;
2
- declare function printError(err: string): void;
3
- declare function validatePrinciples(arrayPrinciples: string[] | undefined): void;
4
- declare function validateLevels(arrayLevels: string[] | undefined): void;
5
- declare function validateACT(rules: string[] | undefined): void;
6
- declare function validateWCAG(techniques: string[] | undefined): void;
7
- declare function validateBP(bestPractices: string[] | undefined): void;
8
- export { printHelp, printError, validatePrinciples, validateLevels, validateACT, validateWCAG, validateBP };
1
+ declare function printHelp(): void;
2
+ declare function printError(err: string): void;
3
+ declare function validatePrinciples(arrayPrinciples: string[] | undefined): void;
4
+ declare function validateLevels(arrayLevels: string[] | undefined): void;
5
+ declare function validateACT(rules: string[] | undefined): void;
6
+ declare function validateWCAG(techniques: string[] | undefined): void;
7
+ declare function validateBP(bestPractices: string[] | undefined): void;
8
+ export { printHelp, printError, validatePrinciples, validateLevels, validateACT, validateWCAG, validateBP };
9
9
  //# sourceMappingURL=parserUtils.d.ts.map
@@ -1,69 +1,69 @@
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.validateBP = exports.validateWCAG = exports.validateACT = exports.validateLevels = exports.validatePrinciples = exports.printError = exports.printHelp = void 0;
7
- const options_1 = require("./options");
8
- const command_line_usage_1 = __importDefault(require("command-line-usage"));
9
- function printHelp() {
10
- console.log((0, command_line_usage_1.default)(options_1.sections));
11
- process.exit(0);
12
- }
13
- exports.printHelp = printHelp;
14
- function printError(err) {
15
- console.error(err);
16
- console.log('To get help please run');
17
- console.log(' $ qw --help');
18
- process.exit(0);
19
- }
20
- exports.printError = printError;
21
- function validatePrinciples(arrayPrinciples) {
22
- if (arrayPrinciples) {
23
- const valid = arrayContainsArray(arrayPrinciples, options_1.principles);
24
- if (!valid) {
25
- printError('Invalid principle(s) selected.');
26
- }
27
- }
28
- }
29
- exports.validatePrinciples = validatePrinciples;
30
- function validateLevels(arrayLevels) {
31
- if (arrayLevels) {
32
- const valid = arrayContainsArray(arrayLevels, options_1.levels);
33
- if (!valid) {
34
- printError('Invalid level(s) selected.');
35
- }
36
- }
37
- }
38
- exports.validateLevels = validateLevels;
39
- function validateACT(rules) {
40
- if (rules) {
41
- const valid = arrayContainsArray(rules, options_1.actRules);
42
- if (!valid) {
43
- printError('Invalid rule(s) selected.');
44
- }
45
- }
46
- }
47
- exports.validateACT = validateACT;
48
- function validateWCAG(techniques) {
49
- if (techniques) {
50
- const valid = arrayContainsArray(techniques, options_1.wcagTechniques);
51
- if (!valid) {
52
- printError('Invalid techniques(s) selected.');
53
- }
54
- }
55
- }
56
- exports.validateWCAG = validateWCAG;
57
- function validateBP(bestPractices) {
58
- if (bestPractices) {
59
- const valid = arrayContainsArray(bestPractices, options_1.bps);
60
- if (!valid) {
61
- printError('Invalid best-practice(s) selected.');
62
- }
63
- }
64
- }
65
- exports.validateBP = validateBP;
66
- function arrayContainsArray(arr1, arr2) {
67
- return arr1.some((r) => arr2.includes(r));
68
- }
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.validateBP = exports.validateWCAG = exports.validateACT = exports.validateLevels = exports.validatePrinciples = exports.printError = exports.printHelp = void 0;
7
+ const options_1 = require("./options");
8
+ const command_line_usage_1 = __importDefault(require("command-line-usage"));
9
+ function printHelp() {
10
+ console.log((0, command_line_usage_1.default)(options_1.sections));
11
+ process.exit(0);
12
+ }
13
+ exports.printHelp = printHelp;
14
+ function printError(err) {
15
+ console.error(err);
16
+ console.log('To get help please run');
17
+ console.log(' $ qw --help');
18
+ process.exit(0);
19
+ }
20
+ exports.printError = printError;
21
+ function validatePrinciples(arrayPrinciples) {
22
+ if (arrayPrinciples) {
23
+ const valid = arrayContainsArray(arrayPrinciples, options_1.principles);
24
+ if (!valid) {
25
+ printError('Invalid principle(s) selected.');
26
+ }
27
+ }
28
+ }
29
+ exports.validatePrinciples = validatePrinciples;
30
+ function validateLevels(arrayLevels) {
31
+ if (arrayLevels) {
32
+ const valid = arrayContainsArray(arrayLevels, options_1.levels);
33
+ if (!valid) {
34
+ printError('Invalid level(s) selected.');
35
+ }
36
+ }
37
+ }
38
+ exports.validateLevels = validateLevels;
39
+ function validateACT(rules) {
40
+ if (rules) {
41
+ const valid = arrayContainsArray(rules, options_1.actRules);
42
+ if (!valid) {
43
+ printError('Invalid rule(s) selected.');
44
+ }
45
+ }
46
+ }
47
+ exports.validateACT = validateACT;
48
+ function validateWCAG(techniques) {
49
+ if (techniques) {
50
+ const valid = arrayContainsArray(techniques, options_1.wcagTechniques);
51
+ if (!valid) {
52
+ printError('Invalid techniques(s) selected.');
53
+ }
54
+ }
55
+ }
56
+ exports.validateWCAG = validateWCAG;
57
+ function validateBP(bestPractices) {
58
+ if (bestPractices) {
59
+ const valid = arrayContainsArray(bestPractices, options_1.bps);
60
+ if (!valid) {
61
+ printError('Invalid best-practice(s) selected.');
62
+ }
63
+ }
64
+ }
65
+ exports.validateBP = validateBP;
66
+ function arrayContainsArray(arr1, arr2) {
67
+ return arr1.some((r) => arr2.includes(r));
68
+ }
69
69
  //# sourceMappingURL=parserUtils.js.map
@@ -1,6 +1,6 @@
1
- /// <reference types="@qualweb/types" />
2
- import { CommandLineOptions } from 'command-line-args';
3
- import { QualwebOptions } from '@qualweb/core';
4
- declare function parseWCAG(mainOptions: CommandLineOptions, options: QualwebOptions): Promise<void>;
5
- export = parseWCAG;
1
+ /// <reference types="@qualweb/types" />
2
+ import { CommandLineOptions } from 'command-line-args';
3
+ import { QualwebOptions } from '@qualweb/core';
4
+ declare function parseWCAG(mainOptions: CommandLineOptions, options: QualwebOptions): Promise<void>;
5
+ export = parseWCAG;
6
6
  //# sourceMappingURL=wcagParser.d.ts.map
@@ -1,69 +1,69 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const parserUtils_1 = require("./parserUtils");
6
- const fileUtils_1 = require("./fileUtils");
7
- const set_value_1 = __importDefault(require("set-value"));
8
- async function parseWCAG(mainOptions, options) {
9
- options['wcag-techniques'] = {};
10
- await validateWCAGTechniques(mainOptions, options);
11
- validateWCAGExclusions(mainOptions, options);
12
- validateWCAGLevels(mainOptions, options);
13
- validateWCAGPrinciples(mainOptions, options);
14
- if (Object.keys(options['wcag-techniques']).length === 0) {
15
- delete options['wcag-techniques'];
16
- }
17
- }
18
- function validateModule(mainOptions, options) {
19
- var _a;
20
- if (mainOptions.module && ((_a = options === null || options === void 0 ? void 0 : options.execute) === null || _a === void 0 ? void 0 : _a.wcag) === undefined) {
21
- (0, parserUtils_1.printError)('The "--wcag-techniques" option doesn\'t match any of the modules selected.');
22
- }
23
- else {
24
- console.warn('Warning: Module wcag has options but is not select. Will be select automatically.');
25
- (0, set_value_1.default)(options, 'execute.wcag', true);
26
- }
27
- }
28
- async function validateWCAGTechniques(mainOptions, options) {
29
- var _a;
30
- if (mainOptions['wcag-techniques'] && options['wcag-techniques']) {
31
- validateModule(mainOptions, options);
32
- if (mainOptions['wcag-techniques'].length === 1) {
33
- if (await (0, fileUtils_1.fileExists)(mainOptions['wcag-techniques'][0])) {
34
- const techniques = await (0, fileUtils_1.readJsonFile)(mainOptions['wcag-techniques'][0]);
35
- options['wcag-techniques'].techniques = [...((_a = techniques['wcag-techniques'].techniques) !== null && _a !== void 0 ? _a : [])];
36
- }
37
- else {
38
- options['wcag-techniques'].techniques = [...mainOptions['wcag-techniques']];
39
- }
40
- }
41
- else {
42
- options['wcag-techniques'].techniques = [...mainOptions['wcag-techniques']];
43
- }
44
- (0, parserUtils_1.validateWCAG)(options['wcag-techniques'].techniques);
45
- }
46
- }
47
- function validateWCAGExclusions(mainOptions, options) {
48
- if (mainOptions['exclude-wcag'] && options['wcag-techniques']) {
49
- validateModule(mainOptions, options);
50
- options['wcag-techniques'].exclude = [...mainOptions['exclude-wcag']];
51
- (0, parserUtils_1.validateWCAG)(options['wcag-techniques'].exclude);
52
- }
53
- }
54
- function validateWCAGLevels(mainOptions, options) {
55
- if (mainOptions['wcag-levels'] && options['wcag-techniques']) {
56
- validateModule(mainOptions, options);
57
- options['wcag-techniques']['levels'] = [...mainOptions['wcag-levels']];
58
- (0, parserUtils_1.validateLevels)(options['wcag-techniques'].levels);
59
- }
60
- }
61
- function validateWCAGPrinciples(mainOptions, options) {
62
- if (mainOptions['wcag-principles'] && options['wcag-techniques']) {
63
- validateModule(mainOptions, options);
64
- options['wcag-techniques'].principles = [...mainOptions['wcag-principles']];
65
- (0, parserUtils_1.validatePrinciples)(options['wcag-techniques'].principles);
66
- }
67
- }
68
- module.exports = parseWCAG;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const parserUtils_1 = require("./parserUtils");
6
+ const fileUtils_1 = require("./fileUtils");
7
+ const set_value_1 = __importDefault(require("set-value"));
8
+ async function parseWCAG(mainOptions, options) {
9
+ options['wcag-techniques'] = {};
10
+ await validateWCAGTechniques(mainOptions, options);
11
+ validateWCAGExclusions(mainOptions, options);
12
+ validateWCAGLevels(mainOptions, options);
13
+ validateWCAGPrinciples(mainOptions, options);
14
+ if (Object.keys(options['wcag-techniques']).length === 0) {
15
+ delete options['wcag-techniques'];
16
+ }
17
+ }
18
+ function validateModule(mainOptions, options) {
19
+ var _a;
20
+ if (mainOptions.module && ((_a = options === null || options === void 0 ? void 0 : options.execute) === null || _a === void 0 ? void 0 : _a.wcag) === undefined) {
21
+ (0, parserUtils_1.printError)('The "--wcag-techniques" option doesn\'t match any of the modules selected.');
22
+ }
23
+ else {
24
+ console.warn('Warning: Module wcag has options but is not select. Will be select automatically.');
25
+ (0, set_value_1.default)(options, 'execute.wcag', true);
26
+ }
27
+ }
28
+ async function validateWCAGTechniques(mainOptions, options) {
29
+ var _a;
30
+ if (mainOptions['wcag-techniques'] && options['wcag-techniques']) {
31
+ validateModule(mainOptions, options);
32
+ if (mainOptions['wcag-techniques'].length === 1) {
33
+ if (await (0, fileUtils_1.fileExists)(mainOptions['wcag-techniques'][0])) {
34
+ const techniques = await (0, fileUtils_1.readJsonFile)(mainOptions['wcag-techniques'][0]);
35
+ options['wcag-techniques'].techniques = [...((_a = techniques['wcag-techniques'].techniques) !== null && _a !== void 0 ? _a : [])];
36
+ }
37
+ else {
38
+ options['wcag-techniques'].techniques = [...mainOptions['wcag-techniques']];
39
+ }
40
+ }
41
+ else {
42
+ options['wcag-techniques'].techniques = [...mainOptions['wcag-techniques']];
43
+ }
44
+ (0, parserUtils_1.validateWCAG)(options['wcag-techniques'].techniques);
45
+ }
46
+ }
47
+ function validateWCAGExclusions(mainOptions, options) {
48
+ if (mainOptions['exclude-wcag'] && options['wcag-techniques']) {
49
+ validateModule(mainOptions, options);
50
+ options['wcag-techniques'].exclude = [...mainOptions['exclude-wcag']];
51
+ (0, parserUtils_1.validateWCAG)(options['wcag-techniques'].exclude);
52
+ }
53
+ }
54
+ function validateWCAGLevels(mainOptions, options) {
55
+ if (mainOptions['wcag-levels'] && options['wcag-techniques']) {
56
+ validateModule(mainOptions, options);
57
+ options['wcag-techniques']['levels'] = [...mainOptions['wcag-levels']];
58
+ (0, parserUtils_1.validateLevels)(options['wcag-techniques'].levels);
59
+ }
60
+ }
61
+ function validateWCAGPrinciples(mainOptions, options) {
62
+ if (mainOptions['wcag-principles'] && options['wcag-techniques']) {
63
+ validateModule(mainOptions, options);
64
+ options['wcag-techniques'].principles = [...mainOptions['wcag-principles']];
65
+ (0, parserUtils_1.validatePrinciples)(options['wcag-techniques'].principles);
66
+ }
67
+ }
68
+ module.exports = parseWCAG;
69
69
  //# sourceMappingURL=wcagParser.js.map