-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
executable file
·42 lines (35 loc) · 1.58 KB
/
index.js
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
#! /usr/bin/env node
const { restore } = require('./utils/restore-utils');
const { runTests } = require('./utils/batch-test-runner');
const { findVariations, computeVariations } = require('./utils/find-variations/index.js');
if (require?.main === module) {
const { program } = require('commander');
program.name('reso-certification-utils').description('Command line batch-testing and restore utils').version('0.0.3');
program
.command('restore')
.option('-p, --pathToResults <string>', 'Path to test results')
.option('-u, --url <string>', 'URL of Certification API')
.description('Restores local or S3 results to a RESO Certification API instance')
.action(restore);
program
.command('runDDTests')
.requiredOption('-p, --pathToConfigFile <string>', 'Path to config file')
.option('-a, --runAvailability', 'Flag to run data availability tests, otherwise only metadata tests are run')
.description('Runs Data Dictionary tests')
.action(runTests);
program
.command('findVariations')
.requiredOption('-p, --pathToMetadataReportJson <string>', 'Path to metadata-report.json file')
.option('-f, --fuzziness <float>', 'Set fuzziness to something besides the default')
.option('-v, --version <string>', 'Data Dictionary version to compare to, i.e. 1.7 or 2.0')
.option('-d, --debug', 'Pass to see extra debugging information')
.description('Finds possible variations in metadata using a number of methods.')
.action(findVariations);
program.parse();
}
module.exports = {
restore,
runTests,
findVariations,
computeVariations
};