forked from paulhiggs/dvb-i-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalidate-sl.js
24 lines (17 loc) · 827 Bytes
/
validate-sl.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
import chalk from "chalk";
// command line arguments - https://github.com/75lb/command-line-args
import commandLineArgs from "command-line-args";
import { HTTPPort } from "./globals.js";
import validator from "./Validator.js";
// parse command line options
const optionDefinitions = [
{ name: "urls", alias: "u", type: Boolean, defaultValue: false },
{ name: "port", alias: "p", type: Number, defaultValue: HTTPPort.sl },
{ name: "sport", alias: "s", type: Number, defaultValue: HTTPPort.sl + 1 },
];
const options = commandLineArgs(optionDefinitions);
console.log(`this application is deprecated! use ${chalk.green(`"all-in-one --nocsr --nocg${options.urls ? " --urls" : ""} --port ${options.port} --sport ${options.sport}"`)}`);
options.nocsr = true;
options.nosl = false;
options.nocg = true;
validator(options);