Convert from minimist to yargs

yargs
gardenapple 4 years ago
parent 2288a94f02
commit ed2803d107
No known key found for this signature in database
GPG Key ID: CAF17E9ABE789268

@ -19,7 +19,7 @@ Firefox Reader Mode in your terminal! CLI tool for Mozilla's Readability library
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
const parseArgs = require("minimist"); //const parseArgs = require("minimist");
//JSDOM, fs, Readability, and Readability-readerable are loaded on-demand. //JSDOM, fs, Readability, and Readability-readerable are loaded on-demand.
//To-do: lazy loading? //To-do: lazy loading?
@ -38,93 +38,244 @@ function setErrored(exitCode) {
errored = true; errored = true;
} }
function printUsage() { //function printUsage() {
console.error(` // console.error(`
Usage: //Usage:
readable [SOURCE] [options] // readable [SOURCE] [options]
readable [options] -- [SOURCE] // readable [options] -- [SOURCE]
(where SOURCE is a file, an http(s) URL, or '-' for standard input) // (where SOURCE is a file, an http(s) URL, or '-' for standard input)
//
Options: //Options:
-h --help Print help // -h --help Print help
-o --output OUTPUT_FILE Output to OUTPUT_FILE // -o --output OUTPUT_FILE Output to OUTPUT_FILE
-p --properties PROPS... Output specific properties of the parsed article // -p --properties PROPS... Output specific properties of the parsed article
-V --version Print version // -V --version Print version
-u --url Set the document URL when parsing standard input or a local file (this affects relative links) // -u --url Set the document URL when parsing standard input or a local file (this affects relative links)
-U --is-url Interpret SOURCE as a URL rather than file name // -U --is-url Interpret SOURCE as a URL rather than file name
-q --quiet Don't output extra information to stderr // -q --quiet Don't output extra information to stderr
-l --low-confidence MODE What to do if Readability.js is uncertain about what the core content actually is // -l --low-confidence MODE What to do if Readability.js is uncertain about what the core content actually is
//
//
The --low-confidence option determines what should be done for documents where Readability can't tell what the core content is: //The --low-confidence option determines what should be done for documents where Readability can't tell what the core content is:
no-op When unsure, don't touch the HTML, output as-is. If the --properties option is used, this will make the program crash. // no-op When unsure, don't touch the HTML, output as-is. If the --properties option is used, this will make the program crash.
force Process the document even when unsure (may produce really bad output). // force Process the document even when unsure (may produce really bad output).
exit When unsure, exit with an error. // exit When unsure, exit with an error.
//
Default value is "no-op". //Default value is "no-op".
//
//
The --properties option accepts a comma-separated list of values (with no spaces in-between). Suitable values are: //The --properties option accepts a comma-separated list of values (with no spaces in-between). Suitable values are:
html-title Outputs the article's title, wrapped in an <h1> tag. // html-title Outputs the article's title, wrapped in an <h1> tag.
title Outputs the title in the format "Title: $TITLE". // title Outputs the title in the format "Title: $TITLE".
excerpt Article description, or short excerpt from the content, in the format "Excerpt: $EXCERPT" // excerpt Article description, or short excerpt from the content, in the format "Excerpt: $EXCERPT"
byline Author metadata, in the format "Author: $AUTHOR" // byline Author metadata, in the format "Author: $AUTHOR"
length Length of the article in characters, in the format "Length: $LENGTH" // length Length of the article in characters, in the format "Length: $LENGTH"
dir Content direction, is either "Direction: ltr" or "Direction: rtl" // dir Content direction, is either "Direction: ltr" or "Direction: rtl"
html-content Outputs the article's main content as HTML. // html-content Outputs the article's main content as HTML.
text-content Outputs the article's main content as plain text. // text-content Outputs the article's main content as plain text.
//
Text-content and Html-content are mutually exclusive, and are always printed last. //Text-content and Html-content are mutually exclusive, and are always printed last.
Default value is "html-title,html-content".`); //Default value is "html-title,html-content".`);
} //}
//const stringArgParams = ['_', "--", "low-confidence", "output", "properties", "url"];
//const boolArgParams = ["quiet", "help", "version", "is-url"];
//const alias = {
// "output": 'o',
// "properties": 'p',
// "version": 'V',
// "url": 'u',
// "is-url": 'U',
// "quiet": 'q',
// "low-confidence": 'l',
// "help": 'h'
//}
//
//let args = parseArgs(process.argv.slice(2), {
// string: stringArgParams,
// boolean: boolArgParams,
// default: {
// "low-confidence": "no-op",
// "quiet": false
// },
// alias: alias,
// "--": true
//});
////backwards compatibility
//
//let shouldSplitNext = false;
//for (var i = 1; i < process.argv.length; i++) {
// const arg = process.argv[i];
// console.log(arg);
// //Turn comma-separated list into space-separated list
// let shouldSplit = false;
//
// if (shouldSplitNext) {
// shouldSplitNext = false;
// shouldSplit = true;
// } else if (arg.startsWith("--properties") || /-\w*p/.test(arg)) {
// shouldSplitNext = true;
// } else if (arg.startsWith("--properties=") || /-\w*p=/.test(arg)) {
// shouldSplit = true;
// }
//
// if (shouldSplit) {
// const split = arg.split(',');
// process.argv.splice(i, 1, ...split);
// }
//}
//console.log("done");
//console.log(process.argv);
//
//Parsing arguments
//
const Properties = {
htmlTitle: "html-title",
title: "title",
excerpt: "excerpt",
byline: "byline",
length: "length",
dir: "dir",
htmlContent: "html-content",
textContent: "text-content"
};
const yargs = require("yargs");
//backwards compat with old, comma-separated values
function yargsCompatProperties(args) {
if (args["properties"]) {
for (var i = 0; i < args["properties"].length; i++) {
const property = args["properties"][i];
console.error(property);
if (property.indexOf(',') > -1) {
const split = args["properties"][i].split(',');
args["properties"].splice(i, 1, ...split);
continue;
}
if (!Object.values(Properties).includes(property)) {
args["properties"].splice(i, 1);
i--;
if (!args["--"])
args["--"] = [ property ];
else
args["--"].push(property);
}
}
}
}
const stringArgParams = ['_', "--", "low-confidence", "output", "properties", "url"]; //Positional arguments sometimes don't get recognized when they're put
const boolArgParams = ["quiet", "help", "version", "is-url"]; //after other arguments, I think it's an oversight in yargs.
const alias = { function yargsFixPositional(args) {
"output": 'o', if (args["-"]) {
"properties": 'p', if (args["source"])
"version": 'V', args["source"] = args["-"];
"url": 'u', else
"is-url": 'U', args["source"].push(...args["-"]);
"quiet": 'q', }
"low-confidence": 'l', if (args["--"]) {
"help": 'h' if (args["source"])
args["source"] = args["--"];
else
args["source"].push(...args["--"]);
delete args["--"];
}
} }
let args = parseArgs(process.argv.slice(2), { let args = yargs
string: stringArgParams, .version(false)
boolean: boolArgParams, .parserConfiguration({
default: { "camel-case-expansion": false
"low-confidence": "no-op", })
"quiet": false .command("* [source]", "Process HTML input", (yargs) => {
}, yargs.positional("source", {
alias: alias, desc: "A file, an http(s) URL, or '-' for standard input",
"--": true type: "string"
}); });
})
.middleware([ yargsCompatProperties, yargsFixPositional ], true) //middleware seems to be buggy
//Minimist's parseArgs accepts a function for handling unknown parameters, .option('c', {
//but it works in a stupid way, so I'm writing my own. alias: "completion"
})
for (var key of Object.keys(args)) { .option('V', {
if (!stringArgParams.includes(key) && !boolArgParams.includes(key) && alias: "version",
!Object.values(alias).includes(key)) { type: "boolean",
console.error(`Unknown argument: ${key}`); desc: "Print version"
setErrored(ExitCodes.badUsageCLI); })
.option('h', {
alias: "help",
desc: "Show help"
})
.option('o', {
alias: "output",
type: "string",
desc: "The file to which the result should be output"
})
.option('l', {
alias: "low-confidence",
type: "string",
desc: "What to do if Readability.js is uncertain about what the core content actually is",
choices: ["no-op", "force", "exit"],
default: "no-op"
})
.option('p', {
alias: "properties",
type: "array",
desc: "Output specific properties of the parsed article",
choices: ["html-title", "title", "excerpt", "byline", "length", "dir", "html-content", "text-content"]
})
.option('q', {
alias: "quiet",
type: "boolean",
desc: "Don't output extra information to stderr",
default: false
})
.wrap(Math.min(yargs.terminalWidth(), 100))
.strict()
//.wrap(yargs.terminalWidth())
.parse();
} else if (stringArgParams.includes(key) && args[key] === "") {
console.error(`Error: no value given for --${key}`);
setErrored(ExitCodes.badUsageCLI);
}
function printUsage() {
yargs.showHelp();
} }
if (errored) {
printUsage(); if (args["completion"]) {
return; yargs.showCompletionScript();
process.exit();
} }
////Minimist's parseArgs accepts a function for handling unknown parameters,
////but it works in a stupid way, so I'm writing my own.
//
//for (var key of Object.keys(args)) {
// if (!stringArgParams.includes(key) && !boolArgParams.includes(key) &&
// !Object.values(alias).includes(key)) {
// console.error(`Unknown argument: ${key}`);
// setErrored(ExitCodes.badUsageCLI);
//
// } else if (stringArgParams.includes(key) && args[key] === "") {
// console.error(`Error: no value given for --${key}`);
// setErrored(ExitCodes.badUsageCLI);
// }
//
//}
//if (errored) {
// printUsage();
// return;
//}
if (args["help"]) { if (args["help"]) {
printUsage(); printUsage();
return; return;
@ -137,13 +288,14 @@ if (args["help"]) {
let inputArg; let inputArg;
const inputCount = args['_'].length + args['--'].length; //const inputCount = args['_'].length + args['--'].length;
if (inputCount > 1) { //if (inputCount > 1) {
console.error("Too many input arguments"); // console.error("Too many input arguments");
printUsage(); // printUsage();
setErrored(ExitCodes.badUsageCLI); // setErrored(ExitCodes.badUsageCLI);
return; // return;
} else if (inputCount == 0) { //} else if (inputCount == 0) {
if (!args["source"]) {
if (process.stdin.isTTY) { if (process.stdin.isTTY) {
console.error("No input provided"); console.error("No input provided");
printUsage(); printUsage();
@ -153,7 +305,8 @@ if (inputCount > 1) {
inputArg = '-' inputArg = '-'
} }
} else { } else {
inputArg = (args['_'].length > 0) ? args['_'][0] : args['--'][0]; // inputArg = (args['_'].length > 0) ? args['_'][0] : args['--'][0];
inputArg = args["source"];
} }
//Get input parameter, remove inputArg from args //Get input parameter, remove inputArg from args
@ -177,16 +330,6 @@ const documentURL = args["url"] || inputURL;
const Properties = {
htmlTitle: "html-title",
title: "title",
excerpt: "excerpt",
byline: "byline",
length: "length",
dir: "dir",
htmlContent: "html-content",
textContent: "text-content"
};
let wantedProperties = []; let wantedProperties = [];
let justOutputHtml = false; let justOutputHtml = false;

192
package-lock.json generated

@ -1,9 +1,14 @@
{ {
"name": "@gardenapple/readability-cli", "name": "@gardenapple/readability-cli",
"version": "1.0.2", "version": "1.1.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@types/color-name": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
},
"abab": { "abab": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz",
@ -39,6 +44,20 @@
"uri-js": "^4.2.2" "uri-js": "^4.2.2"
} }
}, },
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
},
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"asn1": { "asn1": {
"version": "0.2.4", "version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@ -80,11 +99,39 @@
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
"integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==" "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
}, },
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
},
"caseless": { "caseless": {
"version": "0.12.0", "version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
}, },
"cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"requires": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"combined-stream": { "combined-stream": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@ -136,6 +183,11 @@
"whatwg-url": "^8.0.0" "whatwg-url": "^8.0.0"
} }
}, },
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"decimal.js": { "decimal.js": {
"version": "10.2.0", "version": "10.2.0",
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.0.tgz", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.0.tgz",
@ -175,6 +227,11 @@
"safer-buffer": "^2.1.0" "safer-buffer": "^2.1.0"
} }
}, },
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"escodegen": { "escodegen": {
"version": "1.14.3", "version": "1.14.3",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
@ -227,6 +284,15 @@
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
}, },
"find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"requires": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
}
},
"forever-agent": { "forever-agent": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@ -242,6 +308,11 @@
"mime-types": "^2.1.12" "mime-types": "^2.1.12"
} }
}, },
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"getpass": { "getpass": {
"version": "0.1.7", "version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
@ -295,6 +366,11 @@
"resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
"integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=" "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk="
}, },
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"is-potential-custom-element-name": { "is-potential-custom-element-name": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz",
@ -383,6 +459,14 @@
"type-check": "~0.3.2" "type-check": "~0.3.2"
} }
}, },
"locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"requires": {
"p-locate": "^4.1.0"
}
},
"lodash": { "lodash": {
"version": "4.17.19", "version": "4.17.19",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
@ -434,11 +518,37 @@
"word-wrap": "~1.2.3" "word-wrap": "~1.2.3"
} }
}, },
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"requires": {
"p-limit": "^2.2.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"parse5": { "parse5": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
"integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug=="
}, },
"path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
},
"performance-now": { "performance-now": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
@ -535,6 +645,16 @@
} }
} }
}, },
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"safe-buffer": { "safe-buffer": {
"version": "5.2.1", "version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@ -553,6 +673,11 @@
"xmlchars": "^2.2.0" "xmlchars": "^2.2.0"
} }
}, },
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@ -580,6 +705,24 @@
"resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
}, },
"string-width": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
}
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"requires": {
"ansi-regex": "^5.0.0"
}
},
"symbol-tree": { "symbol-tree": {
"version": "3.2.4", "version": "3.2.4",
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
@ -698,11 +841,26 @@
} }
} }
}, },
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"word-wrap": { "word-wrap": {
"version": "1.2.3", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ=="
}, },
"wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
}
},
"ws": { "ws": {
"version": "7.3.1", "version": "7.3.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
@ -717,6 +875,38 @@
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
},
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
},
"yargs": {
"version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"requires": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.2"
}
},
"yargs-parser": {
"version": "18.1.3",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
} }
} }
} }

@ -23,6 +23,7 @@
"dependencies": { "dependencies": {
"jsdom": "^16.3.0", "jsdom": "^16.3.0",
"minimist": "^1.2.5", "minimist": "^1.2.5",
"readability": "github:mozilla/readability#master" "readability": "github:mozilla/readability#master",
"yargs": "^15.4.1"
} }
} }

Loading…
Cancel
Save