@qualweb/cli 0.6.4 → 0.6.6

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 +1 @@
1
- {"version":3,"file":"actParser.js","sourceRoot":"","sources":["../../src/lib/actParser.ts"],"names":[],"mappings":";;;;AAAA,+CAA4F;AAC5F,2CAAqE;AAGrE,0DAAiC;AAEjC,KAAK,UAAU,QAAQ,CAAC,WAA+B,EAAE,OAAuB;IAC9E,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC;IAE1B,MAAM,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC7C,qBAAqB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC5C,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACxC,qBAAqB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAE5C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QAClD,OAAO,OAAO,CAAC,WAAW,CAAC,CAAC;KAC7B;AACH,CAAC;AAED,SAAS,cAAc,CAAC,WAA+B,EAAE,OAAuB;;IAC9E,IAAI,WAAW,CAAC,MAAM,IAAI,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,GAAG,MAAK,SAAS,EAAE;QAC7D,wBAAU,CAAC,sEAAsE,CAAC,CAAC;KACpF;SAAM;QACL,OAAO,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;QACjG,mBAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;KACxC;AACH,CAAC;AAED,KAAK,UAAU,gBAAgB,CAAC,WAA+B,EAAE,OAAuB;;IACtF,IAAI,WAAW,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE;QACpD,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC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AAI,WAAW,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE;QACtD,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACrC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,GAAG,CAAC,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;QAC/D,IAAA,yBAAW,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC;KAC3C;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,WAA+B,EAAE,OAAuB;IACjF,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE;QACrD,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACrC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAC7D,IAAA,4BAAc,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;KAC7C;AACH,CAAC;AAED,SAAS,qBAAqB,CAAC,WAA+B,EAAE,OAAuB;IACrF,IAAI,WAAW,CAAC,gBAAgB,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE;QACzD,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACrC,OAAO,CAAC,WAAW,CAAC,CAAC,UAAU,GAAG,CAAC,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACrE,IAAA,gCAAkB,EAAC,OAAO,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAC;KACrD;AACH,CAAC;AAED,iBAAS,QAAQ,CAAC"}
@@ -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 parseBP(mainOptions: CommandLineOptions, options: QualwebOptions): Promise<void>;
5
- export = parseBP;
1
+ /// <reference types="@qualweb/types" />
2
+ import { CommandLineOptions } from 'command-line-args';
3
+ import { QualwebOptions } from '@qualweb/core';
4
+ declare function parseBP(mainOptions: CommandLineOptions, options: QualwebOptions): Promise<void>;
5
+ export = parseBP;
6
6
  //# sourceMappingURL=bpParser.d.ts.map
@@ -1,53 +1,53 @@
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 parseBP(mainOptions, options) {
9
- options['best-practices'] = {};
10
- await validateBestPractices(mainOptions, options);
11
- validateBPExclusions(mainOptions, options);
12
- if (Object.keys(options['best-practices']).length === 0) {
13
- delete options['best-practices'];
14
- }
15
- }
16
- function validateModule(mainOptions, options) {
17
- var _a;
18
- if (mainOptions.module && ((_a = options === null || options === void 0 ? void 0 : options.execute) === null || _a === void 0 ? void 0 : _a.act) === undefined) {
19
- parserUtils_1.printError('The "--best-practices" option doesn\'t match any of the modules selected.');
20
- }
21
- else {
22
- console.warn('Warning: Module bp has options but is not select. Will be select automatically.');
23
- set_value_1.default(options, 'execute.bp', true);
24
- }
25
- }
26
- async function validateBestPractices(mainOptions, options) {
27
- var _a;
28
- if (mainOptions['best-practices'] && options['best-practices']) {
29
- validateModule(mainOptions, options);
30
- if (mainOptions['best-practices'].length === 1) {
31
- if (await fileUtils_1.fileExists(mainOptions['best-practices'][0])) {
32
- const bps = await fileUtils_1.readJsonFile(mainOptions['best-practices'][0]);
33
- options['best-practices'].bestPractices = [...((_a = bps['best-practices'].bestPractices) !== null && _a !== void 0 ? _a : [])];
34
- }
35
- else {
36
- options['best-practices'].bestPractices = [...mainOptions['best-practices']];
37
- }
38
- }
39
- else {
40
- options['best-practices'].bestPractices = [...mainOptions['best-practices']];
41
- }
42
- parserUtils_1.validateBP(options['best-practices'].bestPractices);
43
- }
44
- }
45
- function validateBPExclusions(mainOptions, options) {
46
- if (mainOptions['exclude-bp'] && options['best-practices']) {
47
- validateModule(mainOptions, options);
48
- options['best-practices'].exclude = [...mainOptions['exclude-bp']];
49
- parserUtils_1.validateBP(options['best-practices'].exclude);
50
- }
51
- }
52
- module.exports = parseBP;
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 parseBP(mainOptions, options) {
9
+ options['best-practices'] = {};
10
+ await validateBestPractices(mainOptions, options);
11
+ validateBPExclusions(mainOptions, options);
12
+ if (Object.keys(options['best-practices']).length === 0) {
13
+ delete options['best-practices'];
14
+ }
15
+ }
16
+ function validateModule(mainOptions, options) {
17
+ var _a;
18
+ if (mainOptions.module && ((_a = options === null || options === void 0 ? void 0 : options.execute) === null || _a === void 0 ? void 0 : _a.act) === undefined) {
19
+ (0, parserUtils_1.printError)('The "--best-practices" option doesn\'t match any of the modules selected.');
20
+ }
21
+ else {
22
+ console.warn('Warning: Module bp has options but is not select. Will be select automatically.');
23
+ (0, set_value_1.default)(options, 'execute.bp', true);
24
+ }
25
+ }
26
+ async function validateBestPractices(mainOptions, options) {
27
+ var _a;
28
+ if (mainOptions['best-practices'] && options['best-practices']) {
29
+ validateModule(mainOptions, options);
30
+ if (mainOptions['best-practices'].length === 1) {
31
+ if (await (0, fileUtils_1.fileExists)(mainOptions['best-practices'][0])) {
32
+ const bps = await (0, fileUtils_1.readJsonFile)(mainOptions['best-practices'][0]);
33
+ options['best-practices'].bestPractices = [...((_a = bps['best-practices'].bestPractices) !== null && _a !== void 0 ? _a : [])];
34
+ }
35
+ else {
36
+ options['best-practices'].bestPractices = [...mainOptions['best-practices']];
37
+ }
38
+ }
39
+ else {
40
+ options['best-practices'].bestPractices = [...mainOptions['best-practices']];
41
+ }
42
+ (0, parserUtils_1.validateBP)(options['best-practices'].bestPractices);
43
+ }
44
+ }
45
+ function validateBPExclusions(mainOptions, options) {
46
+ if (mainOptions['exclude-bp'] && options['best-practices']) {
47
+ validateModule(mainOptions, options);
48
+ options['best-practices'].exclude = [...mainOptions['exclude-bp']];
49
+ (0, parserUtils_1.validateBP)(options['best-practices'].exclude);
50
+ }
51
+ }
52
+ module.exports = parseBP;
53
53
  //# sourceMappingURL=bpParser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bpParser.js","sourceRoot":"","sources":["../../src/lib/bpParser.ts"],"names":[],"mappings":";;;;AAAA,+CAAuD;AACvD,2CAAmE;AAGnE,0DAAiC;AAEjC,KAAK,UAAU,OAAO,CAAC,WAA+B,EAAE,OAAuB;IAC7E,OAAO,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC;IAE/B,MAAM,qBAAqB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAClD,oBAAoB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAE3C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QACvD,OAAO,OAAO,CAAC,gBAAgB,CAAC,CAAC;KAClC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,WAA+B,EAAE,OAAuB;;IAC9E,IAAI,WAAW,CAAC,MAAM,IAAI,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,GAAG,MAAK,SAAS,EAAE;QAC7D,wBAAU,CAAC,2EAA2E,CAAC,CAAC;KACzF;SAAM;QACL,OAAO,CAAC,IAAI,CAAC,iFAAiF,CAAC,CAAC;QAChG,mBAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;KACvC;AACH,CAAC;AAED,KAAK,UAAU,qBAAqB,CAAC,WAA+B,EAAE,OAAuB;;IAC3F,IAAI,WAAW,CAAC,gBAAgB,CAAC,IAAI,OA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,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC7E,OAAO,CAAC,gBAAgB,CAAC,CAAC,aAAa,GAAG,CAAC,GAAG,CAAC,MAAA,GAAG,CAAC,gBAAgB,CAAC,CAAC,aAAa,mCAAI,EAAE,CAAC,CAAC,CAAC;aAC5F;iBAAM;gBACL,OAAO,CAAC,gBAAgB,CAAC,CAAC,aAAa,GAAG,CAAC,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;aAC9E;SACF;aAAM;YACL,OAAO,CAAC,gBAAgB,CAAC,CAAC,aAAa,GAAG,CAAC,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;SAC9E;QAED,IAAA,wBAAU,EAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,aAAa,CAAC,CAAC;KACrD;AACH,CAAC;AAED,SAAS,oBAAoB,CAAC,WAA+B,EAAE,OAAuB;IACpF,IAAI,WAAW,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,gBAAgB,CAAC,EAAE;QAC1D,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACrC,OAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,GAAG,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QACnE,IAAA,wBAAU,EAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC;KAC/C;AACH,CAAC;AAED,iBAAS,OAAO,CAAC"}
@@ -1,20 +1,24 @@
1
- /// <reference types="@qualweb/types" />
2
- import { ACTROptions } from '@qualweb/act-rules';
3
- import { BPOptions } from '@qualweb/best-practices';
4
- import { EvaluationReport } from '@qualweb/core';
5
- import { EarlReport } from '@qualweb/earl-reporter';
6
- import { WCAGOptions } from '@qualweb/wcag-techniques';
7
- interface ACTRJsonFile {
8
- 'act-rules': ACTROptions;
9
- }
10
- interface WCAGTJsonFile {
11
- 'wcag-techniques': WCAGOptions;
12
- }
13
- interface BPJsonFile {
14
- 'best-practices': BPOptions;
15
- }
16
- declare function saveReport(name: string, report: EvaluationReport | EarlReport, overrideName?: boolean): Promise<void>;
17
- declare function readJsonFile(filePath: string): Promise<ACTRJsonFile | WCAGTJsonFile | BPJsonFile>;
18
- declare function fileExists(filePath: string): Promise<boolean>;
19
- export { ACTRJsonFile, WCAGTJsonFile, BPJsonFile, readJsonFile, saveReport, fileExists };
1
+ /// <reference types="@qualweb/types" />
2
+ /// <reference types="@qualweb/types" />
3
+ /// <reference types="@qualweb/types" />
4
+ /// <reference types="@qualweb/types" />
5
+ /// <reference types="@qualweb/types" />
6
+ import { ACTROptions } from '@qualweb/act-rules';
7
+ import { BPOptions } from '@qualweb/best-practices';
8
+ import { EvaluationReport } from '@qualweb/core';
9
+ import { EarlReport } from '@qualweb/earl-reporter';
10
+ import { WCAGOptions } from '@qualweb/wcag-techniques';
11
+ interface ACTRJsonFile {
12
+ 'act-rules': ACTROptions;
13
+ }
14
+ interface WCAGTJsonFile {
15
+ 'wcag-techniques': WCAGOptions;
16
+ }
17
+ interface BPJsonFile {
18
+ 'best-practices': BPOptions;
19
+ }
20
+ declare function saveReport(name: string, report: EvaluationReport | EarlReport, overrideName?: boolean): Promise<void>;
21
+ declare function readJsonFile(filePath: string): Promise<ACTRJsonFile | WCAGTJsonFile | BPJsonFile>;
22
+ declare function fileExists(filePath: string): Promise<boolean>;
23
+ export { ACTRJsonFile, WCAGTJsonFile, BPJsonFile, readJsonFile, saveReport, fileExists };
20
24
  //# sourceMappingURL=fileUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fileUtils.d.ts","sourceRoot":"","sources":["../../src/lib/fileUtils.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CA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AAE,YAAY,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAKlH;AAED,iBAAS,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,aAAa,GAAG,UAAU,CAAC,CAO1F;AAED,iBAAS,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUtD;AAED,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC"}
@@ -1,48 +1,48 @@
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.fileExists = exports.saveReport = exports.readJsonFile = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- function writeFile(file, data) {
9
- return new Promise((resolve, reject) => {
10
- fs_1.default.writeFile(file, data, (err) => {
11
- if (err)
12
- reject(err);
13
- else
14
- resolve();
15
- });
16
- });
17
- }
18
- async function saveReport(name, report, overrideName = false) {
19
- const path = process.cwd();
20
- const filename = overrideName ? name : `${encodeURIComponent(name)}_${new Date().getTime()}.json`;
21
- await writeFile(`${path}/${filename}`, JSON.stringify(report, null, 2));
22
- }
23
- exports.saveReport = saveReport;
24
- function readJsonFile(filePath) {
25
- return new Promise((resolve, reject) => {
26
- fs_1.default.readFile(filePath, (err, data) => {
27
- if (err)
28
- reject(err);
29
- else
30
- resolve(JSON.parse(data.toString()));
31
- });
32
- });
33
- }
34
- exports.readJsonFile = readJsonFile;
35
- function fileExists(filePath) {
36
- return new Promise((resolve) => {
37
- try {
38
- fs_1.default.access(filePath, () => {
39
- resolve(true);
40
- });
41
- }
42
- catch (err) {
43
- resolve(false);
44
- }
45
- });
46
- }
47
- exports.fileExists = fileExists;
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.fileExists = exports.saveReport = exports.readJsonFile = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ function writeFile(file, data) {
9
+ return new Promise((resolve, reject) => {
10
+ fs_1.default.writeFile(file, data, (err) => {
11
+ if (err)
12
+ reject(err);
13
+ else
14
+ resolve();
15
+ });
16
+ });
17
+ }
18
+ async function saveReport(name, report, overrideName = false) {
19
+ const path = process.cwd();
20
+ const filename = overrideName ? name : `${encodeURIComponent(name)}_${new Date().getTime()}.json`;
21
+ await writeFile(`${path}/${filename}`, JSON.stringify(report, null, 2));
22
+ }
23
+ exports.saveReport = saveReport;
24
+ function readJsonFile(filePath) {
25
+ return new Promise((resolve, reject) => {
26
+ fs_1.default.readFile(filePath, (err, data) => {
27
+ if (err)
28
+ reject(err);
29
+ else
30
+ resolve(JSON.parse(data.toString()));
31
+ });
32
+ });
33
+ }
34
+ exports.readJsonFile = readJsonFile;
35
+ function fileExists(filePath) {
36
+ return new Promise((resolve) => {
37
+ try {
38
+ fs_1.default.access(filePath, () => {
39
+ resolve(true);
40
+ });
41
+ }
42
+ catch (err) {
43
+ resolve(false);
44
+ }
45
+ });
46
+ }
47
+ exports.fileExists = fileExists;
48
48
  //# sourceMappingURL=fileUtils.js.map
@@ -1,156 +1,156 @@
1
- declare const strings: {};
2
- declare const modules: string[];
3
- declare const reports: string[];
4
- declare const actRules: string[];
5
- declare const wcagTechniques: string[];
6
- declare const bps: string[];
7
- declare const levels: string[];
8
- declare const principles: string[];
9
- declare const sections: ({
10
- content: string;
11
- raw: boolean;
12
- header?: undefined;
13
- optionList?: undefined;
14
- } | {
15
- header: string;
16
- content: string;
17
- raw?: undefined;
18
- optionList?: undefined;
19
- } | {
20
- header: string;
21
- content: string[];
22
- raw?: undefined;
23
- optionList?: undefined;
24
- } | {
25
- header: string;
26
- optionList: ({
27
- name: string;
28
- alias: string;
29
- type: StringConstructor;
30
- typeLabel: string;
31
- description: string;
32
- multiple?: undefined;
33
- } | {
34
- name: string;
35
- alias: string;
36
- type: StringConstructor;
37
- multiple: boolean;
38
- typeLabel: string;
39
- description: string;
40
- } | {
41
- name: string;
42
- alias: string;
43
- type: NumberConstructor;
44
- typeLabel: string;
45
- description: string;
46
- multiple?: undefined;
47
- } | {
48
- name: string;
49
- alias: string;
50
- description: string;
51
- type: BooleanConstructor;
52
- typeLabel?: undefined;
53
- multiple?: undefined;
54
- })[];
55
- content?: undefined;
56
- raw?: undefined;
57
- } | {
58
- header: string;
59
- optionList: ({
60
- name: string;
61
- alias: string;
62
- description: string;
63
- type: BooleanConstructor;
64
- typeLabel?: undefined;
65
- } | {
66
- name: string;
67
- description: string;
68
- type: BooleanConstructor;
69
- alias?: undefined;
70
- typeLabel?: undefined;
71
- } | {
72
- name: string;
73
- description: string;
74
- typeLabel: string;
75
- type: StringConstructor;
76
- alias?: undefined;
77
- } | {
78
- name: string;
79
- description: string;
80
- typeLabel: string;
81
- type: BooleanConstructor;
82
- alias?: undefined;
83
- } | {
84
- name: string;
85
- description: string;
86
- type: NumberConstructor;
87
- alias?: undefined;
88
- typeLabel?: undefined;
89
- })[];
90
- content?: undefined;
91
- raw?: undefined;
92
- } | {
93
- header: string;
94
- optionList: {
95
- name: string;
96
- typeLabel: string;
97
- type: StringConstructor;
98
- multiple: boolean;
99
- description: string;
100
- }[];
101
- content?: undefined;
102
- raw?: undefined;
103
- })[];
104
- declare const optionList: ({
105
- name: string;
106
- alias: string;
107
- description: string;
108
- type: BooleanConstructor;
109
- typeLabel?: undefined;
110
- } | {
111
- name: string;
112
- description: string;
113
- type: BooleanConstructor;
114
- alias?: undefined;
115
- typeLabel?: undefined;
116
- } | {
117
- name: string;
118
- description: string;
119
- typeLabel: string;
120
- type: StringConstructor;
121
- alias?: undefined;
122
- } | {
123
- name: string;
124
- description: string;
125
- typeLabel: string;
126
- type: BooleanConstructor;
127
- alias?: undefined;
128
- } | {
129
- name: string;
130
- description: string;
131
- type: NumberConstructor;
132
- alias?: undefined;
133
- typeLabel?: undefined;
134
- } | {
135
- name: string;
136
- typeLabel: string;
137
- type: StringConstructor;
138
- multiple: boolean;
139
- description: string;
140
- } | {
141
- name: string;
142
- alias: string;
143
- type: StringConstructor;
144
- typeLabel: string;
145
- description: string;
146
- multiple?: undefined;
147
- } | {
148
- name: string;
149
- alias: string;
150
- type: NumberConstructor;
151
- typeLabel: string;
152
- description: string;
153
- multiple?: undefined;
154
- })[];
155
- export { optionList, sections, strings, actRules, wcagTechniques, bps, reports, levels, principles, modules };
1
+ declare const strings: {};
2
+ declare const modules: string[];
3
+ declare const reports: string[];
4
+ declare const actRules: string[];
5
+ declare const wcagTechniques: string[];
6
+ declare const bps: string[];
7
+ declare const levels: string[];
8
+ declare const principles: string[];
9
+ declare const sections: ({
10
+ content: string;
11
+ raw: boolean;
12
+ header?: undefined;
13
+ optionList?: undefined;
14
+ } | {
15
+ header: string;
16
+ content: string;
17
+ raw?: undefined;
18
+ optionList?: undefined;
19
+ } | {
20
+ header: string;
21
+ content: string[];
22
+ raw?: undefined;
23
+ optionList?: undefined;
24
+ } | {
25
+ header: string;
26
+ optionList: ({
27
+ name: string;
28
+ alias: string;
29
+ type: StringConstructor;
30
+ typeLabel: string;
31
+ description: string;
32
+ multiple?: undefined;
33
+ } | {
34
+ name: string;
35
+ alias: string;
36
+ type: StringConstructor;
37
+ multiple: boolean;
38
+ typeLabel: string;
39
+ description: string;
40
+ } | {
41
+ name: string;
42
+ alias: string;
43
+ type: NumberConstructor;
44
+ typeLabel: string;
45
+ description: string;
46
+ multiple?: undefined;
47
+ } | {
48
+ name: string;
49
+ alias: string;
50
+ description: string;
51
+ type: BooleanConstructor;
52
+ typeLabel?: undefined;
53
+ multiple?: undefined;
54
+ })[];
55
+ content?: undefined;
56
+ raw?: undefined;
57
+ } | {
58
+ header: string;
59
+ optionList: ({
60
+ name: string;
61
+ alias: string;
62
+ description: string;
63
+ type: BooleanConstructor;
64
+ typeLabel?: undefined;
65
+ } | {
66
+ name: string;
67
+ description: string;
68
+ type: BooleanConstructor;
69
+ alias?: undefined;
70
+ typeLabel?: undefined;
71
+ } | {
72
+ name: string;
73
+ description: string;
74
+ typeLabel: string;
75
+ type: StringConstructor;
76
+ alias?: undefined;
77
+ } | {
78
+ name: string;
79
+ description: string;
80
+ typeLabel: string;
81
+ type: BooleanConstructor;
82
+ alias?: undefined;
83
+ } | {
84
+ name: string;
85
+ description: string;
86
+ type: NumberConstructor;
87
+ alias?: undefined;
88
+ typeLabel?: undefined;
89
+ })[];
90
+ content?: undefined;
91
+ raw?: undefined;
92
+ } | {
93
+ header: string;
94
+ optionList: {
95
+ name: string;
96
+ typeLabel: string;
97
+ type: StringConstructor;
98
+ multiple: boolean;
99
+ description: string;
100
+ }[];
101
+ content?: undefined;
102
+ raw?: undefined;
103
+ })[];
104
+ declare const optionList: ({
105
+ name: string;
106
+ alias: string;
107
+ description: string;
108
+ type: BooleanConstructor;
109
+ typeLabel?: undefined;
110
+ } | {
111
+ name: string;
112
+ description: string;
113
+ type: BooleanConstructor;
114
+ alias?: undefined;
115
+ typeLabel?: undefined;
116
+ } | {
117
+ name: string;
118
+ description: string;
119
+ typeLabel: string;
120
+ type: StringConstructor;
121
+ alias?: undefined;
122
+ } | {
123
+ name: string;
124
+ description: string;
125
+ typeLabel: string;
126
+ type: BooleanConstructor;
127
+ alias?: undefined;
128
+ } | {
129
+ name: string;
130
+ description: string;
131
+ type: NumberConstructor;
132
+ alias?: undefined;
133
+ typeLabel?: undefined;
134
+ } | {
135
+ name: string;
136
+ typeLabel: string;
137
+ type: StringConstructor;
138
+ multiple: boolean;
139
+ description: string;
140
+ } | {
141
+ name: string;
142
+ alias: string;
143
+ type: StringConstructor;
144
+ typeLabel: string;
145
+ description: string;
146
+ multiple?: undefined;
147
+ } | {
148
+ name: string;
149
+ alias: string;
150
+ type: NumberConstructor;
151
+ typeLabel: string;
152
+ description: string;
153
+ multiple?: undefined;
154
+ })[];
155
+ export { optionList, sections, strings, actRules, wcagTechniques, bps, reports, levels, principles, modules };
156
156
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/lib/options.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,OAAO,IAAK,CAAC;AACnB,QAAA,MAAM,OAAO,UAAwD,CAAC;AACtE,QAAA,MAAM,OAAO,UAAqB,CAAC;AACnC,QAAA,MAAM,QAAQ,UAAuD,CAAC;AACtE,QAAA,MAAM,cAAc,UAiCnB,CAAC;AACF,QAAA,MAAM,GAAG,UAgBR,CAAC;AACF,QAAA,MAAM,MAAM,UAAqB,CAAC;AAClC,QAAA,MAAM,UAAU,UAA0D,CAAC;AA6L3E,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+Bb,CAAC;AAEF,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA8C,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/lib/options.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,OAAO,IAAK,CAAC;AACnB,QAAA,MAAM,OAAO,UAA4D,CAAC;AAC1E,QAAA,MAAM,OAAO,UAAqB,CAAC;AACnC,QAAA,MAAM,QAAQ,UAAuD,CAAC;AACtE,QAAA,MAAM,cAAc,UAiCnB,CAAC;AACF,QAAA,MAAM,GAAG,UAgBR,CAAC;AACF,QAAA,MAAM,MAAM,UAAqB,CAAC;AAClC,QAAA,MAAM,UAAU,UAA0D,CAAC;AA6L3E,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