diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 623cf103..191f9baa 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -4,9 +4,9 @@ "requires": true, "packages": { "node_modules/@actions/core": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz", - "integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.1.tgz", + "integrity": "sha512-a6d/Nwahm9fliVGRhdhofo40HjHQasUPusmc7vBfyky+7Z+P2A1J68zyFVaNcEclc/Se+eO595oAr5nwEIoIUA==", "license": "MIT", "dependencies": { "@actions/exec": "^3.0.0", @@ -23,13 +23,13 @@ } }, "node_modules/@actions/glob": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.6.1.tgz", - "integrity": "sha512-K4+2Ac5ILcf2ySdJCha+Pop9NcKjxqCL4xL4zI50dgB2PbXgC0+AcP011xfH4Of6b4QEJJg8dyZYv7zl4byTsw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.7.0.tgz", + "integrity": "sha512-+7s3wM+cXapDLmLL1NVWHawqcJOZzXZy2df/VhNn8DnZtS/x83iTCKaUn9F0llur4h3CII0AilvKKH4CMPL8Gw==", "license": "MIT", "dependencies": { "@actions/core": "^3.0.0", - "minimatch": "^3.0.4" + "minimatch": "^10.2.5" } }, "node_modules/@actions/http-client": { @@ -48,265 +48,74 @@ "integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==", "license": "MIT" }, - "node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "license": "ISC", - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "license": "MIT" - }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" + "balanced-match": "^4.0.2" }, "engines": { - "node": ">=6" + "node": "18 || 20 || >=22" } }, - "node_modules/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==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "license": "MIT", "engines": { - "node": ">=4" - } - }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "license": "MIT", - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" + "node": "^12.20.0 || >=14" } }, "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "license": "ISC", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^5.0.5" }, "engines": { - "node": "*" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/nodemailer": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-8.0.2.tgz", - "integrity": "sha512-zbj002pZAIkWQFxyAaqoxvn+zoIwRnS40hgjqTXudKOOJkiFFgBeNqjgD3/YCR12sZnrghWYBY+yP1ZucdDRpw==", + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-8.0.7.tgz", + "integrity": "sha512-pkjE4mkBzQjdJT4/UmlKl3pX0rC9fZmjh7c6C9o7lv66Ac6w9WCnzPzhbPNxwZAzlF4mdq4CSWB5+FbK6FWCow==", "license": "MIT-0", "engines": { "node": ">=6.0.0" } }, - "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/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==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/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==", - "license": "ISC" - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC" - }, "node_modules/showdown": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz", - "integrity": "sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA==", - "license": "BSD-3-Clause", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/showdown/-/showdown-2.1.0.tgz", + "integrity": "sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==", + "license": "MIT", "dependencies": { - "yargs": "^14.2" + "commander": "^9.0.0" }, "bin": { "showdown": "bin/showdown.js" - } - }, - "node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" }, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" + "funding": { + "type": "individual", + "url": "https://www.paypal.me/tiviesantos" } }, "node_modules/tunnel": { @@ -326,61 +135,6 @@ "engines": { "node": ">=18.17" } - }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "license": "ISC" - }, - "node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "license": "ISC" - }, - "node_modules/yargs": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", - "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", - "license": "MIT", - "dependencies": { - "cliui": "^5.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.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": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^15.0.1" - } - }, - "node_modules/yargs-parser": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.3.tgz", - "integrity": "sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } } diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index 3088d9d7..01f93cd7 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,6 +1,6 @@ { "name": "@actions/core", - "version": "3.0.0", + "version": "3.0.1", "description": "Actions core lib", "keywords": [ "github", diff --git a/node_modules/@actions/glob/lib/internal-pattern.js b/node_modules/@actions/glob/lib/internal-pattern.js index 0b68b545..f5354dd5 100644 --- a/node_modules/@actions/glob/lib/internal-pattern.js +++ b/node_modules/@actions/glob/lib/internal-pattern.js @@ -2,10 +2,9 @@ import * as os from 'os'; import * as path from 'path'; import * as pathHelper from './internal-path-helper.js'; import assert from 'assert'; -import minimatch from 'minimatch'; +import { Minimatch } from 'minimatch'; import { MatchKind } from './internal-match-kind.js'; import { Path } from './internal-path.js'; -const { Minimatch } = minimatch; const IS_WINDOWS = process.platform === 'win32'; export class Pattern { constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) { diff --git a/node_modules/@actions/glob/lib/internal-pattern.js.map b/node_modules/@actions/glob/lib/internal-pattern.js.map index b8a7909f..4e0da435 100644 --- a/node_modules/@actions/glob/lib/internal-pattern.js.map +++ b/node_modules/@actions/glob/lib/internal-pattern.js.map @@ -1 +1 @@ -{"version":3,"file":"internal-pattern.js","sourceRoot":"","sources":["../src/internal-pattern.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,KAAK,UAAU,MAAM,2BAA2B,CAAA;AACvD,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,SAAS,MAAM,WAAW,CAAA;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAA;AAIvC,MAAM,EAAC,SAAS,EAAC,GAAG,SAAS,CAAA;AAE7B,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C,MAAM,OAAO,OAAO;IAqDlB,YACE,eAAiC,EACjC,iBAAiB,GAAG,KAAK,EACzB,QAAmB,EACnB,OAAgB;QAxDlB;;WAEG;QACM,WAAM,GAAY,KAAK,CAAA;QAuD9B,mBAAmB;QACnB,IAAI,OAAe,CAAA;QACnB,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE,CAAC;YACxC,OAAO,GAAG,eAAe,CAAC,IAAI,EAAE,CAAA;QAClC,CAAC;QACD,oBAAoB;aACf,CAAC;YACJ,qBAAqB;YACrB,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAA;YACzB,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,qCAAqC,CAAC,CAAA;YAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;YAC5C,MAAM,CACJ,IAAI,IAAI,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,EACxC,wDAAwD,CACzD,CAAA;YACD,OAAO,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAA;YAC9C,IAAI,eAAe,EAAE,CAAC;gBACpB,OAAO,GAAG,IAAI,OAAO,EAAE,CAAA;YACzB,CAAC;QACH,CAAC;QAED,SAAS;QACT,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAA;YAC1B,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACpC,CAAC;QAED,8CAA8C;QAC9C,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAEhD,WAAW;QACX,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAA;QAE1C,wFAAwF;QACxF,IAAI,CAAC,iBAAiB,GAAG,UAAU;aAChC,mBAAmB,CAAC,OAAO,CAAC;aAC5B,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACrB,OAAO,GAAG,UAAU,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAA;QAEvD,6DAA6D;QAC7D,IAAI,SAAS,GAAG,KAAK,CAAA;QACrB,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ;aACjC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;aAC/B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACrD,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAA;QAErD,wDAAwD;QACxD,IAAI,CAAC,UAAU,GAAG,IAAI,MAAM,CAC1B,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EACvC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CACtB,CAAA;QAED,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;QAE1C,mBAAmB;QACnB,MAAM,gBAAgB,GAAsB;YAC1C,GAAG,EAAE,IAAI;YACT,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,UAAU;YAClB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,IAAI;SACf,CAAA;QACD,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;QAC5D,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAA;IAC3D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAgB;QACpB,4BAA4B;QAC5B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACrD,oBAAoB;YACpB,QAAQ,GAAG,UAAU,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAA;YAEnD,wFAAwF;YACxF,sFAAsF;YACtF,+FAA+F;YAC/F,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,iBAAiB,KAAK,KAAK,EAAE,CAAC;gBACrE,uFAAuF;gBACvF,sFAAsF;gBACtF,QAAQ,GAAG,GAAG,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YACrC,CAAC;QACH,CAAC;aAAM,CAAC;YACN,wDAAwD;YACxD,QAAQ,GAAG,UAAU,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAA;QAC3D,CAAC;QAED,QAAQ;QACR,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAA;QACrE,CAAC;QAED,OAAO,SAAS,CAAC,IAAI,CAAA;IACvB,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,QAAgB;QAC3B,wDAAwD;QACxD,QAAQ,GAAG,UAAU,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAA;QAEzD,+CAA+C;QAC/C,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC9C,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACvC,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAC5B,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EACrB,IAAI,CACL,CAAA;IACH,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,CAAS;QACzB,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,4BAA4B;aAC5E,OAAO,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC,sDAAsD;aACzF,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,aAAa;aACnC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA,CAAC,aAAa;IACxC,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,YAAY,CAAC,OAAe,EAAE,OAAgB;QAC3D,QAAQ;QACR,MAAM,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAA;QAE1C,qDAAqD;QACrD,gCAAgC;QAChC,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CACzD,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CACtB,CAAA;QACD,MAAM,CACJ,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,EACrE,oBAAoB,OAAO,kDAAkD,CAC9E,CAAA;QAED,kEAAkE;QAClE,MAAM,CACJ,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,EAClD,oBAAoB,OAAO,yCAAyC,CACrE,CAAA;QAED,oBAAoB;QACpB,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAA;QAEjD,8BAA8B;QAC9B,IAAI,OAAO,KAAK,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;YAC1D,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACjE,CAAC;QACD,8BAA8B;aACzB,IAAI,OAAO,KAAK,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;YAC/D,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YACjC,MAAM,CAAC,OAAO,EAAE,oCAAoC,CAAC,CAAA;YACrD,MAAM,CACJ,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,EACnC,wDAAwD,OAAO,GAAG,CACnE,CAAA;YACD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAC3D,CAAC;QACD,2DAA2D;aACtD,IACH,UAAU;YACV,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,EAC9D,CAAC;YACD,IAAI,IAAI,GAAG,UAAU,CAAC,kBAAkB,CACtC,gBAAgB,EAChB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CACrB,CAAA;YACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/C,IAAI,IAAI,IAAI,CAAA;YACd,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACxD,CAAC;QACD,mDAAmD;aAC9C,IAAI,UAAU,IAAI,CAAC,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;YACvE,IAAI,IAAI,GAAG,UAAU,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;YAChE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,IAAI,IAAI,IAAI,CAAA;YACd,CAAC;YACD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACxD,CAAC;QACD,iCAAiC;aAC5B,CAAC;YACJ,OAAO,GAAG,UAAU,CAAC,kBAAkB,CACrC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EACjC,OAAO,CACR,CAAA;QACH,CAAC;QAED,OAAO,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAA;IAChD,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,UAAU,CAAC,OAAe;QACvC,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;YACpB,SAAS;YACT,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;gBACxD,OAAO,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;gBACvB,SAAQ;YACV,CAAC;YACD,WAAW;iBACN,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBAChC,OAAO,EAAE,CAAA;YACX,CAAC;YACD,gBAAgB;iBACX,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;gBAC7C,IAAI,GAAG,GAAG,EAAE,CAAA;gBACZ,IAAI,MAAM,GAAG,CAAC,CAAC,CAAA;gBACf,KAAK,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC;oBAC/C,MAAM,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAAA;oBACtB,SAAS;oBACT,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;wBAC1D,GAAG,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;wBACpB,SAAQ;oBACV,CAAC;oBACD,SAAS;yBACJ,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;wBACpB,MAAM,GAAG,EAAE,CAAA;wBACX,MAAK;oBACP,CAAC;oBACD,YAAY;yBACP,CAAC;wBACJ,GAAG,IAAI,EAAE,CAAA;oBACX,CAAC;gBACH,CAAC;gBAED,UAAU;gBACV,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;oBAChB,iBAAiB;oBACjB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACnB,OAAO,EAAE,CAAA;oBACX,CAAC;oBAED,qBAAqB;oBACrB,IAAI,GAAG,EAAE,CAAC;wBACR,OAAO,IAAI,GAAG,CAAA;wBACd,CAAC,GAAG,MAAM,CAAA;wBACV,SAAQ;oBACV,CAAC;gBACH,CAAC;gBAED,sBAAsB;YACxB,CAAC;YAED,SAAS;YACT,OAAO,IAAI,CAAC,CAAA;QACd,CAAC;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;IAED;;;OAGG;IACK,MAAM,CAAC,YAAY,CAAC,CAAS;QACnC,OAAO,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;IAC7C,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"internal-pattern.js","sourceRoot":"","sources":["../src/internal-pattern.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/node_modules/@actions/glob/package.json b/node_modules/@actions/glob/package.json index 81b58f8f..7e2f9401 100644 --- a/node_modules/@actions/glob/package.json +++ b/node_modules/@actions/glob/package.json @@ -1,6 +1,6 @@ { "name": "@actions/glob", - "version": "0.6.1", + "version": "0.7.0", "preview": true, "description": "Actions glob lib", "keywords": [ @@ -45,6 +45,6 @@ }, "dependencies": { "@actions/core": "^3.0.0", - "minimatch": "^3.0.4" + "minimatch": "^10.2.5" } } diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js deleted file mode 100644 index 9e37ec3d..00000000 --- a/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -module.exports = options => { - options = Object.assign({ - onlyFirst: false - }, options); - - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); -}; diff --git a/node_modules/ansi-regex/license b/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json deleted file mode 100644 index 66a43e1f..00000000 --- a/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "ansi-regex", - "version": "4.1.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^0.25.0", - "xo": "^0.23.0" - } -} diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md deleted file mode 100644 index d19c4466..00000000 --- a/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,87 +0,0 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - - -## Install - -``` -$ npm install ansi-regex -``` - - -## Usage - -```js -const ansiRegex = require('ansi-regex'); - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - - -## API - -### ansiRegex([options]) - -Returns a regex for matching ANSI escape codes. - -#### options - -##### onlyFirst - -Type: `boolean`
-Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/ansi-styles/index.js b/node_modules/ansi-styles/index.js deleted file mode 100644 index 90a871c4..00000000 --- a/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; -const colorConvert = require('color-convert'); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/ansi-styles/package.json b/node_modules/ansi-styles/package.json deleted file mode 100644 index 65edb48c..00000000 --- a/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "3.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^1.9.0" - }, - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" - }, - "ava": { - "require": "babel-polyfill" - } -} diff --git a/node_modules/ansi-styles/readme.md b/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3158e2df..00000000 --- a/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,147 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - - - - -## Install - -``` -$ npm install ansi-styles -``` - - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/balanced-match/.github/FUNDING.yml b/node_modules/balanced-match/.github/FUNDING.yml deleted file mode 100644 index cea8b16e..00000000 --- a/node_modules/balanced-match/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -tidelift: "npm/balanced-match" -patreon: juliangruber diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md index 2cdc8e41..61ece8cc 100644 --- a/node_modules/balanced-match/LICENSE.md +++ b/node_modules/balanced-match/LICENSE.md @@ -1,6 +1,8 @@ (MIT) -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> +Original code Copyright Julian Gruber + +Port to TypeScript Copyright Isaac Z. Schlueter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md index d2a48b6b..f3bb3773 100644 --- a/node_modules/balanced-match/README.md +++ b/node_modules/balanced-match/README.md @@ -1,22 +1,20 @@ # balanced-match -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) +Match balanced string pairs, like `{` and `}` or `` and +``. Supports regular expressions as well! ## Example Get the first matching pair of braces: ```js -var balanced = require('balanced-match'); +import { balanced } from 'balanced-match' -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +console.log(balanced('{', '}', 'pre{in{nested}}post')) +console.log(balanced('{', '}', 'pre{first}between{second}post')) +console.log( + balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'), +) ``` The matches are: @@ -34,22 +32,22 @@ $ node example.js ## API -### var m = balanced(a, b, str) +### const m = balanced(a, b, str) For the first non-nested matching pair of `a` and `b` in `str`, return an object with those keys: -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included +- **start** the index of the first match of `a` +- **end** the index of the matching `b` +- **pre** the preamble, `a` and `b` not included +- **body** the match, `a` and `b` not included +- **post** the postscript, `a` and `b` not included If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. -### var r = balanced.range(a, b, str) +### const r = balanced.range(a, b, str) For the first non-nested matching pair of `a` and `b` in `str`, return an array with indexes: `[ , ]`. @@ -57,41 +55,3 @@ array with indexes: `[ , ]`. If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/balanced-match/dist/commonjs/index.d.ts b/node_modules/balanced-match/dist/commonjs/index.d.ts new file mode 100644 index 00000000..f819cfd0 --- /dev/null +++ b/node_modules/balanced-match/dist/commonjs/index.d.ts @@ -0,0 +1,9 @@ +export declare const balanced: (a: string | RegExp, b: string | RegExp, str: string) => false | { + start: number; + end: number; + pre: string; + body: string; + post: string; +} | undefined; +export declare const range: (a: string, b: string, str: string) => undefined | [number, number]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/balanced-match/dist/commonjs/index.d.ts.map b/node_modules/balanced-match/dist/commonjs/index.d.ts.map new file mode 100644 index 00000000..6306762c --- /dev/null +++ b/node_modules/balanced-match/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,GAAG,MAAM,EAClB,GAAG,MAAM,GAAG,MAAM,EAClB,KAAK,MAAM;;;;;;aAgBZ,CAAA;AAOD,eAAO,MAAM,KAAK,GAChB,GAAG,MAAM,EACT,GAAG,MAAM,EACT,KAAK,MAAM,KACV,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CA2C7B,CAAA"} \ No newline at end of file diff --git a/node_modules/balanced-match/dist/commonjs/index.js b/node_modules/balanced-match/dist/commonjs/index.js new file mode 100644 index 00000000..0c9014ba --- /dev/null +++ b/node_modules/balanced-match/dist/commonjs/index.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.range = exports.balanced = void 0; +const balanced = (a, b, str) => { + const ma = a instanceof RegExp ? maybeMatch(a, str) : a; + const mb = b instanceof RegExp ? maybeMatch(b, str) : b; + const r = ma !== null && mb != null && (0, exports.range)(ma, mb, str); + return (r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + ma.length, r[1]), + post: str.slice(r[1] + mb.length), + }); +}; +exports.balanced = balanced; +const maybeMatch = (reg, str) => { + const m = str.match(reg); + return m ? m[0] : null; +}; +const range = (a, b, str) => { + let begs, beg, left, right = undefined, result; + let ai = str.indexOf(a); + let bi = str.indexOf(b, ai + 1); + let i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i === ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } + else if (begs.length === 1) { + const r = begs.pop(); + if (r !== undefined) + result = [r, bi]; + } + else { + beg = begs.pop(); + if (beg !== undefined && beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length && right !== undefined) { + result = [left, right]; + } + } + return result; +}; +exports.range = range; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/balanced-match/dist/commonjs/index.js.map b/node_modules/balanced-match/dist/commonjs/index.js.map new file mode 100644 index 00000000..83f547ca --- /dev/null +++ b/node_modules/balanced-match/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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","sourcesContent":["export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n"]} \ No newline at end of file diff --git a/node_modules/balanced-match/dist/commonjs/package.json b/node_modules/balanced-match/dist/commonjs/package.json new file mode 100644 index 00000000..5bbefffb --- /dev/null +++ b/node_modules/balanced-match/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/balanced-match/dist/esm/index.d.ts b/node_modules/balanced-match/dist/esm/index.d.ts new file mode 100644 index 00000000..f819cfd0 --- /dev/null +++ b/node_modules/balanced-match/dist/esm/index.d.ts @@ -0,0 +1,9 @@ +export declare const balanced: (a: string | RegExp, b: string | RegExp, str: string) => false | { + start: number; + end: number; + pre: string; + body: string; + post: string; +} | undefined; +export declare const range: (a: string, b: string, str: string) => undefined | [number, number]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/balanced-match/dist/esm/index.d.ts.map b/node_modules/balanced-match/dist/esm/index.d.ts.map new file mode 100644 index 00000000..6306762c --- /dev/null +++ b/node_modules/balanced-match/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,GAAG,MAAM,EAClB,GAAG,MAAM,GAAG,MAAM,EAClB,KAAK,MAAM;;;;;;aAgBZ,CAAA;AAOD,eAAO,MAAM,KAAK,GAChB,GAAG,MAAM,EACT,GAAG,MAAM,EACT,KAAK,MAAM,KACV,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CA2C7B,CAAA"} \ No newline at end of file diff --git a/node_modules/balanced-match/dist/esm/index.js b/node_modules/balanced-match/dist/esm/index.js new file mode 100644 index 00000000..fe81200f --- /dev/null +++ b/node_modules/balanced-match/dist/esm/index.js @@ -0,0 +1,54 @@ +export const balanced = (a, b, str) => { + const ma = a instanceof RegExp ? maybeMatch(a, str) : a; + const mb = b instanceof RegExp ? maybeMatch(b, str) : b; + const r = ma !== null && mb != null && range(ma, mb, str); + return (r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + ma.length, r[1]), + post: str.slice(r[1] + mb.length), + }); +}; +const maybeMatch = (reg, str) => { + const m = str.match(reg); + return m ? m[0] : null; +}; +export const range = (a, b, str) => { + let begs, beg, left, right = undefined, result; + let ai = str.indexOf(a); + let bi = str.indexOf(b, ai + 1); + let i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i === ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } + else if (begs.length === 1) { + const r = begs.pop(); + if (r !== undefined) + result = [r, bi]; + } + else { + beg = begs.pop(); + if (beg !== undefined && beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length && right !== undefined) { + result = [left, right]; + } + } + return result; +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/balanced-match/dist/esm/index.js.map b/node_modules/balanced-match/dist/esm/index.js.map new file mode 100644 index 00000000..b476cae2 --- /dev/null +++ b/node_modules/balanced-match/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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","sourcesContent":["export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n"]} \ No newline at end of file diff --git a/node_modules/balanced-match/dist/esm/package.json b/node_modules/balanced-match/dist/esm/package.json new file mode 100644 index 00000000..3dbc1ca5 --- /dev/null +++ b/node_modules/balanced-match/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js deleted file mode 100644 index c67a6460..00000000 --- a/node_modules/balanced-match/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json index ce6073e0..48f1a638 100644 --- a/node_modules/balanced-match/package.json +++ b/node_modules/balanced-match/package.json @@ -1,20 +1,49 @@ { "name": "balanced-match", "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "1.0.2", + "version": "4.0.4", + "files": [ + "dist" + ], "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "type": "module", "scripts": { - "test": "tape test/test.js", - "bench": "matcha test/bench.js" + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tshy", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "tap", + "snap": "tap", + "format": "prettier --write .", + "benchmark": "node benchmark/index.js", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" }, "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" + "@types/brace-expansion": "^1.1.2", + "@types/node": "^25.2.1", + "mkdirp": "^3.0.1", + "prettier": "^3.3.2", + "tap": "^21.6.2", + "tshy": "^3.0.2", + "typedoc": "^0.28.5" }, "keywords": [ "match", @@ -23,26 +52,17 @@ "balanced", "parse" ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } + "engines": { + "node": "18 || 20 || >=22" + }, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" } diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE index de322667..46e7b75c 100644 --- a/node_modules/brace-expansion/LICENSE +++ b/node_modules/brace-expansion/LICENSE @@ -1,6 +1,8 @@ MIT License -Copyright (c) 2013 Julian Gruber +Copyright Julian Gruber + +TypeScript port Copyright Isaac Z. Schlueter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md index 6b4e0e16..d00b24d5 100644 --- a/node_modules/brace-expansion/README.md +++ b/node_modules/brace-expansion/README.md @@ -1,18 +1,15 @@ # brace-expansion -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), as known from sh/bash, in JavaScript. -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![CI](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml/badge.svg)](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml) [![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) ## Example ```js -var expand = require('brace-expansion'); +import { expand } from 'brace-expansion' expand('file-{a,b,c}.jpg') // => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] @@ -48,25 +45,36 @@ expand('ppp{,config,oe{,conf}}') ## API ```js -var expand = require('brace-expansion'); +import { expand } from 'brace-expansion' ``` -### var expanded = expand(str) +### const expanded = expand(str, [options]) -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. +Return an array of all possible and valid expansions of `str`. If +none are found, `[str]` is returned. + +The `options` object can provide a `max` value to cap the number +of expansions allowed. This is limited to `100_000` by default, +to prevent DoS attacks. + +```js +const expansions = expand('{1..100}'.repeat(5), { + max: 100, +}) +// expansions.length will be 100, not 100^5 +``` Valid expansions are: ```js -/^(.*,)+(.+)?$/ +;/^(.*,)+(.+)?$/ // {a,b,...} ``` A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. ```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ // {x..y[..incr]} ``` @@ -75,7 +83,7 @@ If `x` or `y` start with a leading `0`, all the numbers will be padded to have equal length. Negative numbers and backwards iteration work too. ```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ // {x..y[..incr]} ``` @@ -84,46 +92,3 @@ An alphabetic sequence from `x` to `y` inclusive, with optional increment. number. For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/brace-expansion/dist/commonjs/index.d.ts b/node_modules/brace-expansion/dist/commonjs/index.d.ts new file mode 100644 index 00000000..92b7a7f0 --- /dev/null +++ b/node_modules/brace-expansion/dist/commonjs/index.d.ts @@ -0,0 +1,6 @@ +export declare const EXPANSION_MAX = 100000; +export type BraceExpansionOptions = { + max?: number; +}; +export declare function expand(str: string, options?: BraceExpansionOptions): string[]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/commonjs/index.d.ts.map b/node_modules/brace-expansion/dist/commonjs/index.d.ts.map new file mode 100644 index 00000000..a4f36aed --- /dev/null +++ b/node_modules/brace-expansion/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,SAAU,CAAA;AAwDpC,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,YAkBtE"} \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/commonjs/index.js b/node_modules/brace-expansion/dist/commonjs/index.js new file mode 100644 index 00000000..b9f3c6fd --- /dev/null +++ b/node_modules/brace-expansion/dist/commonjs/index.js @@ -0,0 +1,201 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EXPANSION_MAX = void 0; +exports.expand = expand; +const balanced_match_1 = require("balanced-match"); +const escSlash = '\0SLASH' + Math.random() + '\0'; +const escOpen = '\0OPEN' + Math.random() + '\0'; +const escClose = '\0CLOSE' + Math.random() + '\0'; +const escComma = '\0COMMA' + Math.random() + '\0'; +const escPeriod = '\0PERIOD' + Math.random() + '\0'; +const escSlashPattern = new RegExp(escSlash, 'g'); +const escOpenPattern = new RegExp(escOpen, 'g'); +const escClosePattern = new RegExp(escClose, 'g'); +const escCommaPattern = new RegExp(escComma, 'g'); +const escPeriodPattern = new RegExp(escPeriod, 'g'); +const slashPattern = /\\\\/g; +const openPattern = /\\{/g; +const closePattern = /\\}/g; +const commaPattern = /\\,/g; +const periodPattern = /\\\./g; +exports.EXPANSION_MAX = 100_000; +function numeric(str) { + return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); +} +function escapeBraces(str) { + return str + .replace(slashPattern, escSlash) + .replace(openPattern, escOpen) + .replace(closePattern, escClose) + .replace(commaPattern, escComma) + .replace(periodPattern, escPeriod); +} +function unescapeBraces(str) { + return str + .replace(escSlashPattern, '\\') + .replace(escOpenPattern, '{') + .replace(escClosePattern, '}') + .replace(escCommaPattern, ',') + .replace(escPeriodPattern, '.'); +} +/** + * Basically just str.split(","), but handling cases + * where we have nested braced sections, which should be + * treated as individual members, like {a,{b,c},d} + */ +function parseCommaParts(str) { + if (!str) { + return ['']; + } + const parts = []; + const m = (0, balanced_match_1.balanced)('{', '}', str); + if (!m) { + return str.split(','); + } + const { pre, body, post } = m; + const p = pre.split(','); + p[p.length - 1] += '{' + body + '}'; + const postParts = parseCommaParts(post); + if (post.length) { + ; + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; +} +function expand(str, options = {}) { + if (!str) { + return []; + } + const { max = exports.EXPANSION_MAX } = options; + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.slice(0, 2) === '{}') { + str = '\\{\\}' + str.slice(2); + } + return expand_(escapeBraces(str), max, true).map(unescapeBraces); +} +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} +function expand_(str, max, isTop) { + /** @type {string[]} */ + const expansions = []; + const m = (0, balanced_match_1.balanced)('{', '}', str); + if (!m) + return [str]; + // no need to expand pre, since it is guaranteed to be free of brace-sets + const pre = m.pre; + const post = m.post.length ? expand_(m.post, max, false) : ['']; + if (/\$$/.test(m.pre)) { + for (let k = 0; k < post.length && k < max; k++) { + const expansion = pre + '{' + m.body + '}' + post[k]; + expansions.push(expansion); + } + } + else { + const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + const isSequence = isNumericSequence || isAlphaSequence; + const isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand_(str, max, true); + } + return [str]; + } + let n; + if (isSequence) { + n = m.body.split(/\.\./); + } + else { + n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== undefined) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand_(n[0], max, false).map(embrace); + //XXX is this necessary? Can't seem to hit it in tests. + /* c8 ignore start */ + if (n.length === 1) { + return post.map(p => m.pre + n[0] + p); + } + /* c8 ignore stop */ + } + } + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + let N; + if (isSequence && n[0] !== undefined && n[1] !== undefined) { + const x = numeric(n[0]); + const y = numeric(n[1]); + const width = Math.max(n[0].length, n[1].length); + let incr = n.length === 3 && n[2] !== undefined ? + Math.max(Math.abs(numeric(n[2])), 1) + : 1; + let test = lte; + const reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + const pad = n.some(isPadded); + N = []; + for (let i = x; test(i, y); i += incr) { + let c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') { + c = ''; + } + } + else { + c = String(i); + if (pad) { + const need = width - c.length; + if (need > 0) { + const z = new Array(need + 1).join('0'); + if (i < 0) { + c = '-' + z + c.slice(1); + } + else { + c = z + c; + } + } + } + } + N.push(c); + } + } + else { + N = []; + for (let j = 0; j < n.length; j++) { + N.push.apply(N, expand_(n[j], max, false)); + } + } + for (let j = 0; j < N.length; j++) { + for (let k = 0; k < post.length && expansions.length < max; k++) { + const expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) { + expansions.push(expansion); + } + } + } + } + return expansions; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/commonjs/index.js.map b/node_modules/brace-expansion/dist/commonjs/index.js.map new file mode 100644 index 00000000..c9d15111 --- /dev/null +++ b/node_modules/brace-expansion/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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","sourcesContent":["import { balanced } from 'balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n if (!str) {\n return ['']\n }\n\n const parts: string[] = []\n const m = balanced('{', '}', str)\n\n if (!m) {\n return str.split(',')\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n\n p[p.length - 1] += '{' + body + '}'\n const postParts = parseCommaParts(post)\n if (post.length) {\n ;(p[p.length - 1] as string) += postParts.shift()\n p.push.apply(p, postParts)\n }\n\n parts.push.apply(parts, p)\n\n return parts\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const { max = EXPANSION_MAX } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(escapeBraces(str), max, true).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\nfunction expand_(str: string, max: number, isTop: boolean): string[] {\n /** @type {string[]} */\n const expansions: string[] = []\n\n const m = balanced('{', '}', str)\n if (!m) return [str]\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n const post: string[] = m.post.length ? expand_(m.post, max, false) : ['']\n\n if (/\\$$/.test(m.pre)) {\n for (let k = 0; k < post.length && k < max; k++) {\n const expansion = pre + '{' + m.body + '}' + post[k]\n expansions.push(expansion)\n }\n } else {\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post\n return expand_(str, max, true)\n }\n return [str]\n }\n\n let n: string[]\n if (isSequence) {\n n = m.body.split(/\\.\\./)\n } else {\n n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(n[0], max, false).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n return post.map(p => m.pre + n[0] + p)\n }\n /* c8 ignore stop */\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n let N: string[]\n\n if (isSequence && n[0] !== undefined && n[1] !== undefined) {\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ?\n Math.max(Math.abs(numeric(n[2])), 1)\n : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n N = []\n\n for (let i = x; test(i, y); i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n N.push(c)\n }\n } else {\n N = []\n\n for (let j = 0; j < n.length; j++) {\n N.push.apply(N, expand_(n[j] as string, max, false))\n }\n }\n\n for (let j = 0; j < N.length; j++) {\n for (let k = 0; k < post.length && expansions.length < max; k++) {\n const expansion = pre + N[j] + post[k]\n if (!isTop || isSequence || expansion) {\n expansions.push(expansion)\n }\n }\n }\n }\n\n return expansions\n}\n"]} \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/commonjs/package.json b/node_modules/brace-expansion/dist/commonjs/package.json new file mode 100644 index 00000000..5bbefffb --- /dev/null +++ b/node_modules/brace-expansion/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/brace-expansion/dist/esm/index.d.ts b/node_modules/brace-expansion/dist/esm/index.d.ts new file mode 100644 index 00000000..92b7a7f0 --- /dev/null +++ b/node_modules/brace-expansion/dist/esm/index.d.ts @@ -0,0 +1,6 @@ +export declare const EXPANSION_MAX = 100000; +export type BraceExpansionOptions = { + max?: number; +}; +export declare function expand(str: string, options?: BraceExpansionOptions): string[]; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/esm/index.d.ts.map b/node_modules/brace-expansion/dist/esm/index.d.ts.map new file mode 100644 index 00000000..a4f36aed --- /dev/null +++ b/node_modules/brace-expansion/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,SAAU,CAAA;AAwDpC,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,YAkBtE"} \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/esm/index.js b/node_modules/brace-expansion/dist/esm/index.js new file mode 100644 index 00000000..855e22cd --- /dev/null +++ b/node_modules/brace-expansion/dist/esm/index.js @@ -0,0 +1,197 @@ +import { balanced } from 'balanced-match'; +const escSlash = '\0SLASH' + Math.random() + '\0'; +const escOpen = '\0OPEN' + Math.random() + '\0'; +const escClose = '\0CLOSE' + Math.random() + '\0'; +const escComma = '\0COMMA' + Math.random() + '\0'; +const escPeriod = '\0PERIOD' + Math.random() + '\0'; +const escSlashPattern = new RegExp(escSlash, 'g'); +const escOpenPattern = new RegExp(escOpen, 'g'); +const escClosePattern = new RegExp(escClose, 'g'); +const escCommaPattern = new RegExp(escComma, 'g'); +const escPeriodPattern = new RegExp(escPeriod, 'g'); +const slashPattern = /\\\\/g; +const openPattern = /\\{/g; +const closePattern = /\\}/g; +const commaPattern = /\\,/g; +const periodPattern = /\\\./g; +export const EXPANSION_MAX = 100_000; +function numeric(str) { + return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); +} +function escapeBraces(str) { + return str + .replace(slashPattern, escSlash) + .replace(openPattern, escOpen) + .replace(closePattern, escClose) + .replace(commaPattern, escComma) + .replace(periodPattern, escPeriod); +} +function unescapeBraces(str) { + return str + .replace(escSlashPattern, '\\') + .replace(escOpenPattern, '{') + .replace(escClosePattern, '}') + .replace(escCommaPattern, ',') + .replace(escPeriodPattern, '.'); +} +/** + * Basically just str.split(","), but handling cases + * where we have nested braced sections, which should be + * treated as individual members, like {a,{b,c},d} + */ +function parseCommaParts(str) { + if (!str) { + return ['']; + } + const parts = []; + const m = balanced('{', '}', str); + if (!m) { + return str.split(','); + } + const { pre, body, post } = m; + const p = pre.split(','); + p[p.length - 1] += '{' + body + '}'; + const postParts = parseCommaParts(post); + if (post.length) { + ; + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; +} +export function expand(str, options = {}) { + if (!str) { + return []; + } + const { max = EXPANSION_MAX } = options; + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.slice(0, 2) === '{}') { + str = '\\{\\}' + str.slice(2); + } + return expand_(escapeBraces(str), max, true).map(unescapeBraces); +} +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} +function expand_(str, max, isTop) { + /** @type {string[]} */ + const expansions = []; + const m = balanced('{', '}', str); + if (!m) + return [str]; + // no need to expand pre, since it is guaranteed to be free of brace-sets + const pre = m.pre; + const post = m.post.length ? expand_(m.post, max, false) : ['']; + if (/\$$/.test(m.pre)) { + for (let k = 0; k < post.length && k < max; k++) { + const expansion = pre + '{' + m.body + '}' + post[k]; + expansions.push(expansion); + } + } + else { + const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + const isSequence = isNumericSequence || isAlphaSequence; + const isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand_(str, max, true); + } + return [str]; + } + let n; + if (isSequence) { + n = m.body.split(/\.\./); + } + else { + n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== undefined) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand_(n[0], max, false).map(embrace); + //XXX is this necessary? Can't seem to hit it in tests. + /* c8 ignore start */ + if (n.length === 1) { + return post.map(p => m.pre + n[0] + p); + } + /* c8 ignore stop */ + } + } + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + let N; + if (isSequence && n[0] !== undefined && n[1] !== undefined) { + const x = numeric(n[0]); + const y = numeric(n[1]); + const width = Math.max(n[0].length, n[1].length); + let incr = n.length === 3 && n[2] !== undefined ? + Math.max(Math.abs(numeric(n[2])), 1) + : 1; + let test = lte; + const reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + const pad = n.some(isPadded); + N = []; + for (let i = x; test(i, y); i += incr) { + let c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') { + c = ''; + } + } + else { + c = String(i); + if (pad) { + const need = width - c.length; + if (need > 0) { + const z = new Array(need + 1).join('0'); + if (i < 0) { + c = '-' + z + c.slice(1); + } + else { + c = z + c; + } + } + } + } + N.push(c); + } + } + else { + N = []; + for (let j = 0; j < n.length; j++) { + N.push.apply(N, expand_(n[j], max, false)); + } + } + for (let j = 0; j < N.length; j++) { + for (let k = 0; k < post.length && expansions.length < max; k++) { + const expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) { + expansions.push(expansion); + } + } + } + } + return expansions; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/esm/index.js.map b/node_modules/brace-expansion/dist/esm/index.js.map new file mode 100644 index 00000000..1bf0ab5b --- /dev/null +++ b/node_modules/brace-expansion/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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","sourcesContent":["import { balanced } from 'balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n if (!str) {\n return ['']\n }\n\n const parts: string[] = []\n const m = balanced('{', '}', str)\n\n if (!m) {\n return str.split(',')\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n\n p[p.length - 1] += '{' + body + '}'\n const postParts = parseCommaParts(post)\n if (post.length) {\n ;(p[p.length - 1] as string) += postParts.shift()\n p.push.apply(p, postParts)\n }\n\n parts.push.apply(parts, p)\n\n return parts\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const { max = EXPANSION_MAX } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(escapeBraces(str), max, true).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\nfunction expand_(str: string, max: number, isTop: boolean): string[] {\n /** @type {string[]} */\n const expansions: string[] = []\n\n const m = balanced('{', '}', str)\n if (!m) return [str]\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n const post: string[] = m.post.length ? expand_(m.post, max, false) : ['']\n\n if (/\\$$/.test(m.pre)) {\n for (let k = 0; k < post.length && k < max; k++) {\n const expansion = pre + '{' + m.body + '}' + post[k]\n expansions.push(expansion)\n }\n } else {\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post\n return expand_(str, max, true)\n }\n return [str]\n }\n\n let n: string[]\n if (isSequence) {\n n = m.body.split(/\\.\\./)\n } else {\n n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(n[0], max, false).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n return post.map(p => m.pre + n[0] + p)\n }\n /* c8 ignore stop */\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n let N: string[]\n\n if (isSequence && n[0] !== undefined && n[1] !== undefined) {\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ?\n Math.max(Math.abs(numeric(n[2])), 1)\n : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n N = []\n\n for (let i = x; test(i, y); i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n N.push(c)\n }\n } else {\n N = []\n\n for (let j = 0; j < n.length; j++) {\n N.push.apply(N, expand_(n[j] as string, max, false))\n }\n }\n\n for (let j = 0; j < N.length; j++) {\n for (let k = 0; k < post.length && expansions.length < max; k++) {\n const expansion = pre + N[j] + post[k]\n if (!isTop || isSequence || expansion) {\n expansions.push(expansion)\n }\n }\n }\n }\n\n return expansions\n}\n"]} \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/esm/package.json b/node_modules/brace-expansion/dist/esm/package.json new file mode 100644 index 00000000..3dbc1ca5 --- /dev/null +++ b/node_modules/brace-expansion/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js deleted file mode 100644 index bd19fe68..00000000 --- a/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,(?!,).*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json index 34478881..83a82896 100644 --- a/node_modules/brace-expansion/package.json +++ b/node_modules/brace-expansion/package.json @@ -1,50 +1,64 @@ { "name": "brace-expansion", "description": "Brace expansion as known from sh/bash", - "version": "1.1.12", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" + "version": "5.0.5", + "files": [ + "dist" + ], + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", + "type": "module", "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tshy", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "tap", + "snap": "tap", + "format": "prettier --write .", + "benchmark": "node benchmark/index.js", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" }, "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" + "@types/brace-expansion": "^1.1.2", + "@types/node": "^25.2.1", + "mkdirp": "^3.0.1", + "prettier": "^3.3.2", + "tap": "^21.6.2", + "tshy": "^3.0.2", + "typedoc": "^0.28.5" }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" + "dependencies": { + "balanced-match": "^4.0.2" }, "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] + "engines": { + "node": "18 || 20 || >=22" }, - "publishConfig": { - "tag": "1.x" + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/juliangruber/brace-expansion.git" } } diff --git a/node_modules/camelcase/index.d.ts b/node_modules/camelcase/index.d.ts deleted file mode 100644 index 58f2069a..00000000 --- a/node_modules/camelcase/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -declare namespace camelcase { - interface Options { - /** - Uppercase the first character: `foo-bar` → `FooBar`. - - @default false - */ - readonly pascalCase?: boolean; - } -} - -declare const camelcase: { - /** - Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. - - @param input - String to convert to camel case. - - @example - ``` - import camelCase = require('camelcase'); - - camelCase('foo-bar'); - //=> 'fooBar' - - camelCase('foo_bar'); - //=> 'fooBar' - - camelCase('Foo-Bar'); - //=> 'fooBar' - - camelCase('Foo-Bar', {pascalCase: true}); - //=> 'FooBar' - - camelCase('--foo.bar', {pascalCase: false}); - //=> 'fooBar' - - camelCase('foo bar'); - //=> 'fooBar' - - console.log(process.argv[3]); - //=> '--foo-bar' - camelCase(process.argv[3]); - //=> 'fooBar' - - camelCase(['foo', 'bar']); - //=> 'fooBar' - - camelCase(['__foo__', '--bar'], {pascalCase: true}); - //=> 'FooBar' - ``` - */ - (input: string | ReadonlyArray, options?: camelcase.Options): string; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function camelcase( - // input: string | ReadonlyArray, - // options?: camelcase.Options - // ): string; - // export = camelcase; - default: typeof camelcase; -}; - -export = camelcase; diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js deleted file mode 100644 index 579f99b4..00000000 --- a/node_modules/camelcase/index.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -const preserveCamelCase = string => { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < string.length; i++) { - const character = string[i]; - - if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { - string = string.slice(0, i) + '-' + string.slice(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { - string = string.slice(0, i - 1) + '-' + string.slice(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; - } - } - - return string; -}; - -const camelCase = (input, options) => { - if (!(typeof input === 'string' || Array.isArray(input))) { - throw new TypeError('Expected the input to be `string | string[]`'); - } - - options = Object.assign({ - pascalCase: false - }, options); - - const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; - - if (Array.isArray(input)) { - input = input.map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - input = input.trim(); - } - - if (input.length === 0) { - return ''; - } - - if (input.length === 1) { - return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); - } - - const hasUpperCase = input !== input.toLowerCase(); - - if (hasUpperCase) { - input = preserveCamelCase(input); - } - - input = input - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) - .replace(/\d+(\w|$)/g, m => m.toUpperCase()); - - return postProcess(input); -}; - -module.exports = camelCase; -// TODO: Remove this for the next major release -module.exports.default = camelCase; diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/camelcase/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json deleted file mode 100644 index fbdbaaa7..00000000 --- a/node_modules/camelcase/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "camelcase", - "version": "5.3.1", - "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", - "license": "MIT", - "repository": "sindresorhus/camelcase", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md deleted file mode 100644 index fde27261..00000000 --- a/node_modules/camelcase/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` - ---- - - - ---- - -## Install - -``` -$ npm install camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' -``` - - -## API - -### camelCase(input, [options]) - -#### input - -Type: `string` `string[]` - -String to convert to camel case. - -#### options - -Type: `Object` - -##### pascalCase - -Type: `boolean`
-Default: `false` - -Uppercase the first character: `foo-bar` → `FooBar` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase -- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string -- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cliui/CHANGELOG.md b/node_modules/cliui/CHANGELOG.md deleted file mode 100644 index 37f259a5..00000000 --- a/node_modules/cliui/CHANGELOG.md +++ /dev/null @@ -1,65 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -# [5.0.0](https://github.com/yargs/cliui/compare/v4.1.0...v5.0.0) (2019-04-10) - - -### Bug Fixes - -* Update wrap-ansi to fix compatibility with latest versions of chalk. ([#60](https://github.com/yargs/cliui/issues/60)) ([7bf79ae](https://github.com/yargs/cliui/commit/7bf79ae)) - - -### BREAKING CHANGES - -* Drop support for node < 6. - - - - -# [4.1.0](https://github.com/yargs/cliui/compare/v4.0.0...v4.1.0) (2018-04-23) - - -### Features - -* add resetOutput method ([#57](https://github.com/yargs/cliui/issues/57)) ([7246902](https://github.com/yargs/cliui/commit/7246902)) - - - - -# [4.0.0](https://github.com/yargs/cliui/compare/v3.2.0...v4.0.0) (2017-12-18) - - -### Bug Fixes - -* downgrades strip-ansi to version 3.0.1 ([#54](https://github.com/yargs/cliui/issues/54)) ([5764c46](https://github.com/yargs/cliui/commit/5764c46)) -* set env variable FORCE_COLOR. ([#56](https://github.com/yargs/cliui/issues/56)) ([7350e36](https://github.com/yargs/cliui/commit/7350e36)) - - -### Chores - -* drop support for node < 4 ([#53](https://github.com/yargs/cliui/issues/53)) ([b105376](https://github.com/yargs/cliui/commit/b105376)) - - -### Features - -* add fallback for window width ([#45](https://github.com/yargs/cliui/issues/45)) ([d064922](https://github.com/yargs/cliui/commit/d064922)) - - -### BREAKING CHANGES - -* officially drop support for Node < 4 - - - - -# [3.2.0](https://github.com/yargs/cliui/compare/v3.1.2...v3.2.0) (2016-04-11) - - -### Bug Fixes - -* reduces tarball size ([acc6c33](https://github.com/yargs/cliui/commit/acc6c33)) - -### Features - -* adds standard-version for release management ([ff84e32](https://github.com/yargs/cliui/commit/ff84e32)) diff --git a/node_modules/cliui/LICENSE.txt b/node_modules/cliui/LICENSE.txt deleted file mode 100644 index c7e27478..00000000 --- a/node_modules/cliui/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cliui/README.md b/node_modules/cliui/README.md deleted file mode 100644 index deacfa0d..00000000 --- a/node_modules/cliui/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# cliui - -[![Build Status](https://travis-ci.org/yargs/cliui.svg)](https://travis-ci.org/yargs/cliui) -[![Coverage Status](https://coveralls.io/repos/yargs/cliui/badge.svg?branch=)](https://coveralls.io/r/yargs/cliui?branch=) -[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - -easily create complex multi-column command-line-interfaces. - -## Example - -```js -var ui = require('cliui')() - -ui.div('Usage: $0 [command] [options]') - -ui.div({ - text: 'Options:', - padding: [2, 0, 2, 0] -}) - -ui.div( - { - text: "-f, --file", - width: 20, - padding: [0, 4, 0, 4] - }, - { - text: "the file to load." + - chalk.green("(if this description is long it wraps).") - , - width: 20 - }, - { - text: chalk.red("[required]"), - align: 'right' - } -) - -console.log(ui.toString()) -``` - - - -## Layout DSL - -cliui exposes a simple layout DSL: - -If you create a single `ui.div`, passing a string rather than an -object: - -* `\n`: characters will be interpreted as new rows. -* `\t`: characters will be interpreted as new columns. -* `\s`: characters will be interpreted as padding. - -**as an example...** - -```js -var ui = require('./')({ - width: 60 -}) - -ui.div( - 'Usage: node ./bin/foo.js\n' + - ' \t provide a regex\n' + - ' \t provide a glob\t [required]' -) - -console.log(ui.toString()) -``` - -**will output:** - -```shell -Usage: node ./bin/foo.js - provide a regex - provide a glob [required] -``` - -## Methods - -```js -cliui = require('cliui') -``` - -### cliui({width: integer}) - -Specify the maximum width of the UI being generated. -If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`. - -### cliui({wrap: boolean}) - -Enable or disable the wrapping of text in a column. - -### cliui.div(column, column, column) - -Create a row with any number of columns, a column -can either be a string, or an object with the following -options: - -* **text:** some text to place in the column. -* **width:** the width of a column. -* **align:** alignment, `right` or `center`. -* **padding:** `[top, right, bottom, left]`. -* **border:** should a border be placed around the div? - -### cliui.span(column, column, column) - -Similar to `div`, except the next row will be appended without -a new line being created. - -### cliui.resetOutput() - -Resets the UI elements of the current cliui instance, maintaining the values -set for `width` and `wrap`. diff --git a/node_modules/cliui/index.js b/node_modules/cliui/index.js deleted file mode 100644 index b42d9824..00000000 --- a/node_modules/cliui/index.js +++ /dev/null @@ -1,324 +0,0 @@ -var stringWidth = require('string-width') -var stripAnsi = require('strip-ansi') -var wrap = require('wrap-ansi') -var align = { - right: alignRight, - center: alignCenter -} -var top = 0 -var right = 1 -var bottom = 2 -var left = 3 - -function UI (opts) { - this.width = opts.width - this.wrap = opts.wrap - this.rows = [] -} - -UI.prototype.span = function () { - var cols = this.div.apply(this, arguments) - cols.span = true -} - -UI.prototype.resetOutput = function () { - this.rows = [] -} - -UI.prototype.div = function () { - if (arguments.length === 0) this.div('') - if (this.wrap && this._shouldApplyLayoutDSL.apply(this, arguments)) { - return this._applyLayoutDSL(arguments[0]) - } - - var cols = [] - - for (var i = 0, arg; (arg = arguments[i]) !== undefined; i++) { - if (typeof arg === 'string') cols.push(this._colFromString(arg)) - else cols.push(arg) - } - - this.rows.push(cols) - return cols -} - -UI.prototype._shouldApplyLayoutDSL = function () { - return arguments.length === 1 && typeof arguments[0] === 'string' && - /[\t\n]/.test(arguments[0]) -} - -UI.prototype._applyLayoutDSL = function (str) { - var _this = this - var rows = str.split('\n') - var leftColumnWidth = 0 - - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(function (row) { - var columns = row.split('\t') - if (columns.length > 1 && stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min( - Math.floor(_this.width * 0.5), - stringWidth(columns[0]) - ) - } - }) - - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(function (row) { - var columns = row.split('\t') - _this.div.apply(_this, columns.map(function (r, i) { - return { - text: r.trim(), - padding: _this._measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - } - })) - }) - - return this.rows[this.rows.length - 1] -} - -UI.prototype._colFromString = function (str) { - return { - text: str, - padding: this._measurePadding(str) - } -} - -UI.prototype._measurePadding = function (str) { - // measure padding without ansi escape codes - var noAnsi = stripAnsi(str) - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length] -} - -UI.prototype.toString = function () { - var _this = this - var lines = [] - - _this.rows.forEach(function (row, i) { - _this.rowToString(row, lines) - }) - - // don't display any lines with the - // hidden flag set. - lines = lines.filter(function (line) { - return !line.hidden - }) - - return lines.map(function (line) { - return line.text - }).join('\n') -} - -UI.prototype.rowToString = function (row, lines) { - var _this = this - var padding - var rrows = this._rasterize(row) - var str = '' - var ts - var width - var wrapWidth - - rrows.forEach(function (rrow, r) { - str = '' - rrow.forEach(function (col, c) { - ts = '' // temporary string used during alignment/padding. - width = row[c].width // the width with padding. - wrapWidth = _this._negatePadding(row[c]) // the width without padding. - - ts += col - - for (var i = 0; i < wrapWidth - stringWidth(col); i++) { - ts += ' ' - } - - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && _this.wrap) { - ts = align[row[c].align](ts, wrapWidth) - if (stringWidth(ts) < wrapWidth) ts += new Array(width - stringWidth(ts)).join(' ') - } - - // apply border and padding to string. - padding = row[c].padding || [0, 0, 0, 0] - if (padding[left]) str += new Array(padding[left] + 1).join(' ') - str += addBorder(row[c], ts, '| ') - str += ts - str += addBorder(row[c], ts, ' |') - if (padding[right]) str += new Array(padding[right] + 1).join(' ') - - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = _this._renderInline(str, lines[lines.length - 1]) - } - }) - - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }) - }) - - return lines -} - -function addBorder (col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) return '' - else if (ts.trim().length) return style - else return ' ' - } - return '' -} - -// if the full 'source' can render in -// the target line, do so. -UI.prototype._renderInline = function (source, previousLine) { - var leadingWhitespace = source.match(/^ */)[0].length - var target = previousLine.text - var targetTextWidth = stringWidth(target.trimRight()) - - if (!previousLine.span) return source - - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true - return target + source - } - - if (leadingWhitespace < targetTextWidth) return source - - previousLine.hidden = true - - return target.trimRight() + new Array(leadingWhitespace - targetTextWidth + 1).join(' ') + source.trimLeft() -} - -UI.prototype._rasterize = function (row) { - var _this = this - var i - var rrow - var rrows = [] - var widths = this._columnWidths(row) - var wrapped - - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach(function (col, c) { - // leave room for left and right padding. - col.width = widths[c] - if (_this.wrap) wrapped = wrap(col.text, _this._negatePadding(col), { hard: true }).split('\n') - else wrapped = col.text.split('\n') - - if (col.border) { - wrapped.unshift('.' + new Array(_this._negatePadding(col) + 3).join('-') + '.') - wrapped.push("'" + new Array(_this._negatePadding(col) + 3).join('-') + "'") - } - - // add top and bottom padding. - if (col.padding) { - for (i = 0; i < (col.padding[top] || 0); i++) wrapped.unshift('') - for (i = 0; i < (col.padding[bottom] || 0); i++) wrapped.push('') - } - - wrapped.forEach(function (str, r) { - if (!rrows[r]) rrows.push([]) - - rrow = rrows[r] - - for (var i = 0; i < c; i++) { - if (rrow[i] === undefined) rrow.push('') - } - rrow.push(str) - }) - }) - - return rrows -} - -UI.prototype._negatePadding = function (col) { - var wrapWidth = col.width - if (col.padding) wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0) - if (col.border) wrapWidth -= 4 - return wrapWidth -} - -UI.prototype._columnWidths = function (row) { - var _this = this - var widths = [] - var unset = row.length - var unsetWidth - var remainingWidth = this.width - - // column widths can be set in config. - row.forEach(function (col, i) { - if (col.width) { - unset-- - widths[i] = col.width - remainingWidth -= col.width - } else { - widths[i] = undefined - } - }) - - // any unset widths should be calculated. - if (unset) unsetWidth = Math.floor(remainingWidth / unset) - widths.forEach(function (w, i) { - if (!_this.wrap) widths[i] = row[i].width || stringWidth(row[i].text) - else if (w === undefined) widths[i] = Math.max(unsetWidth, _minWidth(row[i])) - }) - - return widths -} - -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth (col) { - var padding = col.padding || [] - var minWidth = 1 + (padding[left] || 0) + (padding[right] || 0) - if (col.border) minWidth += 4 - return minWidth -} - -function getWindowWidth () { - if (typeof process === 'object' && process.stdout && process.stdout.columns) return process.stdout.columns -} - -function alignRight (str, width) { - str = str.trim() - var padding = '' - var strWidth = stringWidth(str) - - if (strWidth < width) { - padding = new Array(width - strWidth + 1).join(' ') - } - - return padding + str -} - -function alignCenter (str, width) { - str = str.trim() - var padding = '' - var strWidth = stringWidth(str.trim()) - - if (strWidth < width) { - padding = new Array(parseInt((width - strWidth) / 2, 10) + 1).join(' ') - } - - return padding + str -} - -module.exports = function (opts) { - opts = opts || {} - - return new UI({ - width: (opts || {}).width || getWindowWidth() || 80, - wrap: typeof opts.wrap === 'boolean' ? opts.wrap : true - }) -} diff --git a/node_modules/cliui/package.json b/node_modules/cliui/package.json deleted file mode 100644 index 64936f71..00000000 --- a/node_modules/cliui/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "cliui", - "version": "5.0.0", - "description": "easily create complex multi-column command-line-interfaces", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "nyc mocha", - "coverage": "nyc --reporter=text-lcov mocha | coveralls", - "release": "standard-version" - }, - "repository": { - "type": "git", - "url": "http://github.com/yargs/cliui.git" - }, - "config": { - "blanket": { - "pattern": [ - "index.js" - ], - "data-cover-never": [ - "node_modules", - "test" - ], - "output-reporter": "spec" - } - }, - "standard": { - "ignore": [ - "**/example/**" - ], - "globals": [ - "it" - ] - }, - "keywords": [ - "cli", - "command-line", - "layout", - "design", - "console", - "wrap", - "table" - ], - "author": "Ben Coe ", - "license": "ISC", - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "devDependencies": { - "chai": "^4.2.0", - "chalk": "^2.4.2", - "coveralls": "^3.0.3", - "mocha": "^6.0.2", - "nyc": "^13.3.0", - "standard": "^12.0.1", - "standard-version": "^5.0.2" - }, - "files": [ - "index.js" - ], - "engine": { - "node": ">=6" - } -} diff --git a/node_modules/color-convert/CHANGELOG.md b/node_modules/color-convert/CHANGELOG.md deleted file mode 100644 index 0a7bce4f..00000000 --- a/node_modules/color-convert/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -# 1.0.0 - 2016-01-07 - -- Removed: unused speed test -- Added: Automatic routing between previously unsupported conversions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `convert()` class -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: all functions to lookup dictionary -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: `ansi` to `ansi256` -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Fixed: argument grouping for functions requiring only one argument -([#27](https://github.com/Qix-/color-convert/pull/27)) - -# 0.6.0 - 2015-07-23 - -- Added: methods to handle -[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: - - rgb2ansi16 - - rgb2ansi - - hsl2ansi16 - - hsl2ansi - - hsv2ansi16 - - hsv2ansi - - hwb2ansi16 - - hwb2ansi - - cmyk2ansi16 - - cmyk2ansi - - keyword2ansi16 - - keyword2ansi - - ansi162rgb - - ansi162hsl - - ansi162hsv - - ansi162hwb - - ansi162cmyk - - ansi162keyword - - ansi2rgb - - ansi2hsl - - ansi2hsv - - ansi2hwb - - ansi2cmyk - - ansi2keyword -([#18](https://github.com/harthur/color-convert/pull/18)) - -# 0.5.3 - 2015-06-02 - -- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` -([#15](https://github.com/harthur/color-convert/issues/15)) - ---- - -Check out commit logs for older releases diff --git a/node_modules/color-convert/LICENSE b/node_modules/color-convert/LICENSE deleted file mode 100644 index 5b4c386f..00000000 --- a/node_modules/color-convert/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2016 Heather Arthur - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/color-convert/README.md b/node_modules/color-convert/README.md deleted file mode 100644 index d4b08fc3..00000000 --- a/node_modules/color-convert/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# color-convert - -[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) - -Color-convert is a color conversion library for JavaScript and node. -It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): - -```js -var convert = require('color-convert'); - -convert.rgb.hsl(140, 200, 100); // [96, 48, 59] -convert.keyword.rgb('blue'); // [0, 0, 255] - -var rgbChannels = convert.rgb.channels; // 3 -var cmykChannels = convert.cmyk.channels; // 4 -var ansiChannels = convert.ansi16.channels; // 1 -``` - -# Install - -```console -$ npm install color-convert -``` - -# API - -Simply get the property of the _from_ and _to_ conversion that you're looking for. - -All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. - -All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). - -```js -var convert = require('color-convert'); - -// Hex to LAB -convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] -convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] - -// RGB to CMYK -convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] -convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] -``` - -### Arrays -All functions that accept multiple arguments also support passing an array. - -Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) - -```js -var convert = require('color-convert'); - -convert.rgb.hex(123, 45, 67); // '7B2D43' -convert.rgb.hex([123, 45, 67]); // '7B2D43' -``` - -## Routing - -Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). - -Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). - -# Contribute - -If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. - -# License -Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/color-convert/conversions.js b/node_modules/color-convert/conversions.js deleted file mode 100644 index 32172007..00000000 --- a/node_modules/color-convert/conversions.js +++ /dev/null @@ -1,868 +0,0 @@ -/* MIT license */ -var cssKeywords = require('color-name'); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -var reverseKeywords = {}; -for (var key in cssKeywords) { - if (cssKeywords.hasOwnProperty(key)) { - reverseKeywords[cssKeywords[key]] = key; - } -} - -var convert = module.exports = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -// hide .channels and .labels properties -for (var model in convert) { - if (convert.hasOwnProperty(model)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - var channels = convert[model].channels; - var labels = convert[model].labels; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); - } -} - -convert.rgb.hsl = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; - var h; - var s; - var l; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - var rdif; - var gdif; - var bdif; - var h; - var s; - - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var v = Math.max(r, g, b); - var diff = v - Math.min(r, g, b); - var diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - var r = rgb[0]; - var g = rgb[1]; - var b = rgb[2]; - var h = convert.rgb.hsl(rgb)[0]; - var w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var c; - var m; - var y; - var k; - - k = Math.min(1 - r, 1 - g, 1 - b); - c = (1 - r - k) / (1 - k) || 0; - m = (1 - g - k) / (1 - k) || 0; - y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -/** - * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - * */ -function comparativeDistance(x, y) { - return ( - Math.pow(x[0] - y[0], 2) + - Math.pow(x[1] - y[1], 2) + - Math.pow(x[2] - y[2], 2) - ); -} - -convert.rgb.keyword = function (rgb) { - var reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - var currentClosestDistance = Infinity; - var currentClosestKeyword; - - for (var keyword in cssKeywords) { - if (cssKeywords.hasOwnProperty(keyword)) { - var value = cssKeywords[keyword]; - - // Compute comparative distance - var distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - - // assume sRGB - r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); - g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); - b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); - - var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - var xyz = convert.rgb.xyz(rgb); - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - var h = hsl[0] / 360; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var t1; - var t2; - var t3; - var rgb; - var val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - t1 = 2 * l - t2; - - rgb = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - var h = hsl[0]; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var smin = s; - var lmin = Math.max(l, 0.01); - var sv; - var v; - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - v = (l + s) / 2; - sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - var h = hsv[0] / 60; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var hi = Math.floor(h) % 6; - - var f = h - Math.floor(h); - var p = 255 * v * (1 - s); - var q = 255 * v * (1 - (s * f)); - var t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - var h = hsv[0]; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var vmin = Math.max(v, 0.01); - var lmin; - var sl; - var l; - - l = (2 - s) * v; - lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - var h = hwb[0] / 360; - var wh = hwb[1] / 100; - var bl = hwb[2] / 100; - var ratio = wh + bl; - var i; - var v; - var f; - var n; - - // wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - i = Math.floor(6 * h); - v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - n = wh + f * (v - wh); // linear interpolation - - var r; - var g; - var b; - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - var c = cmyk[0] / 100; - var m = cmyk[1] / 100; - var y = cmyk[2] / 100; - var k = cmyk[3] / 100; - var r; - var g; - var b; - - r = 1 - Math.min(1, c * (1 - k) + k); - g = 1 - Math.min(1, m * (1 - k) + k); - b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - var x = xyz[0] / 100; - var y = xyz[1] / 100; - var z = xyz[2] / 100; - var r; - var g; - var b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // assume sRGB - r = r > 0.0031308 - ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); - - l = (116 * y) - 16; - a = 500 * (x - y); - b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var x; - var y; - var z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - var y2 = Math.pow(y, 3); - var x2 = Math.pow(x, 3); - var z2 = Math.pow(z, 3); - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var hr; - var h; - var c; - - hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - var l = lch[0]; - var c = lch[1]; - var h = lch[2]; - var a; - var b; - var hr; - - hr = h / 360 * 2 * Math.PI; - a = c * Math.cos(hr); - b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - var ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - - // we use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - var ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - var color = args % 10; - - // handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - var mult = (~~(args > 50) + 1) * 0.5; - var r = ((color & 1) * mult) * 255; - var g = (((color >> 1) & 1) * mult) * 255; - var b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // handle greyscale - if (args >= 232) { - var c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - var rem; - var r = Math.floor(args / 36) / 5 * 255; - var g = Math.floor((rem = args % 36) / 6) / 5 * 255; - var b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - var integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - var colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(function (char) { - return char + char; - }).join(''); - } - - var integer = parseInt(colorString, 16); - var r = (integer >> 16) & 0xFF; - var g = (integer >> 8) & 0xFF; - var b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var max = Math.max(Math.max(r, g), b); - var min = Math.min(Math.min(r, g), b); - var chroma = (max - min); - var grayscale; - var hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma + 4; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var c = 1; - var f = 0; - - if (l < 0.5) { - c = 2.0 * s * l; - } else { - c = 2.0 * s * (1.0 - l); - } - - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - var s = hsv[1] / 100; - var v = hsv[2] / 100; - - var c = s * v; - var f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - var h = hcg[0] / 360; - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - var pure = [0, 0, 0]; - var hi = (h % 1) * 6; - var v = hi % 1; - var w = 1 - v; - var mg = 0; - - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var v = c + g * (1.0 - c); - var f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - - var l = g * (1.0 - c) + 0.5 * c; - var s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - var w = hwb[1] / 100; - var b = hwb[2] / 100; - var v = 1 - b; - var c = v - w; - var g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = convert.gray.hsv = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - var val = Math.round(gray[0] / 100 * 255) & 0xFF; - var integer = (val << 16) + (val << 8) + val; - - var string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - var val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; diff --git a/node_modules/color-convert/index.js b/node_modules/color-convert/index.js deleted file mode 100644 index e65b5d77..00000000 --- a/node_modules/color-convert/index.js +++ /dev/null @@ -1,78 +0,0 @@ -var conversions = require('./conversions'); -var route = require('./route'); - -var convert = {}; - -var models = Object.keys(conversions); - -function wrapRaw(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - return fn(args); - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - var wrappedFn = function (args) { - if (args === undefined || args === null) { - return args; - } - - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - - var result = fn(args); - - // we're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (var len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(function (fromModel) { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - var routes = route(fromModel); - var routeModels = Object.keys(routes); - - routeModels.forEach(function (toModel) { - var fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; diff --git a/node_modules/color-convert/package.json b/node_modules/color-convert/package.json deleted file mode 100644 index dfbc4714..00000000 --- a/node_modules/color-convert/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "color-convert", - "description": "Plain color conversion functions", - "version": "1.9.3", - "author": "Heather Arthur ", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "files": [ - "index.js", - "conversions.js", - "css-keywords.js", - "route.js" - ], - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - }, - "devDependencies": { - "chalk": "1.1.1", - "xo": "0.11.2" - }, - "dependencies": { - "color-name": "1.1.3" - } -} diff --git a/node_modules/color-convert/route.js b/node_modules/color-convert/route.js deleted file mode 100644 index 0a1fdea6..00000000 --- a/node_modules/color-convert/route.js +++ /dev/null @@ -1,97 +0,0 @@ -var conversions = require('./conversions'); - -/* - this function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - var graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - var models = Object.keys(conversions); - - for (var len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - var graph = buildGraph(); - var queue = [fromModel]; // unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - var current = queue.pop(); - var adjacents = Object.keys(conversions[current]); - - for (var len = adjacents.length, i = 0; i < len; i++) { - var adjacent = adjacents[i]; - var node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - var path = [graph[toModel].parent, toModel]; - var fn = conversions[graph[toModel].parent][toModel]; - - var cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - var graph = deriveBFS(fromModel); - var conversion = {}; - - var models = Object.keys(graph); - for (var len = models.length, i = 0; i < len; i++) { - var toModel = models[i]; - var node = graph[toModel]; - - if (node.parent === null) { - // no possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - diff --git a/node_modules/color-name/.eslintrc.json b/node_modules/color-name/.eslintrc.json deleted file mode 100644 index c50c2504..00000000 --- a/node_modules/color-name/.eslintrc.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "env": { - "browser": true, - "node": true, - "commonjs": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "strict": 2, - "indent": 0, - "linebreak-style": 0, - "quotes": 0, - "semi": 0, - "no-cond-assign": 1, - "no-constant-condition": 1, - "no-duplicate-case": 1, - "no-empty": 1, - "no-ex-assign": 1, - "no-extra-boolean-cast": 1, - "no-extra-semi": 1, - "no-fallthrough": 1, - "no-func-assign": 1, - "no-global-assign": 1, - "no-implicit-globals": 2, - "no-inner-declarations": ["error", "functions"], - "no-irregular-whitespace": 2, - "no-loop-func": 1, - "no-multi-str": 1, - "no-mixed-spaces-and-tabs": 1, - "no-proto": 1, - "no-sequences": 1, - "no-throw-literal": 1, - "no-unmodified-loop-condition": 1, - "no-useless-call": 1, - "no-void": 1, - "no-with": 2, - "wrap-iife": 1, - "no-redeclare": 1, - "no-unused-vars": ["error", { "vars": "all", "args": "none" }], - "no-sparse-arrays": 1 - } -} diff --git a/node_modules/color-name/.npmignore b/node_modules/color-name/.npmignore deleted file mode 100644 index f9f28164..00000000 --- a/node_modules/color-name/.npmignore +++ /dev/null @@ -1,107 +0,0 @@ -//this will affect all the git repos -git config --global core.excludesfile ~/.gitignore - - -//update files since .ignore won't if already tracked -git rm --cached - -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so - -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods -*.7z -*.dmg -*.gz -*.iso -*.jar -*.rar -*.tar -*.zip - -# Logs and databases # -###################### -*.log -*.sql -*.sqlite - -# OS generated files # -###################### -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -# Icon? -ehthumbs.db -Thumbs.db -.cache -.project -.settings -.tmproj -*.esproj -nbproject - -# Numerous always-ignore extensions # -##################################### -*.diff -*.err -*.orig -*.rej -*.swn -*.swo -*.swp -*.vi -*~ -*.sass-cache -*.grunt -*.tmp - -# Dreamweaver added files # -########################### -_notes -dwsync.xml - -# Komodo # -########################### -*.komodoproject -.komodotools - -# Node # -##################### -node_modules - -# Bower # -##################### -bower_components - -# Folders to ignore # -##################### -.hg -.svn -.CVS -intermediate -publish -.idea -.graphics -_test -_archive -uploads -tmp - -# Vim files to ignore # -####################### -.VimballRecord -.netrwhist - -bundle.* - -_demo \ No newline at end of file diff --git a/node_modules/color-name/LICENSE b/node_modules/color-name/LICENSE deleted file mode 100644 index c6b10012..00000000 --- a/node_modules/color-name/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/color-name/README.md b/node_modules/color-name/README.md deleted file mode 100644 index 932b9791..00000000 --- a/node_modules/color-name/README.md +++ /dev/null @@ -1,11 +0,0 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - diff --git a/node_modules/color-name/index.js b/node_modules/color-name/index.js deleted file mode 100644 index b7c198a6..00000000 --- a/node_modules/color-name/index.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; diff --git a/node_modules/color-name/package.json b/node_modules/color-name/package.json deleted file mode 100644 index d061123e..00000000 --- a/node_modules/color-name/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "color-name", - "version": "1.1.3", - "description": "A list of color names and its values", - "main": "index.js", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:dfcreative/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/dfcreative/color-name/issues" - }, - "homepage": "https://github.com/dfcreative/color-name" -} diff --git a/node_modules/color-name/test.js b/node_modules/color-name/test.js deleted file mode 100644 index 6e6bf30b..00000000 --- a/node_modules/color-name/test.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -var names = require('./'); -var assert = require('assert'); - -assert.deepEqual(names.red, [255,0,0]); -assert.deepEqual(names.aliceblue, [240,248,255]); diff --git a/node_modules/require-directory/LICENSE b/node_modules/commander/LICENSE similarity index 57% rename from node_modules/require-directory/LICENSE rename to node_modules/commander/LICENSE index a70f253a..10f997ab 100644 --- a/node_modules/require-directory/LICENSE +++ b/node_modules/commander/LICENSE @@ -1,20 +1,20 @@ -The MIT License (MIT) +(The MIT License) -Copyright (c) 2011 Troy Goode +Copyright (c) 2011 TJ Holowaychuk -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, diff --git a/node_modules/commander/Readme.md b/node_modules/commander/Readme.md new file mode 100644 index 00000000..ed19cff6 --- /dev/null +++ b/node_modules/commander/Readme.md @@ -0,0 +1,1129 @@ +# Commander.js + +[![Build Status](https://github.com/tj/commander.js/workflows/build/badge.svg)](https://github.com/tj/commander.js/actions?query=workflow%3A%22build%22) +[![NPM Version](http://img.shields.io/npm/v/commander.svg?style=flat)](https://www.npmjs.org/package/commander) +[![NPM Downloads](https://img.shields.io/npm/dm/commander.svg?style=flat)](https://npmcharts.com/compare/commander?minimal=true) +[![Install Size](https://packagephobia.now.sh/badge?p=commander)](https://packagephobia.now.sh/result?p=commander) + +The complete solution for [node.js](http://nodejs.org) command-line interfaces. + +Read this in other languages: English | [简体中文](./Readme_zh-CN.md) + +- [Commander.js](#commanderjs) + - [Installation](#installation) + - [Quick Start](#quick-start) + - [Declaring _program_ variable](#declaring-program-variable) + - [Options](#options) + - [Common option types, boolean and value](#common-option-types-boolean-and-value) + - [Default option value](#default-option-value) + - [Other option types, negatable boolean and boolean|value](#other-option-types-negatable-boolean-and-booleanvalue) + - [Required option](#required-option) + - [Variadic option](#variadic-option) + - [Version option](#version-option) + - [More configuration](#more-configuration) + - [Custom option processing](#custom-option-processing) + - [Commands](#commands) + - [Command-arguments](#command-arguments) + - [More configuration](#more-configuration-1) + - [Custom argument processing](#custom-argument-processing) + - [Action handler](#action-handler) + - [Stand-alone executable (sub)commands](#stand-alone-executable-subcommands) + - [Life cycle hooks](#life-cycle-hooks) + - [Automated help](#automated-help) + - [Custom help](#custom-help) + - [Display help after errors](#display-help-after-errors) + - [Display help from code](#display-help-from-code) + - [.name](#name) + - [.usage](#usage) + - [.description and .summary](#description-and-summary) + - [.helpOption(flags, description)](#helpoptionflags-description) + - [.addHelpCommand()](#addhelpcommand) + - [More configuration](#more-configuration-2) + - [Custom event listeners](#custom-event-listeners) + - [Bits and pieces](#bits-and-pieces) + - [.parse() and .parseAsync()](#parse-and-parseasync) + - [Parsing Configuration](#parsing-configuration) + - [Legacy options as properties](#legacy-options-as-properties) + - [TypeScript](#typescript) + - [createCommand()](#createcommand) + - [Node options such as `--harmony`](#node-options-such-as---harmony) + - [Debugging stand-alone executable subcommands](#debugging-stand-alone-executable-subcommands) + - [Display error](#display-error) + - [Override exit and output handling](#override-exit-and-output-handling) + - [Additional documentation](#additional-documentation) + - [Support](#support) + - [Commander for enterprise](#commander-for-enterprise) + +For information about terms used in this document see: [terminology](./docs/terminology.md) + +## Installation + +```sh +npm install commander +``` + +## Quick Start + +You write code to describe your command line interface. +Commander looks after parsing the arguments into options and command-arguments, +displays usage errors for problems, and implements a help system. + +Commander is strict and displays an error for unrecognised options. +The two most used option types are a boolean option, and an option which takes its value from the following argument. + +Example file: [split.js](./examples/split.js) + +```js +const { program } = require('commander'); + +program + .option('--first') + .option('-s, --separator '); + +program.parse(); + +const options = program.opts(); +const limit = options.first ? 1 : undefined; +console.log(program.args[0].split(options.separator, limit)); +``` + +```console +$ node split.js -s / --fits a/b/c +error: unknown option '--fits' +(Did you mean --first?) +$ node split.js -s / --first a/b/c +[ 'a' ] +``` + +Here is a more complete program using a subcommand and with descriptions for the help. In a multi-command program, you have an action handler for each command (or stand-alone executables for the commands). + +Example file: [string-util.js](./examples/string-util.js) + +```js +const { Command } = require('commander'); +const program = new Command(); + +program + .name('string-util') + .description('CLI to some JavaScript string utilities') + .version('0.8.0'); + +program.command('split') + .description('Split a string into substrings and display as an array') + .argument('', 'string to split') + .option('--first', 'display just the first substring') + .option('-s, --separator ', 'separator character', ',') + .action((str, options) => { + const limit = options.first ? 1 : undefined; + console.log(str.split(options.separator, limit)); + }); + +program.parse(); +``` + +```console +$ node string-util.js help split +Usage: string-util split [options] + +Split a string into substrings and display as an array. + +Arguments: + string string to split + +Options: + --first display just the first substring + -s, --separator separator character (default: ",") + -h, --help display help for command + +$ node string-util.js split --separator=/ a/b/c +[ 'a', 'b', 'c' ] +``` + +More samples can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory. + +## Declaring _program_ variable + +Commander exports a global object which is convenient for quick programs. +This is used in the examples in this README for brevity. + +```js +// CommonJS (.cjs) +const { program } = require('commander'); +``` + +For larger programs which may use commander in multiple ways, including unit testing, it is better to create a local Command object to use. + +```js +// CommonJS (.cjs) +const { Command } = require('commander'); +const program = new Command(); +``` + +```js +// ECMAScript (.mjs) +import { Command } from 'commander'; +const program = new Command(); +``` + +```ts +// TypeScript (.ts) +import { Command } from 'commander'; +const program = new Command(); +``` + +## Options + +Options are defined with the `.option()` method, also serving as documentation for the options. Each option can have a short flag (single character) and a long name, separated by a comma or space or vertical bar ('|'). + +The parsed options can be accessed by calling `.opts()` on a `Command` object, and are passed to the action handler. + +Multi-word options such as "--template-engine" are camel-cased, becoming `program.opts().templateEngine` etc. + +An option and its option-argument can be separated by a space, or combined into the same argument. The option-argument can follow the short option directly or follow an `=` for a long option. + +```sh +serve -p 80 +serve -p80 +serve --port 80 +serve --port=80 +``` + +You can use `--` to indicate the end of the options, and any remaining arguments will be used without being interpreted. + +By default options on the command line are not positional, and can be specified before or after other arguments. + +There are additional related routines for when `.opts()` is not enough: + +- `.optsWithGlobals()` returns merged local and global option values +- `.getOptionValue()` and `.setOptionValue()` work with a single option value +- `.getOptionValueSource()` and `.setOptionValueWithSource()` include where the option value came from + +### Common option types, boolean and value + +The two most used option types are a boolean option, and an option which takes its value +from the following argument (declared with angle brackets like `--expect `). Both are `undefined` unless specified on command line. + +Example file: [options-common.js](./examples/options-common.js) + +```js +program + .option('-d, --debug', 'output extra debugging') + .option('-s, --small', 'small pizza size') + .option('-p, --pizza-type ', 'flavour of pizza'); + +program.parse(process.argv); + +const options = program.opts(); +if (options.debug) console.log(options); +console.log('pizza details:'); +if (options.small) console.log('- small pizza size'); +if (options.pizzaType) console.log(`- ${options.pizzaType}`); +``` + +```console +$ pizza-options -p +error: option '-p, --pizza-type ' argument missing +$ pizza-options -d -s -p vegetarian +{ debug: true, small: true, pizzaType: 'vegetarian' } +pizza details: +- small pizza size +- vegetarian +$ pizza-options --pizza-type=cheese +pizza details: +- cheese +``` + +Multiple boolean short options may be combined together following the dash, and may be followed by a single short option taking a value. +For example `-d -s -p cheese` may be written as `-ds -p cheese` or even `-dsp cheese`. + +Options with an expected option-argument are greedy and will consume the following argument whatever the value. +So `--id -xyz` reads `-xyz` as the option-argument. + +`program.parse(arguments)` processes the arguments, leaving any args not consumed by the program options in the `program.args` array. The parameter is optional and defaults to `process.argv`. + +### Default option value + +You can specify a default value for an option. + +Example file: [options-defaults.js](./examples/options-defaults.js) + +```js +program + .option('-c, --cheese ', 'add the specified type of cheese', 'blue'); + +program.parse(); + +console.log(`cheese: ${program.opts().cheese}`); +``` + +```console +$ pizza-options +cheese: blue +$ pizza-options --cheese stilton +cheese: stilton +``` + +### Other option types, negatable boolean and boolean|value + +You can define a boolean option long name with a leading `no-` to set the option value to false when used. +Defined alone this also makes the option true by default. + +If you define `--foo` first, adding `--no-foo` does not change the default value from what it would +otherwise be. + +Example file: [options-negatable.js](./examples/options-negatable.js) + +```js +program + .option('--no-sauce', 'Remove sauce') + .option('--cheese ', 'cheese flavour', 'mozzarella') + .option('--no-cheese', 'plain with no cheese') + .parse(); + +const options = program.opts(); +const sauceStr = options.sauce ? 'sauce' : 'no sauce'; +const cheeseStr = (options.cheese === false) ? 'no cheese' : `${options.cheese} cheese`; +console.log(`You ordered a pizza with ${sauceStr} and ${cheeseStr}`); +``` + +```console +$ pizza-options +You ordered a pizza with sauce and mozzarella cheese +$ pizza-options --sauce +error: unknown option '--sauce' +$ pizza-options --cheese=blue +You ordered a pizza with sauce and blue cheese +$ pizza-options --no-sauce --no-cheese +You ordered a pizza with no sauce and no cheese +``` + +You can specify an option which may be used as a boolean option but may optionally take an option-argument +(declared with square brackets like `--optional [value]`). + +Example file: [options-boolean-or-value.js](./examples/options-boolean-or-value.js) + +```js +program + .option('-c, --cheese [type]', 'Add cheese with optional type'); + +program.parse(process.argv); + +const options = program.opts(); +if (options.cheese === undefined) console.log('no cheese'); +else if (options.cheese === true) console.log('add cheese'); +else console.log(`add cheese type ${options.cheese}`); +``` + +```console +$ pizza-options +no cheese +$ pizza-options --cheese +add cheese +$ pizza-options --cheese mozzarella +add cheese type mozzarella +``` + +Options with an optional option-argument are not greedy and will ignore arguments starting with a dash. +So `id` behaves as a boolean option for `--id -5`, but you can use a combined form if needed like `--id=-5`. + +For information about possible ambiguous cases, see [options taking varying arguments](./docs/options-taking-varying-arguments.md). + +### Required option + +You may specify a required (mandatory) option using `.requiredOption()`. The option must have a value after parsing, usually specified on the command line, or perhaps from a default value (say from environment). The method is otherwise the same as `.option()` in format, taking flags and description, and optional default value or custom processing. + +Example file: [options-required.js](./examples/options-required.js) + +```js +program + .requiredOption('-c, --cheese ', 'pizza must have cheese'); + +program.parse(); +``` + +```console +$ pizza +error: required option '-c, --cheese ' not specified +``` + +### Variadic option + +You may make an option variadic by appending `...` to the value placeholder when declaring the option. On the command line you +can then specify multiple option-arguments, and the parsed option value will be an array. The extra arguments +are read until the first argument starting with a dash. The special argument `--` stops option processing entirely. If a value +is specified in the same argument as the option then no further values are read. + +Example file: [options-variadic.js](./examples/options-variadic.js) + +```js +program + .option('-n, --number ', 'specify numbers') + .option('-l, --letter [letters...]', 'specify letters'); + +program.parse(); + +console.log('Options: ', program.opts()); +console.log('Remaining arguments: ', program.args); +``` + +```console +$ collect -n 1 2 3 --letter a b c +Options: { number: [ '1', '2', '3' ], letter: [ 'a', 'b', 'c' ] } +Remaining arguments: [] +$ collect --letter=A -n80 operand +Options: { number: [ '80' ], letter: [ 'A' ] } +Remaining arguments: [ 'operand' ] +$ collect --letter -n 1 -n 2 3 -- operand +Options: { number: [ '1', '2', '3' ], letter: true } +Remaining arguments: [ 'operand' ] +``` + +For information about possible ambiguous cases, see [options taking varying arguments](./docs/options-taking-varying-arguments.md). + +### Version option + +The optional `version` method adds handling for displaying the command version. The default option flags are `-V` and `--version`, and when present the command prints the version number and exits. + +```js +program.version('0.0.1'); +``` + +```console +$ ./examples/pizza -V +0.0.1 +``` + +You may change the flags and description by passing additional parameters to the `version` method, using +the same syntax for flags as the `option` method. + +```js +program.version('0.0.1', '-v, --vers', 'output the current version'); +``` + +### More configuration + +You can add most options using the `.option()` method, but there are some additional features available +by constructing an `Option` explicitly for less common cases. + +Example files: [options-extra.js](./examples/options-extra.js), [options-env.js](./examples/options-env.js), [options-conflicts.js](./examples/options-conflicts.js), [options-implies.js](./examples/options-implies.js) + +```js +program + .addOption(new Option('-s, --secret').hideHelp()) + .addOption(new Option('-t, --timeout ', 'timeout in seconds').default(60, 'one minute')) + .addOption(new Option('-d, --drink ', 'drink size').choices(['small', 'medium', 'large'])) + .addOption(new Option('-p, --port ', 'port number').env('PORT')) + .addOption(new Option('--donate [amount]', 'optional donation in dollars').preset('20').argParser(parseFloat)) + .addOption(new Option('--disable-server', 'disables the server').conflicts('port')) + .addOption(new Option('--free-drink', 'small drink included free ').implies({ drink: 'small' })); +``` + +```console +$ extra --help +Usage: help [options] + +Options: + -t, --timeout timeout in seconds (default: one minute) + -d, --drink drink cup size (choices: "small", "medium", "large") + -p, --port port number (env: PORT) + --donate [amount] optional donation in dollars (preset: "20") + --disable-server disables the server + --free-drink small drink included free + -h, --help display help for command + +$ extra --drink huge +error: option '-d, --drink ' argument 'huge' is invalid. Allowed choices are small, medium, large. + +$ PORT=80 extra --donate --free-drink +Options: { timeout: 60, donate: 20, port: '80', freeDrink: true, drink: 'small' } + +$ extra --disable-server --port 8000 +error: option '--disable-server' cannot be used with option '-p, --port ' +``` + +Specify a required (mandatory) option using the `Option` method `.makeOptionMandatory()`. This matches the `Command` method [.requiredOption()](#required-option). + +### Custom option processing + +You may specify a function to do custom processing of option-arguments. The callback function receives two parameters, +the user specified option-argument and the previous value for the option. It returns the new value for the option. + +This allows you to coerce the option-argument to the desired type, or accumulate values, or do entirely custom processing. + +You can optionally specify the default/starting value for the option after the function parameter. + +Example file: [options-custom-processing.js](./examples/options-custom-processing.js) + +```js +function myParseInt(value, dummyPrevious) { + // parseInt takes a string and a radix + const parsedValue = parseInt(value, 10); + if (isNaN(parsedValue)) { + throw new commander.InvalidArgumentError('Not a number.'); + } + return parsedValue; +} + +function increaseVerbosity(dummyValue, previous) { + return previous + 1; +} + +function collect(value, previous) { + return previous.concat([value]); +} + +function commaSeparatedList(value, dummyPrevious) { + return value.split(','); +} + +program + .option('-f, --float ', 'float argument', parseFloat) + .option('-i, --integer ', 'integer argument', myParseInt) + .option('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0) + .option('-c, --collect ', 'repeatable value', collect, []) + .option('-l, --list ', 'comma separated list', commaSeparatedList) +; + +program.parse(); + +const options = program.opts(); +if (options.float !== undefined) console.log(`float: ${options.float}`); +if (options.integer !== undefined) console.log(`integer: ${options.integer}`); +if (options.verbose > 0) console.log(`verbosity: ${options.verbose}`); +if (options.collect.length > 0) console.log(options.collect); +if (options.list !== undefined) console.log(options.list); +``` + +```console +$ custom -f 1e2 +float: 100 +$ custom --integer 2 +integer: 2 +$ custom -v -v -v +verbose: 3 +$ custom -c a -c b -c c +[ 'a', 'b', 'c' ] +$ custom --list x,y,z +[ 'x', 'y', 'z' ] +``` + +## Commands + +You can specify (sub)commands using `.command()` or `.addCommand()`. There are two ways these can be implemented: using an action handler attached to the command, or as a stand-alone executable file (described in more detail later). The subcommands may be nested ([example](./examples/nestedCommands.js)). + +In the first parameter to `.command()` you specify the command name. You may append the command-arguments after the command name, or specify them separately using `.argument()`. The arguments may be `` or `[optional]`, and the last argument may also be `variadic...`. + +You can use `.addCommand()` to add an already configured subcommand to the program. + +For example: + +```js +// Command implemented using action handler (description is supplied separately to `.command`) +// Returns new command for configuring. +program + .command('clone [destination]') + .description('clone a repository into a newly created directory') + .action((source, destination) => { + console.log('clone command called'); + }); + +// Command implemented using stand-alone executable file, indicated by adding description as second parameter to `.command`. +// Returns `this` for adding more commands. +program + .command('start ', 'start named service') + .command('stop [service]', 'stop named service, or all if no name supplied'); + +// Command prepared separately. +// Returns `this` for adding more commands. +program + .addCommand(build.makeBuildCommand()); +``` + +Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `hidden: true` will +remove the command from the generated help output. Specifying `isDefault: true` will run the subcommand if no other +subcommand is specified ([example](./examples/defaultCommand.js)). + +You can add alternative names for a command with `.alias()`. ([example](./examples/alias.js)) + +For safety, `.addCommand()` does not automatically copy the inherited settings from the parent command. There is a helper routine `.copyInheritedSettings()` for copying the settings when they are wanted. + +### Command-arguments + +For subcommands, you can specify the argument syntax in the call to `.command()` (as shown above). This +is the only method usable for subcommands implemented using a stand-alone executable, but for other subcommands +you can instead use the following method. + +To configure a command, you can use `.argument()` to specify each expected command-argument. +You supply the argument name and an optional description. The argument may be `` or `[optional]`. +You can specify a default value for an optional command-argument. + +Example file: [argument.js](./examples/argument.js) + +```js +program + .version('0.1.0') + .argument('', 'user to login') + .argument('[password]', 'password for user, if required', 'no password given') + .action((username, password) => { + console.log('username:', username); + console.log('password:', password); + }); +``` + + The last argument of a command can be variadic, and only the last argument. To make an argument variadic you + append `...` to the argument name. A variadic argument is passed to the action handler as an array. For example: + +```js +program + .version('0.1.0') + .command('rmdir') + .argument('') + .action(function (dirs) { + dirs.forEach((dir) => { + console.log('rmdir %s', dir); + }); + }); +``` + +There is a convenience method to add multiple arguments at once, but without descriptions: + +```js +program + .arguments(' '); +``` + +#### More configuration + +There are some additional features available by constructing an `Argument` explicitly for less common cases. + +Example file: [arguments-extra.js](./examples/arguments-extra.js) + +```js +program + .addArgument(new commander.Argument('', 'drink cup size').choices(['small', 'medium', 'large'])) + .addArgument(new commander.Argument('[timeout]', 'timeout in seconds').default(60, 'one minute')) +``` + +#### Custom argument processing + +You may specify a function to do custom processing of command-arguments (like for option-arguments). +The callback function receives two parameters, the user specified command-argument and the previous value for the argument. +It returns the new value for the argument. + +The processed argument values are passed to the action handler, and saved as `.processedArgs`. + +You can optionally specify the default/starting value for the argument after the function parameter. + +Example file: [arguments-custom-processing.js](./examples/arguments-custom-processing.js) + +```js +program + .command('add') + .argument('', 'integer argument', myParseInt) + .argument('[second]', 'integer argument', myParseInt, 1000) + .action((first, second) => { + console.log(`${first} + ${second} = ${first + second}`); + }) +; +``` + +### Action handler + +The action handler gets passed a parameter for each command-argument you declared, and two additional parameters +which are the parsed options and the command object itself. + +Example file: [thank.js](./examples/thank.js) + +```js +program + .argument('') + .option('-t, --title ', 'title to use before name') + .option('-d, --debug', 'display some debugging') + .action((name, options, command) => { + if (options.debug) { + console.error('Called %s with options %o', command.name(), options); + } + const title = options.title ? `${options.title} ` : ''; + console.log(`Thank-you ${title}${name}`); + }); +``` + +If you prefer, you can work with the command directly and skip declaring the parameters for the action handler. The `this` keyword is set to the running command and can be used from a function expression (but not from an arrow function). + +Example file: [action-this.js](./examples/action-this.js) + +```js +program + .command('serve') + .argument(' -

foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

-

foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

-

foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

-

foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

-

foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

-
    -
  1. foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
  2. -
  3. foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
  4. -
-
-

blockquote foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo

-
-
    -
  • foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
  • -
  • foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
  • -
-
-

http://en.wikipedia.org/wiki/Tourism_in_Germany

-

an example

-

Another example of a link

-

foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

- -

foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

-

foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

-

http://myurl.com/foo_bar_baz_bar_foo

-

http://myurl.com/foo_bar_baz_bar_foo

-

italics.

-

italics .

diff --git a/node_modules/showdown/test/ghost/underscore.md b/node_modules/showdown/test/ghost/underscore.md deleted file mode 100644 index fae7be09..00000000 --- a/node_modules/showdown/test/ghost/underscore.md +++ /dev/null @@ -1,77 +0,0 @@ -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -_baz_bar_foo_ - -__baz_bar_foo__ - -___baz_bar_foo___ - -baz bar foo _baz_bar_foo foo bar baz_ and foo - -foo\_bar\_baz foo\_bar\_baz\_bar\_foo \_foo\_bar baz\_bar\_ baz\_foo - -`foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo` - - - foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - - -```html -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo -``` - -
foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
- -
foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
- -
foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
- - - -[foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo](http://myurl.com/foo_bar_baz_bar_foo) - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo ------ - -### foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -1. foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo -2. foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -> blockquote foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -* foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo -* foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -------- - -http://en.wikipedia.org/wiki/Tourism_in_Germany - -[an example] [wiki] - -Another [example][wiki] of a link - -[wiki]: http://en.wikipedia.org/wiki/Tourism_in_Germany - -

foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

- - - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -![foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo](http://myurl.com/foo_bar_baz_bar_foo) - -http://myurl.com/foo_bar_baz_bar_foo - - - -_italics_. - -_italics_ . diff --git a/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.html b/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.html deleted file mode 100644 index aee64358..00000000 --- a/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.html +++ /dev/null @@ -1,6 +0,0 @@ -

escaped word_with_underscores

-

escaped word__with__double underscores

-

escaped word_with_single italic underscore

-

escaped word*with*asterixs

-

escaped word**with**asterixs

-

escaped word*with*bold asterixs

diff --git a/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.md b/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.md deleted file mode 100644 index 8d22521f..00000000 --- a/node_modules/showdown/test/issues/#107.inner-underscore-parse-to-block.md +++ /dev/null @@ -1,11 +0,0 @@ -escaped word\_with\_underscores - -escaped word\_\_with\_\_double underscores - -escaped word_\_with\__single italic underscore - -escaped word\*with*asterixs - -escaped word\*\*with\*\*asterixs - -escaped word**\*with\***bold asterixs diff --git a/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.html b/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.html deleted file mode 100644 index 49c9ca43..00000000 --- a/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.html +++ /dev/null @@ -1,12 +0,0 @@ -
    -
  • Item 1
  • -
  • Item 2
  • -
-
    -
  1. Item 1
  2. -
  3. Item 2
  4. -
-
    -
  • Item 1
  • -
  • Item 2
  • -
diff --git a/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.md b/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.md deleted file mode 100644 index 4621a36f..00000000 --- a/node_modules/showdown/test/issues/#142.odd-behaviour-for-multiple-consecutive-lists.md +++ /dev/null @@ -1,8 +0,0 @@ -* Item 1 -* Item 2 - -1. Item 1 -2. Item 2 - -- Item 1 -- Item 2 diff --git a/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.html b/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.html deleted file mode 100644 index 8f9d2e5d..00000000 --- a/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.html +++ /dev/null @@ -1 +0,0 @@ -

2015-10-04

\ No newline at end of file diff --git a/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.md b/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.md deleted file mode 100644 index d0d6dda6..00000000 --- a/node_modules/showdown/test/issues/#150.hyphens-are-getting-removed.md +++ /dev/null @@ -1 +0,0 @@ -2015-10-04 diff --git a/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.html b/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.html deleted file mode 100644 index cbf97c79..00000000 --- a/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.html +++ /dev/null @@ -1,12 +0,0 @@ -
    -
  1. Hi, I am a thing

    -
    $ git clone thing.git
    -
    -dfgdfg
    -
  2. -
  3. I am another thing!

    -
    $ git clone other-thing.git
    -
    -foobar
    -
  4. -
diff --git a/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.md b/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.md deleted file mode 100644 index fd5634df..00000000 --- a/node_modules/showdown/test/issues/#183.gh-code-blocks-within-lists-do-not-render-properly.md +++ /dev/null @@ -1,17 +0,0 @@ -1. Hi, I am a thing - - ```sh - - $ git clone thing.git - - dfgdfg - ``` - -1. I am another thing! - - ```sh - - $ git clone other-thing.git - - foobar - ``` diff --git a/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.html b/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.html deleted file mode 100644 index b5942885..00000000 --- a/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.html +++ /dev/null @@ -1,4 +0,0 @@ -
-

a blockquote

-

followed by an heading

-
\ No newline at end of file diff --git a/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.md b/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.md deleted file mode 100644 index f60ccb8d..00000000 --- a/node_modules/showdown/test/issues/#191.blockquote-followed-by-an-heading.md +++ /dev/null @@ -1,2 +0,0 @@ -> a blockquote -# followed by an heading diff --git a/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.html b/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.html deleted file mode 100644 index 8de7bb38..00000000 --- a/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.html +++ /dev/null @@ -1,11 +0,0 @@ -

Test pre in a list

-
    -
  • & <
  • -
  • & <
      -
    • & <
    • -
    • & <
        -
      • & <
      • -
      • & <
          -
        • & <
        • -
        • & <
  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.md b/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.md deleted file mode 100644 index cec26706..00000000 --- a/node_modules/showdown/test/issues/#196.entity-in-code-block-in-nested-list.md +++ /dev/null @@ -1,10 +0,0 @@ -Test pre in a list - -- & < -- `& <` - - & < - - `& <` - - & < - - `& <` - - & < - - `& <` diff --git a/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.html b/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.html deleted file mode 100644 index 66439cbf..00000000 --- a/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.html +++ /dev/null @@ -1,5 +0,0 @@ -

Title 1

-
-

Title 2

-
-
diff --git a/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.md b/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.md deleted file mode 100644 index 4cf6aa8c..00000000 --- a/node_modules/showdown/test/issues/#220.html-breaks-markdown-parsing.md +++ /dev/null @@ -1,11 +0,0 @@ -Title 1 -------- - -
- - -# Title 2 - - -
-
diff --git a/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.html b/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.html deleted file mode 100644 index 53c82431..00000000 --- a/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.html +++ /dev/null @@ -1,22 +0,0 @@ -

-foo
-
-```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-bar
-
-

this is a long paragraph

-

this is another long paragraph

-
```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-```python
-s = "Python syntax highlighting"
-print s
-```
-
diff --git a/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.md b/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.md deleted file mode 100644 index d234cf0e..00000000 --- a/node_modules/showdown/test/issues/#229.2.code-being-parsed-inside-HTML-code-tags.md +++ /dev/null @@ -1,25 +0,0 @@ -

-foo
-
-```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-bar
-
- -this is a long paragraph - -this is another long paragraph - -
```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-```python
-s = "Python syntax highlighting"
-print s
-```
-
diff --git a/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.html b/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.html deleted file mode 100644 index deba3d4d..00000000 --- a/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.html +++ /dev/null @@ -1,16 +0,0 @@ -

-```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-```python
-s = "Python syntax highlighting"
-print s
-```
-
-```
-No language indicated, so no syntax highlighting.
-But let's throw in a <b>tag</b>.
-```
-
diff --git a/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.md b/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.md deleted file mode 100644 index 5a148cef..00000000 --- a/node_modules/showdown/test/issues/#229.code-being-parsed-inside-HTML-code-tags.md +++ /dev/null @@ -1,16 +0,0 @@ -

-```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-```python
-s = "Python syntax highlighting"
-print s
-```
-
-```
-No language indicated, so no syntax highlighting.
-But let's throw in a tag.
-```
-
diff --git a/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.html b/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.html deleted file mode 100644 index 9ce90ea9..00000000 --- a/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.html +++ /dev/null @@ -1,10 +0,0 @@ -
```python
-var s;
-```
-
-

this is a long paragraph

-

-```javascript
-var s;
-```
-
diff --git a/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.md b/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.md deleted file mode 100644 index 9362a18d..00000000 --- a/node_modules/showdown/test/issues/#230.paragraphs-are-ignored-between-code-tags.md +++ /dev/null @@ -1,12 +0,0 @@ -
```python
-var s;
-```
-
- -this is a long paragraph - -

-```javascript
-var s;
-```
-
diff --git a/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.html b/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.html deleted file mode 100644 index 53ed8b7b..00000000 --- a/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.html +++ /dev/null @@ -1,5 +0,0 @@ -

this should be

-

this should be

-

this should be

-

this should> appear

-

this text <should appear

diff --git a/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.md b/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.md deleted file mode 100644 index a73cfbfe..00000000 --- a/node_modules/showdown/test/issues/#236.wrong-lt-parsing-when-attached-to-word.md +++ /dev/null @@ -1,9 +0,0 @@ -this should be - -this should be - -this should be - -this should> appear - -this text sd-inline sd-ref

-

foo

-

sd-inline sd-ref

-

foo

-

sd-ref sd-inline

-

foo

-

sd-ref sd-inline

-

foo

-

sd-ref

diff --git a/node_modules/showdown/test/issues/#261.mix-images-with-links.md b/node_modules/showdown/test/issues/#261.mix-images-with-links.md deleted file mode 100644 index f9583e07..00000000 --- a/node_modules/showdown/test/issues/#261.mix-images-with-links.md +++ /dev/null @@ -1,19 +0,0 @@ -![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo] - -foo - -[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo] - -foo - -![sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) - -foo - -[sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) - -foo - -[![sd-ref][sd-logo]](http://www.google.com/) - -[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png diff --git a/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.html b/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.html deleted file mode 100644 index 117f37da..00000000 --- a/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.html +++ /dev/null @@ -1,3 +0,0 @@ -

sd-inline sd-ref

-

foo

-

sd-ref sd-inline

diff --git a/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.md b/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.md deleted file mode 100644 index 0e76cbb3..00000000 --- a/node_modules/showdown/test/issues/#261.reference-style-image-after-inline-style-image-does-not-work-correctely.md +++ /dev/null @@ -1,7 +0,0 @@ -![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo] - -foo - -![sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) - -[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png diff --git a/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.html b/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.html deleted file mode 100644 index 13bb32f9..00000000 --- a/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.html +++ /dev/null @@ -1,3 +0,0 @@ -

sd-inline sd-ref

-

foo

-

sd-ref sd-inline

diff --git a/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.md b/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.md deleted file mode 100644 index 40b7f8f8..00000000 --- a/node_modules/showdown/test/issues/#261.reference-style-link-after-inline-style-link-does-not-work-correctely.md +++ /dev/null @@ -1,7 +0,0 @@ -[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo] - -foo - -[sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) - -[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png diff --git a/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.html b/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.html deleted file mode 100644 index d18a6a5b..00000000 --- a/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.html +++ /dev/null @@ -1,18 +0,0 @@ -
    -
  • list item 1

    -
    <parent>
    -<child>child1</child>
    -<!-- This is a comment -->
    -<child>child2</child>
    -<child>some text <!-- a comment --></child>
    -</parent>
    -
  • -
  • list item 2

  • -
-
<parent>
-<child>child1</child>
-<!-- This is a comment -->
-<child>child2</child>
-<child>some text <!-- a comment --></child>
-</parent>
-
diff --git a/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.md b/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.md deleted file mode 100644 index 8f918a53..00000000 --- a/node_modules/showdown/test/issues/#288.code-blocks-containing-xml-comments-are-not-converted-correctly-when-nested-in-list-items.md +++ /dev/null @@ -1,21 +0,0 @@ -* list item 1 - - ``` - - child1 - - child2 - some text - - ``` - -* list item 2 - -``` - -child1 - -child2 -some text - -``` diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.html b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.html deleted file mode 100644 index a5680aeb..00000000 --- a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.html +++ /dev/null @@ -1,50 +0,0 @@ -
    -
  • one
  • -
-
    -
  1. two
  2. -
-

foo

-
    -
  • one
  • -
-
    -
  1. two
  2. -
-

foo

-
    -
  • one
  • -
-
    -
  1. two
  2. -
-

foo

-
    -
  • one
      -
    1. two
  • -
-

foo

-
    -
  • one
  • -
  • two
  • -
-

foo

-
    -
  • one
  • -
  • two
  • -
-

foo

-
    -
  • one
  • -
  • two
  • -
-

foo

-
    -
  • one
  • -
  • two
  • -
-

foo

-
    -
  • one
      -
    • two
  • -
diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.md b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.md deleted file mode 100644 index 138dc8e0..00000000 --- a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-2.md +++ /dev/null @@ -1,42 +0,0 @@ - * one - 1. two - -foo - - * one - 1. two - -foo - - * one - 1. two - -foo - - * one - 1. two - -foo - - * one - * two - -foo - - * one - * two - -foo - - * one - * two - -foo - - * one -* two - -foo - - * one - * two diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.html b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.html deleted file mode 100644 index c67bf4b3..00000000 --- a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.html +++ /dev/null @@ -1,15 +0,0 @@ -
    -
  • one long paragraph of -text
  • -
-
    -
  1. two
  2. -
-

foo

-
    -
  • one long paragraph of -text
  • -
-
    -
  1. two
  2. -
diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.md b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.md deleted file mode 100644 index fc1abd86..00000000 --- a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior-3.md +++ /dev/null @@ -1,9 +0,0 @@ - * one long paragraph of -text - 1. two - -foo - - * one long paragraph of -text - 1. two diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.html b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.html deleted file mode 100644 index 33ac02bc..00000000 --- a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.html +++ /dev/null @@ -1,47 +0,0 @@ -
    -
  • one
  • -
-
    -
  1. two
  2. -
-

foo

-
    -
  • one
  • -
-
    -
  1. two
  2. -
-

foo

-
    -
  • one
  • -
-
    -
  1. two
  2. -
-

foo

-
    -
  • one
  • -
-
    -
  1. two
  2. -
-

foo

-
    -
  • uli one
  • -
  • uli two
  • -
-

foo

-
    -
  • uli one
  • -
  • uli two
  • -
-

foo

-
    -
  • uli one
  • -
  • uli two
  • -
-

foo

-
    -
  • uli one
  • -
  • uli two
  • -
diff --git a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.md b/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.md deleted file mode 100644 index ca0c0a6f..00000000 --- a/node_modules/showdown/test/issues/#299.nested-ordered-unordered-list-inconsistent-behavior.md +++ /dev/null @@ -1,37 +0,0 @@ -* one -1. two - -foo - -* one - 1. two - -foo - -* one - 1. two - -foo - -* one - 1. two - -foo - -* uli one -* uli two - -foo - -* uli one - * uli two - -foo - -* uli one - * uli two - -foo - -* uli one - * uli two diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.html b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.html deleted file mode 100644 index c36379ba..00000000 --- a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.html +++ /dev/null @@ -1,15 +0,0 @@ -
    -
  • - - a
  • -
-

a

-
    -
  • - * - - + a
  • -
-

a

-
    -
  1. 2. 3. 4. 5.
  2. -
-

a

-
    -
  1. 2. 3. 4. 5. a
  2. -
diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.md b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.md deleted file mode 100644 index 5aa10333..00000000 --- a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char.md +++ /dev/null @@ -1,13 +0,0 @@ -- - - a - -a - -+ - * - - + a - -a - -1. 2. 3. 4. 5. - -a - -1. 2. 3. 4. 5. a diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.html b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.html deleted file mode 100644 index 43b3b064..00000000 --- a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.html +++ /dev/null @@ -1,8 +0,0 @@ -
    -
  • - - a

  • -
  • - * - - + a

  • -
-
    -
  1. 2. 3. 4. 5.

  2. -
  3. 2. 3. 4. 5. a

  4. -
diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.md b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.md deleted file mode 100644 index d40889fe..00000000 --- a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char2.md +++ /dev/null @@ -1,7 +0,0 @@ -- - - a - -+ - * - - + a - -1. 2. 3. 4. 5. - -1. 2. 3. 4. 5. a diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.html b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.html deleted file mode 100644 index 717d2f32..00000000 --- a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.html +++ /dev/null @@ -1,10 +0,0 @@ -
    -
  • - -a
  • -
-

fooo

-
    -
  • - - aaaaa

    -

    bbbbb

  • -
- diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.md b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.md deleted file mode 100644 index b40ff474..00000000 --- a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char3.md +++ /dev/null @@ -1,10 +0,0 @@ -- - -a - - -fooo - - -- - - aaaaa - - bbbbb diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.html b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.html deleted file mode 100644 index e60553ad..00000000 --- a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.html +++ /dev/null @@ -1,3 +0,0 @@ -
    -
  • - - - -- - - - - - - -- - - - - - - - - - - - - - - - - - - - abcd
  • -
diff --git a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.md b/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.md deleted file mode 100644 index e8d2acca..00000000 --- a/node_modules/showdown/test/issues/#312.spaced-dashes-followed-by-char4.md +++ /dev/null @@ -1 +0,0 @@ -- - - - -- - - - - - - -- - - - - - - - - - - - - - - - - - - - abcd diff --git a/node_modules/showdown/test/issues/#317.spaces-before-hr.html b/node_modules/showdown/test/issues/#317.spaces-before-hr.html deleted file mode 100644 index 42714bd3..00000000 --- a/node_modules/showdown/test/issues/#317.spaces-before-hr.html +++ /dev/null @@ -1,2 +0,0 @@ -
-
diff --git a/node_modules/showdown/test/issues/#317.spaces-before-hr.md b/node_modules/showdown/test/issues/#317.spaces-before-hr.md deleted file mode 100644 index 36c05951..00000000 --- a/node_modules/showdown/test/issues/#317.spaces-before-hr.md +++ /dev/null @@ -1,3 +0,0 @@ - --- - - - - - diff --git a/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.html b/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.html deleted file mode 100644 index 7dbf76f2..00000000 --- a/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.html +++ /dev/null @@ -1,21 +0,0 @@ -

foo *bar *baz

-

foo **bar **baz

-

foo ***bar ***baz

-

foo _bar _baz

-

foo __bar __baz

-

foo ___bar ___baz

-

foo *bar *baz *bazinga

-

foo **bar **baz **bazinga

-

foo ***bar ***baz ***bazinga

-

foo _bar _baz __bazinga

-

foo __bar __baz __bazinga

-

foo ___bar ___baz ___bazinga

-

f

-

f

-

f

-

f

-

foo **bar **baz bazinga bla

-

foo bar **baz **bazinga bla

-

foo **bar **baz **bazinga bla

-

this is imbued link with strong

-

this is imbued link with strong

diff --git a/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.md b/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.md deleted file mode 100644 index e4538720..00000000 --- a/node_modules/showdown/test/issues/#332.inconsistent-behavior-of-emphasis-and-strong.md +++ /dev/null @@ -1,41 +0,0 @@ -foo *bar *baz - -foo **bar **baz - -foo ***bar ***baz - -foo _bar _baz - -foo __bar __baz - -foo ___bar ___baz - -foo *bar *baz *bazinga - -foo **bar **baz **bazinga - -foo ***bar ***baz ***bazinga - -foo _bar _baz __bazinga - -foo __bar __baz __bazinga - -foo ___bar ___baz ___bazinga - -*f* - -**f** - -_f_ - -__f__ - -foo **bar **baz **bazinga bla** - -foo __bar **baz **bazinga bla__ - -foo __**bar **baz **bazinga bla__ - -this is **imbued link with strong** - -this is __imbued link with strong__ diff --git a/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.html b/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.html deleted file mode 100644 index 9c79cdee..00000000 --- a/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.html +++ /dev/null @@ -1 +0,0 @@ -

this |

diff --git a/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.md b/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.md deleted file mode 100644 index 26055b30..00000000 --- a/node_modules/showdown/test/issues/#345.no-escape-for-the-pipe-character.md +++ /dev/null @@ -1 +0,0 @@ -this \| diff --git a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.html b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.html deleted file mode 100644 index d5290b49..00000000 --- a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.html +++ /dev/null @@ -1,4 +0,0 @@ -

This is an image

-

This is another image

-

image link

-

image link

diff --git a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.md b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.md deleted file mode 100644 index 6340f75e..00000000 --- a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-images.md +++ /dev/null @@ -1,9 +0,0 @@ -This is an ![image][] - -[image]: ./image/cat(1).png - -This is another ![image](./image/cat(1).png) - -[![image link](./image/cat(1).png)](http://example.com) - -[![image link](<./image/cat1).png>)](http://example.com) diff --git a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.html b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.html deleted file mode 100644 index acff8f95..00000000 --- a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.html +++ /dev/null @@ -1,3 +0,0 @@ -

This is a link.

-

This is another link.

-

link

diff --git a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.md b/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.md deleted file mode 100644 index 338fcdd1..00000000 --- a/node_modules/showdown/test/issues/#390.brackets-in-URL-break-links.md +++ /dev/null @@ -1,7 +0,0 @@ -This is a [link][]. - -[link]: https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile" - -This is another [link](https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile"). - -[link](<./image/cat1).png> "title") diff --git a/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.html b/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.html deleted file mode 100644 index 643007e1..00000000 --- a/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.html +++ /dev/null @@ -1 +0,0 @@ -

malformed

diff --git a/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.md b/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.md deleted file mode 100644 index 3cdae761..00000000 --- a/node_modules/showdown/test/issues/#393.showdown-hangs-with-malformed-html.md +++ /dev/null @@ -1 +0,0 @@ -

malformed

diff --git a/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.html b/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.html deleted file mode 100644 index bab378d5..00000000 --- a/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.html +++ /dev/null @@ -1,14 +0,0 @@ -

    -
  • Customer – Opens the Customer List. Refer to the document “Customer Management”.

    -
      -
    • Customer List
    • -
    • New Customer
    • -
    • Customer Prices
    • -
    • Appointments
  • -
  • Designer - Opens the Designer List. Refer to the document “Designer Commissions”.

    -
      -
    • Designer List
    • -
    • New Designer
    • -
    • Designer Payment List
    • -
    • New Designer Payment
  • -
diff --git a/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.md b/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.md deleted file mode 100644 index 59bc46bd..00000000 --- a/node_modules/showdown/test/issues/#397.unordered-list-strange-behavior.md +++ /dev/null @@ -1,11 +0,0 @@ -- **Customer** – Opens the Customer List. Refer to the document “Customer Management”. - - Customer List - - New Customer - - Customer Prices - - Appointments - -- **Designer** - Opens the Designer List. Refer to the document “Designer Commissions”. - - Designer List - - New Designer - - Designer Payment List - - New Designer Payment \ No newline at end of file diff --git a/node_modules/showdown/test/issues/#429.multiline-base64-image-support.html b/node_modules/showdown/test/issues/#429.multiline-base64-image-support.html deleted file mode 100644 index 8a26284d..00000000 --- a/node_modules/showdown/test/issues/#429.multiline-base64-image-support.html +++ /dev/null @@ -1,3 +0,0 @@ -

foo

-

bar

- diff --git a/node_modules/showdown/test/issues/#429.multiline-base64-image-support.md b/node_modules/showdown/test/issues/#429.multiline-base64-image-support.md deleted file mode 100644 index 61e2f566..00000000 --- a/node_modules/showdown/test/issues/#429.multiline-base64-image-support.md +++ /dev/null @@ -1,9 +0,0 @@ -![foo](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7ljmRAAAAAXNSR0IArs4c6QAAAARnQU1BAA -Cxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYSURBVBhXYwCC/2AAZYEoOAMs8Z+BgQEAXdcR7/Q1gssAAAAASUVORK5CYII=) - -![bar][] - - -[bar]: -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7ljmRAAAAAXNSR0IArs4c6QAAAARnQU1BAA -Cxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYSURBVBhXYwCC/2AAZYEoOAMs8Z+BgQEAXdcR7/Q1gssAAAAASUVORK5CYII= diff --git a/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.html b/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.html deleted file mode 100644 index 9ff791b3..00000000 --- a/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.html +++ /dev/null @@ -1,5 +0,0 @@ -

header id in h2

-

header id in h3

-

header id in h4

-
header id in h5
-
header id in h6
diff --git a/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.md b/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.md deleted file mode 100644 index cb52effa..00000000 --- a/node_modules/showdown/test/issues/#467.header-ids-for-subheadings.md +++ /dev/null @@ -1,9 +0,0 @@ -## header id in h2 - -### header id in h3 - -#### header id in h4 - -##### header id in h5 - -###### header id in h6 diff --git a/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.html b/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.html deleted file mode 100644 index ab9ddaa3..00000000 --- a/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.html +++ /dev/null @@ -1,15 +0,0 @@ -
var test = test;
-function foo() {
-  return 'bar';
-}
-
-
var test = test;
-function foo() {
-  return 'bar';
-}
-
-
var test = test;
-function foo() {
-  return 'bar';
-}
-
diff --git a/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.md b/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.md deleted file mode 100644 index 9289cd06..00000000 --- a/node_modules/showdown/test/issues/#523.leading-space-breaks-gfm-code-blocks.md +++ /dev/null @@ -1,20 +0,0 @@ - ```javascript -var test = test; -function foo() { - return 'bar'; -} - ``` - - ```javascript -var test = test; -function foo() { - return 'bar'; -} - ``` - - ```javascript -var test = test; -function foo() { - return 'bar'; -} - ``` diff --git a/node_modules/showdown/test/issues/#585.error-when-using-image-references.html b/node_modules/showdown/test/issues/#585.error-when-using-image-references.html deleted file mode 100644 index 880d804e..00000000 --- a/node_modules/showdown/test/issues/#585.error-when-using-image-references.html +++ /dev/null @@ -1 +0,0 @@ -

[the-image]

diff --git a/node_modules/showdown/test/issues/#585.error-when-using-image-references.md b/node_modules/showdown/test/issues/#585.error-when-using-image-references.md deleted file mode 100644 index 8855cb3b..00000000 --- a/node_modules/showdown/test/issues/#585.error-when-using-image-references.md +++ /dev/null @@ -1,3 +0,0 @@ -[![the-image]] - -[the-image]: http://example.com/foo.png diff --git a/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.html b/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.html deleted file mode 100644 index 8d6f94bc..00000000 --- a/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.html +++ /dev/null @@ -1,3 +0,0 @@ -

plain text link http://test.com/this_has/one.html with underscores

-

legit·word_with·1·underscore

-

a wordwith2underscores (gets em)

diff --git a/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.md b/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.md deleted file mode 100644 index e2118ed3..00000000 --- a/node_modules/showdown/test/issues/#83.parsed-text-links-with-underscores.md +++ /dev/null @@ -1,5 +0,0 @@ -plain text link http://test.com/this_has/one.html with underscores - -legit·word_with·1·underscore - -a word_with_2underscores (gets em) diff --git a/node_modules/showdown/test/issues/#96.underscores-in-links.html b/node_modules/showdown/test/issues/#96.underscores-in-links.html deleted file mode 100644 index 975c4f59..00000000 --- a/node_modules/showdown/test/issues/#96.underscores-in-links.html +++ /dev/null @@ -1,2 +0,0 @@ -

this is a underscore_test my cat

-

another my cat underscore_test bla

diff --git a/node_modules/showdown/test/issues/#96.underscores-in-links.md b/node_modules/showdown/test/issues/#96.underscores-in-links.md deleted file mode 100644 index 9b4ba0db..00000000 --- a/node_modules/showdown/test/issues/#96.underscores-in-links.md +++ /dev/null @@ -1,3 +0,0 @@ -this is a underscore_test ![my cat](http://myserver.com/my_kitty.jpg) - -another ![my cat](http://myserver.com/my_kitty.jpg) underscore_test bla diff --git a/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.html b/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.html deleted file mode 100644 index 166a9d30..00000000 --- a/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.html +++ /dev/null @@ -1,5 +0,0 @@ -

link

-

link

-

image

-

image

-

image

diff --git a/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.md b/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.md deleted file mode 100644 index 5d324574..00000000 --- a/node_modules/showdown/test/issues/URLs-with-multiple-parenthesis.md +++ /dev/null @@ -1,9 +0,0 @@ -[link](<./images(1)/cat(1).png>) - -[link](<./images(1)/cat(1).png> "title") - -![image](<./images(1)/cat(1).png>) - -![image](<./images(1)/cat(1).png> "title") - -![image](<./images(1)/cat(1).png> =800x600 "title") diff --git a/node_modules/showdown/test/issues/crazy-urls.html b/node_modules/showdown/test/issues/crazy-urls.html deleted file mode 100644 index d5a1f3a7..00000000 --- a/node_modules/showdown/test/issues/crazy-urls.html +++ /dev/null @@ -1,14 +0,0 @@ -

my cat

-

my cat

-

foo

-

foo

-

foo

-

foo

-

empty

-

empty

-

empty

-

empty

-

empty

-

empty

-

empty

-

empty

diff --git a/node_modules/showdown/test/issues/crazy-urls.md b/node_modules/showdown/test/issues/crazy-urls.md deleted file mode 100644 index 3299d5b6..00000000 --- a/node_modules/showdown/test/issues/crazy-urls.md +++ /dev/null @@ -1,27 +0,0 @@ -![my cat]() - -[my cat]() - -![foo]() - -![foo]( "title") - -[foo]() - -[foo]( "title") - -![empty](<>) - -[empty](<>) - -![empty](<> "title") - -[empty](<> "title") - -![empty](< >) - -[empty](< >) - -![empty](< > "title") - -[empty](< > "title") diff --git a/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.html b/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.html deleted file mode 100644 index 433c4666..00000000 --- a/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.html +++ /dev/null @@ -1,12 +0,0 @@ -
-
-
-
- text -
-
- text -
-
-
-
diff --git a/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.md b/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.md deleted file mode 100644 index 59047cf7..00000000 --- a/node_modules/showdown/test/issues/deeply-nested-HTML-blocks.md +++ /dev/null @@ -1,12 +0,0 @@ -
-
-
-
- text -
-
- text -
-
-
-
\ No newline at end of file diff --git a/node_modules/showdown/test/issues/handle-html-pre.html b/node_modules/showdown/test/issues/handle-html-pre.html deleted file mode 100644 index 1b539924..00000000 --- a/node_modules/showdown/test/issues/handle-html-pre.html +++ /dev/null @@ -1,4 +0,0 @@ -

hmm

-
-this is `a\_test` and this\_too and finally_this_is
-
diff --git a/node_modules/showdown/test/issues/handle-html-pre.md b/node_modules/showdown/test/issues/handle-html-pre.md deleted file mode 100644 index e2a6333a..00000000 --- a/node_modules/showdown/test/issues/handle-html-pre.md +++ /dev/null @@ -1,4 +0,0 @@ -hmm -
-this is `a\_test` and this\_too and finally_this_is
-
diff --git a/node_modules/showdown/test/issues/one-line-HTML-input.html b/node_modules/showdown/test/issues/one-line-HTML-input.html deleted file mode 100644 index b009ba29..00000000 --- a/node_modules/showdown/test/issues/one-line-HTML-input.html +++ /dev/null @@ -1,3 +0,0 @@ -
a
b
-
<div>**foobar**</div>
-
diff --git a/node_modules/showdown/test/issues/one-line-HTML-input.md b/node_modules/showdown/test/issues/one-line-HTML-input.md deleted file mode 100644 index 9fc4eef3..00000000 --- a/node_modules/showdown/test/issues/one-line-HTML-input.md +++ /dev/null @@ -1,3 +0,0 @@ -
a
b
- -
**foobar**
diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.html b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.html deleted file mode 100644 index 7c095bbd..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.html +++ /dev/null @@ -1,4 +0,0 @@ -

This is a first paragraph, -on multiple lines.

-

This is a second paragraph. -There are spaces in between the two.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.md b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.md deleted file mode 100644 index 460d600c..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return-spaces.md +++ /dev/null @@ -1,5 +0,0 @@ -This is a first paragraph, -on multiple lines. - -This is a second paragraph. -There are spaces in between the two. diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.html b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.html deleted file mode 100644 index a2d0808e..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.html +++ /dev/null @@ -1,4 +0,0 @@ -

This is a first paragraph, -on multiple lines.

-

This is a second paragraph -which has multiple lines too.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.md b/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.md deleted file mode 100644 index a3ac9dff..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-hard-return.md +++ /dev/null @@ -1,5 +0,0 @@ -This is a first paragraph, -on multiple lines. - -This is a second paragraph -which has multiple lines too. diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.html b/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.html deleted file mode 100644 index 87f33f6a..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.html +++ /dev/null @@ -1,2 +0,0 @@ -

A first paragraph.

-

A second paragraph after 3 CR (carriage return).

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.md b/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.md deleted file mode 100644 index 9ff9b422..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-line-returns.md +++ /dev/null @@ -1,5 +0,0 @@ -A first paragraph. - - - -A second paragraph after 3 CR (carriage return). diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.html b/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.html deleted file mode 100644 index 601651dc..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.html +++ /dev/null @@ -1,2 +0,0 @@ -

This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.

-

A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.md b/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.md deleted file mode 100644 index 2c18220f..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-line-spaces.md +++ /dev/null @@ -1,3 +0,0 @@ -This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. - -A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line. diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.html b/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.html deleted file mode 100644 index 1f535649..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.html +++ /dev/null @@ -1,2 +0,0 @@ -

This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.

-

1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.md b/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.md deleted file mode 100644 index 335e420a..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-line-tab.md +++ /dev/null @@ -1,3 +0,0 @@ -This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. - -1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line. diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line.html b/node_modules/showdown/test/karlcow/2-paragraphs-line.html deleted file mode 100644 index 07aba479..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-line.html +++ /dev/null @@ -1,2 +0,0 @@ -

This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.

-

A new long long long long long long long long long long long long long long long long paragraph on 1 line.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/2-paragraphs-line.md b/node_modules/showdown/test/karlcow/2-paragraphs-line.md deleted file mode 100644 index 25012924..00000000 --- a/node_modules/showdown/test/karlcow/2-paragraphs-line.md +++ /dev/null @@ -1,3 +0,0 @@ -This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. - -A new long long long long long long long long long long long long long long long long paragraph on 1 line. diff --git a/node_modules/showdown/test/karlcow/EOL-CR+LF.html b/node_modules/showdown/test/karlcow/EOL-CR+LF.html deleted file mode 100644 index 49afea4d..00000000 --- a/node_modules/showdown/test/karlcow/EOL-CR+LF.html +++ /dev/null @@ -1,3 +0,0 @@ -

These lines all end with end of line (EOL) sequences.

-

Seriously, they really do.

-

If you don't believe me: HEX EDIT!

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/EOL-CR+LF.md b/node_modules/showdown/test/karlcow/EOL-CR+LF.md deleted file mode 100644 index 15cb86e7..00000000 --- a/node_modules/showdown/test/karlcow/EOL-CR+LF.md +++ /dev/null @@ -1,6 +0,0 @@ -These lines all end with end of line (EOL) sequences. - -Seriously, they really do. - -If you don't believe me: HEX EDIT! - diff --git a/node_modules/showdown/test/karlcow/EOL-CR.html b/node_modules/showdown/test/karlcow/EOL-CR.html deleted file mode 100644 index 0c04b14d..00000000 --- a/node_modules/showdown/test/karlcow/EOL-CR.html +++ /dev/null @@ -1 +0,0 @@ -

These lines all end with end of line (EOL) sequences.

Seriously, they really do.

If you don't believe me: HEX EDIT!

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/EOL-CR.md b/node_modules/showdown/test/karlcow/EOL-CR.md deleted file mode 100644 index f0a17c89..00000000 --- a/node_modules/showdown/test/karlcow/EOL-CR.md +++ /dev/null @@ -1 +0,0 @@ -These lines all end with end of line (EOL) sequences. Seriously, they really do. If you don't believe me: HEX EDIT! \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/EOL-LF.html b/node_modules/showdown/test/karlcow/EOL-LF.html deleted file mode 100644 index 49afea4d..00000000 --- a/node_modules/showdown/test/karlcow/EOL-LF.html +++ /dev/null @@ -1,3 +0,0 @@ -

These lines all end with end of line (EOL) sequences.

-

Seriously, they really do.

-

If you don't believe me: HEX EDIT!

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/EOL-LF.md b/node_modules/showdown/test/karlcow/EOL-LF.md deleted file mode 100644 index 15cb86e7..00000000 --- a/node_modules/showdown/test/karlcow/EOL-LF.md +++ /dev/null @@ -1,6 +0,0 @@ -These lines all end with end of line (EOL) sequences. - -Seriously, they really do. - -If you don't believe me: HEX EDIT! - diff --git a/node_modules/showdown/test/karlcow/ampersand-text-flow.html b/node_modules/showdown/test/karlcow/ampersand-text-flow.html deleted file mode 100644 index 0f2eaf32..00000000 --- a/node_modules/showdown/test/karlcow/ampersand-text-flow.html +++ /dev/null @@ -1 +0,0 @@ -

An ampersand & in the text flow is escaped as an html entity.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ampersand-text-flow.md b/node_modules/showdown/test/karlcow/ampersand-text-flow.md deleted file mode 100644 index 11ab4db4..00000000 --- a/node_modules/showdown/test/karlcow/ampersand-text-flow.md +++ /dev/null @@ -1 +0,0 @@ -An ampersand & in the text flow is escaped as an html entity. diff --git a/node_modules/showdown/test/karlcow/ampersand-uri.html b/node_modules/showdown/test/karlcow/ampersand-uri.html deleted file mode 100644 index 12b30540..00000000 --- a/node_modules/showdown/test/karlcow/ampersand-uri.html +++ /dev/null @@ -1 +0,0 @@ -

There is an ampersand in the URI.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ampersand-uri.md b/node_modules/showdown/test/karlcow/ampersand-uri.md deleted file mode 100644 index 68a9b72b..00000000 --- a/node_modules/showdown/test/karlcow/ampersand-uri.md +++ /dev/null @@ -1 +0,0 @@ -There is an [ampersand](http://validator.w3.org/check?uri=http://www.w3.org/&verbose=1) in the URI. diff --git a/node_modules/showdown/test/karlcow/asterisk-near-text.html b/node_modules/showdown/test/karlcow/asterisk-near-text.html deleted file mode 100644 index aa442c3c..00000000 --- a/node_modules/showdown/test/karlcow/asterisk-near-text.html +++ /dev/null @@ -1 +0,0 @@ -

This is *an asterisk which should stay as is.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/asterisk-near-text.md b/node_modules/showdown/test/karlcow/asterisk-near-text.md deleted file mode 100644 index d24ce2e8..00000000 --- a/node_modules/showdown/test/karlcow/asterisk-near-text.md +++ /dev/null @@ -1 +0,0 @@ -This is \*an asterisk which should stay as is. diff --git a/node_modules/showdown/test/karlcow/asterisk.html b/node_modules/showdown/test/karlcow/asterisk.html deleted file mode 100644 index b6c93a89..00000000 --- a/node_modules/showdown/test/karlcow/asterisk.html +++ /dev/null @@ -1 +0,0 @@ -

This is * an asterisk which should stay as is.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/asterisk.md b/node_modules/showdown/test/karlcow/asterisk.md deleted file mode 100644 index 787ea411..00000000 --- a/node_modules/showdown/test/karlcow/asterisk.md +++ /dev/null @@ -1 +0,0 @@ -This is * an asterisk which should stay as is. diff --git a/node_modules/showdown/test/karlcow/backslash-escape.html b/node_modules/showdown/test/karlcow/backslash-escape.html deleted file mode 100644 index d69d385b..00000000 --- a/node_modules/showdown/test/karlcow/backslash-escape.html +++ /dev/null @@ -1,12 +0,0 @@ -

\ backslash -` backtick -* asterisk -_ underscore -{} curly braces -[] square brackets -() parentheses -# hash mark -+ plus sign -- minus sign (hyphen) -. dot -! exclamation mark

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/backslash-escape.md b/node_modules/showdown/test/karlcow/backslash-escape.md deleted file mode 100644 index 24a818e4..00000000 --- a/node_modules/showdown/test/karlcow/backslash-escape.md +++ /dev/null @@ -1,12 +0,0 @@ -\\ backslash -\` backtick -\* asterisk -\_ underscore -\{\} curly braces -\[\] square brackets -\(\) parentheses -\# hash mark -\+ plus sign -\- minus sign (hyphen) -\. dot -\! exclamation mark diff --git a/node_modules/showdown/test/karlcow/blockquote-added-markup.html b/node_modules/showdown/test/karlcow/blockquote-added-markup.html deleted file mode 100644 index d0b50bfc..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-added-markup.html +++ /dev/null @@ -1,4 +0,0 @@ -
-

heading level 1

-

paragraph

-
diff --git a/node_modules/showdown/test/karlcow/blockquote-added-markup.md b/node_modules/showdown/test/karlcow/blockquote-added-markup.md deleted file mode 100644 index ca779512..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-added-markup.md +++ /dev/null @@ -1,3 +0,0 @@ -> # heading level 1 -> -> paragraph diff --git a/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.html b/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.html deleted file mode 100644 index 081b88bf..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.html +++ /dev/null @@ -1,4 +0,0 @@ -
-

A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.

-

and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line.

-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.md b/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.md deleted file mode 100644 index 9ff79cc6..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-line-2-paragraphs.md +++ /dev/null @@ -1,3 +0,0 @@ ->A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line. - ->and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line. diff --git a/node_modules/showdown/test/karlcow/blockquote-line.html b/node_modules/showdown/test/karlcow/blockquote-line.html deleted file mode 100644 index 41451afc..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-line.html +++ /dev/null @@ -1,3 +0,0 @@ -
-

This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a blockquote.

-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-line.md b/node_modules/showdown/test/karlcow/blockquote-line.md deleted file mode 100644 index 0acf5fec..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-line.md +++ /dev/null @@ -1 +0,0 @@ ->This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a blockquote. diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.html b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.html deleted file mode 100644 index 6282d219..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.html +++ /dev/null @@ -1,5 +0,0 @@ -
-

A blockquote -on multiple lines -like this.

-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.md b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.md deleted file mode 100644 index e8458448..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-begin.md +++ /dev/null @@ -1,3 +0,0 @@ -> A blockquote -> on multiple lines -> like this. diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.html b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.html deleted file mode 100644 index 82907e2d..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.html +++ /dev/null @@ -1,5 +0,0 @@ -
-

A blockquote -on multiple lines -like this.

-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.md b/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.md deleted file mode 100644 index b38bc71f..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-multiline-1-space-end.md +++ /dev/null @@ -1,3 +0,0 @@ ->A blockquote ->on multiple lines ->like this. diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.html b/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.html deleted file mode 100644 index a0f1f2b1..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.html +++ /dev/null @@ -1,7 +0,0 @@ -
-

A blockquote -on multiple lines -like this.

-

But it has -two paragraphs.

-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.md b/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.md deleted file mode 100644 index 46c8d6b2..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-multiline-2-paragraphs.md +++ /dev/null @@ -1,6 +0,0 @@ ->A blockquote ->on multiple lines ->like this. -> ->But it has ->two paragraphs. diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline.html b/node_modules/showdown/test/karlcow/blockquote-multiline.html deleted file mode 100644 index 18126d40..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-multiline.html +++ /dev/null @@ -1,5 +0,0 @@ -
-

A blockquote -on multiple lines -like this

-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-multiline.md b/node_modules/showdown/test/karlcow/blockquote-multiline.md deleted file mode 100644 index bcbd4d12..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-multiline.md +++ /dev/null @@ -1,3 +0,0 @@ ->A blockquote ->on multiple lines ->like this diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.html b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.html deleted file mode 100644 index ff0a7e69..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.html +++ /dev/null @@ -1,7 +0,0 @@ -
-

This is the first level of quoting.

-
-

This is nested blockquote.

-
-

Back to the first level.

-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.md b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.md deleted file mode 100644 index 8b2530f6..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn-level1.md +++ /dev/null @@ -1,5 +0,0 @@ -> This is the first level of quoting. -> -> > This is nested blockquote. -> -> Back to the first level. diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.html b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.html deleted file mode 100644 index f3f11f91..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.html +++ /dev/null @@ -1,6 +0,0 @@ -
-

This is the first level of quoting.

-
-

This is nested blockquote.

-
-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.md b/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.md deleted file mode 100644 index 2894815a..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-nested-multiplereturn.md +++ /dev/null @@ -1,3 +0,0 @@ -> This is the first level of quoting. -> -> > This is nested blockquote. diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.html b/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.html deleted file mode 100644 index 42b8ab4d..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.html +++ /dev/null @@ -1,7 +0,0 @@ -
-

This is the first level of quoting.

-
-

This is nested blockquote. -Back to the first level.

-
-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.md b/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.md deleted file mode 100644 index e01158b8..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-nested-return-level1.md +++ /dev/null @@ -1,3 +0,0 @@ -> This is the first level of quoting. -> > This is nested blockquote. -> Back to the first level. diff --git a/node_modules/showdown/test/karlcow/blockquote-nested.html b/node_modules/showdown/test/karlcow/blockquote-nested.html deleted file mode 100644 index f3f11f91..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-nested.html +++ /dev/null @@ -1,6 +0,0 @@ -
-

This is the first level of quoting.

-
-

This is nested blockquote.

-
-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/blockquote-nested.md b/node_modules/showdown/test/karlcow/blockquote-nested.md deleted file mode 100644 index 739ac210..00000000 --- a/node_modules/showdown/test/karlcow/blockquote-nested.md +++ /dev/null @@ -1,2 +0,0 @@ -> This is the first level of quoting. -> > This is nested blockquote. diff --git a/node_modules/showdown/test/karlcow/code-1-tab.html b/node_modules/showdown/test/karlcow/code-1-tab.html deleted file mode 100644 index 9b8bb7a4..00000000 --- a/node_modules/showdown/test/karlcow/code-1-tab.html +++ /dev/null @@ -1,3 +0,0 @@ -
10 PRINT HELLO INFINITE
-20 GOTO 10
-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/code-1-tab.md b/node_modules/showdown/test/karlcow/code-1-tab.md deleted file mode 100644 index ff1e25da..00000000 --- a/node_modules/showdown/test/karlcow/code-1-tab.md +++ /dev/null @@ -1,2 +0,0 @@ - 10 PRINT HELLO INFINITE - 20 GOTO 10 diff --git a/node_modules/showdown/test/karlcow/code-4-spaces-escaping.html b/node_modules/showdown/test/karlcow/code-4-spaces-escaping.html deleted file mode 100644 index 6d9fa871..00000000 --- a/node_modules/showdown/test/karlcow/code-4-spaces-escaping.html +++ /dev/null @@ -1,3 +0,0 @@ -
10 PRINT < > &
-20 GOTO 10
-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/code-4-spaces-escaping.md b/node_modules/showdown/test/karlcow/code-4-spaces-escaping.md deleted file mode 100644 index 379cbbd0..00000000 --- a/node_modules/showdown/test/karlcow/code-4-spaces-escaping.md +++ /dev/null @@ -1,2 +0,0 @@ - 10 PRINT < > & - 20 GOTO 10 diff --git a/node_modules/showdown/test/karlcow/code-4-spaces.html b/node_modules/showdown/test/karlcow/code-4-spaces.html deleted file mode 100644 index 9b8bb7a4..00000000 --- a/node_modules/showdown/test/karlcow/code-4-spaces.html +++ /dev/null @@ -1,3 +0,0 @@ -
10 PRINT HELLO INFINITE
-20 GOTO 10
-
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/code-4-spaces.md b/node_modules/showdown/test/karlcow/code-4-spaces.md deleted file mode 100644 index e3bc4ba3..00000000 --- a/node_modules/showdown/test/karlcow/code-4-spaces.md +++ /dev/null @@ -1,2 +0,0 @@ - 10 PRINT HELLO INFINITE - 20 GOTO 10 diff --git a/node_modules/showdown/test/karlcow/em-middle-word.html b/node_modules/showdown/test/karlcow/em-middle-word.html deleted file mode 100644 index 74f7f909..00000000 --- a/node_modules/showdown/test/karlcow/em-middle-word.html +++ /dev/null @@ -1 +0,0 @@ -

asterisks

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/em-middle-word.md b/node_modules/showdown/test/karlcow/em-middle-word.md deleted file mode 100644 index b49e7bae..00000000 --- a/node_modules/showdown/test/karlcow/em-middle-word.md +++ /dev/null @@ -1 +0,0 @@ -as*te*risks diff --git a/node_modules/showdown/test/karlcow/em-star.html b/node_modules/showdown/test/karlcow/em-star.html deleted file mode 100644 index d35dd53d..00000000 --- a/node_modules/showdown/test/karlcow/em-star.html +++ /dev/null @@ -1 +0,0 @@ -

single asterisks

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/em-star.md b/node_modules/showdown/test/karlcow/em-star.md deleted file mode 100644 index 1e7c8dea..00000000 --- a/node_modules/showdown/test/karlcow/em-star.md +++ /dev/null @@ -1 +0,0 @@ -*single asterisks* diff --git a/node_modules/showdown/test/karlcow/em-underscore.html b/node_modules/showdown/test/karlcow/em-underscore.html deleted file mode 100644 index 2627bde8..00000000 --- a/node_modules/showdown/test/karlcow/em-underscore.html +++ /dev/null @@ -1 +0,0 @@ -

single underscores

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/em-underscore.md b/node_modules/showdown/test/karlcow/em-underscore.md deleted file mode 100644 index b6eac785..00000000 --- a/node_modules/showdown/test/karlcow/em-underscore.md +++ /dev/null @@ -1 +0,0 @@ -_single underscores_ diff --git a/node_modules/showdown/test/karlcow/entities-text-flow.html b/node_modules/showdown/test/karlcow/entities-text-flow.html deleted file mode 100644 index 6924fea4..00000000 --- a/node_modules/showdown/test/karlcow/entities-text-flow.html +++ /dev/null @@ -1 +0,0 @@ -

HTML entities are written using ampersand notation: ©

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/entities-text-flow.md b/node_modules/showdown/test/karlcow/entities-text-flow.md deleted file mode 100644 index 336eae17..00000000 --- a/node_modules/showdown/test/karlcow/entities-text-flow.md +++ /dev/null @@ -1 +0,0 @@ -HTML entities are written using ampersand notation: © diff --git a/node_modules/showdown/test/karlcow/header-level1-equal-underlined.html b/node_modules/showdown/test/karlcow/header-level1-equal-underlined.html deleted file mode 100644 index af0c276d..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-equal-underlined.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H1

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-equal-underlined.md b/node_modules/showdown/test/karlcow/header-level1-equal-underlined.md deleted file mode 100644 index 313c1dcc..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-equal-underlined.md +++ /dev/null @@ -1,2 +0,0 @@ -This is an H1 -============= diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.html deleted file mode 100644 index af0c276d..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H1

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.md deleted file mode 100644 index d25887af..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-hash-sign-closed.md +++ /dev/null @@ -1 +0,0 @@ -# This is an H1 # diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.html b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.html deleted file mode 100644 index 1b48fc28..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.html +++ /dev/null @@ -1 +0,0 @@ -

# This is an H1

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.md b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.md deleted file mode 100644 index 49d1ae34..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-1-space.md +++ /dev/null @@ -1,2 +0,0 @@ - # This is an H1 - \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.html b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.html deleted file mode 100644 index 013acb3e..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.html +++ /dev/null @@ -1,2 +0,0 @@ -

this is an h1 with two trailing spaces

-

A new paragraph.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.md b/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.md deleted file mode 100644 index a390af03..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-hash-sign-trailing-2-spaces.md +++ /dev/null @@ -1,2 +0,0 @@ -# this is an h1 with two trailing spaces -A new paragraph. diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign.html b/node_modules/showdown/test/karlcow/header-level1-hash-sign.html deleted file mode 100644 index af0c276d..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-hash-sign.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H1

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level1-hash-sign.md b/node_modules/showdown/test/karlcow/header-level1-hash-sign.md deleted file mode 100644 index 90944c94..00000000 --- a/node_modules/showdown/test/karlcow/header-level1-hash-sign.md +++ /dev/null @@ -1 +0,0 @@ -# This is an H1 diff --git a/node_modules/showdown/test/karlcow/header-level2-dash-underlined.html b/node_modules/showdown/test/karlcow/header-level2-dash-underlined.html deleted file mode 100644 index 2f4138ba..00000000 --- a/node_modules/showdown/test/karlcow/header-level2-dash-underlined.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H2

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level2-dash-underlined.md b/node_modules/showdown/test/karlcow/header-level2-dash-underlined.md deleted file mode 100644 index a912f0e6..00000000 --- a/node_modules/showdown/test/karlcow/header-level2-dash-underlined.md +++ /dev/null @@ -1,2 +0,0 @@ -This is an H2 -------------- diff --git a/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.html deleted file mode 100644 index 2f4138ba..00000000 --- a/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H2

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.md deleted file mode 100644 index 95392525..00000000 --- a/node_modules/showdown/test/karlcow/header-level2-hash-sign-closed.md +++ /dev/null @@ -1 +0,0 @@ -## This is an H2 ## diff --git a/node_modules/showdown/test/karlcow/header-level2-hash-sign.html b/node_modules/showdown/test/karlcow/header-level2-hash-sign.html deleted file mode 100644 index 2f4138ba..00000000 --- a/node_modules/showdown/test/karlcow/header-level2-hash-sign.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H2

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level2-hash-sign.md b/node_modules/showdown/test/karlcow/header-level2-hash-sign.md deleted file mode 100644 index bf1c56f9..00000000 --- a/node_modules/showdown/test/karlcow/header-level2-hash-sign.md +++ /dev/null @@ -1 +0,0 @@ -## This is an H2 diff --git a/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.html deleted file mode 100644 index a9d3ba91..00000000 --- a/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H3

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.md deleted file mode 100644 index f8756652..00000000 --- a/node_modules/showdown/test/karlcow/header-level3-hash-sign-closed.md +++ /dev/null @@ -1 +0,0 @@ -### This is an H3 ### diff --git a/node_modules/showdown/test/karlcow/header-level3-hash-sign.html b/node_modules/showdown/test/karlcow/header-level3-hash-sign.html deleted file mode 100644 index a9d3ba91..00000000 --- a/node_modules/showdown/test/karlcow/header-level3-hash-sign.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H3

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level3-hash-sign.md b/node_modules/showdown/test/karlcow/header-level3-hash-sign.md deleted file mode 100644 index 247ce34c..00000000 --- a/node_modules/showdown/test/karlcow/header-level3-hash-sign.md +++ /dev/null @@ -1 +0,0 @@ -### This is an H3 diff --git a/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.html deleted file mode 100644 index 1c0f3d63..00000000 --- a/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H4

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.md deleted file mode 100644 index 24a9eb3f..00000000 --- a/node_modules/showdown/test/karlcow/header-level4-hash-sign-closed.md +++ /dev/null @@ -1 +0,0 @@ -#### This is an H4 #### diff --git a/node_modules/showdown/test/karlcow/header-level4-hash-sign.html b/node_modules/showdown/test/karlcow/header-level4-hash-sign.html deleted file mode 100644 index 1c0f3d63..00000000 --- a/node_modules/showdown/test/karlcow/header-level4-hash-sign.html +++ /dev/null @@ -1 +0,0 @@ -

This is an H4

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level4-hash-sign.md b/node_modules/showdown/test/karlcow/header-level4-hash-sign.md deleted file mode 100644 index 36f0db0c..00000000 --- a/node_modules/showdown/test/karlcow/header-level4-hash-sign.md +++ /dev/null @@ -1 +0,0 @@ -#### This is an H4 diff --git a/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.html deleted file mode 100644 index aa439108..00000000 --- a/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.html +++ /dev/null @@ -1 +0,0 @@ -
This is an H5
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.md deleted file mode 100644 index 889f7893..00000000 --- a/node_modules/showdown/test/karlcow/header-level5-hash-sign-closed.md +++ /dev/null @@ -1 +0,0 @@ -##### This is an H5 ##### diff --git a/node_modules/showdown/test/karlcow/header-level5-hash-sign.html b/node_modules/showdown/test/karlcow/header-level5-hash-sign.html deleted file mode 100644 index aa439108..00000000 --- a/node_modules/showdown/test/karlcow/header-level5-hash-sign.html +++ /dev/null @@ -1 +0,0 @@ -
This is an H5
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level5-hash-sign.md b/node_modules/showdown/test/karlcow/header-level5-hash-sign.md deleted file mode 100644 index a66d50b1..00000000 --- a/node_modules/showdown/test/karlcow/header-level5-hash-sign.md +++ /dev/null @@ -1 +0,0 @@ -##### This is an H5 diff --git a/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.html b/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.html deleted file mode 100644 index 2cbc7b17..00000000 --- a/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.html +++ /dev/null @@ -1 +0,0 @@ -
This is an H6
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.md b/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.md deleted file mode 100644 index 92dc1dfd..00000000 --- a/node_modules/showdown/test/karlcow/header-level6-hash-sign-closed.md +++ /dev/null @@ -1 +0,0 @@ -###### This is an H6 ###### diff --git a/node_modules/showdown/test/karlcow/header-level6-hash-sign.html b/node_modules/showdown/test/karlcow/header-level6-hash-sign.html deleted file mode 100644 index 2cbc7b17..00000000 --- a/node_modules/showdown/test/karlcow/header-level6-hash-sign.html +++ /dev/null @@ -1 +0,0 @@ -
This is an H6
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/header-level6-hash-sign.md b/node_modules/showdown/test/karlcow/header-level6-hash-sign.md deleted file mode 100644 index c85f1a74..00000000 --- a/node_modules/showdown/test/karlcow/header-level6-hash-sign.md +++ /dev/null @@ -1 +0,0 @@ -###### This is an H6 diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.html b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.html deleted file mode 100644 index 1d6667d2..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.md b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.md deleted file mode 100644 index 75fb4cdc..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes-spaces.md +++ /dev/null @@ -1 +0,0 @@ -- - - diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.html b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.html deleted file mode 100644 index 1d6667d2..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.md b/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.md deleted file mode 100644 index ed97d539..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-3-dashes.md +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.html b/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.html deleted file mode 100644 index 1d6667d2..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.md b/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.md deleted file mode 100644 index 6a7e4527..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-3-stars.md +++ /dev/null @@ -1 +0,0 @@ -*** diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.html b/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.html deleted file mode 100644 index 1d6667d2..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.md b/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.md deleted file mode 100644 index 88f351dc..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-3-underscores.md +++ /dev/null @@ -1 +0,0 @@ -___ diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.html b/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.html deleted file mode 100644 index 1d6667d2..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.html +++ /dev/null @@ -1 +0,0 @@ -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.md b/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.md deleted file mode 100644 index 3e21f7ef..00000000 --- a/node_modules/showdown/test/karlcow/horizontal-rule-7-dashes.md +++ /dev/null @@ -1 +0,0 @@ -------- diff --git a/node_modules/showdown/test/karlcow/img-idref-title.html b/node_modules/showdown/test/karlcow/img-idref-title.html deleted file mode 100644 index f9b17158..00000000 --- a/node_modules/showdown/test/karlcow/img-idref-title.html +++ /dev/null @@ -1 +0,0 @@ -

HTML5

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/img-idref-title.md b/node_modules/showdown/test/karlcow/img-idref-title.md deleted file mode 100644 index c4dfe526..00000000 --- a/node_modules/showdown/test/karlcow/img-idref-title.md +++ /dev/null @@ -1,3 +0,0 @@ -![HTML5][h5] - -[h5]: http://www.w3.org/html/logo/img/mark-word-icon.png "HTML5 for everyone" diff --git a/node_modules/showdown/test/karlcow/img-idref.html b/node_modules/showdown/test/karlcow/img-idref.html deleted file mode 100644 index 79103a84..00000000 --- a/node_modules/showdown/test/karlcow/img-idref.html +++ /dev/null @@ -1 +0,0 @@ -

HTML5

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/img-idref.md b/node_modules/showdown/test/karlcow/img-idref.md deleted file mode 100644 index 71387b4c..00000000 --- a/node_modules/showdown/test/karlcow/img-idref.md +++ /dev/null @@ -1,3 +0,0 @@ -![HTML5][h5] - -[h5]: http://www.w3.org/html/logo/img/mark-word-icon.png diff --git a/node_modules/showdown/test/karlcow/img-title.html b/node_modules/showdown/test/karlcow/img-title.html deleted file mode 100644 index cc0e1958..00000000 --- a/node_modules/showdown/test/karlcow/img-title.html +++ /dev/null @@ -1 +0,0 @@ -

HTML5

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/img-title.md b/node_modules/showdown/test/karlcow/img-title.md deleted file mode 100644 index a1dc1aa7..00000000 --- a/node_modules/showdown/test/karlcow/img-title.md +++ /dev/null @@ -1 +0,0 @@ -![HTML5](http://www.w3.org/html/logo/img/mark-word-icon.png "HTML5 logo for everyone") diff --git a/node_modules/showdown/test/karlcow/img.html b/node_modules/showdown/test/karlcow/img.html deleted file mode 100644 index 79103a84..00000000 --- a/node_modules/showdown/test/karlcow/img.html +++ /dev/null @@ -1 +0,0 @@ -

HTML5

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/img.md b/node_modules/showdown/test/karlcow/img.md deleted file mode 100644 index bffc42a8..00000000 --- a/node_modules/showdown/test/karlcow/img.md +++ /dev/null @@ -1 +0,0 @@ -![HTML5](http://www.w3.org/html/logo/img/mark-word-icon.png) diff --git a/node_modules/showdown/test/karlcow/inline-code-escaping-entities.html b/node_modules/showdown/test/karlcow/inline-code-escaping-entities.html deleted file mode 100644 index 726e8a89..00000000 --- a/node_modules/showdown/test/karlcow/inline-code-escaping-entities.html +++ /dev/null @@ -1 +0,0 @@ -

We love <code> and & for everything

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/inline-code-escaping-entities.md b/node_modules/showdown/test/karlcow/inline-code-escaping-entities.md deleted file mode 100644 index 641ae90b..00000000 --- a/node_modules/showdown/test/karlcow/inline-code-escaping-entities.md +++ /dev/null @@ -1 +0,0 @@ -We love ` and &` for everything diff --git a/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.html b/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.html deleted file mode 100644 index bc921657..00000000 --- a/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.html +++ /dev/null @@ -1 +0,0 @@ -

We love `code` for everything

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.md b/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.md deleted file mode 100644 index 9e2325d0..00000000 --- a/node_modules/showdown/test/karlcow/inline-code-with-visible-backtick.md +++ /dev/null @@ -1 +0,0 @@ -``We love `code` for everything`` diff --git a/node_modules/showdown/test/karlcow/inline-code.html b/node_modules/showdown/test/karlcow/inline-code.html deleted file mode 100644 index bc921657..00000000 --- a/node_modules/showdown/test/karlcow/inline-code.html +++ /dev/null @@ -1 +0,0 @@ -

We love `code` for everything

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/inline-code.md b/node_modules/showdown/test/karlcow/inline-code.md deleted file mode 100644 index 9e2325d0..00000000 --- a/node_modules/showdown/test/karlcow/inline-code.md +++ /dev/null @@ -1 +0,0 @@ -``We love `code` for everything`` diff --git a/node_modules/showdown/test/karlcow/line-break-2-spaces.html b/node_modules/showdown/test/karlcow/line-break-2-spaces.html deleted file mode 100644 index f4f61edc..00000000 --- a/node_modules/showdown/test/karlcow/line-break-2-spaces.html +++ /dev/null @@ -1,2 +0,0 @@ -

A first sentence
-and a line break.

diff --git a/node_modules/showdown/test/karlcow/line-break-2-spaces.md b/node_modules/showdown/test/karlcow/line-break-2-spaces.md deleted file mode 100644 index 9150278e..00000000 --- a/node_modules/showdown/test/karlcow/line-break-2-spaces.md +++ /dev/null @@ -1,2 +0,0 @@ -A first sentence -and a line break. diff --git a/node_modules/showdown/test/karlcow/line-break-5-spaces.html b/node_modules/showdown/test/karlcow/line-break-5-spaces.html deleted file mode 100644 index f4f61edc..00000000 --- a/node_modules/showdown/test/karlcow/line-break-5-spaces.html +++ /dev/null @@ -1,2 +0,0 @@ -

A first sentence
-and a line break.

diff --git a/node_modules/showdown/test/karlcow/line-break-5-spaces.md b/node_modules/showdown/test/karlcow/line-break-5-spaces.md deleted file mode 100644 index 07c1dbb5..00000000 --- a/node_modules/showdown/test/karlcow/line-break-5-spaces.md +++ /dev/null @@ -1,2 +0,0 @@ -A first sentence -and a line break. diff --git a/node_modules/showdown/test/karlcow/link-automatic.html b/node_modules/showdown/test/karlcow/link-automatic.html deleted file mode 100644 index 604cbdc9..00000000 --- a/node_modules/showdown/test/karlcow/link-automatic.html +++ /dev/null @@ -1 +0,0 @@ -

This is an automatic link http://www.w3.org/

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-automatic.md b/node_modules/showdown/test/karlcow/link-automatic.md deleted file mode 100644 index a01ea4be..00000000 --- a/node_modules/showdown/test/karlcow/link-automatic.md +++ /dev/null @@ -1 +0,0 @@ -This is an automatic link diff --git a/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.html b/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.html deleted file mode 100644 index 5e568bab..00000000 --- a/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.html +++ /dev/null @@ -1 +0,0 @@ -

W3C

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.md b/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.md deleted file mode 100644 index ac8dc5a3..00000000 --- a/node_modules/showdown/test/karlcow/link-bracket-paranthesis-title.md +++ /dev/null @@ -1 +0,0 @@ -[W3C](http://www.w3.org/ "Discover w3c") diff --git a/node_modules/showdown/test/karlcow/link-bracket-paranthesis.html b/node_modules/showdown/test/karlcow/link-bracket-paranthesis.html deleted file mode 100644 index ba65be83..00000000 --- a/node_modules/showdown/test/karlcow/link-bracket-paranthesis.html +++ /dev/null @@ -1 +0,0 @@ -

W3C

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-bracket-paranthesis.md b/node_modules/showdown/test/karlcow/link-bracket-paranthesis.md deleted file mode 100644 index 1ac993bd..00000000 --- a/node_modules/showdown/test/karlcow/link-bracket-paranthesis.md +++ /dev/null @@ -1 +0,0 @@ -[W3C](http://www.w3.org/) diff --git a/node_modules/showdown/test/karlcow/link-idref-angle-bracket.html b/node_modules/showdown/test/karlcow/link-idref-angle-bracket.html deleted file mode 100644 index dbee9a97..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-angle-bracket.html +++ /dev/null @@ -1 +0,0 @@ -

World Wide Web Consortium

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-angle-bracket.md b/node_modules/showdown/test/karlcow/link-idref-angle-bracket.md deleted file mode 100644 index a9635971..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-angle-bracket.md +++ /dev/null @@ -1,3 +0,0 @@ -[World Wide Web Consortium][w3c] - -[w3c]: diff --git a/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.html b/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.html deleted file mode 100644 index dbee9a97..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.html +++ /dev/null @@ -1 +0,0 @@ -

World Wide Web Consortium

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.md b/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.md deleted file mode 100644 index 24447d1c..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-implicit-spaces.md +++ /dev/null @@ -1,3 +0,0 @@ -[World Wide Web Consortium][] - -[World Wide Web Consortium]: http://www.w3.org/ diff --git a/node_modules/showdown/test/karlcow/link-idref-implicit.html b/node_modules/showdown/test/karlcow/link-idref-implicit.html deleted file mode 100644 index 9ba2da66..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-implicit.html +++ /dev/null @@ -1 +0,0 @@ -

w3c

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-implicit.md b/node_modules/showdown/test/karlcow/link-idref-implicit.md deleted file mode 100644 index 91aa48dc..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-implicit.md +++ /dev/null @@ -1,3 +0,0 @@ -[w3c][] - -[w3c]: http://www.w3.org/ diff --git a/node_modules/showdown/test/karlcow/link-idref-space.html b/node_modules/showdown/test/karlcow/link-idref-space.html deleted file mode 100644 index dbee9a97..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-space.html +++ /dev/null @@ -1 +0,0 @@ -

World Wide Web Consortium

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-space.md b/node_modules/showdown/test/karlcow/link-idref-space.md deleted file mode 100644 index dda6a3e7..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-space.md +++ /dev/null @@ -1,3 +0,0 @@ -[World Wide Web Consortium] [w3c] - -[w3c]: http://www.w3.org/ diff --git a/node_modules/showdown/test/karlcow/link-idref-title-next-line.html b/node_modules/showdown/test/karlcow/link-idref-title-next-line.html deleted file mode 100644 index 9c2dda6b..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-title-next-line.html +++ /dev/null @@ -1 +0,0 @@ -

World Wide Web Consortium

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-title-next-line.md b/node_modules/showdown/test/karlcow/link-idref-title-next-line.md deleted file mode 100644 index 1e55a1d0..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-title-next-line.md +++ /dev/null @@ -1,4 +0,0 @@ -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ - "Discover W3C" diff --git a/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.html b/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.html deleted file mode 100644 index f80f8ce9..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.html +++ /dev/null @@ -1 +0,0 @@ -

World Wide Web Consortium

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.md b/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.md deleted file mode 100644 index 3ebc0838..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-title-paranthesis.md +++ /dev/null @@ -1,3 +0,0 @@ -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ (Discover w3c) diff --git a/node_modules/showdown/test/karlcow/link-idref-title-single-quote.html b/node_modules/showdown/test/karlcow/link-idref-title-single-quote.html deleted file mode 100644 index f80f8ce9..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-title-single-quote.html +++ /dev/null @@ -1 +0,0 @@ -

World Wide Web Consortium

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-title-single-quote.md b/node_modules/showdown/test/karlcow/link-idref-title-single-quote.md deleted file mode 100644 index 71fd319c..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-title-single-quote.md +++ /dev/null @@ -1,3 +0,0 @@ -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ 'Discover w3c' diff --git a/node_modules/showdown/test/karlcow/link-idref-title.html b/node_modules/showdown/test/karlcow/link-idref-title.html deleted file mode 100644 index f80f8ce9..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-title.html +++ /dev/null @@ -1 +0,0 @@ -

World Wide Web Consortium

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref-title.md b/node_modules/showdown/test/karlcow/link-idref-title.md deleted file mode 100644 index 637940dd..00000000 --- a/node_modules/showdown/test/karlcow/link-idref-title.md +++ /dev/null @@ -1,3 +0,0 @@ -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ "Discover w3c" diff --git a/node_modules/showdown/test/karlcow/link-idref.html b/node_modules/showdown/test/karlcow/link-idref.html deleted file mode 100644 index dbee9a97..00000000 --- a/node_modules/showdown/test/karlcow/link-idref.html +++ /dev/null @@ -1 +0,0 @@ -

World Wide Web Consortium

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/link-idref.md b/node_modules/showdown/test/karlcow/link-idref.md deleted file mode 100644 index 83f741ec..00000000 --- a/node_modules/showdown/test/karlcow/link-idref.md +++ /dev/null @@ -1,3 +0,0 @@ -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ diff --git a/node_modules/showdown/test/karlcow/list-blockquote.html b/node_modules/showdown/test/karlcow/list-blockquote.html deleted file mode 100644 index 60b17706..00000000 --- a/node_modules/showdown/test/karlcow/list-blockquote.html +++ /dev/null @@ -1,6 +0,0 @@ -
    -
  • a list containing a blockquote

    -
    -

    this the blockquote in the list

    -
  • -
diff --git a/node_modules/showdown/test/karlcow/list-blockquote.md b/node_modules/showdown/test/karlcow/list-blockquote.md deleted file mode 100644 index 763ae3e5..00000000 --- a/node_modules/showdown/test/karlcow/list-blockquote.md +++ /dev/null @@ -1,3 +0,0 @@ -* a list containing a blockquote - - > this the blockquote in the list diff --git a/node_modules/showdown/test/karlcow/list-code.html b/node_modules/showdown/test/karlcow/list-code.html deleted file mode 100644 index 664a61c9..00000000 --- a/node_modules/showdown/test/karlcow/list-code.html +++ /dev/null @@ -1,6 +0,0 @@ -
    -
  • a list containing a block of code

    -
    10 PRINT HELLO INFINITE
    -20 GOTO 10
    -
  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/list-code.md b/node_modules/showdown/test/karlcow/list-code.md deleted file mode 100644 index 71d2bc89..00000000 --- a/node_modules/showdown/test/karlcow/list-code.md +++ /dev/null @@ -1,4 +0,0 @@ -* a list containing a block of code - - 10 PRINT HELLO INFINITE - 20 GOTO 10 diff --git a/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.html b/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.html deleted file mode 100644 index 3f499b09..00000000 --- a/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.html +++ /dev/null @@ -1,9 +0,0 @@ -
    -
  • This is a list item with two paragraphs. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit. Aliquam hendrerit -mi posuere lectus.

    -

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet -vitae, risus. Donec sit amet nisl. Aliquam semper ipsum -sit amet velit.

  • -
  • Suspendisse id sem consectetuer libero luctus adipiscing.

  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.md b/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.md deleted file mode 100644 index 0decb6ff..00000000 --- a/node_modules/showdown/test/karlcow/list-multiparagraphs-tab.md +++ /dev/null @@ -1,9 +0,0 @@ -* This is a list item with two paragraphs. Lorem ipsum dolor - sit amet, consectetuer adipiscing elit. Aliquam hendrerit - mi posuere lectus. - - Vestibulum enim wisi, viverra nec, fringilla in, laoreet - vitae, risus. Donec sit amet nisl. Aliquam semper ipsum - sit amet velit. - -* Suspendisse id sem consectetuer libero luctus adipiscing. diff --git a/node_modules/showdown/test/karlcow/list-multiparagraphs.html b/node_modules/showdown/test/karlcow/list-multiparagraphs.html deleted file mode 100644 index 3f499b09..00000000 --- a/node_modules/showdown/test/karlcow/list-multiparagraphs.html +++ /dev/null @@ -1,9 +0,0 @@ -
    -
  • This is a list item with two paragraphs. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit. Aliquam hendrerit -mi posuere lectus.

    -

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet -vitae, risus. Donec sit amet nisl. Aliquam semper ipsum -sit amet velit.

  • -
  • Suspendisse id sem consectetuer libero luctus adipiscing.

  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/list-multiparagraphs.md b/node_modules/showdown/test/karlcow/list-multiparagraphs.md deleted file mode 100644 index d8b1b677..00000000 --- a/node_modules/showdown/test/karlcow/list-multiparagraphs.md +++ /dev/null @@ -1,9 +0,0 @@ -* This is a list item with two paragraphs. Lorem ipsum dolor - sit amet, consectetuer adipiscing elit. Aliquam hendrerit - mi posuere lectus. - - Vestibulum enim wisi, viverra nec, fringilla in, laoreet - vitae, risus. Donec sit amet nisl. Aliquam semper ipsum - sit amet velit. - -* Suspendisse id sem consectetuer libero luctus adipiscing. diff --git a/node_modules/showdown/test/karlcow/ordered-list-escaped.html b/node_modules/showdown/test/karlcow/ordered-list-escaped.html deleted file mode 100644 index f6c477d6..00000000 --- a/node_modules/showdown/test/karlcow/ordered-list-escaped.html +++ /dev/null @@ -1 +0,0 @@ -

1. ordered list escape

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ordered-list-escaped.md b/node_modules/showdown/test/karlcow/ordered-list-escaped.md deleted file mode 100644 index ecd4a741..00000000 --- a/node_modules/showdown/test/karlcow/ordered-list-escaped.md +++ /dev/null @@ -1 +0,0 @@ -1\. ordered list escape diff --git a/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.html b/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.html deleted file mode 100644 index dbe72cfa..00000000 --- a/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.html +++ /dev/null @@ -1,6 +0,0 @@ -
    -
  1. 1

    -
      -
    • inner par list
  2. -
  3. 2

  4. -
diff --git a/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.md b/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.md deleted file mode 100644 index 05c6490b..00000000 --- a/node_modules/showdown/test/karlcow/ordered-list-inner-par-list.md +++ /dev/null @@ -1,5 +0,0 @@ -1. 1 - - - inner par list - -2. 2 diff --git a/node_modules/showdown/test/karlcow/ordered-list-items-random-number.html b/node_modules/showdown/test/karlcow/ordered-list-items-random-number.html deleted file mode 100644 index c34d8597..00000000 --- a/node_modules/showdown/test/karlcow/ordered-list-items-random-number.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  1. list item 1
  2. -
  3. list item 2
  4. -
  5. list item 3
  6. -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ordered-list-items-random-number.md b/node_modules/showdown/test/karlcow/ordered-list-items-random-number.md deleted file mode 100644 index 53c30664..00000000 --- a/node_modules/showdown/test/karlcow/ordered-list-items-random-number.md +++ /dev/null @@ -1,3 +0,0 @@ -1. list item 1 -8. list item 2 -1. list item 3 diff --git a/node_modules/showdown/test/karlcow/ordered-list-items.html b/node_modules/showdown/test/karlcow/ordered-list-items.html deleted file mode 100644 index c34d8597..00000000 --- a/node_modules/showdown/test/karlcow/ordered-list-items.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  1. list item 1
  2. -
  3. list item 2
  4. -
  5. list item 3
  6. -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/ordered-list-items.md b/node_modules/showdown/test/karlcow/ordered-list-items.md deleted file mode 100644 index 9ab0ada4..00000000 --- a/node_modules/showdown/test/karlcow/ordered-list-items.md +++ /dev/null @@ -1,3 +0,0 @@ -1. list item 1 -2. list item 2 -3. list item 3 diff --git a/node_modules/showdown/test/karlcow/paragraph-hard-return.html b/node_modules/showdown/test/karlcow/paragraph-hard-return.html deleted file mode 100644 index 7915e299..00000000 --- a/node_modules/showdown/test/karlcow/paragraph-hard-return.html +++ /dev/null @@ -1,3 +0,0 @@ -

This is a paragraph -on multiple lines -with hard return.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraph-hard-return.md b/node_modules/showdown/test/karlcow/paragraph-hard-return.md deleted file mode 100644 index 42b1fa5e..00000000 --- a/node_modules/showdown/test/karlcow/paragraph-hard-return.md +++ /dev/null @@ -1,3 +0,0 @@ -This is a paragraph -on multiple lines -with hard return. diff --git a/node_modules/showdown/test/karlcow/paragraph-line.html b/node_modules/showdown/test/karlcow/paragraph-line.html deleted file mode 100644 index 5fc0e448..00000000 --- a/node_modules/showdown/test/karlcow/paragraph-line.html +++ /dev/null @@ -1 +0,0 @@ -

This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraph-line.md b/node_modules/showdown/test/karlcow/paragraph-line.md deleted file mode 100644 index ca72f4b0..00000000 --- a/node_modules/showdown/test/karlcow/paragraph-line.md +++ /dev/null @@ -1 +0,0 @@ -This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. diff --git a/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.html b/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.html deleted file mode 100644 index d99afcdc..00000000 --- a/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.html +++ /dev/null @@ -1 +0,0 @@ -

This is a paragraph with a trailing and leading space.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.md b/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.md deleted file mode 100644 index b83c0dbd..00000000 --- a/node_modules/showdown/test/karlcow/paragraph-trailing-leading-spaces.md +++ /dev/null @@ -1 +0,0 @@ - This is a paragraph with a trailing and leading space. diff --git a/node_modules/showdown/test/karlcow/paragraph-trailing-tab.html b/node_modules/showdown/test/karlcow/paragraph-trailing-tab.html deleted file mode 100644 index f4bcd7cf..00000000 --- a/node_modules/showdown/test/karlcow/paragraph-trailing-tab.html +++ /dev/null @@ -1 +0,0 @@ -

This is a paragraph with 1 trailing tab.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraph-trailing-tab.md b/node_modules/showdown/test/karlcow/paragraph-trailing-tab.md deleted file mode 100644 index a3617e04..00000000 --- a/node_modules/showdown/test/karlcow/paragraph-trailing-tab.md +++ /dev/null @@ -1 +0,0 @@ -This is a paragraph with 1 trailing tab. diff --git a/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.html b/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.html deleted file mode 100644 index bd08e957..00000000 --- a/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.html +++ /dev/null @@ -1 +0,0 @@ -

This is a paragraph with 2 leading spaces.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.md b/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.md deleted file mode 100644 index 81f814e1..00000000 --- a/node_modules/showdown/test/karlcow/paragraphs-2-leading-spaces.md +++ /dev/null @@ -1 +0,0 @@ - This is a paragraph with 2 leading spaces. diff --git a/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.html b/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.html deleted file mode 100644 index 9c91f46a..00000000 --- a/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.html +++ /dev/null @@ -1 +0,0 @@ -

This is a paragraph with 3 leading spaces.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.md b/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.md deleted file mode 100644 index 652f19ac..00000000 --- a/node_modules/showdown/test/karlcow/paragraphs-3-leading-spaces.md +++ /dev/null @@ -1 +0,0 @@ - This is a paragraph with 3 leading spaces. diff --git a/node_modules/showdown/test/karlcow/paragraphs-leading-space.html b/node_modules/showdown/test/karlcow/paragraphs-leading-space.html deleted file mode 100644 index 917426d3..00000000 --- a/node_modules/showdown/test/karlcow/paragraphs-leading-space.html +++ /dev/null @@ -1 +0,0 @@ -

This is a paragraph with 1 leading space.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraphs-leading-space.md b/node_modules/showdown/test/karlcow/paragraphs-leading-space.md deleted file mode 100644 index d462e28e..00000000 --- a/node_modules/showdown/test/karlcow/paragraphs-leading-space.md +++ /dev/null @@ -1 +0,0 @@ - This is a paragraph with 1 leading space. diff --git a/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.html b/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.html deleted file mode 100644 index 7636c460..00000000 --- a/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.html +++ /dev/null @@ -1 +0,0 @@ -

This is a paragraph with a trailing space.

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.md b/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.md deleted file mode 100644 index 6809b737..00000000 --- a/node_modules/showdown/test/karlcow/paragraphs-trailing-spaces.md +++ /dev/null @@ -1 +0,0 @@ -This is a paragraph with a trailing space. \ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/strong-middle-word.html b/node_modules/showdown/test/karlcow/strong-middle-word.html deleted file mode 100644 index 4550f323..00000000 --- a/node_modules/showdown/test/karlcow/strong-middle-word.html +++ /dev/null @@ -1 +0,0 @@ -

asterisks

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/strong-middle-word.md b/node_modules/showdown/test/karlcow/strong-middle-word.md deleted file mode 100644 index b13d5e91..00000000 --- a/node_modules/showdown/test/karlcow/strong-middle-word.md +++ /dev/null @@ -1 +0,0 @@ -as**te**risks diff --git a/node_modules/showdown/test/karlcow/strong-star.html b/node_modules/showdown/test/karlcow/strong-star.html deleted file mode 100644 index 3181aeaa..00000000 --- a/node_modules/showdown/test/karlcow/strong-star.html +++ /dev/null @@ -1 +0,0 @@ -

double asterisks

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/strong-star.md b/node_modules/showdown/test/karlcow/strong-star.md deleted file mode 100644 index 3af6887d..00000000 --- a/node_modules/showdown/test/karlcow/strong-star.md +++ /dev/null @@ -1 +0,0 @@ -**double asterisks** diff --git a/node_modules/showdown/test/karlcow/strong-underscore.html b/node_modules/showdown/test/karlcow/strong-underscore.html deleted file mode 100644 index ef613bb9..00000000 --- a/node_modules/showdown/test/karlcow/strong-underscore.html +++ /dev/null @@ -1 +0,0 @@ -

double underscores

\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/strong-underscore.md b/node_modules/showdown/test/karlcow/strong-underscore.md deleted file mode 100644 index 2ed30205..00000000 --- a/node_modules/showdown/test/karlcow/strong-underscore.md +++ /dev/null @@ -1 +0,0 @@ -__double underscores__ diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.html b/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.html deleted file mode 100644 index f2ca34ff..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  • list item 1
  • -
  • list item 2
  • -
  • list item 3
  • -
diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.md b/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.md deleted file mode 100644 index 01e3e61c..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-asterisk.md +++ /dev/null @@ -1,3 +0,0 @@ -* list item 1 -* list item 2 -* list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.html b/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.html deleted file mode 100644 index 10428d5b..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  • list item 1
  • -
  • list item 2
  • -
  • list item 3
  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.md b/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.md deleted file mode 100644 index 068ef971..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-dashsign.md +++ /dev/null @@ -1,3 +0,0 @@ -- list item 1 -- list item 2 -- list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.html b/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.html deleted file mode 100644 index f2ca34ff..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  • list item 1
  • -
  • list item 2
  • -
  • list item 3
  • -
diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.md b/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.md deleted file mode 100644 index 2fa48c32..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-leading-1space.md +++ /dev/null @@ -1,3 +0,0 @@ - * list item 1 - * list item 2 - * list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.html b/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.html deleted file mode 100644 index 10428d5b..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  • list item 1
  • -
  • list item 2
  • -
  • list item 3
  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.md b/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.md deleted file mode 100644 index f86969c0..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-leading-2spaces.md +++ /dev/null @@ -1,3 +0,0 @@ - * list item 1 - * list item 2 - * list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.html b/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.html deleted file mode 100644 index 10428d5b..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  • list item 1
  • -
  • list item 2
  • -
  • list item 3
  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.md b/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.md deleted file mode 100644 index ee8ba46c..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-leading-3spaces.md +++ /dev/null @@ -1,3 +0,0 @@ - * list item 1 - * list item 2 - * list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-plussign.html b/node_modules/showdown/test/karlcow/unordered-list-items-plussign.html deleted file mode 100644 index 10428d5b..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-plussign.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  • list item 1
  • -
  • list item 2
  • -
  • list item 3
  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-items-plussign.md b/node_modules/showdown/test/karlcow/unordered-list-items-plussign.md deleted file mode 100644 index afa0018b..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-items-plussign.md +++ /dev/null @@ -1,3 +0,0 @@ -+ list item 1 -+ list item 2 -+ list item 3 diff --git a/node_modules/showdown/test/karlcow/unordered-list-paragraphs.html b/node_modules/showdown/test/karlcow/unordered-list-paragraphs.html deleted file mode 100644 index e78215e2..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-paragraphs.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
  • list item in paragraph

  • -
  • another list item in paragraph

  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-paragraphs.md b/node_modules/showdown/test/karlcow/unordered-list-paragraphs.md deleted file mode 100644 index 4d9c3d7a..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-paragraphs.md +++ /dev/null @@ -1,3 +0,0 @@ -* list item in paragraph - -* another list item in paragraph diff --git a/node_modules/showdown/test/karlcow/unordered-list-unindented-content.html b/node_modules/showdown/test/karlcow/unordered-list-unindented-content.html deleted file mode 100644 index 44d07b84..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-unindented-content.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
  • This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a list.
  • -
  • and yet another long long long long long long long long long long long long long long long long long long long long long long line.
  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-unindented-content.md b/node_modules/showdown/test/karlcow/unordered-list-unindented-content.md deleted file mode 100644 index 483b9790..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-unindented-content.md +++ /dev/null @@ -1,2 +0,0 @@ -* This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a list. -* and yet another long long long long long long long long long long long long long long long long long long long long long long line. diff --git a/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.html b/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.html deleted file mode 100644 index 003d8ce7..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -
  • This is a list item -with the content on -multiline and indented.
  • -
  • And this another list item -with the same principle.
  • -
\ No newline at end of file diff --git a/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.md b/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.md deleted file mode 100644 index 96ad00a3..00000000 --- a/node_modules/showdown/test/karlcow/unordered-list-with-indented-content.md +++ /dev/null @@ -1,5 +0,0 @@ -* This is a list item - with the content on - multiline and indented. -* And this another list item - with the same principle. diff --git a/node_modules/showdown/test/makeMd/blockquote.html b/node_modules/showdown/test/makeMd/blockquote.html deleted file mode 100644 index be52feb1..00000000 --- a/node_modules/showdown/test/makeMd/blockquote.html +++ /dev/null @@ -1,4 +0,0 @@ -
some -multiline -blockquote -
diff --git a/node_modules/showdown/test/makeMd/blockquote.md b/node_modules/showdown/test/makeMd/blockquote.md deleted file mode 100644 index e9f4c8a5..00000000 --- a/node_modules/showdown/test/makeMd/blockquote.md +++ /dev/null @@ -1 +0,0 @@ -> some multiline blockquote diff --git a/node_modules/showdown/test/makeMd/codeblock.html b/node_modules/showdown/test/makeMd/codeblock.html deleted file mode 100644 index 9ee4fc4a..00000000 --- a/node_modules/showdown/test/makeMd/codeblock.html +++ /dev/null @@ -1,8 +0,0 @@ -
some code
-
- -

-function foo() {
-  return 'bar';
-}
-
diff --git a/node_modules/showdown/test/makeMd/codeblock.md b/node_modules/showdown/test/makeMd/codeblock.md deleted file mode 100644 index eea0ee3a..00000000 --- a/node_modules/showdown/test/makeMd/codeblock.md +++ /dev/null @@ -1,9 +0,0 @@ -``` -some code -``` - -```javascript -function foo() { - return 'bar'; -} -``` diff --git a/node_modules/showdown/test/makeMd/codespan.html b/node_modules/showdown/test/makeMd/codespan.html deleted file mode 100644 index dfc06221..00000000 --- a/node_modules/showdown/test/makeMd/codespan.html +++ /dev/null @@ -1 +0,0 @@ -some code span diff --git a/node_modules/showdown/test/makeMd/codespan.md b/node_modules/showdown/test/makeMd/codespan.md deleted file mode 100644 index 54e91501..00000000 --- a/node_modules/showdown/test/makeMd/codespan.md +++ /dev/null @@ -1 +0,0 @@ -some `code` span diff --git a/node_modules/showdown/test/makeMd/emphasis.html b/node_modules/showdown/test/makeMd/emphasis.html deleted file mode 100644 index ad219c89..00000000 --- a/node_modules/showdown/test/makeMd/emphasis.html +++ /dev/null @@ -1 +0,0 @@ -foobar diff --git a/node_modules/showdown/test/makeMd/emphasis.md b/node_modules/showdown/test/makeMd/emphasis.md deleted file mode 100644 index 0f099381..00000000 --- a/node_modules/showdown/test/makeMd/emphasis.md +++ /dev/null @@ -1 +0,0 @@ -*foobar* diff --git a/node_modules/showdown/test/makeMd/heading.html b/node_modules/showdown/test/makeMd/heading.html deleted file mode 100644 index e4781119..00000000 --- a/node_modules/showdown/test/makeMd/heading.html +++ /dev/null @@ -1,6 +0,0 @@ -

foo h1

-

foo h2

-

foo h3

-

foo h4

-
foo h5
-
foo h6
diff --git a/node_modules/showdown/test/makeMd/heading.md b/node_modules/showdown/test/makeMd/heading.md deleted file mode 100644 index 9c9efec0..00000000 --- a/node_modules/showdown/test/makeMd/heading.md +++ /dev/null @@ -1,11 +0,0 @@ -# foo h1 - -## foo h2 - -### foo h3 - -#### foo h4 - -##### foo h5 - -###### foo h6 diff --git a/node_modules/showdown/test/makeMd/hr.html b/node_modules/showdown/test/makeMd/hr.html deleted file mode 100644 index 798dde80..00000000 --- a/node_modules/showdown/test/makeMd/hr.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
diff --git a/node_modules/showdown/test/makeMd/hr.md b/node_modules/showdown/test/makeMd/hr.md deleted file mode 100644 index 853d812b..00000000 --- a/node_modules/showdown/test/makeMd/hr.md +++ /dev/null @@ -1,3 +0,0 @@ ---- - ---- diff --git a/node_modules/showdown/test/makeMd/image.html b/node_modules/showdown/test/makeMd/image.html deleted file mode 100644 index a6301c7f..00000000 --- a/node_modules/showdown/test/makeMd/image.html +++ /dev/null @@ -1 +0,0 @@ -an image diff --git a/node_modules/showdown/test/makeMd/image.md b/node_modules/showdown/test/makeMd/image.md deleted file mode 100644 index 41e89a9a..00000000 --- a/node_modules/showdown/test/makeMd/image.md +++ /dev/null @@ -1 +0,0 @@ -![an image]( =200pxx300px "a title") diff --git a/node_modules/showdown/test/makeMd/link.html b/node_modules/showdown/test/makeMd/link.html deleted file mode 100644 index a64f7b2c..00000000 --- a/node_modules/showdown/test/makeMd/link.html +++ /dev/null @@ -1 +0,0 @@ -some link diff --git a/node_modules/showdown/test/makeMd/link.md b/node_modules/showdown/test/makeMd/link.md deleted file mode 100644 index 414701d7..00000000 --- a/node_modules/showdown/test/makeMd/link.md +++ /dev/null @@ -1 +0,0 @@ -[some link]( "a title") diff --git a/node_modules/showdown/test/makeMd/list.html b/node_modules/showdown/test/makeMd/list.html deleted file mode 100644 index a36096dd..00000000 --- a/node_modules/showdown/test/makeMd/list.html +++ /dev/null @@ -1,15 +0,0 @@ -
    -
  • foo
  • -
  • bar
  • -
  • baz
  • -
-
    -
  • foo

  • -
  • bar

  • -
  • baz
  • -
-
    -
  1. one
  2. -
  3. 2
  4. -
  5. three
  6. -
diff --git a/node_modules/showdown/test/makeMd/list.md b/node_modules/showdown/test/makeMd/list.md deleted file mode 100644 index aa1f4843..00000000 --- a/node_modules/showdown/test/makeMd/list.md +++ /dev/null @@ -1,19 +0,0 @@ -- foo -- bar -- baz - - - -- foo - -- bar - -- baz - - - -1. one -2. 2 -3. three - - diff --git a/node_modules/showdown/test/makeMd/other-html.html b/node_modules/showdown/test/makeMd/other-html.html deleted file mode 100644 index 42df3a4b..00000000 --- a/node_modules/showdown/test/makeMd/other-html.html +++ /dev/null @@ -1,5 +0,0 @@ -
this is a div
- - - - diff --git a/node_modules/showdown/test/makeMd/other-html.md b/node_modules/showdown/test/makeMd/other-html.md deleted file mode 100644 index 4383c8e0..00000000 --- a/node_modules/showdown/test/makeMd/other-html.md +++ /dev/null @@ -1,9 +0,0 @@ -
this is a div
- - - - - - - - diff --git a/node_modules/showdown/test/makeMd/paragraph.html b/node_modules/showdown/test/makeMd/paragraph.html deleted file mode 100644 index 9838f730..00000000 --- a/node_modules/showdown/test/makeMd/paragraph.html +++ /dev/null @@ -1,3 +0,0 @@ -

a paragraph - of multi-line - text

diff --git a/node_modules/showdown/test/makeMd/paragraph.md b/node_modules/showdown/test/makeMd/paragraph.md deleted file mode 100644 index 73ab64aa..00000000 --- a/node_modules/showdown/test/makeMd/paragraph.md +++ /dev/null @@ -1 +0,0 @@ -a paragraph of multi-line text diff --git a/node_modules/showdown/test/makeMd/strikethrough.html b/node_modules/showdown/test/makeMd/strikethrough.html deleted file mode 100644 index 859f38e9..00000000 --- a/node_modules/showdown/test/makeMd/strikethrough.html +++ /dev/null @@ -1 +0,0 @@ -deleted text diff --git a/node_modules/showdown/test/makeMd/strikethrough.md b/node_modules/showdown/test/makeMd/strikethrough.md deleted file mode 100644 index b9f9a781..00000000 --- a/node_modules/showdown/test/makeMd/strikethrough.md +++ /dev/null @@ -1 +0,0 @@ -~~deleted text~~ diff --git a/node_modules/showdown/test/makeMd/strong.html b/node_modules/showdown/test/makeMd/strong.html deleted file mode 100644 index 773ea1f9..00000000 --- a/node_modules/showdown/test/makeMd/strong.html +++ /dev/null @@ -1 +0,0 @@ -strong text diff --git a/node_modules/showdown/test/makeMd/strong.md b/node_modules/showdown/test/makeMd/strong.md deleted file mode 100644 index 34fbefa2..00000000 --- a/node_modules/showdown/test/makeMd/strong.md +++ /dev/null @@ -1 +0,0 @@ -**strong text** diff --git a/node_modules/showdown/test/makeMd/table.html b/node_modules/showdown/test/makeMd/table.html deleted file mode 100644 index 38b40095..00000000 --- a/node_modules/showdown/test/makeMd/table.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
head 1head 2head 3
foobarbaz
abcccc
diff --git a/node_modules/showdown/test/makeMd/table.md b/node_modules/showdown/test/makeMd/table.md deleted file mode 100644 index 8d87846d..00000000 --- a/node_modules/showdown/test/makeMd/table.md +++ /dev/null @@ -1,4 +0,0 @@ -| head 1 | head 2 | head 3 | -| ------ | ------ | ------ | -| foo | *bar* | baz | -| ~~a~~ | **b** | `cccc` | diff --git a/node_modules/showdown/test/node/cli.js b/node_modules/showdown/test/node/cli.js deleted file mode 100644 index 7dba2822..00000000 --- a/node_modules/showdown/test/node/cli.js +++ /dev/null @@ -1,18 +0,0 @@ -/* -var semver = require('semver'), - cmd = 'node bin/showdown.js'; - -describe('showdown cli', function () { - 'use strict'; - if (semver.gt(process.versions.node, '0.12.0')) { - var execSync = require('child_process').execSync; - it('basic stdin stdout', function () { - var otp = execSync(cmd + ' makehtml -q', { - encoding: 'utf8', - input: '**foo**' - }); - otp.trim().should.equal('

foo

'); - }); - } -}); -*/ diff --git a/node_modules/showdown/test/node/performance.js b/node_modules/showdown/test/node/performance.js deleted file mode 100644 index 2285c65d..00000000 --- a/node_modules/showdown/test/node/performance.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Created by Tivie on 21/12/2016. - */ -'use strict'; -var fs = require('fs'), - showdown = require('../bootstrap').showdown, - converter = new showdown.Converter(), - pkg = require('../../package.json'), - performance = require('../performance/performance.js'); - -performance.setLibraryName(pkg.name); -performance.setVersion(pkg.version); -performance.setGithubLink('https://github.com/showdownjs/showdown/tree/'); - -var globals = { - gHtmlBlocks: [], - gHtmlMdBlocks: [], - gHtmlSpans: [], - gUrls: {}, - gTitles: {}, - gDimensions: {}, - gListLevel: 0, - hashLinkCounts: {}, - langExtensions: [], - outputModifiers: [], - converter: converter, - ghCodeBlocks: [] - }, - options = showdown.getOptions(); - -function runTests () { - var testMDFile = fs.readFileSync('test/performance.testfile.md', 'utf8'); - new performance.Suite('Basic') - .setOption('cycles', 50) - .add('Simple "Hello World"', function () { - converter.makeHtml('*Hello* **World**!'); - }) - .add('performance.testfile.md', { - prepare: function () { - return testMDFile; - }, - test: function (mdText) { - converter.makeHtml(mdText); - } - }); - new performance.Suite('subParsers') - .setOption('cycles', 20) - .add('hashHTMLBlocks', function () { - showdown.subParser('hashHTMLBlocks')(testMDFile, options, globals); - }) - .add('anchors', function () { - showdown.subParser('anchors')(testMDFile, options, globals); - }) - .add('autoLinks', function () { - showdown.subParser('autoLinks')(testMDFile, options, globals); - }) - /* - .add('blockGamut', function () { - showdown.subParser('blockGamut')(testMDFile, options, globals); - }) - */ - .add('blockQuotes', function () { - showdown.subParser('blockQuotes')(testMDFile, options, globals); - }) - .add('codeBlocks', function () { - showdown.subParser('codeBlocks')(testMDFile, options, globals); - }) - .add('codeSpans', function () { - showdown.subParser('codeSpans')(testMDFile, options, globals); - }) - .add('detab', function () { - showdown.subParser('detab')(testMDFile, options, globals); - }) - .add('encodeAmpsAndAngles', function () { - showdown.subParser('encodeAmpsAndAngles')(testMDFile, options, globals); - }) - .add('encodeBackslashEscapes', function () { - showdown.subParser('encodeBackslashEscapes')(testMDFile, options, globals); - }) - .add('encodeCode', function () { - showdown.subParser('encodeCode')(testMDFile, options, globals); - }) - .add('escapeSpecialCharsWithinTagAttributes', function () { - showdown.subParser('escapeSpecialCharsWithinTagAttributes')(testMDFile, options, globals); - }) - .add('githubCodeBlocks', function () { - showdown.subParser('githubCodeBlocks')(testMDFile, options, globals); - }) - .add('hashBlock', function () { - showdown.subParser('hashBlock')(testMDFile, options, globals); - }) - .add('hashElement', function () { - showdown.subParser('hashElement')(testMDFile, options, globals); - }) - .add('hashHTMLSpans', function () { - showdown.subParser('hashHTMLSpans')(testMDFile, options, globals); - }) - .add('hashPreCodeTags', function () { - showdown.subParser('hashPreCodeTags')(testMDFile, options, globals); - }) - .add('headers', function () { - showdown.subParser('headers')(testMDFile, options, globals); - }) - .add('horizontalRule', function () { - showdown.subParser('horizontalRule')(testMDFile, options, globals); - }) - .add('images', function () { - showdown.subParser('images')(testMDFile, options, globals); - }) - .add('italicsAndBold', function () { - showdown.subParser('italicsAndBold')(testMDFile, options, globals); - }) - .add('lists', function () { - showdown.subParser('lists')(testMDFile, options, globals); - }) - .add('outdent', function () { - showdown.subParser('outdent')(testMDFile, options, globals); - }) - .add('paragraphs', function () { - showdown.subParser('paragraphs')(testMDFile, options, globals); - }) - .add('spanGamut', function () { - showdown.subParser('spanGamut')(testMDFile, options, globals); - }) - .add('strikethrough', function () { - showdown.subParser('strikethrough')(testMDFile, options, globals); - }) - .add('stripLinkDefinitions', function () { - showdown.subParser('stripLinkDefinitions')(testMDFile, options, globals); - }) - .add('tables', function () { - showdown.subParser('tables')(testMDFile, options, globals); - }) - .add('unescapeSpecialChars', function () { - showdown.subParser('unescapeSpecialChars')(testMDFile, options, globals); - }); -} - -function generateLogs () { - performance.generateLog(null, null, true); -} - -module.exports = { - runTests: runTests, - generateLogs: generateLogs -}; diff --git a/node_modules/showdown/test/node/showdown.Converter.js b/node_modules/showdown/test/node/showdown.Converter.js deleted file mode 100644 index a4cf6924..00000000 --- a/node_modules/showdown/test/node/showdown.Converter.js +++ /dev/null @@ -1,184 +0,0 @@ -/** - * Created by Estevao on 31-05-2015. - */ -require('source-map-support').install(); -require('chai').should(); -require('sinon'); -var showdown = require('../bootstrap').showdown; - -describe('showdown.Converter', function () { - 'use strict'; - - describe('option methods', function () { - var converter = new showdown.Converter(); - - it('setOption() should set option foo=baz', function () { - converter.setOption('foo', 'baz'); - }); - - it('getOption() should get option foo to equal baz', function () { - converter.getOption('foo').should.equal('baz'); - }); - - it('getOptions() should contain foo=baz', function () { - var options = converter.getOptions(); - options.should.have.ownProperty('foo'); - options.foo.should.equal('baz'); - }); - }); - - describe('Converter.options extensions', function () { - var runCount; - showdown.extension('testext', function () { - return [{ - type: 'output', - filter: function (text) { - runCount = runCount + 1; - return text; - } - }]; - }); - - var converter = new showdown.Converter({extensions: ['testext']}); - - it('output extensions should run once', function () { - runCount = 0; - converter.makeHtml('# testext'); - runCount.should.equal(1); - }); - }); - - describe('metadata methods', function () { - var converter = new showdown.Converter(); - - it('_setMetadataPair() should set foo to bar', function () { - converter._setMetadataPair('foo', 'bar'); - converter.getMetadata().should.eql({foo: 'bar'}); - }); - - it('_setMetadata should set metadata to {baz: bazinga}', function () { - converter._setMetadataRaw('{baz: bazinga}'); - converter.getMetadata(true).should.eql('{baz: bazinga}'); - }); - }); - - describe('converter.setFlavor()', function () { - - /** - * Test setFlavor('github') - */ - describe('github', function () { - var converter = new showdown.Converter(), - ghOpts = showdown.getFlavorOptions('github'); - - converter.setFlavor('github'); - - for (var opt in ghOpts) { - if (ghOpts.hasOwnProperty(opt)) { - check(opt, ghOpts[opt]); - } - } - function check (key, val) { - it('should set ' + opt + ' to ' + val, function () { - converter.getOption(key).should.equal(val); - }); - } - }); - }); - - describe('getFlavor method', function () { - - // reset showdown - showdown.setFlavor('vanilla'); - - describe('flavor', function () { - it('should be vanilla by default', function () { - var converter = new showdown.Converter(); - converter.getFlavor().should.equal('vanilla'); - }); - - it('should be changed if global option is changed', function () { - showdown.setFlavor('github'); - var converter = new showdown.Converter(); - converter.getFlavor().should.equal('github'); - showdown.setFlavor('vanilla'); - }); - - it('should not be changed if converter is initialized before global change', function () { - var converter = new showdown.Converter(); - showdown.setFlavor('github'); - converter.getFlavor().should.equal('vanilla'); - showdown.setFlavor('vanilla'); - }); - }); - }); - - describe('extension methods', function () { - var extObjMock = { - type: 'lang', - filter: function () {} - }, - extObjFunc = function () { - return extObjMock; - }; - - it('addExtension() should add an extension Object', function () { - var converter = new showdown.Converter(); - converter.addExtension(extObjMock); - converter.getAllExtensions().language.should.contain(extObjMock); - }); - - it('addExtension() should unwrap an extension wrapped in a function', function () { - var converter = new showdown.Converter(); - - converter.addExtension(extObjFunc); - converter.getAllExtensions().language.should.contain(extObjMock); - }); - - it('useExtension() should use a previous registered extension in showdown', function () { - showdown.extension('foo', extObjMock); - var converter = new showdown.Converter(); - - converter.useExtension('foo'); - converter.getAllExtensions().language.should.contain(extObjMock); - showdown.resetExtensions(); - }); - }); - - describe('events', function () { - var events = [ - 'anchors', - 'autoLinks', - 'blockGamut', - 'blockQuotes', - 'codeBlocks', - 'codeSpans', - 'githubCodeBlocks', - 'headers', - 'images', - 'italicsAndBold', - 'lists', - 'paragraph', - 'spanGamut' - //'strikeThrough', - //'tables' - ]; - - for (var i = 0; i < events.length; ++i) { - runListener(events[i] + '.before'); - runListener(events[i] + '.after'); - } - - function runListener (name) { - it('should listen to ' + name, function () { - var converter = new showdown.Converter(); - converter.listen(name, function (evtName, text) { - evtName.should.equal(name); - text.should.match(/^[\s\S]*foo[\s\S]*$/); - return text; - }) - .makeHtml('foo'); - }); - } - }); -}); diff --git a/node_modules/showdown/test/node/showdown.Converter.makeHtml.js b/node_modules/showdown/test/node/showdown.Converter.makeHtml.js deleted file mode 100644 index 3a8b2720..00000000 --- a/node_modules/showdown/test/node/showdown.Converter.makeHtml.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Created by Estevao on 15-01-2015. - */ - -describe('showdown.Converter', function () { - 'use strict'; - - require('source-map-support').install(); - require('chai').should(); - - var showdown = require('../bootstrap').showdown; - - describe('makeHtml() with option omitExtraWLInCodeBlocks', function () { - var converter = new showdown.Converter({omitExtraWLInCodeBlocks: true}), - text = 'var foo = bar;', - html = converter.makeHtml(' ' + text); - it('should omit extra line after code tag', function () { - var expectedHtml = '
' + text + '
'; - html.should.equal(expectedHtml); - }); - }); - - describe('makeHtml() with option prefixHeaderId', function () { - var converter = new showdown.Converter(), - text = 'foo header'; - - it('should prefix header id with "section"', function () { - converter.setOption('prefixHeaderId', true); - var html = converter.makeHtml('# ' + text), - expectedHtml = '

' + text + '

'; - html.should.equal(expectedHtml); - }); - - it('should prefix header id with custom string', function () { - converter.setOption('prefixHeaderId', 'blabla'); - var html = converter.makeHtml('# ' + text), - expectedHtml = '

' + text + '

'; - html.should.equal(expectedHtml); - }); - }); - - describe('makeHtml() with option metadata', function () { - var converter = new showdown.Converter(), - text1 = - '---SIMPLE\n' + - 'foo: bar\n' + - 'baz: bazinga\n' + - '---\n', - text2 = - '---TIVIE\n' + - 'a: b\n' + - 'c: 123\n' + - '---\n'; - - it('should correctly set metadata', function () { - converter.setOption('metadata', true); - - var expectedHtml = '', - expectedObj = {foo: 'bar', baz: 'bazinga'}, - expectedRaw = 'foo: bar\nbaz: bazinga', - expectedFormat = 'SIMPLE'; - converter.makeHtml(text1).should.equal(expectedHtml); - converter.getMetadata().should.eql(expectedObj); - converter.getMetadata(true).should.equal(expectedRaw); - converter.getMetadataFormat().should.equal(expectedFormat); - }); - - it('consecutive calls should reset metadata', function () { - converter.makeHtml(text2); - var expectedObj = {a: 'b', c: '123'}, - expectedRaw = 'a: b\nc: 123', - expectedFormat = 'TIVIE'; - converter.getMetadata().should.eql(expectedObj); - converter.getMetadata(true).should.equal(expectedRaw); - converter.getMetadataFormat().should.equal(expectedFormat); - }); - }); -}); diff --git a/node_modules/showdown/test/node/showdown.Converter.makeMarkdown.js b/node_modules/showdown/test/node/showdown.Converter.makeMarkdown.js deleted file mode 100644 index a6d89561..00000000 --- a/node_modules/showdown/test/node/showdown.Converter.makeMarkdown.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Created by Estevao on 15-01-2015. - */ - -describe('showdown.Converter', function () { - 'use strict'; - - require('source-map-support').install(); - require('chai').should(); - var jsdom = require('jsdom'); - var document = new jsdom.JSDOM('', {}).window.document; // jshint ignore:line - var showdown = require('../bootstrap').showdown; - - describe('makeMarkdown()', function () { - var converter = new showdown.Converter(); - - it('should parse a simple html string', function () { - var html = 'a link\n'; - var md = '[a link]()'; - - converter.makeMd(html, document).should.equal(md); - }); - - }); -}); diff --git a/node_modules/showdown/test/node/showdown.helpers.js b/node_modules/showdown/test/node/showdown.helpers.js deleted file mode 100644 index e7678e70..00000000 --- a/node_modules/showdown/test/node/showdown.helpers.js +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Created by Estevao on 27/01/2017. - */ -/*jshint expr: true*/ -/*jshint -W053 */ -/*jshint -W010 */ -/*jshint -W009 */ -var bootstrap = require('../bootstrap.js'), - showdown = bootstrap.showdown; - -describe('encodeEmailAddress()', function () { - 'use strict'; - var encoder = showdown.helper.encodeEmailAddress, - email = 'foobar@example.com', - encodedEmail = encoder(email); - - it('should encode email', function () { - encodedEmail.should.not.equal(email); - }); - - it('should decode to original email', function () { - var decodedEmail = encodedEmail.replace(/&#(.+?);/g, function (wm, cc) { - if (cc.charAt(0) === 'x') { - //hex - return String.fromCharCode('0' + cc); - } else { - //dec - return String.fromCharCode(cc); - } - }); - decodedEmail.should.equal(email); - }); -}); - -describe('isString()', function () { - 'use strict'; - var isString = showdown.helper.isString; - - it('should return true for new String Object', function () { - isString(new String('some string')).should.be.true; - }); - - it('should return true for String Object', function () { - isString(String('some string')).should.be.true; - }); - - it('should return true for string literal', function () { - isString('some string').should.be.true; - }); - - it('should return false for integers', function () { - isString(5).should.be.false; - }); - - it('should return false for random objects', function () { - isString({foo: 'bar'}).should.be.false; - }); - - it('should return false for arrays', function () { - isString(['bar']).should.be.false; - }); -}); - -describe('isFunction()', function () { - 'use strict'; - var isFunction = showdown.helper.isFunction; - - it('should return true for closures', function () { - isFunction(function () {}).should.be.true; - }); - - it('should return true for defined functions', function () { - function foo () {} - isFunction(foo).should.be.true; - }); - - it('should return true for function variables', function () { - var bar = function () {}; - isFunction(bar).should.be.true; - }); - - it('should return false for hash objects', function () { - isFunction({}).should.be.false; - }); - - it('should return false for objects', function () { - isFunction(new Object ()).should.be.false; - }); - - it('should return false for string primitives', function () { - isFunction('foo').should.be.false; - }); -}); - -describe('isArray()', function () { - 'use strict'; - var isArray = showdown.helper.isArray; - - it('should return true for short syntax arrays', function () { - isArray([]).should.be.true; - }); - - it('should return true for array objects', function () { - var myArr = new Array(); - isArray(myArr).should.be.true; - }); - - it('should return false for functions', function () { - isArray(function () {}).should.be.false; - function baz () {} - isArray(baz).should.be.false; - }); - - it('should return false for objects', function () { - isArray({}).should.be.false; - isArray(new Object ()).should.be.false; - }); - - it('should return false for strings', function () { - isArray('foo').should.be.false; - isArray(new String('foo')).should.be.false; - }); -}); - -describe('isUndefined()', function () { - 'use strict'; - var isUndefined = showdown.helper.isUndefined; - - it('should return true if nothing is passed', function () { - isUndefined().should.be.true; - }); - - it('should return true if a variable is initialized but not defined', function () { - var myVar; - isUndefined(myVar).should.be.true; - }); - - it('should return false for null', function () { - isUndefined(null).should.be.false; - }); - - it('should return false for 0', function () { - isUndefined(0).should.be.false; - }); - - it('should return false for empty string', function () { - isUndefined('').should.be.false; - }); - - it('should return false for empty booleans false or true', function () { - isUndefined(false).should.be.false; - isUndefined(true).should.be.false; - }); - - it('should return false for anything not undefined', function () { - isUndefined('foo').should.be.false; - isUndefined(2).should.be.false; - isUndefined({}).should.be.false; - }); -}); - -describe('stdExtName()', function () { - 'use strict'; - var stdExtName = showdown.helper.stdExtName; - - it('should remove certain chars', function () { - var str = 'bla_- \nbla'; - //[_?*+\/\\.^-] - stdExtName(str).should.not.match(/[_?*+\/\\.^-]/g); - }); - it('should make everything lowercase', function () { - var str = 'BLABLA'; - //[_?*+\/\\.^-] - stdExtName(str).should.equal('blabla'); - }); -}); - -describe('forEach()', function () { - 'use strict'; - var forEach = showdown.helper.forEach; - - it('should throw an error if first parameter is undefined', function () { - (function () {forEach();}).should.throw('obj param is required'); - }); - - it('should throw an error if second parameter is undefined', function () { - (function () {forEach([]);}).should.throw('callback param is required'); - }); - - it('should throw an error if second parameter is not a function', function () { - (function () {forEach([], 'foo');}).should.throw('callback param must be a function/closure'); - }); - - it('should throw an error if first parameter is not an object or an array', function () { - (function () {forEach('foo', function () {});}).should.throw('obj does not seem to be an array or an iterable object'); - }); - - it('should not throw even if object is empty', function () { - (function () {forEach({}, function () {});}).should.not.throw(); - }); - - it('should iterate array items', function () { - var myArray = ['banana', 'orange', 'grape']; - forEach(myArray, function (val, key, obj) { - key.should.be.a('number'); - (key % 1).should.equal(0); - val.should.equal(myArray[key]); - obj.should.equal(myArray); - }); - }); - - it('should iterate over object properties', function () { - var myObj = {foo: 'banana', bar: 'orange', baz: 'grape'}; - forEach(myObj, function (val, key, obj) { - myObj.should.have.ownProperty(key); - val.should.equal(myObj[key]); - obj.should.equal(myObj); - }); - }); - - it('should iterate only over object own properties', function () { - var Obj1 = {foo: 'banana'}, - myObj = Object.create(Obj1); - myObj.bar = 'orange'; - myObj.baz = 'grape'; - - myObj.should.have.ownProperty('bar'); - myObj.should.have.ownProperty('baz'); - myObj.should.not.have.ownProperty('foo'); - - forEach(myObj, function (val, key) { - key.should.not.equal('foo'); - }); - }); -}); - -describe('matchRecursiveRegExp()', function () { - 'use strict'; - - var rRegExp = showdown.helper.matchRecursiveRegExp; - - it('should match nested elements', function () { - var result = rRegExp('
a
', ']*>', '', 'gim'); - result.should.deep.equal([['
a
', '
a
', '
', '
']]); - }); - -}); - diff --git a/node_modules/showdown/test/node/showdown.js b/node_modules/showdown/test/node/showdown.js deleted file mode 100644 index c6e7002c..00000000 --- a/node_modules/showdown/test/node/showdown.js +++ /dev/null @@ -1,158 +0,0 @@ -require('source-map-support').install(); -require('chai').should(); -var expect = require('chai').expect, - showdown = require('../bootstrap').showdown; - -describe('showdown.options', function () { - 'use strict'; - - describe('setOption() and getOption()', function () { - it('should set option foo=bar', function () { - showdown.setOption('foo', 'bar'); - showdown.getOption('foo').should.equal('bar'); - showdown.resetOptions(); - (typeof showdown.getOption('foo')).should.equal('undefined'); - }); - }); - - describe('getDefaultOptions()', function () { - it('should get default options', function () { - var opts = require('../optionswp').getDefaultOpts(true); - expect(showdown.getDefaultOptions()).to.be.eql(opts); - }); - }); -}); - -describe('showdown.extension()', function () { - 'use strict'; - - var extObjMock = { - type: 'lang', - filter: function () {} - }, - extObjFunc = function () { - return extObjMock; - }; - - describe('should register', function () { - it('an extension object', function () { - showdown.extension('foo', extObjMock); - showdown.extension('foo').should.eql([extObjMock]); - showdown.resetExtensions(); - }); - - it('an extension function', function () { - showdown.extension('foo', extObjFunc); - showdown.extension('foo').should.eql([extObjMock]); - showdown.resetExtensions(); - }); - - it('a listener extension', function () { - showdown.extension('foo', { - type: 'listener', - listeners: { - foo: function (name, txt) { - return txt; - } - } - }); - showdown.resetExtensions(); - }); - }); - - describe('should refuse to register', function () { - it('a generic object', function () { - var fn = function () { - showdown.extension('foo', {}); - }; - expect(fn).to.throw(); - }); - - it('an extension with invalid type', function () { - var fn = function () { - showdown.extension('foo', { - type: 'foo' - }); - }; - expect(fn).to.throw(/type .+? is not recognized\. Valid values: "lang\/language", "output\/html" or "listener"/); - }); - - it('an extension without regex or filter', function () { - var fn = function () { - showdown.extension('foo', { - type: 'lang' - }); - }; - expect(fn).to.throw(/extensions must define either a "regex" property or a "filter" method/); - }); - - it('a listener extension without a listeners property', function () { - var fn = function () { - showdown.extension('foo', { - type: 'listener' - }); - }; - expect(fn).to.throw(/Extensions of type "listener" must have a property called "listeners"/); - }); - }); -}); - -describe('showdown.getAllExtensions()', function () { - 'use strict'; - var extObjMock = { - type: 'lang', - filter: function () {} - }; - - it('should return all extensions', function () { - showdown.extension('bar', extObjMock); - showdown.getAllExtensions().should.eql({bar: [extObjMock]}); - }); -}); - -describe('showdown.setFlavor()', function () { - 'use strict'; - it('should set flavor to github', function () { - showdown.setFlavor('github'); - showdown.getFlavor().should.equal('github'); - showdown.setFlavor('vanilla'); - }); - - it('should set options correctly', function () { - showdown.setFlavor('github'); - var ghOpts = showdown.getFlavorOptions('github'), - shOpts = showdown.getOptions(); - for (var opt in ghOpts) { - if (ghOpts.hasOwnProperty(opt)) { - shOpts.should.have.property(opt); - shOpts[opt].should.equal(ghOpts[opt]); - } - } - showdown.setFlavor('vanilla'); - }); - - it('should switch between flavors correctly', function () { - showdown.setFlavor('github'); - var ghOpts = showdown.getFlavorOptions('github'), - shOpts = showdown.getOptions(), - dfOpts = showdown.getDefaultOptions(); - for (var opt in dfOpts) { - if (ghOpts.hasOwnProperty(opt)) { - shOpts[opt].should.equal(ghOpts[opt]); - } else { - shOpts[opt].should.equal(dfOpts[opt]); - } - } - showdown.setFlavor('original'); - var orOpts = showdown.getFlavorOptions('original'); - shOpts = showdown.getOptions(); - for (opt in dfOpts) { - if (orOpts.hasOwnProperty(opt)) { - shOpts[opt].should.equal(orOpts[opt]); - } else { - shOpts[opt].should.equal(dfOpts[opt]); - } - } - showdown.setFlavor('vanilla'); - }); -}); diff --git a/node_modules/showdown/test/node/testsuite.features.js b/node_modules/showdown/test/node/testsuite.features.js deleted file mode 100644 index f96515fa..00000000 --- a/node_modules/showdown/test/node/testsuite.features.js +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Created by Estevao on 08-06-2015. - */ -var bootstrap = require('../bootstrap.js'), - showdown = bootstrap.showdown, - assertion = bootstrap.assertion, - testsuite = bootstrap.getTestSuite('test/features/'), - tableSuite = bootstrap.getTestSuite('test/features/tables/'), - simplifiedAutoLinkSuite = bootstrap.getTestSuite('test/features/simplifiedAutoLink/'), - openLinksInNewWindowSuite = bootstrap.getTestSuite('test/features/openLinksInNewWindow/'), - disableForced4SpacesIndentedSublistsSuite = bootstrap.getTestSuite('test/features/disableForced4SpacesIndentedSublists/'), - rawHeaderIdSuite = bootstrap.getTestSuite('test/features/rawHeaderId/'), - rawPrefixHeaderIdSuite = bootstrap.getTestSuite('test/features/rawPrefixHeaderId/'), - emojisSuite = bootstrap.getTestSuite('test/features/emojis/'), - underlineSuite = bootstrap.getTestSuite('test/features/underline/'), - literalMidWordUnderscoresSuite = bootstrap.getTestSuite('test/features/literalMidWordUnderscores/'), - literalMidWordAsterisksSuite = bootstrap.getTestSuite('test/features/literalMidWordAsterisks/'), - completeHTMLOutputSuite = bootstrap.getTestSuite('test/features/completeHTMLOutput/'), - metadataSuite = bootstrap.getTestSuite('test/features/metadata/'), - splitAdjacentBlockquotesSuite = bootstrap.getTestSuite('test/features/splitAdjacentBlockquotes/'); - -describe('makeHtml() features testsuite', function () { - 'use strict'; - - describe('issues', function () { - for (var i = 0; i < testsuite.length; ++i) { - var converter; - if (testsuite[i].name === '#143.support-image-dimensions') { - converter = new showdown.Converter({parseImgDimensions: true}); - } else if (testsuite[i].name === '#69.header-level-start') { - converter = new showdown.Converter({headerLevelStart: 3}); - } else if (testsuite[i].name === '#164.1.simple-autolink' || testsuite[i].name === '#204.certain-links-with-at-and-dot-break-url') { - converter = new showdown.Converter({simplifiedAutoLink: true}); - } else if (testsuite[i].name === 'literalMidWordUnderscores') { - converter = new showdown.Converter({literalMidWordUnderscores: true}); - } else if (testsuite[i].name === '#164.2.disallow-underscore-emphasis-mid-word') { - converter = new showdown.Converter({literalMidWordUnderscores: true}); - } else if (testsuite[i].name === '#164.3.strikethrough' || testsuite[i].name === '#214.escaped-markdown-chars-break-strikethrough') { - converter = new showdown.Converter({strikethrough: true}); - } else if (testsuite[i].name === 'disable-gh-codeblocks') { - converter = new showdown.Converter({ghCodeBlocks: false}); - } else if (testsuite[i].name === '#164.4.tasklists') { - converter = new showdown.Converter({tasklists: true}); - } else if (testsuite[i].name === '#198.literalMidWordUnderscores-changes-behavior-of-asterisk') { - converter = new showdown.Converter({literalMidWordUnderscores: true}); - } else if (testsuite[i].name === '#259.es6-template-strings-indentation-issues') { - converter = new showdown.Converter({smartIndentationFix: true}); - } else if (testsuite[i].name === '#284.simplifiedAutoLink-does-not-match-GFM-style') { - converter = new showdown.Converter({simplifiedAutoLink: true}); - } else if (testsuite[i].name === 'disableForced4SpacesIndentedSublists') { - converter = new showdown.Converter({disableForced4SpacesIndentedSublists: true}); - } else if (testsuite[i].name === '#206.treat-single-line-breaks-as-br') { - converter = new showdown.Converter({simpleLineBreaks: true}); - } else if (testsuite[i].name === 'simpleLineBreaks2') { - converter = new showdown.Converter({simpleLineBreaks: true}); - } else if (testsuite[i].name === '#316.new-simpleLineBreaks-option-breaks-lists') { - converter = new showdown.Converter({simpleLineBreaks: true}); - } else if (testsuite[i].name === '#323.simpleLineBreaks-breaks-with-strong') { - converter = new showdown.Converter({simpleLineBreaks: true}); - } else if (testsuite[i].name === '#318.simpleLineBreaks-does-not-work-with-chinese-characters') { - converter = new showdown.Converter({simpleLineBreaks: true}); - } else if (testsuite[i].name === 'simpleLineBreaks-handle-html-pre') { - converter = new showdown.Converter({simpleLineBreaks: true}); - } else if (testsuite[i].name === 'excludeTrailingPunctuationFromURLs-option') { - converter = new showdown.Converter({simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true}); - } else if (testsuite[i].name === 'requireSpaceBeforeHeadingText') { - converter = new showdown.Converter({requireSpaceBeforeHeadingText: true}); - } else if (testsuite[i].name === '#320.github-compatible-generated-header-id') { - converter = new showdown.Converter({ghCompatibleHeaderId: true}); - } else if (testsuite[i].name === 'ghMentions') { - converter = new showdown.Converter({ghMentions: true}); - } else if (testsuite[i].name === 'disable-email-encoding') { - converter = new showdown.Converter({encodeEmails: false}); - } else if (testsuite[i].name === '#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail') { - converter = new showdown.Converter({encodeEmails: false, simplifiedAutoLink: true}); - } else if (testsuite[i].name === '#331.allow-escaping-of-tilde') { - converter = new showdown.Converter({strikethrough: true}); - } else if (testsuite[i].name === 'enable-literalMidWordAsterisks') { - converter = new showdown.Converter({literalMidWordAsterisks: true}); - } else if (testsuite[i].name === 'prefixHeaderId-simple') { - converter = new showdown.Converter({prefixHeaderId: true}); - } else if (testsuite[i].name === 'prefixHeaderId-string') { - converter = new showdown.Converter({prefixHeaderId: 'my-prefix-'}); - } else if (testsuite[i].name === 'prefixHeaderId-string-and-ghCompatibleHeaderId') { - converter = new showdown.Converter({prefixHeaderId: 'my-prefix-', ghCompatibleHeaderId: true}); - } else if (testsuite[i].name === 'prefixHeaderId-string-and-ghCompatibleHeaderId2') { - converter = new showdown.Converter({prefixHeaderId: 'my prefix ', ghCompatibleHeaderId: true}); - } else if (testsuite[i].name === 'simplifiedAutoLink') { - converter = new showdown.Converter({simplifiedAutoLink: true, strikethrough: true}); - } else if (testsuite[i].name === 'customizedHeaderId-simple') { - converter = new showdown.Converter({customizedHeaderId: true}); - } else if (testsuite[i].name === '#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs') { - converter = new showdown.Converter({simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true}); - } else if (testsuite[i].name === '#374.escape-html-tags') { - converter = new showdown.Converter({backslashEscapesHTMLTags: true}); - } else if (testsuite[i].name === '#379.openLinksInNewWindow-breaks-em-markdup') { - converter = new showdown.Converter({openLinksInNewWindow: true}); - } else if (testsuite[i].name === '#398.literalMidWordAsterisks-treats-non-word-characters-as-characters') { - converter = new showdown.Converter({literalMidWordAsterisks: true}); - } else { - converter = new showdown.Converter(); - } - it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); - } - }); - - /** test Table Syntax Support **/ - describe('table support', function () { - var converter, - suite = tableSuite; - for (var i = 0; i < suite.length; ++i) { - if (suite[i].name === 'basic-with-header-ids') { - converter = new showdown.Converter({tables: true, tablesHeaderId: true}); - } else if (suite[i].name === '#179.parse-md-in-table-ths') { - converter = new showdown.Converter({tables: true, strikethrough: true}); - } else { - converter = new showdown.Converter({tables: true}); - } - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test simplifiedAutoLink Support **/ - describe('simplifiedAutoLink support in', function () { - var converter, - suite = simplifiedAutoLinkSuite; - for (var i = 0; i < suite.length; ++i) { - if (suite[i].name === 'emphasis-and-strikethrough') { - converter = new showdown.Converter({simplifiedAutoLink: true, strikethrough: true}); - } else if (suite[i].name === 'disallow-underscores') { - converter = new showdown.Converter({literalMidWordUnderscores: true, simplifiedAutoLink: true}); - } else if (suite[i].name === 'disallow-asterisks') { - converter = new showdown.Converter({literalMidWordAsterisks: true, simplifiedAutoLink: true}); - } else { - converter = new showdown.Converter({simplifiedAutoLink: true}); - } - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test openLinksInNewWindow support **/ - describe('openLinksInNewWindow support in', function () { - var converter, - suite = openLinksInNewWindowSuite; - for (var i = 0; i < suite.length; ++i) { - if (suite[i].name === 'simplifiedAutoLink') { - converter = new showdown.Converter({openLinksInNewWindow: true, simplifiedAutoLink: true}); - } else { - converter = new showdown.Converter({openLinksInNewWindow: true}); - } - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test disableForced4SpacesIndentedSublists support **/ - describe('disableForced4SpacesIndentedSublists support in', function () { - var converter, - suite = disableForced4SpacesIndentedSublistsSuite; - for (var i = 0; i < suite.length; ++i) { - converter = new showdown.Converter({disableForced4SpacesIndentedSublists: true}); - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test rawHeaderId support **/ - describe('rawHeaderId support', function () { - var converter, - suite = rawHeaderIdSuite; - for (var i = 0; i < suite.length; ++i) { - if (suite[i].name === 'with-prefixHeaderId') { - converter = new showdown.Converter({rawHeaderId: true, prefixHeaderId: '/prefix/'}); - } else { - converter = new showdown.Converter({rawHeaderId: true}); - } - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test rawPrefixHeaderId support **/ - describe('rawPrefixHeaderId support', function () { - var converter, - suite = rawPrefixHeaderIdSuite; - for (var i = 0; i < suite.length; ++i) { - converter = new showdown.Converter({rawPrefixHeaderId: true, prefixHeaderId: '/prefix/'}); - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test emojis support **/ - describe('emojis support', function () { - var converter, - suite = emojisSuite; - for (var i = 0; i < suite.length; ++i) { - if (suite[i].name === 'simplifiedautolinks') { - converter = new showdown.Converter({emoji: true, simplifiedAutoLink: true}); - } else { - converter = new showdown.Converter({emoji: true}); - } - - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test underline support **/ - describe('underline support', function () { - var converter, - suite = underlineSuite; - for (var i = 0; i < suite.length; ++i) { - if (suite[i].name === 'simplifiedautolinks') { - converter = new showdown.Converter({underline: true, simplifiedAutoLink: true}); - } else { - converter = new showdown.Converter({underline: true}); - } - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test literalMidWordUnderscores option **/ - describe('literalMidWordUnderscores option', function () { - var converter, - suite = literalMidWordUnderscoresSuite; - for (var i = 0; i < suite.length; ++i) { - converter = new showdown.Converter({literalMidWordUnderscores: true}); - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test literalMidWordAsterisks option **/ - describe('literalMidWordAsterisks option', function () { - var converter, - suite = literalMidWordAsterisksSuite; - for (var i = 0; i < suite.length; ++i) { - converter = new showdown.Converter({literalMidWordAsterisks: true}); - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - - /** test completeHTMLDocument option **/ - describe('completeHTMLDocument option', function () { - var converter, - suite = completeHTMLOutputSuite; - for (var i = 0; i < suite.length; ++i) { - converter = new showdown.Converter({completeHTMLDocument: true}); - - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test metadata option **/ - describe('metadata option', function () { - var converter, - suite = metadataSuite; - - for (var i = 0; i < suite.length; ++i) { - if (suite[i].name === 'embeded-in-output' || - suite[i].name === 'embeded-two-consecutive-metadata-blocks' || - suite[i].name === 'embeded-two-consecutive-metadata-blocks-different-symbols') { - converter = new showdown.Converter({metadata: true, completeHTMLDocument: true}); - } else if (suite[i].name === 'ignore-metadata') { - converter = new showdown.Converter({metadata: false}); - } else { - converter = new showdown.Converter({metadata: true}); - } - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); - - /** test metadata option **/ - describe('splitAdjacentBlockquotes option', function () { - var converter, - suite = splitAdjacentBlockquotesSuite; - - for (var i = 0; i < suite.length; ++i) { - converter = new showdown.Converter({splitAdjacentBlockquotes: true}); - it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter)); - } - }); -}); diff --git a/node_modules/showdown/test/node/testsuite.ghost.js b/node_modules/showdown/test/node/testsuite.ghost.js deleted file mode 100644 index 8c782ea5..00000000 --- a/node_modules/showdown/test/node/testsuite.ghost.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Created by Estevao on 14-07-2015. - */ -var bootstrap = require('../bootstrap.js'), - converter = new bootstrap.showdown.Converter({ - strikethrough: true, - literalMidWordUnderscores: true, - simplifiedAutoLink: true, - tables: true, - parseImgDimensions: true, //extra - tasklists: true //extra - }), - assertion = bootstrap.assertion, - testsuite = bootstrap.getTestSuite('test/ghost/'); - -//MD-Testsuite (borrowed from karlcow/markdown-testsuite) -describe('makeHtml() ghost testsuite', function () { - 'use strict'; - for (var i = 0; i < testsuite.length; ++i) { - it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); - } -}); diff --git a/node_modules/showdown/test/node/testsuite.issues.js b/node_modules/showdown/test/node/testsuite.issues.js deleted file mode 100644 index 8580a3e7..00000000 --- a/node_modules/showdown/test/node/testsuite.issues.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Created by Estevao on 08-06-2015. - */ -var bootstrap = require('../bootstrap.js'), - converter = new bootstrap.showdown.Converter(), - assertion = bootstrap.assertion, - testsuite = bootstrap.getTestSuite('test/issues/'); - -describe('makeHtml() issues testsuite', function () { - 'use strict'; - for (var i = 0; i < testsuite.length; ++i) { - it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); - } -}); diff --git a/node_modules/showdown/test/node/testsuite.karlcow.js b/node_modules/showdown/test/node/testsuite.karlcow.js deleted file mode 100644 index 072c41f6..00000000 --- a/node_modules/showdown/test/node/testsuite.karlcow.js +++ /dev/null @@ -1,12 +0,0 @@ -var bootstrap = require('../bootstrap.js'), - converter = new bootstrap.showdown.Converter({noHeaderId: true}), - assertion = bootstrap.assertion, - testsuite = bootstrap.getTestSuite('test/karlcow/'); - -//MD-Testsuite (borrowed from karlcow/markdown-testsuite) -describe('makeHtml() karlcow testsuite', function () { - 'use strict'; - for (var i = 0; i < testsuite.length; ++i) { - it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); - } -}); diff --git a/node_modules/showdown/test/node/testsuite.makemd.js b/node_modules/showdown/test/node/testsuite.makemd.js deleted file mode 100644 index f7b2e32e..00000000 --- a/node_modules/showdown/test/node/testsuite.makemd.js +++ /dev/null @@ -1,12 +0,0 @@ -var bootstrap = require('../bootstrap.js'), - converter = new bootstrap.showdown.Converter(), - testsuite = bootstrap.getHtmlToMdTestSuite('test/makeMd/'), - assertion = bootstrap.assertion; - -describe('makeMd() standard testsuite', function () { - 'use strict'; - for (var i = 0; i < testsuite.length; ++i) { - it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter, 'makeMd')); - } -}); - diff --git a/node_modules/showdown/test/node/testsuite.standard.js b/node_modules/showdown/test/node/testsuite.standard.js deleted file mode 100644 index 1746998a..00000000 --- a/node_modules/showdown/test/node/testsuite.standard.js +++ /dev/null @@ -1,11 +0,0 @@ -var bootstrap = require('../bootstrap.js'), - converter = new bootstrap.showdown.Converter(), - assertion = bootstrap.assertion, - testsuite = bootstrap.getTestSuite('test/cases/'); - -describe('makeHtml() standard testsuite', function () { - 'use strict'; - for (var i = 0; i < testsuite.length; ++i) { - it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter)); - } -}); diff --git a/node_modules/showdown/test/optionswp.js b/node_modules/showdown/test/optionswp.js deleted file mode 100644 index dd202647..00000000 --- a/node_modules/showdown/test/optionswp.js +++ /dev/null @@ -1,9 +0,0 @@ -/* jshint ignore:start */ -var fs = require('fs'), - filedata; -filedata = fs.readFileSync('src/options.js', 'utf8'); -eval(filedata); -module.exports = { - getDefaultOpts: getDefaultOpts -}; -/* jshint ignore:end */ diff --git a/node_modules/showdown/test/performance.testfile.md b/node_modules/showdown/test/performance.testfile.md deleted file mode 100644 index 895e466c..00000000 --- a/node_modules/showdown/test/performance.testfile.md +++ /dev/null @@ -1,1912 +0,0 @@ - -This is [an example][id] reference-style link. -This is [another] [foo] reference-style link. -This is [a third][bar] reference-style link. -This is [a fourth][4] reference-style link. - - [id]: http://example.com/ "Optional Title Here" - [foo]: http://example.com/ (Optional Title Here) - [bar]: http://example.com/ (Optional Title Here) - [4]: - "Optional Title Here" - - - - - - -> a blockquote - with a 4 space indented line (not code) - -sep - -> a blockquote - - with some code after - - - > this is a pseudo blockquote - > inside a code block - -foo - - > this is another bq - inside code - - -> ## This is a header. -> -> 1. This is the first list item. -> 2. This is the second list item. -> -> Here's some example code: -> -> return shell_exec("echo $input | $markdown_script"); - - - - > This is a multi line blockquote test - > - > With more than one line. - - - -This is some HTML: - -

Heading

- - - -This is a normal paragraph: - - This is a code block. - - - - * Bird - - * Magic - - -*single asterisks* - -_single underscores_ - -**double asterisks** - -__double underscores__ - -text *with italic sentence* in middle - -text __with bold sentence__ in middle - -text with __bold text that -spans across multiple__ lines - -underscored_word - -doubleunderscore__word - -asterix*word - -doubleasterix**word - -line with_underscored word - -line with__doubleunderscored word - -line with*asterixed word - -line with**doubleasterixed word - -some line_with_inner underscores - -some line__with__inner double underscores - -some line*with*inner asterixs - -some line**with**inner double asterixs - -another line with just _one underscore - -another line with just __one double underscore - -another line with just *one asterix - -another line with just **one double asterix - -a sentence with_underscore and another_underscore - -a sentence with__doubleunderscore and another__doubleunderscore - -a sentence with*asterix and another*asterix - -a sentence with**doubleasterix and another**doubleasterix - -escaped word\_with\_underscores - -escaped word\_\_with\_\_double underscores - -escaped word_\_with\__single italic underscore - -escaped word\*with*asterixs - -escaped word\*\*with\*\*asterixs - -escaped word**\*with\***bold asterixs - - -It happened in 1986\. What a great season. - - - -These should all be escaped: - -\\ - -\` - -\* - -\_ - -\{ - -\} - -\[ - -\] - -\( - -\) - -\# - -\+ - -\- - -\. - -\! - - -``` -function MyFunc(a) { - // ... -} -``` - -That is some code! - - -> Define a function in javascript: -> -> ``` -> function MyFunc(a) { -> var s = '`'; -> } -> ``` -> ->> And some nested quote ->> ->> ```html ->>
HTML!
->> ``` - - - -Define a function in javascript: - -``` -function MyFunc(a) { - var s = '`'; -} -``` - -And some HTML - -```html -
HTML!
-``` - - -``` -code can go here -this is rendered on a second line -``` - - -# This is an H1 # - - -This is an H1 -============= - - -# This is an H1 - - -This is an H2 -------------- - - -## This is an H2 ## - - -## This is an H2 - - -### This is an H3 ### - - -### This is an H3 - - -#### This is an H4 - - -##### This is an H5 - - -###### This is an H6 - - - -* * * - -*** - -***** - -- - - - ---------------------------------------- - - - - - - -words words - - words - - - - - - - - list item 1 - - ```html - google -
-
some div
-
- ``` - - - -These HTML5 tags should pass through just fine. - -
hello
-
head
-
footsies
- -
read me
- -
read -me
- - -the end - - - - - - - - -
Foo
Bar
- - - - - - - - - - - - - - - -
Foo
Bar
Bar
- - - - - -
My street
- - - Sorry, your browser doesn't support the <canvas> element. - - -
- An awesome picture -
Caption for the awesome picture
-
- -
-

Main title

-

Secondary title

-
- - - - - -![Alt text](/path/to/img.jpg) - -![Alt text](/path/to/img.jpg "Optional title") - -![Alt text][id] - - [id]: url/to/image "Optional title attribute" - - - -Search the web at [Google][] or [Daring Fireball][]. - - [Google]: http://google.com/ - [Daring Fireball]: http://daringfireball.net/ - - - -This is [an example](http://example.com/ "Title") inline link. - -[This link](http://example.net/) has no title attribute. - - - -Create a new `function`. - -Use the backtick in MySQL syntax ``SELECT `column` FROM whatever``. - -A single backtick in a code span: `` ` `` - -A backtick-delimited string in a code span: `` `foo` `` - -Please don't use any `` tags. - -`—` is the decimal-encoded equivalent of `—`. - - - -Hello.this\_is\_a\_variable -and.this.is.another_one - - - - - -An exciting sentence. - - - - > This is a multi line blockquote test - - > With more than one line. - - -some text words - -
words - - -# some title - -1. list item 1 -2. list item 2 - -> some text in a blockquote - -* another list item 1 -* another list item 2 - - -# some title - -1. list item 1 -2. list item 2 - -``` -some code - -and some other line of code -``` - -* another list item 1 -* another list item 2 - - -* A list item with a blockquote: - - > This is a blockquote - > inside a list item. - - -* A list item with code: - - alert('Hello world!'); - - -some **code** yeah - -some inline **code** block - -some inline **code** block - -yo dawg some code inception - -
some **div** yeah
- - - - 1. This is a major bullet point. - - That contains multiple paragraphs. - - 2. And another line - - - - - This line spans - more than one line and is lazy - - Similar to this line - - - - > This is a multi line blockquote test - > - > > And nesting! - > - > With more than one line. - - - - 1. Red - 1. Green - 1. Blue - - - - 8. Red - 1. Green - 3. Blue - - - - 1. Red - 2. Green - 3. Blue - - - - foo - - - bazinga - - - yeah - - - bar - - 1. damn - - 2. so many paragraphs - - - baz - - -code inception - -``` -

-
some html code inside code html tags inside a fenced code block
-
-``` - - -
-
-foobar
-
-
- -blabla - -

-foobar
-
-
- -

-
some html code
-
- - - -See my [About](/about/) page for details. - - -# Same Title - -some text - -# Same Title - - - -Hello, world! - - - -**important** - -__important__ - -really **freaking**strong - - - - * Red - * Green - * Blue - - - - - Red - - Green - - Blue - - - - + Red - + Green - + Blue - - -There's an [episode](http://en.memory-alpha.org/wiki/Darmok_(episode)) of Star Trek: The Next Generation - - -# some title - -Test **bold** and _italic_ - - -![my image](./pic/pic1_50.png =100pxx20px) - -![my image2][1] - -[1]: ./pic/pic1_50.png =100pxx20px - - -foo.bar - -www.foobar - -www.foobar.com - -http://foobar.com - -https://www.foobar.com/baz?bazinga=nhecos; - -http://www.google.com - - -this is a sentence_with_mid underscores - -this is a sentence with just_one underscore - -this _should be parsed_ as emphasis - -this is double__underscore__mid word - -this has just__one double underscore - -this __should be parsed__ as bold - -emphasis at _end of sentence_ - -_emphasis at_ line start - -multi _line emphasis -yeah it is_ yeah - - -a ~~strikethrough~~ word - -this should~~not be parsed - -~~strike-through text~~ - - -# my things - - - foo - - [] bar - - [ ] baz - - [x] bazinga - -otherthings - - -# some markdown - -blabla -
This is **not parsed**
-
This is **parsed**
-
This is **not parsed**
- - -​pointer *ptr *thing - -something _else _bla - -something __else __bla - - -http://website.com/img@x2.jpg - -http://website.com/img-x2.jpg - -http://website.com/img@x2 - -http://website.com/img@.jpg - - -a simple -wrapped line - - -Your friend ~~[**test\***](www.google.com)~~ (~~[*@test*](www.google.com)~~) updated his/her description - - - ## markdown doc - - you can use markdown for card documentation - - foo - - bar - - -this is a link to www.github.com - -this is a link to - - -1. One -2. Two - - A - - B -3. Three - -> this has -> simple linebreaks - - testing - some - code - - 1. paragraphed list - - this belongs - to the first list item - - 2. This text - also - -simple -text - - - a list - item - - another - list item - -simple -text - - - some item - - another - paragraph - - - And - now - - paragraph - sublist - - - and - even - - another - one - - - foo - - - -foo烫 -bar - -foo -bar - - -# some header - -# some header with &+$,/:;=?@\"#{}|^~[]`\\*()%.!' chars - -# another header > with < chars - - -**Nom :** aaaa -**Nom :** aaa - - -Just an example info@example.com ok?​ - - -#Given - -#When - -#Then - -foo -=== - -bar ---- - - -http://en.wikipedia.org/wiki/Tourism_in_Germany - - -this email should not be encoded - - -this is some text - -```php -function thisThing() { - echo "some weird formatted code!"; -} -``` - -some other text - - -* foo - * bar - -... - -* baz - 1. bazinga - - -url http://www.google.com. - -url http://www.google.com! - -url http://www.google.com? foo - -url (http://www.google.com) bazinga - - -hello @tivie how are you? - -this email foo@gmail.com is not parsed - -this \@mentions is not parsed also - - -# header - -#header - - - 1. One - 2. Two - foo - - bar - bazinga - - - - - nhecos - - 3. Three - - - foo - - - bar - - -| *foo* | **bar** | ~~baz~~ | -|-------|---------|---------| -| 100 | blabla | aaa | - - -|key|value| -|--|--| -|My Key|My Value| - - -| First Header | Second Header | -| :------------ | :------------ | -| Row 1 Cell 1 | Row 1 Cell 2 | -| Row 2 Cell 1 | Row 2 Cell 2 | - - -| First Header | Second Header | -| ------------- | ------------- | -| Row 1 Cell 1 | Row 1 Cell 2 | -| Row 2 Cell 1 | Row 2 Cell 2 | - - -| First Header | Second Header | -| ------------- | ------------- | -| Row 1 Cell 1 | Row 1 Cell 2 | -| Row 2 Cell 1 | Row 2 Cell 2 | - - -First Header | Second Header|Third Header -------------- | -------------|--- -Content Cell | Content Cell|C -Content Cell | Content Cell|C - - -| First Header | Second Header | Third Header | Fourth Header | -| :------------ |: ----------- :| ------------ :| ------------- | -| Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 | Row 1 Cell 4 | -| Row 2 Cell 1 | Row 2 Cell 2 | Row 2 Cell 3 | Row 2 Cell 4 | -| Row 3 Cell 1 | Row 3 Cell 2 | Row 3 Cell 3 | Row 3 Cell 4 | -| Row 4 Cell 1 | Row 4 Cell 2 | Row 4 Cell 3 | Row 4 Cell 4 | -| Row 5 Cell 1 | Row 5 Cell 2 | Row 5 Cell 3 | Row 5 Cell 4 | - - -| First Header | Second Header | Third Header | Fourth Header | -| ------------- | ------------- | ------------ | ------------- | -| Row 1 Cell 1 | Row 1 Cell 2 | Row 1 Cell 3 | Row 1 Cell 4 | -| Row 2 Cell 1 | Row 2 Cell 2 | Row 2 Cell 3 | Row 2 Cell 4 | -| Row 3 Cell 1 | Row 3 Cell 2 | Row 3 Cell 3 | Row 3 Cell 4 | -| Row 4 Cell 1 | Row 4 Cell 2 | Row 4 Cell 3 | Row 4 Cell 4 | -| Row 5 Cell 1 | Row 5 Cell 2 | Row 5 Cell 3 | Row 5 Cell 4 | - - -| Left-Aligned | Center-Aligned | Right-Aligned | -| :------------ |:--------------------:| -------------:| -| col 3 is | some wordy paragraph | $1600 | -| col 2 is | centered | $12 | -| zebra stripes | are neat | $1 | - - -Table Test -============ - -section 1 ------------- - -|header1 |header2 |header3| -|-----------|-----------|---------| -|Value1 |Value2 |Value3 | - - -section 2 ------------ - -|headerA |headerB |headerC| -|-----------|-----------|---------| -|ValueA |ValueB |ValueC | - - -some text - - - | Tables | Are | Cool | - | ------------- |:-------------:| -----:| - | **col 3 is** | right-aligned | $1600 | - | col 2 is | *centered* | $12 | - | zebra stripes | ~~are neat~~ | $1 | - - - -### Stats - - -Status | AGENT1 | AGENT2 | AGENT3 | AGENT4 | AGENT5 | AGENT6 | AGENT7 | AGENT8 | AGENT9 | TOTAL | ---- | --- | --- | --- | --- | --- | --- | --- | --- | --- | -AGENT ERROR | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -APPROVED | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - - -| First Header | Second Header | -| ============= | ============= | -| Row 1 Cell 1 | Row 1 Cell 2 | -| Row 2 Cell 1 | Row 2 Cell 2 | - - -| First Header | Second Header | -| ------------- | ----------------- | -| **bold** | ![img](foo.jpg) | -| _italic_ | [link](bla.html) | -| `some code` | [google][1] | -| | normal | - - - [1]: www.google.com - - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisi est, -ullamcorper euismod iaculis sed, tristique at neque. Nullam metus risus, -malesuada vitae imperdiet ac, tincidunt eget lacus. Proin ullamcorper -vulputate dictum. Vestibulum consequat ultricies nibh, sed tempus nisl mattis a. - -| First Header | Second Header | -| ------------- | ------------- | -| Row 1 Cell 1 | Row 1 Cell 2 | -| Row 2 Cell 1 | Row 2 Cell 2 | - -Phasellus ac porttitor quam. Integer cursus accumsan mauris nec interdum. -Etiam iaculis urna vitae risus facilisis faucibus eu quis risus. Sed aliquet -rutrum dictum. Vivamus pulvinar malesuada ultricies. Pellentesque in commodo -nibh. Maecenas justo erat, sodales vel bibendum a, dignissim in orci. Duis -blandit ornare mi non facilisis. Aliquam rutrum fringilla lacus in semper. -Sed vel pretium lorem. - - -| First Header | Second Header | -| ------------- | ------------- | - - -| First Header | Second Header | - - -### Automatic Links - -``` -https://ghost.org -``` - -https://ghost.org - -### Markdown Footnotes - -``` -The quick brown fox[^1] jumped over the lazy dog[^2]. - -[^1]: Foxes are red -[^2]: Dogs are usually not red -``` - -The quick brown fox[^1] jumped over the lazy dog[^2]. - - -### Syntax Highlighting - - ```language-javascript - [...] - ``` - -Combined with [Prism.js](http://prismjs.com/) in the Ghost theme: - -```language-javascript -// # Notifications API -// RESTful API for creating notifications -var Promise = require('bluebird'), - _ = require('lodash'), - canThis = require('../permissions').canThis, - errors = require('../errors'), - utils = require('./utils'), - - // Holds the persistent notifications - notificationsStore = [], - // Holds the last used id - notificationCounter = 0, - notifications; -``` - - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -_baz_bar_foo_ - -__baz_bar_foo__ - -___baz_bar_foo___ - -baz bar foo _baz_bar_foo foo bar baz_ and foo - -foo\_bar\_baz foo\_bar\_baz\_bar\_foo \_foo\_bar baz\_bar\_ baz\_foo - -`foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo` - - - foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - - -```html -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo -``` - -
foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
- -
foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
- -
foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
- - - -[foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo](http://myurl.com/foo_bar_baz_bar_foo) - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo ------ - -### foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -1. foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo -2. foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -> blockquote foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -* foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo -* foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -------- - -http://en.wikipedia.org/wiki/Tourism_in_Germany - -[an example] [wiki] - -Another [example][wiki] of a link - -[wiki]: http://en.wikipedia.org/wiki/Tourism_in_Germany - -

foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo

- - - -foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo - -![foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo](http://myurl.com/foo_bar_baz_bar_foo) - -http://myurl.com/foo_bar_baz_bar_foo - - - -_italics_. - -_italics_ . - - -escaped word\_with\_underscores - -escaped word\_\_with\_\_double underscores - -escaped word_\_with\__single italic underscore - -escaped word\*with*asterixs - -escaped word\*\*with\*\*asterixs - -escaped word**\*with\***bold asterixs - - -* Item 1 -* Item 2 - -1. Item 1 -2. Item 2 - -- Item 1 -- Item 2 - - -2015-10-04 - - -1. Hi, I am a thing - - ```sh - - $ git clone thing.git - - dfgdfg - ``` - -1. I am another thing! - - ```sh - - $ git clone other-thing.git - - foobar - ``` - - -> a blockquote -# followed by an heading - - -Test pre in a list - -- & < -- `& <` - - & < - - `& <` - - & < - - `& <` - - & < - - `& <` - - -Title 1 -------- - -
- - -# Title 2 - - -
-
- - -

-foo
-
-```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-bar
-
- -this is a long paragraph - -this is another long paragraph - -
```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-```python
-s = "Python syntax highlighting"
-print s
-```
-
- - -

-```javascript
-var s = "JavaScript syntax highlighting";
-alert(s);
-```
-
-```python
-s = "Python syntax highlighting"
-print s
-```
-
-```
-No language indicated, so no syntax highlighting.
-But let's throw in a tag.
-```
-
- - -
```python
-var s;
-```
-
- -this is a long paragraph - -

-```javascript
-var s;
-```
-
- - -![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo] - -foo - -[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo] - -foo - -![sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) - -foo - -[sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) - -foo - -[![sd-ref][sd-logo]](http://www.google.com/) - -[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png - - -![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) ![sd-ref][sd-logo] - -foo - -![sd-ref][sd-logo] ![sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) - -[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png - - -[sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) [sd-ref][sd-logo] - -foo - -[sd-ref][sd-logo] [sd-inline](https://raw.githubusercontent.com/showdownjs/logo/master/dist/logo.readme.png) - -[sd-logo]: https://www.google.pt/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png - - -* list item 1 - - ``` - - child1 - - child2 - some text - - ``` - -* list item 2 - -``` - -child1 - -child2 -some text - -``` - - - * one - 1. two - -foo - - * one - 1. two - -foo - - * one - 1. two - -foo - - * one - 1. two - -foo - - * one - * two - -foo - - * one - * two - -foo - - * one - * two - -foo - - * one -* two - -foo - - * one - * two - - - * one long paragraph of -text - 1. two - -foo - - * one long paragraph of -text - 1. two - - -* one -1. two - -foo - -* one - 1. two - -foo - -* one - 1. two - -foo - -* one - 1. two - -foo - -* uli one -* uli two - -foo - -* uli one - * uli two - -foo - -* uli one - * uli two - -foo - -* uli one - * uli two - - -- - - a - -a - -+ - * - - + a - -a - -1. 2. 3. 4. 5. - -a - -1. 2. 3. 4. 5. a - - -- - - a - -+ - * - - + a - -1. 2. 3. 4. 5. - -1. 2. 3. 4. 5. a - - -- - -a - - -fooo - - -- - - aaaaa - - bbbbb - - -- - - - -- - - - - - - -- - - - - - - - - - - - - - - - - - - - abcd - - - --- - - - - - - - -plain text link http://test.com/this_has/one.html with underscores - -legit·word_with·1·underscore - -a word_with_2underscores (gets em) - - -this is a underscore_test ![my cat](http://myserver.com/my_kitty.jpg) - -another ![my cat](http://myserver.com/my_kitty.jpg) underscore_test bla - - -This is a first paragraph, -on multiple lines. - -This is a second paragraph. -There are spaces in between the two. - - -This is a first paragraph, -on multiple lines. - -This is a second paragraph -which has multiple lines too. - - -A first paragraph. - - - -A second paragraph after 3 CR (carriage return). - - -This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. - -A few spaces and a new long long long long long long long long long long long long long long long long paragraph on 1 line. - - -This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. - -1 tab to separate them and a new long long long long long long long long long long long long long long long long paragraph on 1 line. - - -This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. - -A new long long long long long long long long long long long long long long long long paragraph on 1 line. - - -An ampersand & in the text flow is escaped as an html entity. - - -There is an [ampersand](http://validator.w3.org/check?uri=http://www.w3.org/&verbose=1) in the URI. - - -This is \*an asterisk which should stay as is. - - -This is * an asterisk which should stay as is. - - -\\ backslash -\` backtick -\* asterisk -\_ underscore -\{\} curly braces -\[\] square brackets -\(\) parentheses -\# hash mark -\+ plus sign -\- minus sign (hyphen) -\. dot -\! exclamation mark - - -> # heading level 1 -> -> paragraph - - ->A blockquote with a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line. - ->and a second very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long line. - - ->This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a blockquote. - - -> A blockquote -> on multiple lines -> like this. - - ->A blockquote ->on multiple lines ->like this. - - ->A blockquote ->on multiple lines ->like this. -> ->But it has ->two paragraphs. - - ->A blockquote ->on multiple lines ->like this - - -> This is the first level of quoting. -> -> > This is nested blockquote. -> -> Back to the first level. - - -> This is the first level of quoting. -> -> > This is nested blockquote. - - -> This is the first level of quoting. -> > This is nested blockquote. -> Back to the first level. - - -> This is the first level of quoting. -> > This is nested blockquote. - - - 10 PRINT HELLO INFINITE - 20 GOTO 10 - - - 10 PRINT < > & - 20 GOTO 10 - - - 10 PRINT HELLO INFINITE - 20 GOTO 10 - - -as*te*risks - - -*single asterisks* - - -_single underscores_ - - -HTML entities are written using ampersand notation: © - - -These lines all end with end of line (EOL) sequences. - -Seriously, they really do. - -If you don't believe me: HEX EDIT! - - - -These lines all end with end of line (EOL) sequences. Seriously, they really do. If you don't believe me: HEX EDIT! - -These lines all end with end of line (EOL) sequences. - -Seriously, they really do. - -If you don't believe me: HEX EDIT! - - - -This is an H1 -============= - - -# This is an H1 # - - - # This is an H1 - - -# this is an h1 with two trailing spaces -A new paragraph. - - -# This is an H1 - - -This is an H2 -------------- - - -## This is an H2 ## - - -## This is an H2 - - -### This is an H3 ### - - -### This is an H3 - - -#### This is an H4 #### - - -#### This is an H4 - - -##### This is an H5 ##### - - -##### This is an H5 - - -###### This is an H6 ###### - - -###### This is an H6 - - -- - - - - ---- - - -*** - - -___ - - -------- - - -![HTML5][h5] - -[h5]: http://www.w3.org/html/logo/img/mark-word-icon.png "HTML5 for everyone" - - -![HTML5][h5] - -[h5]: http://www.w3.org/html/logo/img/mark-word-icon.png - - -![HTML5](http://www.w3.org/html/logo/img/mark-word-icon.png "HTML5 logo for everyone") - - -![HTML5](http://www.w3.org/html/logo/img/mark-word-icon.png) - - -We love ` and &` for everything - - -``We love `code` for everything`` - - -``We love `code` for everything`` - - -A first sentence -and a line break. - - -A first sentence -and a line break. - - -This is an automatic link - - -[W3C](http://www.w3.org/ "Discover w3c") - - -[W3C](http://www.w3.org/) - - -[World Wide Web Consortium][w3c] - -[w3c]: - - -[World Wide Web Consortium][] - -[World Wide Web Consortium]: http://www.w3.org/ - - -[w3c][] - -[w3c]: http://www.w3.org/ - - -[World Wide Web Consortium] [w3c] - -[w3c]: http://www.w3.org/ - - -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ - "Discover W3C" - - -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ (Discover w3c) - - -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ 'Discover w3c' - - -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ "Discover w3c" - - -[World Wide Web Consortium][w3c] - -[w3c]: http://www.w3.org/ - - -* a list containing a blockquote - - > this the blockquote in the list - - -* a list containing a block of code - - 10 PRINT HELLO INFINITE - 20 GOTO 10 - - -* This is a list item with two paragraphs. Lorem ipsum dolor - sit amet, consectetuer adipiscing elit. Aliquam hendrerit - mi posuere lectus. - - Vestibulum enim wisi, viverra nec, fringilla in, laoreet - vitae, risus. Donec sit amet nisl. Aliquam semper ipsum - sit amet velit. - -* Suspendisse id sem consectetuer libero luctus adipiscing. - - -* This is a list item with two paragraphs. Lorem ipsum dolor - sit amet, consectetuer adipiscing elit. Aliquam hendrerit - mi posuere lectus. - - Vestibulum enim wisi, viverra nec, fringilla in, laoreet - vitae, risus. Donec sit amet nisl. Aliquam semper ipsum - sit amet velit. - -* Suspendisse id sem consectetuer libero luctus adipiscing. - - -1\. ordered list escape - - -1. 1 - - - inner par list - -2. 2 - - -1. list item 1 -8. list item 2 -1. list item 3 - - -1. list item 1 -2. list item 2 -3. list item 3 - - -This is a paragraph -on multiple lines -with hard return. - - -This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph on 1 line. - - - This is a paragraph with a trailing and leading space. - - -This is a paragraph with 1 trailing tab. - - - This is a paragraph with 2 leading spaces. - - - This is a paragraph with 3 leading spaces. - - - This is a paragraph with 1 leading space. - - -This is a paragraph with a trailing space. - -as**te**risks - - -**double asterisks** - - -__double underscores__ - - -* list item 1 -* list item 2 -* list item 3 - - -- list item 1 -- list item 2 -- list item 3 - - - * list item 1 - * list item 2 - * list item 3 - - - * list item 1 - * list item 2 - * list item 3 - - - * list item 1 - * list item 2 - * list item 3 - - -+ list item 1 -+ list item 2 -+ list item 3 - - -* list item in paragraph - -* another list item in paragraph - - -* This a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long paragraph in a list. -* and yet another long long long long long long long long long long long long long long long long long long long long long long line. - - -* This is a list item - with the content on - multiline and indented. -* And this another list item - with the same principle. - - diff --git a/node_modules/showdown/test/performance/performance.js b/node_modules/showdown/test/performance/performance.js deleted file mode 100644 index c24c5821..00000000 --- a/node_modules/showdown/test/performance/performance.js +++ /dev/null @@ -1,236 +0,0 @@ -/** - * Created by Tivie on 21/12/2016. - */ -'use strict'; -var now = require('performance-now'), - fs = require('fs'), - semverSort = require('semver-sort'), - performance = { - version: '', - libraryName: '', - MDFile: 'performance.log.md', - logFile: 'performance.json', - testSuites: [], - silent: false, - githubLink: '' - }; - -performance.setVersion = function (version) { - performance.version = version; -}; - -performance.setLibraryName = function (name) { - performance.libraryName = name; -}; - -performance.setGithubLink = function (url) { - performance.githubLink = url; -}; - -performance.generateLog = function (filename, MDFilename, asTable) { - filename = filename || performance.logFile; - MDFilename = MDFilename || performance.MDFile; - asTable = !!asTable; - - fs.closeSync(fs.openSync(filename, 'a')); - - var json = fs.readFileSync(filename), - jsonParsed; - - try { - jsonParsed = JSON.parse(json); - } catch (err) { - jsonParsed = {}; - } - - var jData = []; - - for (var i = 0; i < performance.testSuites.length; ++i) { - // Suite - var suiteName = performance.testSuites[i].getSuiteName(), - cycles = performance.testSuites[i].getOption('cycles'), - subJData = { - suiteName: suiteName, - cycles: cycles, - tests: [] - }, - testSuite = performance.testSuites[i].getTests(); - //make sure tests have ran first - if (!performance.testSuites[i].hasRun()) { - performance.testSuites[i].run(); - } - - // loop through tests - for (var ii = 0; ii < testSuite.length; ++ii) { - // Test - var test = testSuite[ii]; - subJData.tests.push({ - name: test.name, - time: test.time, - maxTime: test.maxTime, - minTime: test.minTime - }); - } - jData.push(subJData); - } - jsonParsed[performance.version] = jData; - - //Sort jsonParsed - var versions = []; - for (var version in jsonParsed) { - if (jsonParsed.hasOwnProperty(version)) { - versions.push(version); - } - } - - semverSort.desc(versions); - - var finalJsonObj = {}; - - for (i = 0; i < versions.length; ++i) { - if (jsonParsed.hasOwnProperty(versions[i])) { - finalJsonObj[versions[i]] = jsonParsed[versions[i]]; - } - } - - fs.writeFileSync(filename, JSON.stringify(finalJsonObj)); - - generateMD(MDFilename, finalJsonObj, asTable); -}; - -function generateMD (filename, obj, asTable) { - fs.closeSync(fs.openSync(filename, 'w')); - asTable = !!asTable; - - // generate MD - var otp = '# Performance Tests for ' + performance.libraryName + '\n\n\n'; - - for (var version in obj) { - if (obj.hasOwnProperty(version)) { - otp += '## [version ' + version + '](' + performance.githubLink + version + ')\n\n'; - var testSuite = obj[version]; - for (var i = 0; i < testSuite.length; ++i) { - otp += '### Test Suite: ' + testSuite[i].suiteName + ' (' + testSuite[i].cycles + ' cycles)\n'; - var tests = testSuite[i].tests; - if (asTable) { - otp += '| test | avgTime | max | min |\n'; - otp += '|:-----|--------:|----:|----:|\n'; - } - for (var ii = 0; ii < tests.length; ++ii) { - var time = parseFloat(tests[ii].time).toFixed(3), - maxTime = parseFloat(tests[ii].maxTime).toFixed(3), - minTime = parseFloat(tests[ii].minTime).toFixed(3); - if (asTable) { - otp += '|' + tests[ii].name + '|' + time + '|' + maxTime + '|' + minTime + '|\n'; - } else { - otp += ' - **' + tests[ii].name + ':** took ' + time + 'ms (*max: ' + maxTime + 'ms; min: ' + minTime + 'ms*)\n'; - } - } - otp += '\n'; - } - otp += '\n'; - } - } - fs.writeFileSync(filename, otp); -} - -performance.Suite = function (name) { - var suiteName = name || '', - tests = [], - hasRunFlag = false, - options = { - cycles: 20 - }; - - this.setOption = function (key, val) { - options[key] = val; - return this; - }; - - this.getOption = function (key) { - return options[key]; - }; - - this.add = function (name, obj) { - if (typeof obj === 'function') { - obj = { - prepare: function () {}, - test: obj, - teardown: function () {} - }; - } - - if (!obj.hasOwnProperty('test')) { - throw 'obj must have a property called test'; - } - - if (typeof obj.test !== 'function') { - throw 'obj test property must be a function'; - } - - if (!obj.hasOwnProperty('prepare')) { - obj.prepare = function () {}; - } - - if (!obj.hasOwnProperty('teardown')) { - obj.teardown = function () {}; - } - - if (typeof obj.prepare !== 'function') { - throw 'obj prepare property must be a function'; - } - - if (typeof obj.teardown !== 'function') { - throw 'obj teardown property must be a function'; - } - - tests.push({ - name: name, - obj: obj, - time: 0, - maxTime: 0, - minTime: 0 - }); - return this; - }; - - this.run = function run () { - var nn = options.cycles; - console.log('running tests: ' + nn + ' cycles each.'); - for (var i = 0; i < tests.length; ++i) { - var times = [], - passVar = tests[i].obj.prepare(); - for (var ii = 0; ii < nn; ++ii) { - var before = now(); - tests[i].obj.test(passVar); - var after = now(); - times.push(after - before); - } - var total = times.reduce(function (a, b) {return a + b;}, 0); - tests[i].time = total / options.cycles; - tests[i].minTime = Math.min.apply(null, times); - tests[i].maxTime = Math.max.apply(null, times); - if (!options.silent) { - console.log(tests[i].name + ' took an average of ' + tests[i].time + 'ms (min: ' + tests[i].minTime + 'ms; max: ' + tests[i].maxTime + 'ms'); - } - } - hasRunFlag = true; - return this; - }; - - this.hasRun = function () { - return hasRunFlag; - }; - - this.getSuiteName = function () { - return suiteName; - }; - - this.getTests = function () { - return tests; - }; - - performance.testSuites.push(this); -}; - -module.exports = performance; diff --git a/node_modules/string-width/index.js b/node_modules/string-width/index.js deleted file mode 100644 index 33c9d6c0..00000000 --- a/node_modules/string-width/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; -const stripAnsi = require('strip-ansi'); -const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const emojiRegex = require('emoji-regex')(); - -module.exports = input => { - input = input.replace(emojiRegex, ' '); - - if (typeof input !== 'string' || input.length === 0) { - return 0; - } - - input = stripAnsi(input); - - let width = 0; - - for (let i = 0; i < input.length; i++) { - const code = input.codePointAt(i); - - // Ignore control characters - if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (code >= 0x300 && code <= 0x36F) { - continue; - } - - // Surrogates - if (code > 0xFFFF) { - i++; - } - - width += isFullwidthCodePoint(code) ? 2 : 1; - } - - return width; -}; diff --git a/node_modules/string-width/license b/node_modules/string-width/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/string-width/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/string-width/package.json b/node_modules/string-width/package.json deleted file mode 100644 index e040183e..00000000 --- a/node_modules/string-width/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "string-width", - "version": "3.1.0", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "string", - "str", - "character", - "char", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "devDependencies": { - "ava": "^1.0.1", - "xo": "^0.23.0" - } -} diff --git a/node_modules/string-width/readme.md b/node_modules/string-width/readme.md deleted file mode 100644 index d39d95f5..00000000 --- a/node_modules/string-width/readme.md +++ /dev/null @@ -1,45 +0,0 @@ -# string-width [![Build Status](https://travis-ci.org/sindresorhus/string-width.svg?branch=master)](https://travis-ci.org/sindresorhus/string-width) - -> Get the visual width of a string - the number of columns required to display it - -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - -Useful to be able to measure the actual width of command-line output. - - -## Install - -``` -$ npm install string-width -``` - - -## Usage - -```js -const stringWidth = require('string-width'); - -stringWidth('古'); -//=> 2 - -stringWidth('\u001b[1m古\u001b[22m'); -//=> 2 - -stringWidth('a'); -//=> 1 - -stringWidth('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -// => 5 -``` - - -## Related - -- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module -- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string -- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/strip-ansi/index.d.ts b/node_modules/strip-ansi/index.d.ts deleted file mode 100644 index 44e954d0..00000000 --- a/node_modules/strip-ansi/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** -Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. - -@example -``` -import stripAnsi from 'strip-ansi'; - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` -*/ -export default function stripAnsi(string: string): string; diff --git a/node_modules/strip-ansi/index.js b/node_modules/strip-ansi/index.js deleted file mode 100644 index 9788c96d..00000000 --- a/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - -module.exports = stripAnsi; -module.exports.default = stripAnsi; diff --git a/node_modules/strip-ansi/license b/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json deleted file mode 100644 index 7494fd7e..00000000 --- a/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "5.2.0", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - } -} diff --git a/node_modules/strip-ansi/readme.md b/node_modules/strip-ansi/readme.md deleted file mode 100644 index 8681fe8a..00000000 --- a/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - ---- - -
- - Get professional support for 'strip-ansi' with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - -## Install - -``` -$ npm install strip-ansi -``` - - -## Usage - -```js -const stripAnsi = require('strip-ansi'); - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/which-module/LICENSE b/node_modules/which-module/LICENSE deleted file mode 100644 index ab601b65..00000000 --- a/node_modules/which-module/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/node_modules/which-module/README.md b/node_modules/which-module/README.md deleted file mode 100644 index 008a1ae2..00000000 --- a/node_modules/which-module/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# which-module - -> Find the module object for something that was require()d - -[![Build Status](https://travis-ci.org/nexdrew/which-module.svg?branch=master)](https://travis-ci.org/nexdrew/which-module) -[![Coverage Status](https://coveralls.io/repos/github/nexdrew/which-module/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/which-module?branch=master) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) -[![Greenkeeper badge](https://badges.greenkeeper.io/nexdrew/which-module.svg)](https://greenkeeper.io/) - -Find the `module` object in `require.cache` for something that was `require()`d -or `import`ed - essentially a reverse `require()` lookup. - -Useful for libs that want to e.g. lookup a filename for a module or submodule -that it did not `require()` itself. - -## Install and Usage - -``` -npm install --save which-module -``` - -```js -const whichModule = require('which-module') - -console.log(whichModule(require('something'))) -// Module { -// id: '/path/to/project/node_modules/something/index.js', -// exports: [Function], -// parent: ..., -// filename: '/path/to/project/node_modules/something/index.js', -// loaded: true, -// children: [], -// paths: [ '/path/to/project/node_modules/something/node_modules', -// '/path/to/project/node_modules', -// '/path/to/node_modules', -// '/path/node_modules', -// '/node_modules' ] } -``` - -## API - -### `whichModule(exported)` - -Return the [`module` object](https://nodejs.org/api/modules.html#modules_the_module_object), -if any, that represents the given argument in the `require.cache`. - -`exported` can be anything that was previously `require()`d or `import`ed as a -module, submodule, or dependency - which means `exported` is identical to the -`module.exports` returned by this method. - -If `exported` did not come from the `exports` of a `module` in `require.cache`, -then this method returns `null`. - -## License - -ISC © Contributors - -[opensourceregistry_package_id]: # (458260416784685e5ef3091fee54001785dd4360406aa3000315ff256eef6878) diff --git a/node_modules/which-module/index.js b/node_modules/which-module/index.js deleted file mode 100644 index 45559b78..00000000 --- a/node_modules/which-module/index.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -module.exports = function whichModule (exported) { - for (var i = 0, files = Object.keys(require.cache), mod; i < files.length; i++) { - mod = require.cache[files[i]] - if (mod.exports === exported) return mod - } - return null -} diff --git a/node_modules/which-module/package.json b/node_modules/which-module/package.json deleted file mode 100644 index 65535755..00000000 --- a/node_modules/which-module/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "which-module", - "version": "2.0.1", - "description": "Find the module object for something that was require()d", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "nyc ava", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "standard-version" - }, - "files": [ - "index.js" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/nexdrew/which-module.git" - }, - "keywords": [ - "which", - "module", - "exports", - "filename", - "require", - "reverse", - "lookup" - ], - "author": "nexdrew", - "license": "ISC", - "bugs": { - "url": "https://github.com/nexdrew/which-module/issues" - }, - "homepage": "https://github.com/nexdrew/which-module#readme", - "devDependencies": { - "ava": "^2.0.0", - "coveralls": "^3.0.3", - "nyc": "^14.0.0", - "standard": "^14.0.0", - "standard-version": "^7.0.0" - } -} diff --git a/node_modules/wrap-ansi/index.js b/node_modules/wrap-ansi/index.js deleted file mode 100755 index 5038bb0c..00000000 --- a/node_modules/wrap-ansi/index.js +++ /dev/null @@ -1,188 +0,0 @@ -'use strict'; -const stringWidth = require('string-width'); -const stripAnsi = require('strip-ansi'); -const ansiStyles = require('ansi-styles'); - -const ESCAPES = new Set([ - '\u001B', - '\u009B' -]); - -const END_CODE = 39; - -const wrapAnsi = code => `${ESCAPES.values().next().value}[${code}m`; - -// Calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes -const wordLengths = string => string.split(' ').map(character => stringWidth(character)); - -// Wrap a long word across multiple rows -// Ansi escape codes do not count towards length -const wrapWord = (rows, word, columns) => { - const characters = [...word]; - - let insideEscape = false; - let visible = stringWidth(stripAnsi(rows[rows.length - 1])); - - for (const [index, character] of characters.entries()) { - const characterLength = stringWidth(character); - - if (visible + characterLength <= columns) { - rows[rows.length - 1] += character; - } else { - rows.push(character); - visible = 0; - } - - if (ESCAPES.has(character)) { - insideEscape = true; - } else if (insideEscape && character === 'm') { - insideEscape = false; - continue; - } - - if (insideEscape) { - continue; - } - - visible += characterLength; - - if (visible === columns && index < characters.length - 1) { - rows.push(''); - visible = 0; - } - } - - // It's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case - if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { - rows[rows.length - 2] += rows.pop(); - } -}; - -// Trims spaces from a string ignoring invisible sequences -const stringVisibleTrimSpacesRight = str => { - const words = str.split(' '); - let last = words.length; - - while (last > 0) { - if (stringWidth(words[last - 1]) > 0) { - break; - } - - last--; - } - - if (last === words.length) { - return str; - } - - return words.slice(0, last).join(' ') + words.slice(last).join(''); -}; - -// The wrap-ansi module can be invoked -// in either 'hard' or 'soft' wrap mode -// -// 'hard' will never allow a string to take up more -// than columns characters -// -// 'soft' allows long words to expand past the column length -const exec = (string, columns, options = {}) => { - if (options.trim !== false && string.trim() === '') { - return ''; - } - - let pre = ''; - let ret = ''; - let escapeCode; - - const lengths = wordLengths(string); - let rows = ['']; - - for (const [index, word] of string.split(' ').entries()) { - if (options.trim !== false) { - rows[rows.length - 1] = rows[rows.length - 1].trimLeft(); - } - - let rowLength = stringWidth(rows[rows.length - 1]); - - if (index !== 0) { - if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { - // If we start with a new word but the current row length equals the length of the columns, add a new row - rows.push(''); - rowLength = 0; - } - - if (rowLength > 0 || options.trim === false) { - rows[rows.length - 1] += ' '; - rowLength++; - } - } - - // In 'hard' wrap mode, the length of a line is - // never allowed to extend past 'columns' - if (options.hard && lengths[index] > columns) { - const remainingColumns = (columns - rowLength); - const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); - const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); - if (breaksStartingNextLine < breaksStartingThisLine) { - rows.push(''); - } - - wrapWord(rows, word, columns); - continue; - } - - if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { - if (options.wordWrap === false && rowLength < columns) { - wrapWord(rows, word, columns); - continue; - } - - rows.push(''); - } - - if (rowLength + lengths[index] > columns && options.wordWrap === false) { - wrapWord(rows, word, columns); - continue; - } - - rows[rows.length - 1] += word; - } - - if (options.trim !== false) { - rows = rows.map(stringVisibleTrimSpacesRight); - } - - pre = rows.join('\n'); - - for (const [index, character] of [...pre].entries()) { - ret += character; - - if (ESCAPES.has(character)) { - const code = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4))); - escapeCode = code === END_CODE ? null : code; - } - - const code = ansiStyles.codes.get(Number(escapeCode)); - - if (escapeCode && code) { - if (pre[index + 1] === '\n') { - ret += wrapAnsi(code); - } else if (character === '\n') { - ret += wrapAnsi(escapeCode); - } - } - } - - return ret; -}; - -// For each newline, invoke the method separately -module.exports = (string, columns, options) => { - return String(string) - .normalize() - .split('\n') - .map(line => exec(line, columns, options)) - .join('\n'); -}; diff --git a/node_modules/wrap-ansi/license b/node_modules/wrap-ansi/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/wrap-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/wrap-ansi/package.json b/node_modules/wrap-ansi/package.json deleted file mode 100644 index dcbb7f6e..00000000 --- a/node_modules/wrap-ansi/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "wrap-ansi", - "version": "5.1.0", - "description": "Wordwrap a string with ANSI escape codes", - "license": "MIT", - "repository": "chalk/wrap-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && nyc ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "wrap", - "break", - "wordwrap", - "wordbreak", - "linewrap", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "devDependencies": { - "ava": "^1.2.1", - "chalk": "^2.4.2", - "coveralls": "^3.0.3", - "has-ansi": "^3.0.0", - "nyc": "^13.3.0", - "xo": "^0.24.0" - } -} diff --git a/node_modules/wrap-ansi/readme.md b/node_modules/wrap-ansi/readme.md deleted file mode 100644 index 73b87de2..00000000 --- a/node_modules/wrap-ansi/readme.md +++ /dev/null @@ -1,108 +0,0 @@ -# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/github/chalk/wrap-ansi/badge.svg?branch=master)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) - -> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) - - -## Install - -``` -$ npm install wrap-ansi -``` - - -## Usage - -```js -const chalk = require('chalk'); -const wrapAnsi = require('wrap-ansi'); - -const input = 'The quick brown ' + chalk.red('fox jumped over ') + - 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); - -console.log(wrapAnsi(input, 20)); -``` - - - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - - -## API - -### wrapAnsi(input, columns, [options]) - -Wrap words to the specified column width. - -#### input - -Type: `string` - -String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). - -#### columns - -Type: `number` - -Number of columns to wrap the text to. - -#### options - -Type: `Object` - -##### hard - -Type: `boolean`
-Default: `false` - -By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. - -##### wordWrap - -Type: `boolean`
-Default: `true` - -By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. - -##### trim - -Type: `boolean`
-Default: `true` - -Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. - - -## Related - -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right -- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) -- [Benjamin Coe](https://github.com/bcoe) - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## License - -MIT diff --git a/node_modules/y18n/CHANGELOG.md b/node_modules/y18n/CHANGELOG.md deleted file mode 100644 index b7e86e94..00000000 --- a/node_modules/y18n/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -### [4.0.3](https://www.github.com/yargs/y18n/compare/y18n-v4.0.2...y18n-v4.0.3) (2021-04-07) - - -### Bug Fixes - -* **release:** 4.x.x should not enforce Node 10 ([#126](https://www.github.com/yargs/y18n/issues/126)) ([1e21a53](https://www.github.com/yargs/y18n/commit/1e21a536e9135d8403a47be88922157a706b7cde)) - -### 4.0.1 (2020-11-30) - -### Bug Fixes - -* address prototype pollution issue ([#108](https://www.github.com/yargs/y18n/issues/108)) ([a9ac604](https://www.github.com/yargs/y18n/commit/a9ac604abf756dec9687be3843e2c93bfe581f25)) - - -# [4.0.0](https://github.com/yargs/y18n/compare/v3.2.1...v4.0.0) (2017-10-10) - - -### Bug Fixes - -* allow support for falsy values like 0 in tagged literal ([#45](https://github.com/yargs/y18n/issues/45)) ([c926123](https://github.com/yargs/y18n/commit/c926123)) - - -### Features - -* **__:** added tagged template literal support ([#44](https://github.com/yargs/y18n/issues/44)) ([0598daf](https://github.com/yargs/y18n/commit/0598daf)) - - -### BREAKING CHANGES - -* **__:** dropping Node 0.10/Node 0.12 support diff --git a/node_modules/y18n/LICENSE b/node_modules/y18n/LICENSE deleted file mode 100644 index 3c157f0b..00000000 --- a/node_modules/y18n/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/node_modules/y18n/README.md b/node_modules/y18n/README.md deleted file mode 100644 index 826474f2..00000000 --- a/node_modules/y18n/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# y18n - -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) - -The bare-bones internationalization library used by yargs. - -Inspired by [i18n](https://www.npmjs.com/package/i18n). - -## Examples - -_simple string translation:_ - -```js -var __ = require('y18n').__ - -console.log(__('my awesome string %s', 'foo')) -``` - -output: - -`my awesome string foo` - -_using tagged template literals_ - -```js -var __ = require('y18n').__ -var str = 'foo' - -console.log(__`my awesome string ${str}`) -``` - -output: - -`my awesome string foo` - -_pluralization support:_ - -```js -var __n = require('y18n').__n - -console.log(__n('one fish %s', '%d fishes %s', 2, 'foo')) -``` - -output: - -`2 fishes foo` - -## JSON Language Files - -The JSON language files should be stored in a `./locales` folder. -File names correspond to locales, e.g., `en.json`, `pirate.json`. - -When strings are observed for the first time they will be -added to the JSON file corresponding to the current locale. - -## Methods - -### require('y18n')(config) - -Create an instance of y18n with the config provided, options include: - -* `directory`: the locale directory, default `./locales`. -* `updateFiles`: should newly observed strings be updated in file, default `true`. -* `locale`: what locale should be used. -* `fallbackToLanguage`: should fallback to a language-only file (e.g. `en.json`) - be allowed if a file matching the locale does not exist (e.g. `en_US.json`), - default `true`. - -### y18n.\_\_(str, arg, arg, arg) - -Print a localized string, `%s` will be replaced with `arg`s. - -This function can also be used as a tag for a template literal. You can use it -like this: __`hello ${'world'}`. This will be equivalent to -`__('hello %s', 'world')`. - -### y18n.\_\_n(singularString, pluralString, count, arg, arg, arg) - -Print a localized string with appropriate pluralization. If `%d` is provided -in the string, the `count` will replace this placeholder. - -### y18n.setLocale(str) - -Set the current locale being used. - -### y18n.getLocale() - -What locale is currently being used? - -### y18n.updateLocale(obj) - -Update the current locale with the key value pairs in `obj`. - -## License - -ISC - -[travis-url]: https://travis-ci.org/yargs/y18n -[travis-image]: https://img.shields.io/travis/yargs/y18n.svg -[coveralls-url]: https://coveralls.io/github/yargs/y18n -[coveralls-image]: https://img.shields.io/coveralls/yargs/y18n.svg -[npm-url]: https://npmjs.org/package/y18n -[npm-image]: https://img.shields.io/npm/v/y18n.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: https://github.com/feross/standard diff --git a/node_modules/y18n/index.js b/node_modules/y18n/index.js deleted file mode 100644 index 727362aa..00000000 --- a/node_modules/y18n/index.js +++ /dev/null @@ -1,188 +0,0 @@ -var fs = require('fs') -var path = require('path') -var util = require('util') - -function Y18N (opts) { - // configurable options. - opts = opts || {} - this.directory = opts.directory || './locales' - this.updateFiles = typeof opts.updateFiles === 'boolean' ? opts.updateFiles : true - this.locale = opts.locale || 'en' - this.fallbackToLanguage = typeof opts.fallbackToLanguage === 'boolean' ? opts.fallbackToLanguage : true - - // internal stuff. - this.cache = Object.create(null) - this.writeQueue = [] -} - -Y18N.prototype.__ = function () { - if (typeof arguments[0] !== 'string') { - return this._taggedLiteral.apply(this, arguments) - } - var args = Array.prototype.slice.call(arguments) - var str = args.shift() - var cb = function () {} // start with noop. - - if (typeof args[args.length - 1] === 'function') cb = args.pop() - cb = cb || function () {} // noop. - - if (!this.cache[this.locale]) this._readLocaleFile() - - // we've observed a new string, update the language file. - if (!this.cache[this.locale][str] && this.updateFiles) { - this.cache[this.locale][str] = str - - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite([this.directory, this.locale, cb]) - } else { - cb() - } - - return util.format.apply(util, [this.cache[this.locale][str] || str].concat(args)) -} - -Y18N.prototype._taggedLiteral = function (parts) { - var args = arguments - var str = '' - parts.forEach(function (part, i) { - var arg = args[i + 1] - str += part - if (typeof arg !== 'undefined') { - str += '%s' - } - }) - return this.__.apply(null, [str].concat([].slice.call(arguments, 1))) -} - -Y18N.prototype._enqueueWrite = function (work) { - this.writeQueue.push(work) - if (this.writeQueue.length === 1) this._processWriteQueue() -} - -Y18N.prototype._processWriteQueue = function () { - var _this = this - var work = this.writeQueue[0] - - // destructure the enqueued work. - var directory = work[0] - var locale = work[1] - var cb = work[2] - - var languageFile = this._resolveLocaleFile(directory, locale) - var serializedLocale = JSON.stringify(this.cache[locale], null, 2) - - fs.writeFile(languageFile, serializedLocale, 'utf-8', function (err) { - _this.writeQueue.shift() - if (_this.writeQueue.length > 0) _this._processWriteQueue() - cb(err) - }) -} - -Y18N.prototype._readLocaleFile = function () { - var localeLookup = {} - var languageFile = this._resolveLocaleFile(this.directory, this.locale) - - try { - localeLookup = JSON.parse(fs.readFileSync(languageFile, 'utf-8')) - } catch (err) { - if (err instanceof SyntaxError) { - err.message = 'syntax error in ' + languageFile - } - - if (err.code === 'ENOENT') localeLookup = {} - else throw err - } - - this.cache[this.locale] = localeLookup -} - -Y18N.prototype._resolveLocaleFile = function (directory, locale) { - var file = path.resolve(directory, './', locale + '.json') - if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf('_')) { - // attempt fallback to language only - var languageFile = path.resolve(directory, './', locale.split('_')[0] + '.json') - if (this._fileExistsSync(languageFile)) file = languageFile - } - return file -} - -// this only exists because fs.existsSync() "will be deprecated" -// see https://nodejs.org/api/fs.html#fs_fs_existssync_path -Y18N.prototype._fileExistsSync = function (file) { - try { - return fs.statSync(file).isFile() - } catch (err) { - return false - } -} - -Y18N.prototype.__n = function () { - var args = Array.prototype.slice.call(arguments) - var singular = args.shift() - var plural = args.shift() - var quantity = args.shift() - - var cb = function () {} // start with noop. - if (typeof args[args.length - 1] === 'function') cb = args.pop() - - if (!this.cache[this.locale]) this._readLocaleFile() - - var str = quantity === 1 ? singular : plural - if (this.cache[this.locale][singular]) { - str = this.cache[this.locale][singular][quantity === 1 ? 'one' : 'other'] - } - - // we've observed a new string, update the language file. - if (!this.cache[this.locale][singular] && this.updateFiles) { - this.cache[this.locale][singular] = { - one: singular, - other: plural - } - - // include the current directory and locale, - // since these values could change before the - // write is performed. - this._enqueueWrite([this.directory, this.locale, cb]) - } else { - cb() - } - - // if a %d placeholder is provided, add quantity - // to the arguments expanded by util.format. - var values = [str] - if (~str.indexOf('%d')) values.push(quantity) - - return util.format.apply(util, values.concat(args)) -} - -Y18N.prototype.setLocale = function (locale) { - this.locale = locale -} - -Y18N.prototype.getLocale = function () { - return this.locale -} - -Y18N.prototype.updateLocale = function (obj) { - if (!this.cache[this.locale]) this._readLocaleFile() - - for (var key in obj) { - this.cache[this.locale][key] = obj[key] - } -} - -module.exports = function (opts) { - var y18n = new Y18N(opts) - - // bind all functions to y18n, so that - // they can be used in isolation. - for (var key in y18n) { - if (typeof y18n[key] === 'function') { - y18n[key] = y18n[key].bind(y18n) - } - } - - return y18n -} diff --git a/node_modules/y18n/package.json b/node_modules/y18n/package.json deleted file mode 100644 index 6f08863e..00000000 --- a/node_modules/y18n/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "y18n", - "version": "4.0.3", - "description": "the bare-bones internationalization library used by yargs", - "main": "index.js", - "scripts": { - "pretest": "standard", - "test": "nyc mocha", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "standard-version" - }, - "repository": { - "type": "git", - "url": "git@github.com:yargs/y18n.git" - }, - "files": [ - "index.js" - ], - "keywords": [ - "i18n", - "internationalization", - "yargs" - ], - "author": "Ben Coe ", - "license": "ISC", - "bugs": { - "url": "https://github.com/yargs/y18n/issues" - }, - "homepage": "https://github.com/yargs/y18n", - "devDependencies": { - "chai": "^4.0.1", - "coveralls": "^3.0.0", - "mocha": "^4.0.1", - "nyc": "^11.0.1", - "rimraf": "^2.5.0", - "standard": "^10.0.0-beta.0", - "standard-version": "^4.2.0" - } -} diff --git a/node_modules/yargs-parser/CHANGELOG.md b/node_modules/yargs-parser/CHANGELOG.md deleted file mode 100644 index 4f967d46..00000000 --- a/node_modules/yargs-parser/CHANGELOG.md +++ /dev/null @@ -1,521 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [15.0.3](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v15.0.2...yargs-parser-v15.0.3) (2021-06-20) - - -### Bug Fixes - -* **build:** should use releases_created when using manifest ([49ea4ef](https://www.github.com/yargs/yargs-parser/commit/49ea4ef042f7d9af78d7bb4090a5f37bff067bc3)) - -### [15.0.2](https://www.github.com/yargs/yargs-parser/compare/yargs-parser-v15.0.1...yargs-parser-v15.0.2) (2021-06-20) - - -### Bug Fixes - -* **perf:** address slow parse when using unknown-options-as-args ([#400](https://www.github.com/yargs/yargs-parser/issues/400)) ([bc387ec](https://www.github.com/yargs/yargs-parser/commit/bc387ec5825cf4a79376709782c7903737e86715)) - -## [15.0.0](https://github.com/yargs/yargs-parser/compare/v14.0.0...v15.0.0) (2019-10-07) - - -### Features - -* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality ([ef771ca](https://github.com/yargs/yargs-parser/commit/ef771ca)) - - -### BREAKING CHANGES - -* rework `collect-unknown-options` into `unknown-options-as-args`, providing more comprehensive functionality - - - -## [14.0.0](https://github.com/yargs/yargs-parser/compare/v13.1.1...v14.0.0) (2019-09-06) - - -### Bug Fixes - -* boolean arrays with default values ([#185](https://github.com/yargs/yargs-parser/issues/185)) ([7d42572](https://github.com/yargs/yargs-parser/commit/7d42572)) -* boolean now behaves the same as other array types ([#184](https://github.com/yargs/yargs-parser/issues/184)) ([17ca3bd](https://github.com/yargs/yargs-parser/commit/17ca3bd)) -* eatNargs() for 'opt.narg === 0' and boolean typed options ([#188](https://github.com/yargs/yargs-parser/issues/188)) ([c5a1db0](https://github.com/yargs/yargs-parser/commit/c5a1db0)) -* maybeCoerceNumber now takes precedence over coerce return value ([#182](https://github.com/yargs/yargs-parser/issues/182)) ([2f26436](https://github.com/yargs/yargs-parser/commit/2f26436)) -* take into account aliases when appending arrays from config object ([#199](https://github.com/yargs/yargs-parser/issues/199)) ([f8a2d3f](https://github.com/yargs/yargs-parser/commit/f8a2d3f)) - - -### Features - -* add configuration option to "collect-unknown-options" ([#181](https://github.com/yargs/yargs-parser/issues/181)) ([7909cc4](https://github.com/yargs/yargs-parser/commit/7909cc4)) -* maybeCoerceNumber() now takes into account arrays ([#187](https://github.com/yargs/yargs-parser/issues/187)) ([31c204b](https://github.com/yargs/yargs-parser/commit/31c204b)) - - -### BREAKING CHANGES - -* unless "parse-numbers" is set to "false", arrays of numeric strings are now parsed as numbers, rather than strings. -* we have dropped the broken "defaulted" functionality; we would like to revisit adding this in the future. -* maybeCoerceNumber now takes precedence over coerce return value (#182) - - - -### [13.1.1](https://www.github.com/yargs/yargs-parser/compare/v13.1.0...v13.1.1) (2019-06-10) - - -### Bug Fixes - -* convert values to strings when tokenizing ([#167](https://www.github.com/yargs/yargs-parser/issues/167)) ([57b7883](https://www.github.com/yargs/yargs-parser/commit/57b7883)) -* nargs should allow duplicates when duplicate-arguments-array=false ([#164](https://www.github.com/yargs/yargs-parser/issues/164)) ([47ccb0b](https://www.github.com/yargs/yargs-parser/commit/47ccb0b)) -* should populate "_" when given config with "short-option-groups" false ([#179](https://www.github.com/yargs/yargs-parser/issues/179)) ([6055974](https://www.github.com/yargs/yargs-parser/commit/6055974)) - -## [13.1.0](https://github.com/yargs/yargs-parser/compare/v13.0.0...v13.1.0) (2019-05-05) - - -### Features - -* add `strip-aliased` and `strip-dashed` configuration options. ([#172](https://github.com/yargs/yargs-parser/issues/172)) ([a3936aa](https://github.com/yargs/yargs-parser/commit/a3936aa)) -* support boolean which do not consume next argument. ([#171](https://github.com/yargs/yargs-parser/issues/171)) ([0ae7fcb](https://github.com/yargs/yargs-parser/commit/0ae7fcb)) - - - - -# [13.0.0](https://github.com/yargs/yargs-parser/compare/v12.0.0...v13.0.0) (2019-02-02) - - -### Features - -* don't coerce number from string with leading '0' or '+' ([#158](https://github.com/yargs/yargs-parser/issues/158)) ([18d0fd5](https://github.com/yargs/yargs-parser/commit/18d0fd5)) - - -### BREAKING CHANGES - -* options with leading '+' or '0' now parse as strings - - - - -# [12.0.0](https://github.com/yargs/yargs-parser/compare/v11.1.1...v12.0.0) (2019-01-29) - - -### Bug Fixes - -* better handling of quoted strings ([#153](https://github.com/yargs/yargs-parser/issues/153)) ([2fb71b2](https://github.com/yargs/yargs-parser/commit/2fb71b2)) - - -### Features - -* default value is now used if no right-hand value provided for numbers/strings ([#156](https://github.com/yargs/yargs-parser/issues/156)) ([5a7c46a](https://github.com/yargs/yargs-parser/commit/5a7c46a)) - - -### BREAKING CHANGES - -* a flag with no right-hand value no longer populates defaulted options with `undefined`. -* quotes at beginning and endings of strings are not removed during parsing. - - - - -## [11.1.1](https://github.com/yargs/yargs-parser/compare/v11.1.0...v11.1.1) (2018-11-19) - - -### Bug Fixes - -* ensure empty string is added into argv._ ([#140](https://github.com/yargs/yargs-parser/issues/140)) ([79cda98](https://github.com/yargs/yargs-parser/commit/79cda98)) - - -### Reverts - -* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([f4a3063](https://github.com/yargs/yargs-parser/commit/f4a3063)) - - - - -# [11.1.0](https://github.com/yargs/yargs-parser/compare/v11.0.0...v11.1.0) (2018-11-10) - - -### Bug Fixes - -* handling of one char alias ([#139](https://github.com/yargs/yargs-parser/issues/139)) ([ee56e31](https://github.com/yargs/yargs-parser/commit/ee56e31)) - - -### Features - -* add halt-at-non-option configuration option ([#130](https://github.com/yargs/yargs-parser/issues/130)) ([a849fce](https://github.com/yargs/yargs-parser/commit/a849fce)) - - - - -# [11.0.0](https://github.com/yargs/yargs-parser/compare/v10.1.0...v11.0.0) (2018-10-06) - - -### Bug Fixes - -* flatten-duplicate-arrays:false for more than 2 arrays ([#128](https://github.com/yargs/yargs-parser/issues/128)) ([2bc395f](https://github.com/yargs/yargs-parser/commit/2bc395f)) -* hyphenated flags combined with dot notation broke parsing ([#131](https://github.com/yargs/yargs-parser/issues/131)) ([dc788da](https://github.com/yargs/yargs-parser/commit/dc788da)) -* make requiresArg work in conjunction with arrays ([#136](https://github.com/yargs/yargs-parser/issues/136)) ([77ae1d4](https://github.com/yargs/yargs-parser/commit/77ae1d4)) - - -### Chores - -* update dependencies ([6dc42a1](https://github.com/yargs/yargs-parser/commit/6dc42a1)) - - -### Features - -* also add camelCase array options ([#125](https://github.com/yargs/yargs-parser/issues/125)) ([08c0117](https://github.com/yargs/yargs-parser/commit/08c0117)) -* array.type can now be provided, supporting coercion ([#132](https://github.com/yargs/yargs-parser/issues/132)) ([4b8cfce](https://github.com/yargs/yargs-parser/commit/4b8cfce)) - - -### BREAKING CHANGES - -* drops Node 4 support -* the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction. - - - - -# [10.1.0](https://github.com/yargs/yargs-parser/compare/v10.0.0...v10.1.0) (2018-06-29) - - -### Features - -* add `set-placeholder-key` configuration ([#123](https://github.com/yargs/yargs-parser/issues/123)) ([19386ee](https://github.com/yargs/yargs-parser/commit/19386ee)) - - - - -# [10.0.0](https://github.com/yargs/yargs-parser/compare/v9.0.2...v10.0.0) (2018-04-04) - - -### Bug Fixes - -* do not set boolean flags if not defined in `argv` ([#119](https://github.com/yargs/yargs-parser/issues/119)) ([f6e6599](https://github.com/yargs/yargs-parser/commit/f6e6599)) - - -### BREAKING CHANGES - -* `boolean` flags defined without a `default` value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg. - -Previous behavior: -```js -var parse = require('yargs-parser'); - -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } - -parse('--no-flag', {boolean: ['flag']}); -// => { _: [], flag: false } - -parse('', {boolean: ['flag']}); -// => { _: [], flag: false } -``` - -New behavior: -```js -var parse = require('yargs-parser'); - -parse('--flag', {boolean: ['flag']}); -// => { _: [], flag: true } - -parse('--no-flag', {boolean: ['flag']}); -// => { _: [], flag: false } - -parse('', {boolean: ['flag']}); -// => { _: [] } => flag not set similarly to other option type -``` - - - - -## [9.0.2](https://github.com/yargs/yargs-parser/compare/v9.0.1...v9.0.2) (2018-01-20) - - -### Bug Fixes - -* nargs was still aggressively consuming too many arguments ([9b28aad](https://github.com/yargs/yargs-parser/commit/9b28aad)) - - - - -## [9.0.1](https://github.com/yargs/yargs-parser/compare/v9.0.0...v9.0.1) (2018-01-20) - - -### Bug Fixes - -* nargs was consuming too many arguments ([4fef206](https://github.com/yargs/yargs-parser/commit/4fef206)) - - - - -# [9.0.0](https://github.com/yargs/yargs-parser/compare/v8.1.0...v9.0.0) (2018-01-20) - - -### Features - -* narg arguments no longer consume flag arguments ([#114](https://github.com/yargs/yargs-parser/issues/114)) ([60bb9b3](https://github.com/yargs/yargs-parser/commit/60bb9b3)) - - -### BREAKING CHANGES - -* arguments of form --foo, -abc, will no longer be consumed by nargs - - - - -# [8.1.0](https://github.com/yargs/yargs-parser/compare/v8.0.0...v8.1.0) (2017-12-20) - - -### Bug Fixes - -* allow null config values ([#108](https://github.com/yargs/yargs-parser/issues/108)) ([d8b14f9](https://github.com/yargs/yargs-parser/commit/d8b14f9)) -* ensure consistent parsing of dot-notation arguments ([#102](https://github.com/yargs/yargs-parser/issues/102)) ([c9bd79c](https://github.com/yargs/yargs-parser/commit/c9bd79c)) -* implement [@antoniom](https://github.com/antoniom)'s fix for camel-case expansion ([3087e1d](https://github.com/yargs/yargs-parser/commit/3087e1d)) -* only run coercion functions once, despite aliases. ([#76](https://github.com/yargs/yargs-parser/issues/76)) ([#103](https://github.com/yargs/yargs-parser/issues/103)) ([507aaef](https://github.com/yargs/yargs-parser/commit/507aaef)) -* scientific notation circumvented bounds check ([#110](https://github.com/yargs/yargs-parser/issues/110)) ([3571f57](https://github.com/yargs/yargs-parser/commit/3571f57)) -* tokenizer should ignore spaces at the beginning of the argString ([#106](https://github.com/yargs/yargs-parser/issues/106)) ([f34ead9](https://github.com/yargs/yargs-parser/commit/f34ead9)) - - -### Features - -* make combining arrays a configurable option ([#111](https://github.com/yargs/yargs-parser/issues/111)) ([c8bf536](https://github.com/yargs/yargs-parser/commit/c8bf536)) -* merge array from arguments with array from config ([#83](https://github.com/yargs/yargs-parser/issues/83)) ([806ddd6](https://github.com/yargs/yargs-parser/commit/806ddd6)) - - - - -# [8.0.0](https://github.com/yargs/yargs-parser/compare/v7.0.0...v8.0.0) (2017-10-05) - - -### Bug Fixes - -* Ignore multiple spaces between arguments. ([#100](https://github.com/yargs/yargs-parser/issues/100)) ([d137227](https://github.com/yargs/yargs-parser/commit/d137227)) - - -### Features - -* allow configuration of prefix for boolean negation ([#94](https://github.com/yargs/yargs-parser/issues/94)) ([00bde7d](https://github.com/yargs/yargs-parser/commit/00bde7d)) -* reworking how numbers are parsed ([#104](https://github.com/yargs/yargs-parser/issues/104)) ([fba00eb](https://github.com/yargs/yargs-parser/commit/fba00eb)) - - -### BREAKING CHANGES - -* strings that fail `Number.isSafeInteger()` are no longer coerced into numbers. - - - - -# [7.0.0](https://github.com/yargs/yargs-parser/compare/v6.0.1...v7.0.0) (2017-05-02) - - -### Chores - -* revert populate-- logic ([#91](https://github.com/yargs/yargs-parser/issues/91)) ([6003e6d](https://github.com/yargs/yargs-parser/commit/6003e6d)) - - -### BREAKING CHANGES - -* populate-- now defaults to false. - - - - -## [6.0.1](https://github.com/yargs/yargs-parser/compare/v6.0.0...v6.0.1) (2017-05-01) - - -### Bug Fixes - -* default '--' to undefined when not provided; this is closer to the array API ([#90](https://github.com/yargs/yargs-parser/issues/90)) ([4e739cc](https://github.com/yargs/yargs-parser/commit/4e739cc)) - - - - -# [6.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v6.0.0) (2017-05-01) - - -### Bug Fixes - -* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) -* parsing hints should apply for dot notation keys ([#86](https://github.com/yargs/yargs-parser/issues/86)) ([3e47d62](https://github.com/yargs/yargs-parser/commit/3e47d62)) - - -### Chores - -* upgrade to newest version of camelcase ([#87](https://github.com/yargs/yargs-parser/issues/87)) ([f1903aa](https://github.com/yargs/yargs-parser/commit/f1903aa)) - - -### Features - -* add -- option which allows arguments after the -- flag to be returned separated from positional arguments ([#84](https://github.com/yargs/yargs-parser/issues/84)) ([2572ca8](https://github.com/yargs/yargs-parser/commit/2572ca8)) -* when parsing stops, we now populate "--" by default ([#88](https://github.com/yargs/yargs-parser/issues/88)) ([cd666db](https://github.com/yargs/yargs-parser/commit/cd666db)) - - -### BREAKING CHANGES - -* rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default. -* camelcase now requires Node 4+. -* environment variables will now override config files (args, env, config-file, config-object) - - - - -# [5.0.0](https://github.com/yargs/yargs-parser/compare/v4.2.1...v5.0.0) (2017-02-18) - - -### Bug Fixes - -* environment variables should take precedence over config file ([#81](https://github.com/yargs/yargs-parser/issues/81)) ([76cee1f](https://github.com/yargs/yargs-parser/commit/76cee1f)) - - -### BREAKING CHANGES - -* environment variables will now override config files (args, env, config-file, config-object) - - - - -## [4.2.1](https://github.com/yargs/yargs-parser/compare/v4.2.0...v4.2.1) (2017-01-02) - - -### Bug Fixes - -* flatten/duplicate regression ([#75](https://github.com/yargs/yargs-parser/issues/75)) ([68d68a0](https://github.com/yargs/yargs-parser/commit/68d68a0)) - - - - -# [4.2.0](https://github.com/yargs/yargs-parser/compare/v4.1.0...v4.2.0) (2016-12-01) - - -### Bug Fixes - -* inner objects in configs had their keys appended to top-level key when dot-notation was disabled ([#72](https://github.com/yargs/yargs-parser/issues/72)) ([0b1b5f9](https://github.com/yargs/yargs-parser/commit/0b1b5f9)) - - -### Features - -* allow multiple arrays to be provided, rather than always combining ([#71](https://github.com/yargs/yargs-parser/issues/71)) ([0f0fb2d](https://github.com/yargs/yargs-parser/commit/0f0fb2d)) - - - - -# [4.1.0](https://github.com/yargs/yargs-parser/compare/v4.0.2...v4.1.0) (2016-11-07) - - -### Features - -* apply coercions to default options ([#65](https://github.com/yargs/yargs-parser/issues/65)) ([c79052b](https://github.com/yargs/yargs-parser/commit/c79052b)) -* handle dot notation boolean options ([#63](https://github.com/yargs/yargs-parser/issues/63)) ([02c3545](https://github.com/yargs/yargs-parser/commit/02c3545)) - - - - -## [4.0.2](https://github.com/yargs/yargs-parser/compare/v4.0.1...v4.0.2) (2016-09-30) - - -### Bug Fixes - -* whoops, let's make the assign not change the Object key order ([29d069a](https://github.com/yargs/yargs-parser/commit/29d069a)) - - - - -## [4.0.1](https://github.com/yargs/yargs-parser/compare/v4.0.0...v4.0.1) (2016-09-30) - - -### Bug Fixes - -* lodash.assign was deprecated ([#59](https://github.com/yargs/yargs-parser/issues/59)) ([5e7eb11](https://github.com/yargs/yargs-parser/commit/5e7eb11)) - - - - -# [4.0.0](https://github.com/yargs/yargs-parser/compare/v3.2.0...v4.0.0) (2016-09-26) - - -### Bug Fixes - -* coerce should be applied to the final objects and arrays created ([#57](https://github.com/yargs/yargs-parser/issues/57)) ([4ca69da](https://github.com/yargs/yargs-parser/commit/4ca69da)) - - -### BREAKING CHANGES - -* coerce is no longer applied to individual arguments in an implicit array. - - - - -# [3.2.0](https://github.com/yargs/yargs-parser/compare/v3.1.0...v3.2.0) (2016-08-13) - - -### Features - -* coerce full array instead of each element ([#51](https://github.com/yargs/yargs-parser/issues/51)) ([cc4dc56](https://github.com/yargs/yargs-parser/commit/cc4dc56)) - - - - -# [3.1.0](https://github.com/yargs/yargs-parser/compare/v3.0.0...v3.1.0) (2016-08-09) - - -### Bug Fixes - -* address pkgConf parsing bug outlined in [#37](https://github.com/yargs/yargs-parser/issues/37) ([#45](https://github.com/yargs/yargs-parser/issues/45)) ([be76ee6](https://github.com/yargs/yargs-parser/commit/be76ee6)) -* better parsing of negative values ([#44](https://github.com/yargs/yargs-parser/issues/44)) ([2e43692](https://github.com/yargs/yargs-parser/commit/2e43692)) -* check aliases when guessing defaults for arguments fixes [#41](https://github.com/yargs/yargs-parser/issues/41) ([#43](https://github.com/yargs/yargs-parser/issues/43)) ([f3e4616](https://github.com/yargs/yargs-parser/commit/f3e4616)) - - -### Features - -* added coerce option, for providing specialized argument parsing ([#42](https://github.com/yargs/yargs-parser/issues/42)) ([7b49cd2](https://github.com/yargs/yargs-parser/commit/7b49cd2)) - - - - -# [3.0.0](https://github.com/yargs/yargs-parser/compare/v2.4.1...v3.0.0) (2016-08-07) - - -### Bug Fixes - -* parsing issue with numeric character in group of options ([#19](https://github.com/yargs/yargs-parser/issues/19)) ([f743236](https://github.com/yargs/yargs-parser/commit/f743236)) -* upgraded lodash.assign ([5d7fdf4](https://github.com/yargs/yargs-parser/commit/5d7fdf4)) - -### BREAKING CHANGES - -* subtle change to how values are parsed in a group of single-character arguments. -* _first released in 3.1.0, better handling of negative values should be considered a breaking change._ - - - - -## [2.4.1](https://github.com/yargs/yargs-parser/compare/v2.4.0...v2.4.1) (2016-07-16) - - -### Bug Fixes - -* **count:** do not increment a default value ([#39](https://github.com/yargs/yargs-parser/issues/39)) ([b04a189](https://github.com/yargs/yargs-parser/commit/b04a189)) - - - - -# [2.4.0](https://github.com/yargs/yargs-parser/compare/v2.3.0...v2.4.0) (2016-04-11) - - -### Features - -* **environment:** Support nested options in environment variables ([#26](https://github.com/yargs/yargs-parser/issues/26)) thanks [@elas7](https://github.com/elas7) \o/ ([020778b](https://github.com/yargs/yargs-parser/commit/020778b)) - - - - -# [2.3.0](https://github.com/yargs/yargs-parser/compare/v2.2.0...v2.3.0) (2016-04-09) - - -### Bug Fixes - -* **boolean:** fix for boolean options with non boolean defaults (#20) ([2dbe86b](https://github.com/yargs/yargs-parser/commit/2dbe86b)), closes [(#20](https://github.com/(/issues/20) -* **package:** remove tests from tarball ([0353c0d](https://github.com/yargs/yargs-parser/commit/0353c0d)) -* **parsing:** handle calling short option with an empty string as the next value. ([a867165](https://github.com/yargs/yargs-parser/commit/a867165)) -* boolean flag when next value contains the strings 'true' or 'false'. ([69941a6](https://github.com/yargs/yargs-parser/commit/69941a6)) -* update dependencies; add standard-version bin for next release (#24) ([822d9d5](https://github.com/yargs/yargs-parser/commit/822d9d5)) - -### Features - -* **configuration:** Allow to pass configuration objects to yargs-parser ([0780900](https://github.com/yargs/yargs-parser/commit/0780900)) -* **normalize:** allow normalize to work with arrays ([e0eaa1a](https://github.com/yargs/yargs-parser/commit/e0eaa1a)) diff --git a/node_modules/yargs-parser/LICENSE.txt b/node_modules/yargs-parser/LICENSE.txt deleted file mode 100644 index 836440be..00000000 --- a/node_modules/yargs-parser/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2016, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/yargs-parser/README.md b/node_modules/yargs-parser/README.md deleted file mode 100644 index 5f1ccb98..00000000 --- a/node_modules/yargs-parser/README.md +++ /dev/null @@ -1,418 +0,0 @@ -# yargs-parser - -[![Build Status](https://travis-ci.org/yargs/yargs-parser.svg)](https://travis-ci.org/yargs/yargs-parser) -[![Coverage Status](https://coveralls.io/repos/yargs/yargs-parser/badge.svg?branch=)](https://coveralls.io/r/yargs/yargs-parser?branch=master) -[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser) -[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) - - -The mighty option parser used by [yargs](https://github.com/yargs/yargs). - -visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions. - - - -## Example - -```sh -npm i yargs-parser --save -``` - -```js -var argv = require('yargs-parser')(process.argv.slice(2)) -console.log(argv) -``` - -```sh -node example.js --foo=33 --bar hello -{ _: [], foo: 33, bar: 'hello' } -``` - -_or parse a string!_ - -```js -var argv = require('yargs-parser')('--foo=99 --bar=33') -console.log(argv) -``` - -```sh -{ _: [], foo: 99, bar: 33 } -``` - -Convert an array of mixed types before passing to `yargs-parser`: - -```js -var parse = require('yargs-parser') -parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string -parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings -``` - -## API - -### require('yargs-parser')(args, opts={}) - -Parses command line arguments returning a simple mapping of keys and values. - -**expects:** - -* `args`: a string or array of strings representing the options to parse. -* `opts`: provide a set of hints indicating how `args` should be parsed: - * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`. - * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.
- Indicate that keys should be parsed as an array and coerced to booleans / numbers:
- `{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`. - * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`. - * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided - (or throws an error). For arrays the function is called only once for the entire array:
- `{coerce: {foo: function (arg) {return modifiedArg}}}`. - * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed). - * `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:
- `{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`. - * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)). - * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`. - * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`. - * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed. - * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`. - * `opts.normalize`: `path.normalize()` will be applied to values set to this key. - * `opts.number`: keys should be treated as numbers. - * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`). - -**returns:** - -* `obj`: an object representing the parsed value of `args` - * `key/value`: key value pairs for each argument and their aliases. - * `_`: an array representing the positional arguments. - * [optional] `--`: an array with arguments after the end-of-options flag `--`. - -### require('yargs-parser').detailed(args, opts={}) - -Parses a command line string, returning detailed information required by the -yargs engine. - -**expects:** - -* `args`: a string or array of strings representing options to parse. -* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`. - -**returns:** - -* `argv`: an object representing the parsed value of `args` - * `key/value`: key value pairs for each argument and their aliases. - * `_`: an array representing the positional arguments. -* `error`: populated with an error object if an exception occurred during parsing. -* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`. -* `newAliases`: any new aliases added via camel-case expansion. -* `configuration`: the configuration loaded from the `yargs` stanza in package.json. - - - -### Configuration - -The yargs-parser applies several automated transformations on the keys provided -in `args`. These features can be turned on and off using the `configuration` field -of `opts`. - -```js -var parsed = parser(['--no-dice'], { - configuration: { - 'boolean-negation': false - } -}) -``` - -### short option groups - -* default: `true`. -* key: `short-option-groups`. - -Should a group of short-options be treated as boolean flags? - -```sh -node example.js -abc -{ _: [], a: true, b: true, c: true } -``` - -_if disabled:_ - -```sh -node example.js -abc -{ _: [], abc: true } -``` - -### camel-case expansion - -* default: `true`. -* key: `camel-case-expansion`. - -Should hyphenated arguments be expanded into camel-case aliases? - -```sh -node example.js --foo-bar -{ _: [], 'foo-bar': true, fooBar: true } -``` - -_if disabled:_ - -```sh -node example.js --foo-bar -{ _: [], 'foo-bar': true } -``` - -### dot-notation - -* default: `true` -* key: `dot-notation` - -Should keys that contain `.` be treated as objects? - -```sh -node example.js --foo.bar -{ _: [], foo: { bar: true } } -``` - -_if disabled:_ - -```sh -node example.js --foo.bar -{ _: [], "foo.bar": true } -``` - -### parse numbers - -* default: `true` -* key: `parse-numbers` - -Should keys that look like numbers be treated as such? - -```sh -node example.js --foo=99.3 -{ _: [], foo: 99.3 } -``` - -_if disabled:_ - -```sh -node example.js --foo=99.3 -{ _: [], foo: "99.3" } -``` - -### boolean negation - -* default: `true` -* key: `boolean-negation` - -Should variables prefixed with `--no` be treated as negations? - -```sh -node example.js --no-foo -{ _: [], foo: false } -``` - -_if disabled:_ - -```sh -node example.js --no-foo -{ _: [], "no-foo": true } -``` - -### combine arrays - -* default: `false` -* key: `combine-arrays` - -Should arrays be combined when provided by both command line arguments and -a configuration file. - -### duplicate arguments array - -* default: `true` -* key: `duplicate-arguments-array` - -Should arguments be coerced into an array when duplicated: - -```sh -node example.js -x 1 -x 2 -{ _: [], x: [1, 2] } -``` - -_if disabled:_ - -```sh -node example.js -x 1 -x 2 -{ _: [], x: 2 } -``` - -### flatten duplicate arrays - -* default: `true` -* key: `flatten-duplicate-arrays` - -Should array arguments be coerced into a single array when duplicated: - -```sh -node example.js -x 1 2 -x 3 4 -{ _: [], x: [1, 2, 3, 4] } -``` - -_if disabled:_ - -```sh -node example.js -x 1 2 -x 3 4 -{ _: [], x: [[1, 2], [3, 4]] } -``` - -### negation prefix - -* default: `no-` -* key: `negation-prefix` - -The prefix to use for negated boolean variables. - -```sh -node example.js --no-foo -{ _: [], foo: false } -``` - -_if set to `quux`:_ - -```sh -node example.js --quuxfoo -{ _: [], foo: false } -``` - -### populate -- - -* default: `false`. -* key: `populate--` - -Should unparsed flags be stored in `--` or `_`. - -_If disabled:_ - -```sh -node example.js a -b -- x y -{ _: [ 'a', 'x', 'y' ], b: true } -``` - -_If enabled:_ - -```sh -node example.js a -b -- x y -{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true } -``` - -### set placeholder key - -* default: `false`. -* key: `set-placeholder-key`. - -Should a placeholder be added for keys not set via the corresponding CLI argument? - -_If disabled:_ - -```sh -node example.js -a 1 -c 2 -{ _: [], a: 1, c: 2 } -``` - -_If enabled:_ - -```sh -node example.js -a 1 -c 2 -{ _: [], a: 1, b: undefined, c: 2 } -``` - -### halt at non-option - -* default: `false`. -* key: `halt-at-non-option`. - -Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line. - -_If disabled:_ - -```sh -node example.js -a run b -x y -{ _: [ 'b' ], a: 'run', x: 'y' } -``` - -_If enabled:_ - -```sh -node example.js -a run b -x y -{ _: [ 'b', '-x', 'y' ], a: 'run' } -``` - -### strip aliased - -* default: `false` -* key: `strip-aliased` - -Should aliases be removed before returning results? - -_If disabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 } -``` - -_If enabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1 } -``` - -### strip dashed - -* default: `false` -* key: `strip-dashed` - -Should dashed keys be removed before returning results? This option has no effect if -`camel-case-expansion` is disabled. - -_If disabled:_ - -```sh -node example.js --test-field 1 -{ _: [], 'test-field': 1, testField: 1 } -``` - -_If enabled:_ - -```sh -node example.js --test-field 1 -{ _: [], testField: 1 } -``` - -### unknown options as args - -* default: `false` -* key: `unknown-options-as-args` - -Should unknown options be treated like regular arguments? An unknown option is one that is not -configured in `opts`. - -_If disabled_ - -```sh -node example.js --unknown-option --known-option 2 --string-option --unknown-option2 -{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true } -``` - -_If enabled_ - -```sh -node example.js --unknown-option --known-option 2 --string-option --unknown-option2 -{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' } -``` - -## Special Thanks - -The yargs project evolves from optimist and minimist. It owes its -existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/ - -## License - -ISC diff --git a/node_modules/yargs-parser/index.js b/node_modules/yargs-parser/index.js deleted file mode 100644 index 3968eba5..00000000 --- a/node_modules/yargs-parser/index.js +++ /dev/null @@ -1,969 +0,0 @@ -var camelCase = require('camelcase') -var decamelize = require('decamelize') -var path = require('path') -var tokenizeArgString = require('./lib/tokenize-arg-string') -var util = require('util') - -function parse (args, opts) { - if (!opts) opts = {} - // allow a string argument to be passed in rather - // than an argv array. - args = tokenizeArgString(args) - - // aliases might have transitive relationships, normalize this. - var aliases = combineAliases(opts.alias || {}) - var configuration = Object.assign({ - 'short-option-groups': true, - 'camel-case-expansion': true, - 'dot-notation': true, - 'parse-numbers': true, - 'boolean-negation': true, - 'negation-prefix': 'no-', - 'duplicate-arguments-array': true, - 'flatten-duplicate-arrays': true, - 'populate--': false, - 'combine-arrays': false, - 'set-placeholder-key': false, - 'halt-at-non-option': false, - 'strip-aliased': false, - 'strip-dashed': false, - 'unknown-options-as-args': false - }, opts.configuration) - var defaults = opts.default || {} - var configObjects = opts.configObjects || [] - var envPrefix = opts.envPrefix - var notFlagsOption = configuration['populate--'] - var notFlagsArgv = notFlagsOption ? '--' : '_' - var newAliases = {} - // allow a i18n handler to be passed in, default to a fake one (util.format). - var __ = opts.__ || util.format - var error = null - var flags = { - aliases: {}, - arrays: {}, - bools: {}, - strings: {}, - numbers: {}, - counts: {}, - normalize: {}, - configs: {}, - nargs: {}, - coercions: {}, - keys: [] - } - var negative = /^-[0-9]+(\.[0-9]+)?/ - var negatedBoolean = new RegExp('^--' + configuration['negation-prefix'] + '(.+)') - - ;[].concat(opts.array).filter(Boolean).forEach(function (opt) { - var key = opt.key || opt - - // assign to flags[bools|strings|numbers] - const assignment = Object.keys(opt).map(function (key) { - return ({ - boolean: 'bools', - string: 'strings', - number: 'numbers' - })[key] - }).filter(Boolean).pop() - - // assign key to be coerced - if (assignment) { - flags[assignment][key] = true - } - - flags.arrays[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.boolean).filter(Boolean).forEach(function (key) { - flags.bools[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.number).filter(Boolean).forEach(function (key) { - flags.numbers[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.count).filter(Boolean).forEach(function (key) { - flags.counts[key] = true - flags.keys.push(key) - }) - - ;[].concat(opts.normalize).filter(Boolean).forEach(function (key) { - flags.normalize[key] = true - flags.keys.push(key) - }) - - Object.keys(opts.narg || {}).forEach(function (k) { - flags.nargs[k] = opts.narg[k] - flags.keys.push(k) - }) - - Object.keys(opts.coerce || {}).forEach(function (k) { - flags.coercions[k] = opts.coerce[k] - flags.keys.push(k) - }) - - if (Array.isArray(opts.config) || typeof opts.config === 'string') { - ;[].concat(opts.config).filter(Boolean).forEach(function (key) { - flags.configs[key] = true - }) - } else { - Object.keys(opts.config || {}).forEach(function (k) { - flags.configs[k] = opts.config[k] - }) - } - - // create a lookup table that takes into account all - // combinations of aliases: {f: ['foo'], foo: ['f']} - extendAliases(opts.key, aliases, opts.default, flags.arrays) - - // apply default values to all aliases. - Object.keys(defaults).forEach(function (key) { - (flags.aliases[key] || []).forEach(function (alias) { - defaults[alias] = defaults[key] - }) - }) - - var argv = { _: [] } - var notFlags = [] - - for (var i = 0; i < args.length; i++) { - var arg = args[i] - var broken - var key - var letters - var m - var next - var value - - if (isUnknownOptionAsArg(arg)) { - argv._.push(arg) - // -- separated by = - } else if (arg.match(/^--.+=/) || ( - !configuration['short-option-groups'] && arg.match(/^-.+=/) - )) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - m = arg.match(/^--?([^=]+)=([\s\S]*)$/) - - // nargs format = '--f=monkey washing cat' - if (checkAllAliases(m[1], flags.nargs)) { - args.splice(i + 1, 0, m[2]) - i = eatNargs(i, m[1], args) - // arrays format = '--f=a b c' - } else if (checkAllAliases(m[1], flags.arrays)) { - args.splice(i + 1, 0, m[2]) - i = eatArray(i, m[1], args) - } else { - setArg(m[1], m[2]) - } - } else if (arg.match(negatedBoolean) && configuration['boolean-negation']) { - key = arg.match(negatedBoolean)[1] - setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false) - - // -- separated by space. - } else if (arg.match(/^--.+/) || ( - !configuration['short-option-groups'] && arg.match(/^-[^-]+/) - )) { - key = arg.match(/^--?(.+)/)[1] - - // nargs format = '--foo a b c' - // should be truthy even if: flags.nargs[key] === 0 - if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args) - // array format = '--foo a b c' - } else if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && (!next.match(/^-/) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } - - // dot-notation flag separated by '='. - } else if (arg.match(/^-.\..+=/)) { - m = arg.match(/^-([^=]+)=([\s\S]*)$/) - setArg(m[1], m[2]) - - // dot-notation flag separated by space. - } else if (arg.match(/^-.\..+/)) { - next = args[i + 1] - key = arg.match(/^-(.\..+)/)[1] - - if (next !== undefined && !next.match(/^-/) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { - letters = arg.slice(1, -1).split('') - broken = false - - for (var j = 0; j < letters.length; j++) { - next = arg.slice(j + 2) - - if (letters[j + 1] && letters[j + 1] === '=') { - value = arg.slice(j + 3) - key = letters[j] - - // nargs format = '-f=monkey washing cat' - if (checkAllAliases(key, flags.nargs)) { - args.splice(i + 1, 0, value) - i = eatNargs(i, key, args) - // array format = '-f=a b c' - } else if (checkAllAliases(key, flags.arrays)) { - args.splice(i + 1, 0, value) - i = eatArray(i, key, args) - } else { - setArg(key, value) - } - - broken = true - break - } - - if (next === '-') { - setArg(letters[j], next) - continue - } - - // current letter is an alphabetic character and next value is a number - if (/[A-Za-z]/.test(letters[j]) && - /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next) - broken = true - break - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], next) - broken = true - break - } else { - setArg(letters[j], defaultValue(letters[j])) - } - } - - key = arg.slice(-1)[0] - - if (!broken && key !== '-') { - // nargs format = '-f a b c' - // should be truthy even if: flags.nargs[key] === 0 - if (checkAllAliases(key, flags.nargs) !== false) { - i = eatNargs(i, key, args) - // array format = '-f a b c' - } else if (checkAllAliases(key, flags.arrays)) { - i = eatArray(i, key, args) - } else { - next = args[i + 1] - - if (next !== undefined && (!/^(-|--)[^-]/.test(next) || - next.match(negative)) && - !checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts)) { - setArg(key, next) - i++ - } else if (/^(true|false)$/.test(next)) { - setArg(key, next) - i++ - } else { - setArg(key, defaultValue(key)) - } - } - } - } else if (arg === '--') { - notFlags = args.slice(i + 1) - break - } else if (configuration['halt-at-non-option']) { - notFlags = args.slice(i) - break - } else { - argv._.push(maybeCoerceNumber('_', arg)) - } - } - - // order of precedence: - // 1. command line arg - // 2. value from env var - // 3. value from config file - // 4. value from config objects - // 5. configured default value - applyEnvVars(argv, true) // special case: check env vars that point to config file - applyEnvVars(argv, false) - setConfig(argv) - setConfigObjects() - applyDefaultsAndAliases(argv, flags.aliases, defaults) - applyCoercions(argv) - if (configuration['set-placeholder-key']) setPlaceholderKeys(argv) - - // for any counts either not in args or without an explicit default, set to 0 - Object.keys(flags.counts).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) setArg(key, 0) - }) - - // '--' defaults to undefined. - if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = [] - notFlags.forEach(function (key) { - argv[notFlagsArgv].push(key) - }) - - if (configuration['camel-case-expansion'] && configuration['strip-dashed']) { - Object.keys(argv).filter(key => key !== '--' && key.includes('-')).forEach(key => { - delete argv[key] - }) - } - - if (configuration['strip-aliased']) { - // XXX Switch to [].concat(...Object.values(aliases)) once node.js 6 is dropped - ;[].concat(...Object.keys(aliases).map(k => aliases[k])).forEach(alias => { - if (configuration['camel-case-expansion']) { - delete argv[alias.split('.').map(prop => camelCase(prop)).join('.')] - } - - delete argv[alias] - }) - } - - // how many arguments should we consume, based - // on the nargs option? - function eatNargs (i, key, args) { - var ii - const toEat = checkAllAliases(key, flags.nargs) - - if (toEat === 0) { - setArg(key, defaultValue(key)) - return i - } - - // nargs will not consume flag arguments, e.g., -abc, --foo, - // and terminates when one is observed. - var available = 0 - for (ii = i + 1; ii < args.length; ii++) { - if (!args[ii].match(/^-[^0-9]/) || isUnknownOptionAsArg(args[ii])) available++ - else break - } - - if (available < toEat) error = Error(__('Not enough arguments following: %s', key)) - - const consumed = Math.min(available, toEat) - for (ii = i + 1; ii < (consumed + i + 1); ii++) { - setArg(key, args[ii]) - } - - return (i + consumed) - } - - // if an option is an array, eat all non-hyphenated arguments - // following it... YUM! - // e.g., --foo apple banana cat becomes ["apple", "banana", "cat"] - function eatArray (i, key, args) { - let argsToSet = [] - let next = args[i + 1] - - if (checkAllAliases(key, flags.bools) && !(/^(true|false)$/.test(next))) { - argsToSet.push(true) - } else if (isUndefined(next) || (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))) { - // for keys without value ==> argsToSet remains an empty [] - // set user default value, if available - if (defaults.hasOwnProperty(key)) { - argsToSet.push(defaults[key]) - } - } else { - for (var ii = i + 1; ii < args.length; ii++) { - next = args[ii] - if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) break - i = ii - argsToSet.push(processValue(key, next)) - } - } - - setArg(key, argsToSet) - return i - } - - function setArg (key, val) { - if (/-/.test(key) && configuration['camel-case-expansion']) { - var alias = key.split('.').map(function (prop) { - return camelCase(prop) - }).join('.') - addNewAlias(key, alias) - } - - var value = processValue(key, val) - - var splitKey = key.split('.') - setKey(argv, splitKey, value) - - // handle populating aliases of the full key - if (flags.aliases[key] && flags.aliases[key].forEach) { - flags.aliases[key].forEach(function (x) { - x = x.split('.') - setKey(argv, x, value) - }) - } - - // handle populating aliases of the first element of the dot-notation key - if (splitKey.length > 1 && configuration['dot-notation']) { - ;(flags.aliases[splitKey[0]] || []).forEach(function (x) { - x = x.split('.') - - // expand alias with nested objects in key - var a = [].concat(splitKey) - a.shift() // nuke the old key. - x = x.concat(a) - - setKey(argv, x, value) - }) - } - - // Set normalize getter and setter when key is in 'normalize' but isn't an array - if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { - var keys = [key].concat(flags.aliases[key] || []) - keys.forEach(function (key) { - argv.__defineSetter__(key, function (v) { - val = path.normalize(v) - }) - - argv.__defineGetter__(key, function () { - return typeof val === 'string' ? path.normalize(val) : val - }) - }) - } - } - - function addNewAlias (key, alias) { - if (!(flags.aliases[key] && flags.aliases[key].length)) { - flags.aliases[key] = [alias] - newAliases[alias] = true - } - if (!(flags.aliases[alias] && flags.aliases[alias].length)) { - addNewAlias(alias, key) - } - } - - function processValue (key, val) { - // strings may be quoted, clean this up as we assign values. - if (typeof val === 'string' && - (val[0] === "'" || val[0] === '"') && - val[val.length - 1] === val[0] - ) { - val = val.substring(1, val.length - 1) - } - - // handle parsing boolean arguments --foo=true --bar false. - if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { - if (typeof val === 'string') val = val === 'true' - } - - var value = Array.isArray(val) - ? val.map(function (v) { return maybeCoerceNumber(key, v) }) - : maybeCoerceNumber(key, val) - - // increment a count given as arg (either no value or value parsed as boolean) - if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === 'boolean')) { - value = increment - } - - // Set normalized value when key is in 'normalize' and in 'arrays' - if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { - if (Array.isArray(val)) value = val.map(path.normalize) - else value = path.normalize(val) - } - return value - } - - function maybeCoerceNumber (key, value) { - if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { - const shouldCoerceNumber = isNumber(value) && configuration['parse-numbers'] && ( - Number.isSafeInteger(Math.floor(value)) - ) - if (shouldCoerceNumber || (!isUndefined(value) && checkAllAliases(key, flags.numbers))) value = Number(value) - } - return value - } - - // set args from config.json file, this should be - // applied last so that defaults can be applied. - function setConfig (argv) { - var configLookup = {} - - // expand defaults/aliases, in-case any happen to reference - // the config.json file. - applyDefaultsAndAliases(configLookup, flags.aliases, defaults) - - Object.keys(flags.configs).forEach(function (configKey) { - var configPath = argv[configKey] || configLookup[configKey] - if (configPath) { - try { - var config = null - var resolvedConfigPath = path.resolve(process.cwd(), configPath) - - if (typeof flags.configs[configKey] === 'function') { - try { - config = flags.configs[configKey](resolvedConfigPath) - } catch (e) { - config = e - } - if (config instanceof Error) { - error = config - return - } - } else { - config = require(resolvedConfigPath) - } - - setConfigObject(config) - } catch (ex) { - if (argv[configKey]) error = Error(__('Invalid JSON config file: %s', configPath)) - } - } - }) - } - - // set args from config object. - // it recursively checks nested objects. - function setConfigObject (config, prev) { - Object.keys(config).forEach(function (key) { - var value = config[key] - var fullKey = prev ? prev + '.' + key : key - - // if the value is an inner object and we have dot-notation - // enabled, treat inner objects in config the same as - // heavily nested dot notations (foo.bar.apple). - if (typeof value === 'object' && value !== null && !Array.isArray(value) && configuration['dot-notation']) { - // if the value is an object but not an array, check nested object - setConfigObject(value, fullKey) - } else { - // setting arguments via CLI takes precedence over - // values within the config file. - if (!hasKey(argv, fullKey.split('.')) || (checkAllAliases(fullKey, flags.arrays) && configuration['combine-arrays'])) { - setArg(fullKey, value) - } - } - }) - } - - // set all config objects passed in opts - function setConfigObjects () { - if (typeof configObjects === 'undefined') return - configObjects.forEach(function (configObject) { - setConfigObject(configObject) - }) - } - - function applyEnvVars (argv, configOnly) { - if (typeof envPrefix === 'undefined') return - - var prefix = typeof envPrefix === 'string' ? envPrefix : '' - Object.keys(process.env).forEach(function (envVar) { - if (prefix === '' || envVar.lastIndexOf(prefix, 0) === 0) { - // get array of nested keys and convert them to camel case - var keys = envVar.split('__').map(function (key, i) { - if (i === 0) { - key = key.substring(prefix.length) - } - return camelCase(key) - }) - - if (((configOnly && flags.configs[keys.join('.')]) || !configOnly) && !hasKey(argv, keys)) { - setArg(keys.join('.'), process.env[envVar]) - } - } - }) - } - - function applyCoercions (argv) { - var coerce - var applied = {} - Object.keys(argv).forEach(function (key) { - if (!applied.hasOwnProperty(key)) { // If we haven't already coerced this option via one of its aliases - coerce = checkAllAliases(key, flags.coercions) - if (typeof coerce === 'function') { - try { - var value = maybeCoerceNumber(key, coerce(argv[key])) - ;([].concat(flags.aliases[key] || [], key)).forEach(ali => { - applied[ali] = argv[ali] = value - }) - } catch (err) { - error = err - } - } - } - }) - } - - function setPlaceholderKeys (argv) { - flags.keys.forEach((key) => { - // don't set placeholder keys for dot notation options 'foo.bar'. - if (~key.indexOf('.')) return - if (typeof argv[key] === 'undefined') argv[key] = undefined - }) - return argv - } - - function applyDefaultsAndAliases (obj, aliases, defaults) { - Object.keys(defaults).forEach(function (key) { - if (!hasKey(obj, key.split('.'))) { - setKey(obj, key.split('.'), defaults[key]) - - ;(aliases[key] || []).forEach(function (x) { - if (hasKey(obj, x.split('.'))) return - setKey(obj, x.split('.'), defaults[key]) - }) - } - }) - } - - function hasKey (obj, keys) { - var o = obj - - if (!configuration['dot-notation']) keys = [keys.join('.')] - - keys.slice(0, -1).forEach(function (key) { - o = (o[key] || {}) - }) - - var key = keys[keys.length - 1] - - if (typeof o !== 'object') return false - else return key in o - } - - function setKey (obj, keys, value) { - var o = obj - - if (!configuration['dot-notation']) keys = [keys.join('.')] - - keys.slice(0, -1).forEach(function (key, index) { - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - key = sanitizeKey(key) - - if (typeof o === 'object' && o[key] === undefined) { - o[key] = {} - } - - if (typeof o[key] !== 'object' || Array.isArray(o[key])) { - // ensure that o[key] is an array, and that the last item is an empty object. - if (Array.isArray(o[key])) { - o[key].push({}) - } else { - o[key] = [o[key], {}] - } - - // we want to update the empty object at the end of the o[key] array, so set o to that object - o = o[key][o[key].length - 1] - } else { - o = o[key] - } - }) - - // TODO(bcoe): in the next major version of yargs, switch to - // Object.create(null) for dot notation: - const key = sanitizeKey(keys[keys.length - 1]) - - const isTypeArray = checkAllAliases(keys.join('.'), flags.arrays) - const isValueArray = Array.isArray(value) - let duplicate = configuration['duplicate-arguments-array'] - - // nargs has higher priority than duplicate - if (!duplicate && checkAllAliases(key, flags.nargs)) { - duplicate = true - if ((!isUndefined(o[key]) && flags.nargs[key] === 1) || (Array.isArray(o[key]) && o[key].length === flags.nargs[key])) { - o[key] = undefined - } - } - - if (value === increment) { - o[key] = increment(o[key]) - } else if (Array.isArray(o[key])) { - if (duplicate && isTypeArray && isValueArray) { - o[key] = configuration['flatten-duplicate-arrays'] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]) - } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { - o[key] = value - } else { - o[key] = o[key].concat([value]) - } - } else if (o[key] === undefined && isTypeArray) { - o[key] = isValueArray ? value : [value] - } else if (duplicate && !(o[key] === undefined || checkAllAliases(key, flags.counts))) { - o[key] = [ o[key], value ] - } else { - o[key] = value - } - } - - // extend the aliases list with inferred aliases. - function extendAliases (...args) { - args.forEach(function (obj) { - Object.keys(obj || {}).forEach(function (key) { - // short-circuit if we've already added a key - // to the aliases array, for example it might - // exist in both 'opts.default' and 'opts.key'. - if (flags.aliases[key]) return - - flags.aliases[key] = [].concat(aliases[key] || []) - // For "--option-name", also set argv.optionName - flags.aliases[key].concat(key).forEach(function (x) { - if (/-/.test(x) && configuration['camel-case-expansion']) { - var c = camelCase(x) - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c) - newAliases[c] = true - } - } - }) - // For "--optionName", also set argv['option-name'] - flags.aliases[key].concat(key).forEach(function (x) { - if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) { - var c = decamelize(x, '-') - if (c !== key && flags.aliases[key].indexOf(c) === -1) { - flags.aliases[key].push(c) - newAliases[c] = true - } - } - }) - flags.aliases[key].forEach(function (x) { - flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) { - return x !== y - })) - }) - }) - }) - } - - // check if a flag is set for any of a key's aliases. - function checkAllAliases (key, flag) { - var isSet = false - var toCheck = [].concat(flags.aliases[key] || [], key) - - toCheck.forEach(function (key) { - if (flag.hasOwnProperty(key)) isSet = flag[key] - }) - - return isSet - } - - function hasAnyFlag (key) { - // XXX Switch to [].concat(...Object.values(flags)) once node.js 6 is dropped - var toCheck = [].concat(...Object.keys(flags).map(k => flags[k])) - - return toCheck.some(function (flag) { - return flag[key] - }) - } - - function hasFlagsMatching (arg, ...patterns) { - var toCheck = [].concat(...patterns) - return toCheck.some(function (pattern) { - var match = arg.match(pattern) - return match && hasAnyFlag(match[1]) - }) - } - - // based on a simplified version of the short flag group parsing logic - function hasAllShortFlags (arg) { - // if this is a negative number, or doesn't start with a single hyphen, it's not a short flag group - if (arg.match(negative) || !arg.match(/^-[^-]+/)) { return false } - var hasAllFlags = true - var letters = arg.slice(1).split('') - var next - for (var j = 0; j < letters.length; j++) { - next = arg.slice(j + 2) - - if (!hasAnyFlag(letters[j])) { - hasAllFlags = false - break - } - - if ((letters[j + 1] && letters[j + 1] === '=') || - next === '-' || - (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) || - (letters[j + 1] && letters[j + 1].match(/\W/))) { - break - } - } - return hasAllFlags - } - - function isUnknownOptionAsArg (arg) { - return configuration['unknown-options-as-args'] && isUnknownOption(arg) - } - - function isUnknownOption (arg) { - arg = arg.replace(/^-{3,}/, '---') - // ignore negative numbers - if (arg.match(negative)) { return false } - // if this is a short option group and all of them are configured, it isn't unknown - if (hasAllShortFlags(arg)) { return false } - // e.g. '--count=2' - const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/ - // e.g. '-a' or '--arg' - const normalFlag = /^-+([^=]+?)$/ - // e.g. '-a-' - const flagEndingInHyphen = /^-+([^=]+?)-$/ - // e.g. '-abc123' - const flagEndingInDigits = /^-+([^=]+?)\d+$/ - // e.g. '-a/usr/local' - const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/ - // check the different types of flag styles, including negatedBoolean, a pattern defined near the start of the parse method - return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters) - } - - // make a best effor to pick a default value - // for an option based on name and type. - function defaultValue (key) { - if (!checkAllAliases(key, flags.bools) && - !checkAllAliases(key, flags.counts) && - `${key}` in defaults) { - return defaults[key] - } else { - return defaultForType(guessType(key)) - } - } - - // return a default value, given the type of a flag., - // e.g., key of type 'string' will default to '', rather than 'true'. - function defaultForType (type) { - var def = { - boolean: true, - string: '', - number: undefined, - array: [] - } - - return def[type] - } - - // given a flag, enforce a default type. - function guessType (key) { - var type = 'boolean' - - if (checkAllAliases(key, flags.strings)) type = 'string' - else if (checkAllAliases(key, flags.numbers)) type = 'number' - else if (checkAllAliases(key, flags.bools)) type = 'boolean' - else if (checkAllAliases(key, flags.arrays)) type = 'array' - - return type - } - - function isNumber (x) { - if (x === null || x === undefined) return false - // if loaded from config, may already be a number. - if (typeof x === 'number') return true - // hexadecimal. - if (/^0x[0-9a-f]+$/i.test(x)) return true - // don't treat 0123 as a number; as it drops the leading '0'. - if (x.length > 1 && x[0] === '0') return false - return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x) - } - - function isUndefined (num) { - return num === undefined - } - - return { - argv: argv, - error: error, - aliases: flags.aliases, - newAliases: newAliases, - configuration: configuration - } -} - -// if any aliases reference each other, we should -// merge them together. -function combineAliases (aliases) { - var aliasArrays = [] - var change = true - var combined = {} - - // turn alias lookup hash {key: ['alias1', 'alias2']} into - // a simple array ['key', 'alias1', 'alias2'] - Object.keys(aliases).forEach(function (key) { - aliasArrays.push( - [].concat(aliases[key], key) - ) - }) - - // combine arrays until zero changes are - // made in an iteration. - while (change) { - change = false - for (var i = 0; i < aliasArrays.length; i++) { - for (var ii = i + 1; ii < aliasArrays.length; ii++) { - var intersect = aliasArrays[i].filter(function (v) { - return aliasArrays[ii].indexOf(v) !== -1 - }) - - if (intersect.length) { - aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]) - aliasArrays.splice(ii, 1) - change = true - break - } - } - } - } - - // map arrays back to the hash-lookup (de-dupe while - // we're at it). - aliasArrays.forEach(function (aliasArray) { - aliasArray = aliasArray.filter(function (v, i, self) { - return self.indexOf(v) === i - }) - combined[aliasArray.pop()] = aliasArray - }) - - return combined -} - -// this function should only be called when a count is given as an arg -// it is NOT called to set a default value -// thus we can start the count at 1 instead of 0 -function increment (orig) { - return orig !== undefined ? orig + 1 : 1 -} - -function Parser (args, opts) { - var result = parse(args.slice(), opts) - - return result.argv -} - -// parse arguments and return detailed -// meta information, aliases, etc. -Parser.detailed = function (args, opts) { - return parse(args.slice(), opts) -} - -// TODO(bcoe): in the next major version of yargs, switch to -// Object.create(null) for dot notation: -function sanitizeKey (key) { - if (key === '__proto__') return '___proto___' - return key -} - -module.exports = Parser diff --git a/node_modules/yargs-parser/lib/tokenize-arg-string.js b/node_modules/yargs-parser/lib/tokenize-arg-string.js deleted file mode 100644 index fe05e27f..00000000 --- a/node_modules/yargs-parser/lib/tokenize-arg-string.js +++ /dev/null @@ -1,40 +0,0 @@ -// take an un-split argv string and tokenize it. -module.exports = function (argString) { - if (Array.isArray(argString)) { - return argString.map(e => typeof e !== 'string' ? e + '' : e) - } - - argString = argString.trim() - - var i = 0 - var prevC = null - var c = null - var opening = null - var args = [] - - for (var ii = 0; ii < argString.length; ii++) { - prevC = c - c = argString.charAt(ii) - - // split on spaces unless we're in quotes. - if (c === ' ' && !opening) { - if (!(prevC === ' ')) { - i++ - } - continue - } - - // don't split the string if we're in matching - // opening or closing single and double quotes. - if (c === opening) { - opening = null - } else if ((c === "'" || c === '"') && !opening) { - opening = c - } - - if (!args[i]) args[i] = '' - args[i] += c - } - - return args -} diff --git a/node_modules/yargs-parser/package.json b/node_modules/yargs-parser/package.json deleted file mode 100644 index 7dc4671f..00000000 --- a/node_modules/yargs-parser/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "yargs-parser", - "version": "15.0.3", - "description": "the mighty option parser used by yargs", - "main": "index.js", - "scripts": { - "test": "nyc mocha test/*.js", - "posttest": "standard", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "standard-version" - }, - "repository": { - "url": "git@github.com:yargs/yargs-parser.git" - }, - "keywords": [ - "argument", - "parser", - "yargs", - "command", - "cli", - "parsing", - "option", - "args", - "argument" - ], - "author": "Ben Coe ", - "license": "ISC", - "devDependencies": { - "chai": "^4.2.0", - "coveralls": "^3.0.2", - "mocha": "^5.2.0", - "nyc": "^14.1.0", - "standard": "^12.0.1", - "standard-version": "^6.0.0" - }, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "files": [ - "lib", - "index.js" - ], - "engine": { - "node": ">=6" - } -} diff --git a/node_modules/yargs/CHANGELOG.md b/node_modules/yargs/CHANGELOG.md deleted file mode 100644 index 343ffc9a..00000000 --- a/node_modules/yargs/CHANGELOG.md +++ /dev/null @@ -1,1406 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### 14.2.2 - -### Bug Fixes - -* temporary fix for libraries that call Object.freeze() ([#1483](https://www.github.com/yargs/yargs/issues/1483)) ([99c2dc8](https://www.github.com/yargs/yargs/commit/99c2dc850e67c606644f8b0c0bca1a59c87dcbcd)) - -### [14.2.1](https://github.com/yargs/yargs/compare/v14.2.0...v14.2.1) (2019-10-30) - - -### Bug Fixes - -* stop-parse was not being respected by commands ([#1459](https://github.com/yargs/yargs/issues/1459)) ([e78e76e](https://github.com/yargs/yargs/commit/e78e76e3ac0551d4f30c71a05ddb21582960fcef)) - -## [14.2.0](https://github.com/yargs/yargs/compare/v14.1.0...v14.2.0) (2019-10-07) - - -### Bug Fixes - -* async middleware was called twice ([#1422](https://github.com/yargs/yargs/issues/1422)) ([9a42b63](https://github.com/yargs/yargs/commit/9a42b63)) -* fix promise check to accept any spec conform object ([#1424](https://github.com/yargs/yargs/issues/1424)) ([0be43d2](https://github.com/yargs/yargs/commit/0be43d2)) -* groups were not being maintained for nested commands ([#1430](https://github.com/yargs/yargs/issues/1430)) ([d38650e](https://github.com/yargs/yargs/commit/d38650e)) -* **docs:** broken markdown link ([#1426](https://github.com/yargs/yargs/issues/1426)) ([236e24e](https://github.com/yargs/yargs/commit/236e24e)) -* support merging deeply nested configuration ([#1423](https://github.com/yargs/yargs/issues/1423)) ([bae66fe](https://github.com/yargs/yargs/commit/bae66fe)) - - -### Features - -* **deps:** introduce yargs-parser with support for unknown-options-as-args ([#1440](https://github.com/yargs/yargs/issues/1440)) ([4d21520](https://github.com/yargs/yargs/commit/4d21520)) - -## [14.1.0](https://github.com/yargs/yargs/compare/v14.0.0...v14.1.0) (2019-09-06) - - -### Bug Fixes - -* **docs:** fix incorrect parserConfiguration documentation ([2a99124](https://github.com/yargs/yargs/commit/2a99124)) -* detect zsh when zsh isnt run as a login prompt ([#1395](https://github.com/yargs/yargs/issues/1395)) ([8792d13](https://github.com/yargs/yargs/commit/8792d13)) -* populate correct value on yargs.parsed and stop warning on access ([#1412](https://github.com/yargs/yargs/issues/1412)) ([bb0eb52](https://github.com/yargs/yargs/commit/bb0eb52)) -* showCompletionScript was logging script twice ([#1388](https://github.com/yargs/yargs/issues/1388)) ([07c8537](https://github.com/yargs/yargs/commit/07c8537)) -* strict() should not ignore hyphenated arguments ([#1414](https://github.com/yargs/yargs/issues/1414)) ([b774b5e](https://github.com/yargs/yargs/commit/b774b5e)) -* **docs:** formalize existing callback argument to showHelp ([#1386](https://github.com/yargs/yargs/issues/1386)) ([d217764](https://github.com/yargs/yargs/commit/d217764)) - - -### Features - -* make it possible to merge configurations when extending other config. ([#1411](https://github.com/yargs/yargs/issues/1411)) ([5d7ad98](https://github.com/yargs/yargs/commit/5d7ad98)) - -## [14.0.0](https://github.com/yargs/yargs/compare/v13.3.0...v14.0.0) (2019-07-30) - - -### ⚠ BREAKING CHANGES - -* we now only officially support yargs.$0 parameter and discourage direct access to yargs.parsed -* previously to this fix methods like `yargs.getOptions()` contained the state of the last command to execute. -* do not allow additional positionals in strict mode - -### Bug Fixes - -* calling parse multiple times now appropriately maintains state ([#1137](https://github.com/yargs/yargs/issues/1137)) ([#1369](https://github.com/yargs/yargs/issues/1369)) ([026b151](https://github.com/yargs/yargs/commit/026b151)) -* prefer user supplied script name in usage ([#1383](https://github.com/yargs/yargs/issues/1383)) ([28c74b9](https://github.com/yargs/yargs/commit/28c74b9)) -* **deps:** use decamelize from npm instead of vendored copy ([#1377](https://github.com/yargs/yargs/issues/1377)) ([015eeb9](https://github.com/yargs/yargs/commit/015eeb9)) -* **examples:** fix usage-options.js to reflect current API ([#1375](https://github.com/yargs/yargs/issues/1375)) ([6e5b76b](https://github.com/yargs/yargs/commit/6e5b76b)) -* do not allow additional positionals in strict mode ([35d777c](https://github.com/yargs/yargs/commit/35d777c)) -* properties accessed on singleton now reflect current state of instance ([#1366](https://github.com/yargs/yargs/issues/1366)) ([409d35b](https://github.com/yargs/yargs/commit/409d35b)) -* tolerate null prototype for config objects with `extends` ([#1376](https://github.com/yargs/yargs/issues/1376)) ([3d26d11](https://github.com/yargs/yargs/commit/3d26d11)), closes [#1372](https://github.com/yargs/yargs/issues/1372) -* yargs.parsed now populated before returning, when yargs.parse() called with no args (#1382) ([e3981fd](https://github.com/yargs/yargs/commit/e3981fd)), closes [#1382](https://github.com/yargs/yargs/issues/1382) - -### Features - -* adds support for multiple epilog messages ([#1384](https://github.com/yargs/yargs/issues/1384)) ([07a5554](https://github.com/yargs/yargs/commit/07a5554)) -* allow completionCommand to be set via showCompletionScript ([#1385](https://github.com/yargs/yargs/issues/1385)) ([5562853](https://github.com/yargs/yargs/commit/5562853)) - -## [13.3.0](https://www.github.com/yargs/yargs/compare/v13.2.4...v13.3.0) (2019-06-10) - - -### Bug Fixes - -* **deps:** yargs-parser update addressing several parsing bugs ([#1357](https://www.github.com/yargs/yargs/issues/1357)) ([e230d5b](https://www.github.com/yargs/yargs/commit/e230d5b)) - - -### Features - -* **i18n:** swap out os-locale dependency for simple inline implementation ([#1356](https://www.github.com/yargs/yargs/issues/1356)) ([4dfa19b](https://www.github.com/yargs/yargs/commit/4dfa19b)) -* support defaultDescription for positional arguments ([812048c](https://www.github.com/yargs/yargs/commit/812048c)) - -### [13.2.4](https://github.com/yargs/yargs/compare/v13.2.3...v13.2.4) (2019-05-13) - - -### Bug Fixes - -* **i18n:** rename unclear 'implication failed' to 'missing dependent arguments' ([#1317](https://github.com/yargs/yargs/issues/1317)) ([bf46813](https://github.com/yargs/yargs/commit/bf46813)) - - - -### [13.2.3](https://github.com/yargs/yargs/compare/v13.2.2...v13.2.3) (2019-05-05) - - -### Bug Fixes - -* **deps:** upgrade cliui for compatibility with latest chalk. ([#1330](https://github.com/yargs/yargs/issues/1330)) ([b20db65](https://github.com/yargs/yargs/commit/b20db65)) -* address issues with dutch translation ([#1316](https://github.com/yargs/yargs/issues/1316)) ([0295132](https://github.com/yargs/yargs/commit/0295132)) - - -### Tests - -* accept differently formatted output ([#1327](https://github.com/yargs/yargs/issues/1327)) ([c294d1b](https://github.com/yargs/yargs/commit/c294d1b)) - - - -## [13.2.2](https://github.com/yargs/yargs/compare/v13.2.1...v13.2.2) (2019-03-06) - - - -## [13.2.1](https://github.com/yargs/yargs/compare/v13.2.0...v13.2.1) (2019-02-18) - - -### Bug Fixes - -* add zsh script to files array ([3180224](https://github.com/yargs/yargs/commit/3180224)) -* support options/sub-commands in zsh completion ([0a96394](https://github.com/yargs/yargs/commit/0a96394)) - - -# [13.2.0](https://github.com/yargs/yargs/compare/v13.1.0...v13.2.0) (2019-02-15) - - -### Features - -* zsh auto completion ([#1292](https://github.com/yargs/yargs/issues/1292)) ([16c5d25](https://github.com/yargs/yargs/commit/16c5d25)), closes [#1156](https://github.com/yargs/yargs/issues/1156) - - - -# [13.1.0](https://github.com/yargs/yargs/compare/v13.0.0...v13.1.0) (2019-02-12) - - -### Features - -* add applyBeforeValidation, for applying sync middleware before validation ([5be206a](https://github.com/yargs/yargs/commit/5be206a)) - - - - -# [13.0.0](https://github.com/yargs/yargs/compare/v12.0.5...v13.0.0) (2019-02-02) - - -### Bug Fixes - -* **deps:** Update os-locale to avoid security vulnerability ([#1270](https://github.com/yargs/yargs/issues/1270)) ([27bf739](https://github.com/yargs/yargs/commit/27bf739)) -* **validation:** Use the error as a message when none exists otherwise ([#1268](https://github.com/yargs/yargs/issues/1268)) ([0510fe6](https://github.com/yargs/yargs/commit/0510fe6)) -* better bash path completion ([#1272](https://github.com/yargs/yargs/issues/1272)) ([da75ea2](https://github.com/yargs/yargs/commit/da75ea2)) -* middleware added multiple times due to reference bug ([#1282](https://github.com/yargs/yargs/issues/1282)) ([64af518](https://github.com/yargs/yargs/commit/64af518)) - - -### Chores - -* ~drop Node 6 from testing matrix ([#1287](https://github.com/yargs/yargs/issues/1287)) ([ef16792](https://github.com/yargs/yargs/commit/ef16792))~ - * _opting to not drop Node 6 support until April, [see](https://github.com/nodejs/Release)._ -* update dependencies ([#1284](https://github.com/yargs/yargs/issues/1284)) ([f25de4f](https://github.com/yargs/yargs/commit/f25de4f)) - - -### Features - -* Add `.parserConfiguration()` method, deprecating package.json config ([#1262](https://github.com/yargs/yargs/issues/1262)) ([3c6869a](https://github.com/yargs/yargs/commit/3c6869a)) -* adds config option for sorting command output ([#1256](https://github.com/yargs/yargs/issues/1256)) ([6916ce9](https://github.com/yargs/yargs/commit/6916ce9)) -* options/positionals with leading '+' and '0' no longer parse as numbers ([#1286](https://github.com/yargs/yargs/issues/1286)) ([e9dc3aa](https://github.com/yargs/yargs/commit/e9dc3aa)) -* support promises in middleware ([f3a4e4f](https://github.com/yargs/yargs/commit/f3a4e4f)) - - -### BREAKING CHANGES - -* options with leading '+' or '0' now parse as strings -* dropping Node 6 which hits end of life in April 2019 -* see [yargs-parser@12.0.0 CHANGELOG](https://github.com/yargs/yargs-parser/blob/master/CHANGELOG.md#breaking-changes) -* we now warn if the yargs stanza package.json is used. - - - - -## [12.0.5](https://github.com/yargs/yargs/compare/v12.0.4...v12.0.5) (2018-11-19) - - -### Bug Fixes - -* allows camel-case, variadic arguments, and strict mode to be combined ([#1247](https://github.com/yargs/yargs/issues/1247)) ([eacc035](https://github.com/yargs/yargs/commit/eacc035)) - - - - -## [12.0.4](https://github.com/yargs/yargs/compare/v12.0.3...v12.0.4) (2018-11-10) - - -### Bug Fixes - -* don't load config when processing positionals ([5d0dc92](https://github.com/yargs/yargs/commit/5d0dc92)) - - - - -## [12.0.3](https://github.com/yargs/yargs/compare/v12.0.2...v12.0.3) (2018-10-06) - - -### Bug Fixes - -* $0 contains first arg in bundled electron apps ([#1206](https://github.com/yargs/yargs/issues/1206)) ([567820b](https://github.com/yargs/yargs/commit/567820b)) -* accept single function for middleware ([66fd6f7](https://github.com/yargs/yargs/commit/66fd6f7)), closes [#1214](https://github.com/yargs/yargs/issues/1214) [#1214](https://github.com/yargs/yargs/issues/1214) -* hide `hidden` options from help output even if they are in a group ([#1221](https://github.com/yargs/yargs/issues/1221)) ([da54028](https://github.com/yargs/yargs/commit/da54028)) -* improve Norwegian Bokmål translations ([#1208](https://github.com/yargs/yargs/issues/1208)) ([a458fa4](https://github.com/yargs/yargs/commit/a458fa4)) -* improve Norwegian Nynorsk translations ([#1207](https://github.com/yargs/yargs/issues/1207)) ([d422eb5](https://github.com/yargs/yargs/commit/d422eb5)) - - - - -## [12.0.2](https://github.com/yargs/yargs/compare/v12.0.1...v12.0.2) (2018-09-04) - - -### Bug Fixes - -* middleware should work regardless of when method is called ([664b265](https://github.com/yargs/yargs/commit/664b265)), closes [#1178](https://github.com/yargs/yargs/issues/1178) -* translation not working when using __ with a single parameter ([#1183](https://github.com/yargs/yargs/issues/1183)) ([f449aea](https://github.com/yargs/yargs/commit/f449aea)) -* upgrade os-locale to version that addresses license issue ([#1195](https://github.com/yargs/yargs/issues/1195)) ([efc0970](https://github.com/yargs/yargs/commit/efc0970)) - - - - -## [12.0.1](https://github.com/yargs/yargs/compare/v12.0.0...v12.0.1) (2018-06-29) - - - - -# [12.0.0](https://github.com/yargs/yargs/compare/v11.1.0...v12.0.0) (2018-06-26) - - -### Bug Fixes - -* .argv and .parse() now invoke identical code path ([#1126](https://github.com/yargs/yargs/issues/1126)) ([f13ebf4](https://github.com/yargs/yargs/commit/f13ebf4)) -* remove the trailing white spaces from the help output ([#1090](https://github.com/yargs/yargs/issues/1090)) ([3f0746c](https://github.com/yargs/yargs/commit/3f0746c)) -* **completion:** Avoid default command and recommendations during completion ([#1123](https://github.com/yargs/yargs/issues/1123)) ([036e7c5](https://github.com/yargs/yargs/commit/036e7c5)) - - -### Chores - -* test Node.js 6, 8 and 10 ([#1160](https://github.com/yargs/yargs/issues/1160)) ([84f9d2b](https://github.com/yargs/yargs/commit/84f9d2b)) -* upgrade to version of yargs-parser that does not populate value for unset boolean ([#1104](https://github.com/yargs/yargs/issues/1104)) ([d4705f4](https://github.com/yargs/yargs/commit/d4705f4)) - - -### Features - -* add support for global middleware, useful for shared tasks like metrics ([#1119](https://github.com/yargs/yargs/issues/1119)) ([9d71ac7](https://github.com/yargs/yargs/commit/9d71ac7)) -* allow setting scriptName $0 ([#1143](https://github.com/yargs/yargs/issues/1143)) ([a2f2eae](https://github.com/yargs/yargs/commit/a2f2eae)) -* remove `setPlaceholderKeys` ([#1105](https://github.com/yargs/yargs/issues/1105)) ([6ee2c82](https://github.com/yargs/yargs/commit/6ee2c82)) - - -### BREAKING CHANGES - -* Options absent from `argv` (not set via CLI argument) are now absent from the parsed result object rather than being set with `undefined` -* drop Node 4 from testing matrix, such that we'll gradually start drifting away from supporting Node 4. -* yargs-parser does not populate 'false' when boolean flag is not passed -* tests that assert against help output will need to be updated - - - - -# [11.1.0](https://github.com/yargs/yargs/compare/v11.0.0...v11.1.0) (2018-03-04) - - -### Bug Fixes - -* choose correct config directory when require.main does not exist ([#1056](https://github.com/yargs/yargs/issues/1056)) ([a04678c](https://github.com/yargs/yargs/commit/a04678c)) - - -### Features - -* allow hidden options to be displayed with --show-hidden ([#1061](https://github.com/yargs/yargs/issues/1061)) ([ea862ae](https://github.com/yargs/yargs/commit/ea862ae)) -* extend *.rc files in addition to json ([#1080](https://github.com/yargs/yargs/issues/1080)) ([11691a6](https://github.com/yargs/yargs/commit/11691a6)) - - - - -# [11.0.0](https://github.com/yargs/yargs/compare/v10.1.2...v11.0.0) (2018-01-22) - - -### Bug Fixes - -* Set implicit nargs=1 when type=number requiresArg=true ([#1050](https://github.com/yargs/yargs/issues/1050)) ([2b56812](https://github.com/yargs/yargs/commit/2b56812)) - - -### Features - -* requiresArg is now simply an alias for nargs(1) ([#1054](https://github.com/yargs/yargs/issues/1054)) ([a3ddacc](https://github.com/yargs/yargs/commit/a3ddacc)) - - -### BREAKING CHANGES - -* requiresArg now has significantly different error output, matching nargs. - - - - -## [10.1.2](https://github.com/yargs/yargs/compare/v10.1.1...v10.1.2) (2018-01-17) - - -### Bug Fixes - -* requiresArg should only be enforced if argument exists ([#1043](https://github.com/yargs/yargs/issues/1043)) ([fbf41ae](https://github.com/yargs/yargs/commit/fbf41ae)) - - - - -## [10.1.1](https://github.com/yargs/yargs/compare/v10.1.0...v10.1.1) (2018-01-09) - - -### Bug Fixes - -* Add `dirname` sanity check on `findUp` ([#1036](https://github.com/yargs/yargs/issues/1036)) ([331d103](https://github.com/yargs/yargs/commit/331d103)) - - - - -# [10.1.0](https://github.com/yargs/yargs/compare/v10.0.3...v10.1.0) (2018-01-01) - - -### Bug Fixes - -* 'undefined' should be taken to mean no argument was provided ([#1015](https://github.com/yargs/yargs/issues/1015)) ([c679e90](https://github.com/yargs/yargs/commit/c679e90)) - - -### Features - -* add missing simple chinese locale strings ([#1004](https://github.com/yargs/yargs/issues/1004)) ([3cc24ec](https://github.com/yargs/yargs/commit/3cc24ec)) -* add Norwegian Nynorsk translations ([#1028](https://github.com/yargs/yargs/issues/1028)) ([a5ac213](https://github.com/yargs/yargs/commit/a5ac213)) -* async command handlers ([#1001](https://github.com/yargs/yargs/issues/1001)) ([241124b](https://github.com/yargs/yargs/commit/241124b)) -* middleware ([#881](https://github.com/yargs/yargs/issues/881)) ([77b8dbc](https://github.com/yargs/yargs/commit/77b8dbc)) - - - - -## [10.0.3](https://github.com/yargs/yargs/compare/v10.0.2...v10.0.3) (2017-10-21) - - -### Bug Fixes - -* parse array rather than string, so that quotes are safe ([#993](https://github.com/yargs/yargs/issues/993)) ([c351685](https://github.com/yargs/yargs/commit/c351685)) - - - - -## [10.0.2](https://github.com/yargs/yargs/compare/v10.0.1...v10.0.2) (2017-10-21) - - -### Bug Fixes - -* fix tiny spacing issue with usage ([#992](https://github.com/yargs/yargs/issues/992)) ([7871327](https://github.com/yargs/yargs/commit/7871327)) - - - - -## [10.0.1](https://github.com/yargs/yargs/compare/v10.0.0...v10.0.1) (2017-10-19) - - -### Bug Fixes - -* help strings for nested commands were missing parent commands ([#990](https://github.com/yargs/yargs/issues/990)) ([cd1ca15](https://github.com/yargs/yargs/commit/cd1ca15)) -* use correct completion command in generated completion script ([#988](https://github.com/yargs/yargs/issues/988)) ([3c8ac1d](https://github.com/yargs/yargs/commit/3c8ac1d)) - - - - -# [10.0.0](https://github.com/yargs/yargs/compare/v9.1.0...v10.0.0) (2017-10-18) - - -### Bug Fixes - -* config and normalize can be disabled with false ([#952](https://github.com/yargs/yargs/issues/952)) ([3bb8771](https://github.com/yargs/yargs/commit/3bb8771)) -* less eager help command execution ([#972](https://github.com/yargs/yargs/issues/972)) ([8c1d7bf](https://github.com/yargs/yargs/commit/8c1d7bf)) -* the positional argument parse was clobbering global flag arguments ([#984](https://github.com/yargs/yargs/issues/984)) ([7e58453](https://github.com/yargs/yargs/commit/7e58453)) - - -### Features - -* .usage() can now be used to configure a default command ([#975](https://github.com/yargs/yargs/issues/975)) ([7269531](https://github.com/yargs/yargs/commit/7269531)) -* hidden options are now explicitly indicated using "hidden" flag ([#962](https://github.com/yargs/yargs/issues/962)) ([280d0d6](https://github.com/yargs/yargs/commit/280d0d6)) -* introduce .positional() for configuring positional arguments ([#967](https://github.com/yargs/yargs/issues/967)) ([cb16460](https://github.com/yargs/yargs/commit/cb16460)) -* replace $0 with file basename ([#983](https://github.com/yargs/yargs/issues/983)) ([20bb99b](https://github.com/yargs/yargs/commit/20bb99b)) - - -### BREAKING CHANGES - -* .usage() no longer accepts an options object as the second argument. It can instead be used as an alias for configuring a default command. -* previously hidden options were simply implied using a falsy description -* help command now only executes if it's the last positional in argv._ - - - - -# [9.1.0](https://github.com/yargs/yargs/compare/v9.0.1...v9.1.0) (2017-09-25) - - -### Bug Fixes - -* **command:** Run default cmd even if the only cmd ([#950](https://github.com/yargs/yargs/issues/950)) ([7b22203](https://github.com/yargs/yargs/commit/7b22203)) - - -### Features - -* multiple usage calls are now collected, not replaced ([#958](https://github.com/yargs/yargs/issues/958)) ([74a38b2](https://github.com/yargs/yargs/commit/74a38b2)) - - - - -## [9.0.1](https://github.com/yargs/yargs/compare/v9.0.0...v9.0.1) (2017-09-17) - - -### Bug Fixes - -* implications fails only displayed once ([#954](https://github.com/yargs/yargs/issues/954)) ([ac8088b](https://github.com/yargs/yargs/commit/ac8088b)) - - - - -# [9.0.0](https://github.com/yargs/yargs/compare/v8.0.2...v9.0.0) (2017-09-03) - - -### Bug Fixes - -* 'undefined' default value for choices resulted in validation failing ([782b896](https://github.com/yargs/yargs/commit/782b896)) -* address bug with handling of arrays of implications ([c240661](https://github.com/yargs/yargs/commit/c240661)) -* defaulting keys to 'undefined' interfered with conflicting key logic ([a8e0cff](https://github.com/yargs/yargs/commit/a8e0cff)) -* don't bother calling JSON.stringify() on string default values ([#891](https://github.com/yargs/yargs/issues/891)) ([628be21](https://github.com/yargs/yargs/commit/628be21)) -* exclude positional arguments from completion output ([#927](https://github.com/yargs/yargs/issues/927)) ([71c7ec7](https://github.com/yargs/yargs/commit/71c7ec7)) -* strict mode should not fail for hidden options ([#949](https://github.com/yargs/yargs/issues/949)) ([0e0c58d](https://github.com/yargs/yargs/commit/0e0c58d)) - - -### Features - -* allow implies and conflicts to accept array values ([#922](https://github.com/yargs/yargs/issues/922)) ([abdc7da](https://github.com/yargs/yargs/commit/abdc7da)) -* allow parse with no arguments as alias for yargs.argv ([#944](https://github.com/yargs/yargs/issues/944)) ([a9f03e7](https://github.com/yargs/yargs/commit/a9f03e7)) -* enable .help() and .version() by default ([#912](https://github.com/yargs/yargs/issues/912)) ([1ef44e0](https://github.com/yargs/yargs/commit/1ef44e0)) -* to allow both undefined and nulls, for benefit of TypeScript ([#945](https://github.com/yargs/yargs/issues/945)) ([792564d](https://github.com/yargs/yargs/commit/792564d)) - - -### BREAKING CHANGES - -* version() and help() are now enabled by default, and show up in help output; the implicit help command can no longer be enabled/disabled independently from the help command itself (which can now be disabled). -* parse() now behaves as an alias for .argv, unless a parseCallback is provided. - - - - -## [8.0.2](https://github.com/yargs/yargs/compare/v8.0.1...v8.0.2) (2017-06-12) - - - - -## [8.0.1](https://github.com/yargs/yargs/compare/v8.0.0...v8.0.1) (2017-05-02) - - - - -# [8.0.0](https://github.com/yargs/yargs/compare/v7.1.0...v8.0.0) (2017-05-01) - - -### Bug Fixes - -* commands are now applied in order, from left to right ([#857](https://github.com/yargs/yargs/issues/857)) ([baba863](https://github.com/yargs/yargs/commit/baba863)) -* help now takes precedence over command recommendation ([#866](https://github.com/yargs/yargs/issues/866)) ([17e3567](https://github.com/yargs/yargs/commit/17e3567)) -* positional arguments now work if no handler is provided to inner command ([#864](https://github.com/yargs/yargs/issues/864)) ([e28ded3](https://github.com/yargs/yargs/commit/e28ded3)) - - -### Chores - -* upgrade yargs-parser ([#867](https://github.com/yargs/yargs/issues/867)) ([8f9c6c6](https://github.com/yargs/yargs/commit/8f9c6c6)) - - -### Features - -* allow extends to inherit from a module ([#865](https://github.com/yargs/yargs/issues/865)) ([89456d9](https://github.com/yargs/yargs/commit/89456d9)) -* allow strict mode to be disabled ([#840](https://github.com/yargs/yargs/issues/840)) ([6f78c05](https://github.com/yargs/yargs/commit/6f78c05)) - - -### BREAKING CHANGES - -* extends functionality now always loads the JSON provided, rather than reading from a specific key -* Node 4+ is now required; this will allow us to start updating our dependencies. -* the first argument to strict() is now used to enable/disable its functionality, rather than controlling whether or not it is global. - - - - -# [7.1.0](https://github.com/yargs/yargs/compare/v7.0.2...v7.1.0) (2017-04-13) - - -### Bug Fixes - -* fix demandOption no longer treats 'false' as truthy ([#829](https://github.com/yargs/yargs/issues/829)) ([c748dd2](https://github.com/yargs/yargs/commit/c748dd2)) -* get terminalWidth in non interactive mode no longer causes a validation exception ([#837](https://github.com/yargs/yargs/issues/837)) ([360e301](https://github.com/yargs/yargs/commit/360e301)) -* we shouldn't output help if we've printed a prior help-like message ([#847](https://github.com/yargs/yargs/issues/847)) ([17e89bd](https://github.com/yargs/yargs/commit/17e89bd)) - - -### Features - -* add support for numeric commands ([#825](https://github.com/yargs/yargs/issues/825)) ([fde0564](https://github.com/yargs/yargs/commit/fde0564)) - - - - -## [7.0.2](https://github.com/yargs/yargs/compare/v7.0.1...v7.0.2) (2017-03-10) - - -### Bug Fixes - -* populating placeholder arguments broke validation ([b3eb2fe](https://github.com/yargs/yargs/commit/b3eb2fe)) - - - - -## [7.0.1](https://github.com/yargs/yargs/compare/v7.0.0...v7.0.1) (2017-03-03) - - -### Bug Fixes - -* --help with default command should print top-level help ([#810](https://github.com/yargs/yargs/issues/810)) ([9c03fa4](https://github.com/yargs/yargs/commit/9c03fa4)) - - - - -# [7.0.0](https://github.com/yargs/yargs/compare/v6.6.0...v7.0.0) (2017-02-26) - - -### Bug Fixes - -* address min/max validation message regression ([#750](https://github.com/yargs/yargs/issues/750)) ([2e5ce0f](https://github.com/yargs/yargs/commit/2e5ce0f)) -* address positional argument strict() bug introduced in [#766](https://github.com/yargs/yargs/issues/766) ([#784](https://github.com/yargs/yargs/issues/784)) ([a8528e6](https://github.com/yargs/yargs/commit/a8528e6)) -* console.warn() rather than throwing errors when api signatures are incorrect ([#804](https://github.com/yargs/yargs/issues/804)) ([a607061](https://github.com/yargs/yargs/commit/a607061)) -* context should override parsed argv ([#786](https://github.com/yargs/yargs/issues/786)) ([0997288](https://github.com/yargs/yargs/commit/0997288)) -* context variables are now recognized in strict() mode ([#796](https://github.com/yargs/yargs/issues/796)) ([48575cd](https://github.com/yargs/yargs/commit/48575cd)) -* errors were not bubbling appropriately from sub-commands to top-level ([#802](https://github.com/yargs/yargs/issues/802)) ([8a992f5](https://github.com/yargs/yargs/commit/8a992f5)) -* positional arguments of sub-commands threw strict() exception ([#805](https://github.com/yargs/yargs/issues/805)) ([f3f074b](https://github.com/yargs/yargs/commit/f3f074b)) -* pull in yargs-parser with modified env precedence ([#787](https://github.com/yargs/yargs/issues/787)) ([e0fbbe5](https://github.com/yargs/yargs/commit/e0fbbe5)) -* running parse() multiple times on the same yargs instance caused exception if help() enabled ([#790](https://github.com/yargs/yargs/issues/790)) ([07e39b7](https://github.com/yargs/yargs/commit/07e39b7)) -* use path.resolve() to support node 0.10 ([#797](https://github.com/yargs/yargs/issues/797)) ([49a93fc](https://github.com/yargs/yargs/commit/49a93fc)) - - -### Features - -* add conflicts and implies shorthands. ([#753](https://github.com/yargs/yargs/issues/753)) ([bd1472b](https://github.com/yargs/yargs/commit/bd1472b)) -* add traditional Chinese translation ([#780](https://github.com/yargs/yargs/issues/780)) ([6ab6a95](https://github.com/yargs/yargs/commit/6ab6a95)) -* allow provided config object to extend other configs ([#779](https://github.com/yargs/yargs/issues/779)) ([3280dd0](https://github.com/yargs/yargs/commit/3280dd0)) -* function argument validation ([#773](https://github.com/yargs/yargs/issues/773)) ([22ed9bb](https://github.com/yargs/yargs/commit/22ed9bb)) -* if only one column is provided for examples, allow it to take up the entire line ([#749](https://github.com/yargs/yargs/issues/749)) ([7931652](https://github.com/yargs/yargs/commit/7931652)) -* introduce custom yargs error object ([#765](https://github.com/yargs/yargs/issues/765)) ([8308efa](https://github.com/yargs/yargs/commit/8308efa)) -* introduces support for default commands, using the '*' identifier ([#785](https://github.com/yargs/yargs/issues/785)) ([d78a0f5](https://github.com/yargs/yargs/commit/d78a0f5)) -* rethink how options are inherited by commands ([#766](https://github.com/yargs/yargs/issues/766)) ([ab1fa4b](https://github.com/yargs/yargs/commit/ab1fa4b)) - - -### BREAKING CHANGES - -* `extends` key in config file is now used for extending other config files -* environment variables now take precedence over config files. -* context now takes precedence over argv and defaults -* the arguments passed to functions are now validated, there's a good chance this will throw exceptions for a few folks who are using the API in an unexpected way. -* by default options, and many of yargs' parsing helpers will now default to being applied globally; such that they are no-longer reset before being passed into commands. -* yargs will no longer aggressively suppress errors, allowing errors that are not generated internally to bubble. - - - - -# [6.6.0](https://github.com/yargs/yargs/compare/v6.5.0...v6.6.0) (2016-12-29) - - -### Bug Fixes - -* [object Object] was accidentally being populated on options object ([#736](https://github.com/yargs/yargs/issues/736)) ([f755e27](https://github.com/yargs/yargs/commit/f755e27)) -* do not use cwd when resolving package.json for yargs parsing config ([#726](https://github.com/yargs/yargs/issues/726)) ([9bdaab7](https://github.com/yargs/yargs/commit/9bdaab7)) - - -### Features - -* implement conflicts() for defining mutually exclusive arguments; thanks [@madcampos](https://github.com/madcampos)! ([#741](https://github.com/yargs/yargs/issues/741)) ([5883779](https://github.com/yargs/yargs/commit/5883779)) -* split demand() into demandCommand()/demandOption() ([#740](https://github.com/yargs/yargs/issues/740)) ([66573c8](https://github.com/yargs/yargs/commit/66573c8)) -* support for positional argument aliases ([#727](https://github.com/yargs/yargs/issues/727)) ([27e1a57](https://github.com/yargs/yargs/commit/27e1a57)) - - - - -# [6.5.0](https://github.com/yargs/yargs/compare/v6.4.0...v6.5.0) (2016-12-01) - - -### Bug Fixes - -* still freeze/unfreeze if parse() is called in isolation ([#717](https://github.com/yargs/yargs/issues/717)) ([30a9492](https://github.com/yargs/yargs/commit/30a9492)) - - -### Features - -* pull in yargs-parser introducing additional settings ([#688](https://github.com/yargs/yargs/issues/688)), and fixing [#716](https://github.com/yargs/yargs/issues/716) ([#722](https://github.com/yargs/yargs/issues/722)) ([702995a](https://github.com/yargs/yargs/commit/702995a)) - - - - -# [6.4.0](https://github.com/yargs/yargs/compare/v6.3.0...v6.4.0) (2016-11-13) - - -### Bug Fixes - -* **locales:** correct some Russian translations ([#691](https://github.com/yargs/yargs/issues/691)) ([a980671](https://github.com/yargs/yargs/commit/a980671)) - - -### Features - -* **locales:** Added Belarusian translation ([#690](https://github.com/yargs/yargs/issues/690)) ([68dac1f](https://github.com/yargs/yargs/commit/68dac1f)) -* **locales:** Create nl.json ([#687](https://github.com/yargs/yargs/issues/687)) ([46ce1bb](https://github.com/yargs/yargs/commit/46ce1bb)) -* update to yargs-parser that addresses [#598](https://github.com/yargs/yargs/issues/598), [#617](https://github.com/yargs/yargs/issues/617) ([#700](https://github.com/yargs/yargs/issues/700)) ([54cb31d](https://github.com/yargs/yargs/commit/54cb31d)) -* yargs is now passed as the third-argument to fail handler ([#613](https://github.com/yargs/yargs/issues/613)) ([21b74f9](https://github.com/yargs/yargs/commit/21b74f9)) - - -### Performance Improvements - -* normalizing package data is an expensive operation ([#705](https://github.com/yargs/yargs/issues/705)) ([49cf533](https://github.com/yargs/yargs/commit/49cf533)) - - - - -# [6.3.0](https://github.com/yargs/yargs/compare/v6.2.0...v6.3.0) (2016-10-19) - - -### Bug Fixes - -* **command:** subcommands via commandDir() now supported for parse(msg, cb) ([#678](https://github.com/yargs/yargs/issues/678)) ([6b85cc6](https://github.com/yargs/yargs/commit/6b85cc6)) - - -### Features - -* **locales:** Add Thai locale file ([#679](https://github.com/yargs/yargs/issues/679)) ([c05e36b](https://github.com/yargs/yargs/commit/c05e36b)) - - - - -# [6.2.0](https://github.com/yargs/yargs/compare/v6.1.1...v6.2.0) (2016-10-16) - - -### Bug Fixes - -* stop applying parser to context object ([#675](https://github.com/yargs/yargs/issues/675)) ([3fe9b8f](https://github.com/yargs/yargs/commit/3fe9b8f)) - - -### Features - -* add new pt_BR translations ([#674](https://github.com/yargs/yargs/issues/674)) ([5615a82](https://github.com/yargs/yargs/commit/5615a82)) -* Italian translations for 'did you mean' and 'aliases' ([#673](https://github.com/yargs/yargs/issues/673)) ([81984e6](https://github.com/yargs/yargs/commit/81984e6)) - - - - -## [6.1.1](https://github.com/yargs/yargs/compare/v6.1.0...v6.1.1) (2016-10-15) - - -### Bug Fixes - -* freeze was not resetting configObjects to initial state; addressed performance issue raised by [@nexdrew](https://github.com/nexdrew). ([#670](https://github.com/yargs/yargs/issues/670)) ([ae4bcd4](https://github.com/yargs/yargs/commit/ae4bcd4)) - - - - -# [6.1.0](https://github.com/yargs/yargs/compare/v6.0.0...v6.1.0) (2016-10-15) - - -### Bug Fixes - -* **locales:** change some translations ([#667](https://github.com/yargs/yargs/issues/667)) ([aa966c5](https://github.com/yargs/yargs/commit/aa966c5)) -* **locales:** conform hi locale to y18n.__n expectations ([#666](https://github.com/yargs/yargs/issues/666)) ([22adb18](https://github.com/yargs/yargs/commit/22adb18)) - - -### Features - -* initial support for command aliases ([#647](https://github.com/yargs/yargs/issues/647)) ([127a040](https://github.com/yargs/yargs/commit/127a040)) -* **command:** add camelcase commands to argv ([#658](https://github.com/yargs/yargs/issues/658)) ([b1cabae](https://github.com/yargs/yargs/commit/b1cabae)) -* **locales:** add Hindi translations ([9290912](https://github.com/yargs/yargs/commit/9290912)) -* **locales:** add Hungarian translations ([be92327](https://github.com/yargs/yargs/commit/be92327)) -* **locales:** Japanese translations for 'did you mean' and 'aliases' ([#651](https://github.com/yargs/yargs/issues/651)) ([5eb78fc](https://github.com/yargs/yargs/commit/5eb78fc)) -* **locales:** Polish translations for 'did you mean' and 'aliases' ([#650](https://github.com/yargs/yargs/issues/650)) ([c951c0e](https://github.com/yargs/yargs/commit/c951c0e)) -* reworking yargs API to make it easier to run in headless environments, e.g., Slack ([#646](https://github.com/yargs/yargs/issues/646)) ([f284c29](https://github.com/yargs/yargs/commit/f284c29)) -* Turkish translations for 'did you mean' and 'aliases' ([#660](https://github.com/yargs/yargs/issues/660)) ([072fd45](https://github.com/yargs/yargs/commit/072fd45)) - - - - -# [6.0.0](https://github.com/yargs/yargs/compare/v5.0.0...v6.0.0) (2016-09-30) - - -### Bug Fixes - -* changed parsing of the command string to ignore extra spaces ([#600](https://github.com/yargs/yargs/issues/600)) ([e8e5a72](https://github.com/yargs/yargs/commit/e8e5a72)) -* drop lodash.assign ([#641](https://github.com/yargs/yargs/issues/641)) ([ad3146f](https://github.com/yargs/yargs/commit/ad3146f)) -* for args that have skipValidation set to `true`, check if the parsed arg is `true` ([#619](https://github.com/yargs/yargs/issues/619)) ([658a34c](https://github.com/yargs/yargs/commit/658a34c)) -* upgrade standard, and fix appveyor config so that it works with newest standard ([#607](https://github.com/yargs/yargs/issues/607)) ([c301f42](https://github.com/yargs/yargs/commit/c301f42)) - - -### Chores - -* upgrade yargs-parser ([#633](https://github.com/yargs/yargs/issues/633)) ([cc1224e](https://github.com/yargs/yargs/commit/cc1224e)) - - -### Features - -* make opts object optional for .option() ([#624](https://github.com/yargs/yargs/issues/624)) ([4f29de6](https://github.com/yargs/yargs/commit/4f29de6)) - - -### Performance Improvements - -* defer windowWidth() to improve perf for non-help usage ([#610](https://github.com/yargs/yargs/issues/610)) ([cbc3636](https://github.com/yargs/yargs/commit/cbc3636)) - - -### BREAKING CHANGES - -* coerce is now applied as a final step after other parsing is complete - - - - -# [5.0.0](https://github.com/yargs/yargs/compare/v4.8.1...v5.0.0) (2016-08-14) - - -### Bug Fixes - -* **default:** Remove undocumented alias of default() ([#469](https://github.com/yargs/yargs/issues/469)) ([b8591b2](https://github.com/yargs/yargs/commit/b8591b2)) -* remove deprecated zh.json ([#578](https://github.com/yargs/yargs/issues/578)) ([317c62c](https://github.com/yargs/yargs/commit/317c62c)) - - -### Features - -* .help() API can now enable implicit help command ([#574](https://github.com/yargs/yargs/issues/574)) ([7645019](https://github.com/yargs/yargs/commit/7645019)) -* **command:** builder function no longer needs to return the yargs instance ([#549](https://github.com/yargs/yargs/issues/549)) ([eaa2873](https://github.com/yargs/yargs/commit/eaa2873)) -* add coerce api ([#586](https://github.com/yargs/yargs/issues/586)) ([1d53ccb](https://github.com/yargs/yargs/commit/1d53ccb)) -* adds recommendCommands() for command suggestions ([#580](https://github.com/yargs/yargs/issues/580)) ([59474dc](https://github.com/yargs/yargs/commit/59474dc)) -* apply .env() globally ([#553](https://github.com/yargs/yargs/issues/553)) ([be65728](https://github.com/yargs/yargs/commit/be65728)) -* apply default builder to command() and apply fail() handlers globally ([#583](https://github.com/yargs/yargs/issues/583)) ([0aaa68b](https://github.com/yargs/yargs/commit/0aaa68b)) -* update yargs-parser to version 3.1.0 ([#581](https://github.com/yargs/yargs/issues/581)) ([882a127](https://github.com/yargs/yargs/commit/882a127)) - - -### Performance Improvements - -* defer requiring most external libs until needed ([#584](https://github.com/yargs/yargs/issues/584)) ([f9b0ed4](https://github.com/yargs/yargs/commit/f9b0ed4)) - - -### BREAKING CHANGES - -* fail is now applied globally. -* we now default to an empty builder function when command is executed with no builder. -* yargs-parser now better handles negative integer values, at the cost of handling numeric option names, e.g., -1 hello -* default: removed undocumented `defaults` alias for `default`. -* introduces a default `help` command which outputs help, as an alternative to a help flag. -* interpret demand() numbers as relative to executing command ([#582](https://github.com/yargs/yargs/issues/582)) ([927810c](https://github.com/yargs/yargs/commit/927810c)) - - - - -## [4.8.1](https://github.com/yargs/yargs/compare/v4.8.0...v4.8.1) (2016-07-16) - - -### Bug Fixes - -* **commandDir:** make dir relative to caller instead of require.main.filename ([#548](https://github.com/yargs/yargs/issues/548)) ([3c2e479](https://github.com/yargs/yargs/commit/3c2e479)) -* add config lookup for .implies() ([#556](https://github.com/yargs/yargs/issues/556)) ([8d7585c](https://github.com/yargs/yargs/commit/8d7585c)) -* cache pkg lookups by path to avoid returning the wrong one ([#552](https://github.com/yargs/yargs/issues/552)) ([fea7e0b](https://github.com/yargs/yargs/commit/fea7e0b)) -* positional arguments were not being handled appropriately by parse() ([#559](https://github.com/yargs/yargs/issues/559)) ([063a866](https://github.com/yargs/yargs/commit/063a866)) -* pull in [@nexdrew](https://github.com/nexdrew)'s fixes to yargs-parser ([#560](https://github.com/yargs/yargs/issues/560)) ([c77c080](https://github.com/yargs/yargs/commit/c77c080)), closes [#560](https://github.com/yargs/yargs/issues/560) - - - - -# [4.8.0](https://github.com/yargs/yargs/compare/v4.7.1...v4.8.0) (2016-07-09) - - -### Bug Fixes - -* drop unused camelcase dependency fixes [#516](https://github.com/yargs/yargs/issues/516) ([#525](https://github.com/yargs/yargs/issues/525)) ([365fb9a](https://github.com/yargs/yargs/commit/365fb9a)), closes [#516](https://github.com/yargs/yargs/issues/516) [#525](https://github.com/yargs/yargs/issues/525) -* fake a tty in tests, so that we can use the new set-blocking ([#512](https://github.com/yargs/yargs/issues/512)) ([a54c742](https://github.com/yargs/yargs/commit/a54c742)) -* ignore invalid package.json during read-pkg-up ([#546](https://github.com/yargs/yargs/issues/546)) ([e058c87](https://github.com/yargs/yargs/commit/e058c87)) -* keep both zh and zh_CN until yargs[@5](https://github.com/5).x ([0f8faa7](https://github.com/yargs/yargs/commit/0f8faa7)) -* lazy-load package.json and cache. get rid of pkg-conf dependency. ([#544](https://github.com/yargs/yargs/issues/544)) ([2609b2e](https://github.com/yargs/yargs/commit/2609b2e)) -* we now respect the order of _ when applying commands ([#537](https://github.com/yargs/yargs/issues/537)) ([ed86b78](https://github.com/yargs/yargs/commit/ed86b78)) - - -### Features - -* add .commandDir(dir) to API to apply all command modules from a relative directory ([#494](https://github.com/yargs/yargs/issues/494)) ([b299dff](https://github.com/yargs/yargs/commit/b299dff)) -* **command:** derive missing command string from module filename ([#527](https://github.com/yargs/yargs/issues/527)) ([20d4b8a](https://github.com/yargs/yargs/commit/20d4b8a)) -* builder is now optional for a command module ([#545](https://github.com/yargs/yargs/issues/545)) ([8d6ad6e](https://github.com/yargs/yargs/commit/8d6ad6e)) - - - - -## [4.7.1](https://github.com/yargs/yargs/compare/v4.7.0...v4.7.1) (2016-05-15) - - -### Bug Fixes - -* switch to using `const` rather than `var` ([#499](https://github.com/yargs/yargs/pull/499)) -* make stdout flush on newer versions of Node.js ([#501](https://github.com/yargs/yargs/issues/501)) ([9f8c6f4](https://github.com/yargs/yargs/commit/9f8c6f4)) - - - - -# [4.7.0](https://github.com/yargs/yargs/compare/v4.6.0...v4.7.0) (2016-05-02) - - -### Bug Fixes - -* **pkgConf:** fix aliases issues in .pkgConf() ([#478](https://github.com/yargs/yargs/issues/478))([b900502](https://github.com/yargs/yargs/commit/b900502)) - - -### Features - -* **completion:** allow to get completions for any string, not just process.argv ([#470](https://github.com/yargs/yargs/issues/470))([74fcfbc](https://github.com/yargs/yargs/commit/74fcfbc)) -* **configuration:** Allow to directly pass a configuration object to .config() ([#480](https://github.com/yargs/yargs/issues/480))([e0a7e05](https://github.com/yargs/yargs/commit/e0a7e05)) -* **validation:** Add .skipValidation() method ([#471](https://github.com/yargs/yargs/issues/471))([d72badb](https://github.com/yargs/yargs/commit/d72badb)) - - - - -# [4.6.0](https://github.com/yargs/yargs/compare/v4.5.0...v4.6.0) (2016-04-11) - - -### Bug Fixes - -* **my brand!:** I agree with [@osher](https://github.com/osher) lightweight isn't a huge selling point of ours any longer, see [#468](https://github.com/yargs/yargs/issues/468) ([c46d7e1](https://github.com/yargs/yargs/commit/c46d7e1)) - -### Features - -* switch to standard-version for release management ([f70f801](https://github.com/yargs/yargs/commit/f70f801)) -* upgrade to version of yargs-parser that introduces some slick new features, great work [@elas7](https://github.com/elas7). update cliui, replace win-spawn, replace badge. ([#475](https://github.com/yargs/yargs/issues/475)) ([f915dd4](https://github.com/yargs/yargs/commit/f915dd4)) - - - - -# [4.5.0](https://github.com/yargs/yargs/compare/v4.4.0...v4.5.0) (2016-04-05) - - -### Bug Fixes - -* **windows:** handle $0 better on Windows platforms ([eb6e03f](https://github.com/yargs/yargs/commit/eb6e03f)) - -### Features - -* **commands:** implemented variadic positional arguments ([51d926e](https://github.com/yargs/yargs/commit/51d926e)) -* **completion:** completion now better handles aliases, and avoids duplicating keys. ([86416c8](https://github.com/yargs/yargs/commit/86416c8)) -* **config:** If invoking .config() without parameters, set a default option ([0413dd1](https://github.com/yargs/yargs/commit/0413dd1)) -* **conventional-changelog:** switching to using conventional-changelog for generating the changelog ([a2b5a2a](https://github.com/yargs/yargs/commit/a2b5a2a)) - - - -### v4.4.0 (2016/04/03 21:10 +07:00) - -- [#454](https://github.com/yargs/yargs/pull/454) fix demand() when second argument is an array (@elas7) -- [#452](https://github.com/yargs/yargs/pull/452) fix code example for `.help()` docs (@maxrimue) -- [#450](https://github.com/yargs/yargs/pull/450) fix for bash completion trailing space edge-case (@elas7) -- [#448](https://github.com/yargs/yargs/pull/448) allow a method to be passed to `showHelp`, rather than a log-level (@osher) -- [#446](https://github.com/yargs/yargs/pull/446) update yargs-parser, y18n, nyc, cliui, pkg-conf (@bcoe) -- [#436](https://github.com/yargs/yargs/pull/436) the rebase method is only used by tests, do not export it in two places (@elas7) -- [#428](https://github.com/yargs/yargs/pull/428) initial support for subcommands (@nexdrew) - -### v4.3.2 (2016/3/20 15:07 +07:00) - -- [#445](https://github.com/yargs/yargs/pull/445) strict mode was failing if no commands were registered (@nexdrew) -- [#443](https://github.com/yargs/yargs/pull/443) adds Italian translation \o/ (@madrisan) -- [#441](https://github.com/yargs/yargs/pull/441) remove duplicate keys from array options configuration (@elas7) -- [#437](https://github.com/yargs/yargs/pull/437) standardize tests for .command() (@lrlna) - -### v4.3.0 (2016/3/12 14:19 +07:00) - -- [#432](https://github.com/yargs/yargs/pull/432) non-singleton version of yargs (@bcoe) -- [#422, #425, #420] translations for number (@zkat, @rilut, @maxrimue, @watilde) -- [#414](https://github.com/yargs/yargs/pull/414) all command options can be defined in module now (@nexdrew) - -### v4.2.0 (2016/2/22 11:02 +07:00) - -- [#395](https://github.com/yargs/yargs/pull/395) do not reset groups if they contain - global keys (@novemberborn) -- [#393](https://github.com/yargs/yargs/pull/393) use sane default for usage strings (@nexdrew) -- [#392](https://github.com/yargs/yargs/pull/392) resetting wrap() was causing layout issues - with commands (@nexdrew) -- [#391](https://github.com/yargs/yargs/pull/391) commands were being added multiple times (@nexdrew) - -### v4.0.0 (2016/2/14 1:27 +07:00) - -- [#384](https://github.com/bcoe/yargs/pull/384) add new number type to yargs (@lrlna, @maxrimue) -- [#382](https://github.com/bcoe/yargs/pull/382) pass error as extra parameter to fail (@gajus) -- [#378](https://github.com/bcoe/yargs/pull/378) introduces the pkgConf feature, which tells - yargs to load default argument values from a key on a project's package.json (@bcoe) -- [#376](https://github.com/bcoe/yargs/pull/376) **breaking change**, make help() method signature - more consistent with other commands (@maxrimue) -- [#368](https://github.com/bcoe/yargs/pull/368) **breaking change**, overhaul to command handling API: - introducing named positional arguments, commands as modules, introduces the concept of global options (options that don't reset). (@nexdrew, @bcoe). -- [#364](https://github.com/bcoe/yargs/pull/364) add the slick new yargs website to the package.json (@iarna). -- [#357](https://github.com/bcoe/yargs/pull/357) .strict() now requires that a valid command is provided (@lrlna) -- [#356](https://github.com/bcoe/yargs/pull/356) pull the parsing bits of yargs into the separate module yargs-parser. Various parsing options can now be turned on and off using configuration (@bcoe). -- [#330](https://github.com/bcoe/yargs/pull/330) **breaking change**, fix inconsistencies with `.version()` API. (@maxrimue). - -### v3.32.0 (2016/1/14 10:13 +07:00) - -- [#344](https://github.com/bcoe/yargs/pull/344) yargs now has a code of conduct and contributor guidelines (@bcoe) -- [#341](https://github.com/bcoe/yargs/issues/341) Fix edge-case with camel-case arguments (@davibe) -- [#331](https://github.com/bcoe/yargs/pull/331) Handle parsing a raw argument string (@kellyselden) -- [#325](https://github.com/bcoe/yargs/pull/325) Tweaks to make tests pass again on Windows (@isaacs) -- [#321](https://github.com/bcoe/yargs/pull/321) Custom config parsing function (@bcoe) - -### v3.31.0 (2015/12/03 10:15 +07:00) - -- [#239](https://github.com/bcoe/yargs/pull/239) Pass argv to commands (@bcoe) -- [#308](https://github.com/bcoe/yargs/pull/308) Yargs now handles environment variables (@nexdrew) -- [#302](https://github.com/bcoe/yargs/pull/302) Add Indonesian translation (@rilut) -- [#300](https://github.com/bcoe/yargs/pull/300) Add Turkish translation (@feyzo) -- [#298](https://github.com/bcoe/yargs/pull/298) Add Norwegian Bokmål translation (@sindresorhus) -- [#297](https://github.com/bcoe/yargs/pull/297) Fix for layout of cjk characters (@disjukr) -- [#296](https://github.com/bcoe/yargs/pull/296) Add Korean translation (@disjukr) - -### v3.30.0 (2015/11/13 16:29 +07:00) - -- [#293](https://github.com/bcoe/yargs/pull/293) Polish language support (@kamilogorek) -- [#291](https://github.com/bcoe/yargs/pull/291) fix edge-cases with `.alias()` (@bcoe) -- [#289](https://github.com/bcoe/yargs/pull/289) group options in custom groups (@bcoe) - -### v3.29.0 (2015/10/16 21:51 +07:00) - -- [#282](https://github.com/bcoe/yargs/pull/282) completions now accept promises (@LinusU) -- [#281](https://github.com/bcoe/yargs/pull/281) fix parsing issues with dot notation (@bcoe) - -### v3.28.0 (2015/10/16 1:55 +07:00) - -- [#277](https://github.com/bcoe/yargs/pull/277) adds support for ansi escape codes (@bcoe) - -### v3.27.0 (2015/10/08 1:55 +00:00) - -- [#271](https://github.com/bcoe/yargs/pull/273) skips validation for help or version flags with exitProcess(false) (@tepez) -- [#273](https://github.com/bcoe/yargs/pull/273) implements single output for errors with exitProcess(false) (@nexdrew) -- [#269](https://github.com/bcoe/yargs/pull/269) verifies single output for errors with exitProcess(false) (@tepez) -- [#268](https://github.com/bcoe/yargs/pull/268) adds Chinese translation (@qiu8310) -- [#266](https://github.com/bcoe/yargs/pull/266) adds case for -- after -- in parser test (@geophree) - -### v3.26.0 (2015/09/25 2:14 +00:00) - -- [#263](https://github.com/bcoe/yargs/pull/263) document count() and option() object keys (@nexdrew) -- [#259](https://github.com/bcoe/yargs/pull/259) remove util in readme (@38elements) -- [#258](https://github.com/bcoe/yargs/pull/258) node v4 builds, update deps (@nexdrew) -- [#257](https://github.com/bcoe/yargs/pull/257) fix spelling errors (@dkoleary88) - -### v3.25.0 (2015/09/13 7:38 -07:00) - -- [#254](https://github.com/bcoe/yargs/pull/254) adds Japanese translation (@oti) -- [#253](https://github.com/bcoe/yargs/pull/253) fixes for tests on Windows (@bcoe) - -### v3.24.0 (2015/09/04 12:02 +00:00) - -- [#248](https://github.com/bcoe/yargs/pull/248) reinstate os-locale, no spawning (@nexdrew) -- [#249](https://github.com/bcoe/yargs/pull/249) use travis container-based infrastructure (@nexdrew) -- [#247](https://github.com/bcoe/yargs/pull/247) upgrade standard (@nexdrew) - -### v3.23.0 (2015/08/30 23:00 +00:00) - -- [#246](https://github.com/bcoe/yargs/pull/246) detect locale based only on environment variables (@bcoe) -- [#244](https://github.com/bcoe/yargs/pull/244) adds Windows CI testing (@bcoe) -- [#245](https://github.com/bcoe/yargs/pull/245) adds OSX CI testing (@bcoe, @nexdrew) - -### v3.22.0 (2015/08/28 22:26 +00:00) -- [#242](https://github.com/bcoe/yargs/pull/242) adds detectLocale config option (@bcoe) - -### v3.21.1 (2015/08/28 20:58 +00:00) -- [#240](https://github.com/bcoe/yargs/pull/240) hot-fix for Atom on Windows (@bcoe) - -### v3.21.0 (2015/08/21 21:20 +00:00) -- [#238](https://github.com/bcoe/yargs/pull/238) upgrade camelcase, window-size, chai, mocha (@nexdrew) -- [#237](https://github.com/bcoe/yargs/pull/237) adds defaultDescription to option() (@nexdrew) - -### v3.20.0 (2015/08/20 01:29 +00:00) -- [#231](https://github.com/bcoe/yargs/pull/231) Merge pull request #231 from bcoe/detect-locale (@sindresorhus) -- [#235](https://github.com/bcoe/yargs/pull/235) adds german translation to yargs (@maxrimue) - -### v3.19.0 (2015/08/14 05:12 +00:00) -- [#224](https://github.com/bcoe/yargs/pull/224) added Portuguese translation (@codemonkey3045) - -### v3.18.1 (2015/08/12 05:53 +00:00) - -- [#228](https://github.com/bcoe/yargs/pull/228) notes about embedding yargs in Electron (@etiktin) -- [#223](https://github.com/bcoe/yargs/pull/223) make booleans work in config files (@sgentle) - -### v3.18.0 (2015/08/06 20:05 +00:00) -- [#222](https://github.com/bcoe/yargs/pull/222) updates fr locale (@nexdrew) -- [#221](https://github.com/bcoe/yargs/pull/221) adds missing locale strings (@nexdrew) -- [#220](https://github.com/bcoe/yargs/pull/220) adds es locale (@zkat) - -### v3.17.1 (2015/08/02 19:35 +00:00) -- [#218](https://github.com/bcoe/yargs/pull/218) upgrades nyc (@bcoe) - -### v3.17.0 (2015/08/02 18:39 +00:00) -- [#217](https://github.com/bcoe/yargs/pull/217) sort methods in README.md (@nexdrew) -- [#215](https://github.com/bcoe/yargs/pull/215) adds fr locale (@LoicMahieu) - -### v3.16.0 (2015/07/30 04:35 +00:00) -- [#210](https://github.com/bcoe/yargs/pull/210) adds i18n support to yargs (@bcoe) -- [#209](https://github.com/bcoe/yargs/pull/209) adds choices type to yargs (@nexdrew) -- [#207](https://github.com/bcoe/yargs/pull/207) pretty new shields from shields.io (@SimenB) -- [#208](https://github.com/bcoe/yargs/pull/208) improvements to README.md (@nexdrew) -- [#205](https://github.com/bcoe/yargs/pull/205) faster build times on Travis (@ChristianMurphy) - -### v3.15.0 (2015/07/06 06:01 +00:00) -- [#197](https://github.com/bcoe/yargs/pull/197) tweaks to how errors bubble up from parser.js (@bcoe) -- [#193](https://github.com/bcoe/yargs/pull/193) upgraded nyc, reporting now happens by default (@bcoe) - -### v3.14.0 (2015/06/28 02:12 +00:00) - -- [#192](https://github.com/bcoe/yargs/pull/192) standard style nits (@bcoe) -- [#190](https://github.com/bcoe/yargs/pull/190) allow for hidden commands, e.g., - .completion('completion', false) (@tschaub) - -### v3.13.0 (2015/06/24 04:12 +00:00) - -- [#187](https://github.com/bcoe/yargs/pull/187) completion now behaves differently - if it is being run in the context of a command (@tschaub) -- [#186](https://github.com/bcoe/yargs/pull/186) if no matches are found for a completion - default to filename completion (@tschaub) - -### v3.12.0 (2015/06/19 03:23 +00:00) -- [#183](https://github.com/bcoe/yargs/pull/183) don't complete commands if they've already been completed (@tschaub) -- [#181](https://github.com/bcoe/yargs/pull/181) various fixes for completion. (@bcoe, @tschaub) -- [#182](https://github.com/bcoe/yargs/pull/182) you can now set a maximum # of of required arguments (@bcoe) - -### v3.11.0 (2015/06/15 05:15 +00:00) - -- [#173](https://github.com/bcoe/yargs/pull/173) update standard, window-size, chai (@bcoe) -- [#171](https://github.com/bcoe/yargs/pull/171) a description can now be set - when providing a config option. (@5c077yP) - -### v3.10.0 (2015/05/29 04:25 +00:00) - -- [#165](https://github.com/bcoe/yargs/pull/165) expose yargs.terminalWidth() thanks @ensonic (@bcoe) -- [#164](https://github.com/bcoe/yargs/pull/164) better array handling thanks @getify (@bcoe) - -### v3.9.1 (2015/05/20 05:14 +00:00) -- [b6662b6](https://github.com/bcoe/yargs/commit/b6662b6774cfeab4876f41ec5e2f67b7698f4e2f) clarify .config() docs (@linclark) -- [0291360](https://github.com/bcoe/yargs/commit/02913606285ce31ce81d7f12c48d8a3029776ec7) fixed tests, switched to nyc for coverage, fixed security issue, added Lin as collaborator (@bcoe) - -### v3.9.0 (2015/05/10 18:32 +00:00) -- [#157](https://github.com/bcoe/yargs/pull/157) Merge pull request #157 from bcoe/command-yargs. allows handling of command specific arguments. Thanks for the suggestion @ohjames (@bcoe) -- [#158](https://github.com/bcoe/yargs/pull/158) Merge pull request #158 from kemitchell/spdx-license. Update license format (@kemitchell) - -### v3.8.0 (2015/04/24 23:10 +00:00) -- [#154](https://github.com/bcoe/yargs/pull/154) showHelp's method signature was misleading fixes #153 (@bcoe) -- [#151](https://github.com/bcoe/yargs/pull/151) refactor yargs' table layout logic to use new helper library (@bcoe) -- [#150](https://github.com/bcoe/yargs/pull/150) Fix README example in argument requirements (@annonymouse) - -### v3.7.2 (2015/04/13 11:52 -07:00) - -* [679fbbf](https://github.com/bcoe/yargs/commit/679fbbf55904030ccee8a2635e8e5f46551ab2f0) updated yargs to use the [standard](https://github.com/feross/standard) style guide (agokjr) -* [22382ee](https://github.com/bcoe/yargs/commit/22382ee9f5b495bc2586c1758cd1091cec3647f9 various bug fixes for $0 (@nylen) - -### v3.7.1 (2015/04/10 11:06 -07:00) - -* [89e1992](https://github.com/bcoe/yargs/commit/89e1992a004ba73609b5f9ee6890c4060857aba4) detect iojs bin along with node bin. (@bcoe) -* [755509e](https://github.com/bcoe/yargs/commit/755509ea90041e5f7833bba3b8c5deffe56f0aab) improvements to example documentation in README.md (@rstacruz) -* [0d2dfc8](https://github.com/bcoe/yargs/commit/0d2dfc822a43418242908ad97ddd5291a1b35dc6) showHelp() no longer requires that .argv has been called (@bcoe) - -### v3.7.0 (2015/04/04 02:29 -07:00) - -* [56cbe2d](https://github.com/bcoe/yargs/commit/56cbe2ddd33dc176dcbf97ba40559864a9f114e4) make .requiresArg() work with type hints. (@bcoe). -* [2f5d562](https://github.com/bcoe/yargs/commit/2f5d5624f736741deeedf6a664d57bc4d857bdd0) serialize arrays and objects in usage strings. (@bcoe). -* [5126304](https://github.com/bcoe/yargs/commit/5126304dd18351fc28f10530616fdd9361e0af98) be more lenient about alias/primary key ordering in chaining API. (@bcoe) - -### v3.6.0 (2015/03/21 01:00 +00:00) -- [4e24e22](https://github.com/bcoe/yargs/commit/4e24e22e6a195e55ab943ede704a0231ac33b99c) support for .js configuration files. (@pirxpilot) - -### v3.5.4 (2015/03/12 05:56 +00:00) -- [c16cc08](https://github.com/bcoe/yargs/commit/c16cc085501155cf7fd853ccdf8584b05ab92b78) message for non-option arguments is now optional, thanks to (@raine) - -### v3.5.3 (2015/03/09 06:14 +00:00) -- [870b428](https://github.com/bcoe/yargs/commit/870b428cf515d560926ca392555b7ad57dba9e3d) completion script was missing in package.json (@bcoe) - -### v3.5.2 (2015/03/09 06:11 +00:00) -- [58a4b24](https://github.com/bcoe/yargs/commit/58a4b2473ebbb326713d522be53e32d3aabb08d2) parse was being called multiple times, resulting in strange behavior (@bcoe) - -### v3.5.1 (2015/03/09 04:55 +00:00) -- [4e588e0](https://github.com/bcoe/yargs/commit/4e588e055afbeb9336533095f051496e3977f515) accidentally left testing logic in (@bcoe) - -### v3.5.0 (2015/03/09 04:49 +00:00) -- [718bacd](https://github.com/bcoe/yargs/commit/718bacd81b9b44f786af76b2afe491fe06274f19) added support for bash completions see #4 (@bcoe) -- [a192882](https://github.com/bcoe/yargs/commit/a19288270fc431396c42af01125eeb4443664528) downgrade to mocha 2.1.0 until https://github.com/mochajs/mocha/issues/1585 can be sorted out (@bcoe) - -### v3.4.7 (2015/03/09 04:09 +00:00) -- [9845e5c](https://github.com/bcoe/yargs/commit/9845e5c1a9c684ba0be3f0bfb40e7b62ab49d9c8) the Argv singleton was not being updated when manually parsing arguments, fixes #114 (@bcoe) - -### v3.4.6 (2015/03/09 04:01 +00:00) -- [45b4c80](https://github.com/bcoe/yargs/commit/45b4c80b890d02770b0a94f326695a8a566e8fe9) set placeholders for all keys fixes #115 (@bcoe) - -### v3.4.5 (2015/03/01 20:31 +00:00) -- [a758e0b](https://github.com/bcoe/yargs/commit/a758e0b2556184f067cf3d9c4ef886d39817ebd2) fix for count consuming too many arguments (@bcoe) - -### v3.4.4 (2015/02/28 04:52 +00:00) -- [0476af7](https://github.com/bcoe/yargs/commit/0476af757966acf980d998b45108221d4888cfcb) added nargs feature, allowing you to specify the number of arguments after an option (@bcoe) -- [092477d](https://github.com/bcoe/yargs/commit/092477d7ab3efbf0ba11cede57f7d8cfc70b024f) updated README with full example of v3.0 API (@bcoe) - -### v3.3.3 (2015/02/28 04:23 +00:00) -- [0c4b769](https://github.com/bcoe/yargs/commit/0c4b769516cd8d93a7c4e5e675628ae0049aa9a8) remove string dependency, which conflicted with other libraries see #106 (@bcoe) - -### v3.3.2 (2015/02/28 04:11 +00:00) -- [2a98906](https://github.com/bcoe/yargs/commit/2a9890675821c0e7a12f146ce008b0562cb8ec9a) add $0 to epilog (@schnittstabil) - -### v3.3.1 (2015/02/24 03:28 +00:00) -- [ad485ce](https://github.com/bcoe/yargs/commit/ad485ce748ebdfce25b88ef9d6e83d97a2f68987) fix for applying defaults to camel-case args (@bcoe) - -### v3.3.0 (2015/02/24 00:49 +00:00) -- [8bfe36d](https://github.com/bcoe/yargs/commit/8bfe36d7fb0f93a799ea3f4c756a7467c320f8c0) fix and document restart() command, as a tool for building nested CLIs (@bcoe) - -### v3.2.1 (2015/02/22 05:45 +00:00) -- [49a6d18](https://github.com/bcoe/yargs/commit/49a6d1822a4ef9b1ea6f90cc366be60912628885) you can now provide a function that generates a default value (@bcoe) - -### v3.2.0 (2015/02/22 05:24 +00:00) -- [7a55886](https://github.com/bcoe/yargs/commit/7a55886c9343cf71a20744ca5cdd56d2ea7412d5) improvements to yargs two-column text layout (@bcoe) -- [b6ab513](https://github.com/bcoe/yargs/commit/b6ab5136a4c3fa6aa496f6b6360382e403183989) Tweak NPM version badge (@nylen) - -### v3.1.0 (2015/02/19 19:37 +00:00) -- [9bd2379](https://github.com/bcoe/yargs/commit/9bd237921cf1b61fd9f32c0e6d23f572fc225861) version now accepts a function, making it easy to load version #s from a package.json (@bcoe) - -### v3.0.4 (2015/02/14 01:40 +00:00) -- [0b7c19b](https://github.com/bcoe/yargs/commit/0b7c19beaecb747267ca4cc10e5cb2a8550bc4b7) various fixes for dot-notation handling (@bcoe) - -### v3.0.3 (2015/02/14 00:59 +00:00) -- [c3f35e9](https://github.com/bcoe/yargs/commit/c3f35e99bd5a0d278073fcadd95e2d778616cc17) make sure dot-notation is applied to aliases (@bcoe) - -### 3.0.2 (2015/02/13 16:50 +00:00) -- [74c8967](https://github.com/bcoe/yargs/commit/74c8967c340c204a0a7edf8a702b6f46c2705435) document epilog shorthand of epilogue. (@bcoe) -- [670110f](https://github.com/bcoe/yargs/commit/670110fc01bedc4831b6fec6afac54517d5a71bc) any non-truthy value now causes check to fail see #76 (@bcoe) -- [0d8f791](https://github.com/bcoe/yargs/commit/0d8f791a33c11ced4cd431ea8d3d3a337d456b56) finished implementing my wish-list of fetures for yargs 3.0. see #88 (@bcoe) -- [5768447](https://github.com/bcoe/yargs/commit/5768447447c4c8e8304f178846206ce86540f063) fix coverage. (@bcoe) -- [82e793f](https://github.com/bcoe/yargs/commit/82e793f3f61c41259eaacb67f0796aea2cf2aaa0) detect console width and perform word-wrapping. (@bcoe) -- [67476b3](https://github.com/bcoe/yargs/commit/67476b37eea07fee55f23f35b9e0c7d76682b86d) refactor two-column table layout so that we can use it for examples and usage (@bcoe) -- [4724cdf](https://github.com/bcoe/yargs/commit/4724cdfcc8e37ae1ca3dcce9d762f476e9ef4bb4) major refactor of index.js, in prep for 3.x release. (@bcoe) - -### v2.3.0 (2015/02/08 20:41 +00:00) -- [d824620](https://github.com/bcoe/yargs/commit/d824620493df4e63664af1fe320764dd1a9244e6) allow for undefined boolean defaults (@ashi009) - -### v2.2.0 (2015/02/08 20:07 +00:00) -- [d6edd98](https://github.com/bcoe/yargs/commit/d6edd9848826e7389ed1393858c45d03961365fd) in-prep for further refactoring, and a 3.x release I've shuffled some things around and gotten test-coverage to 100%. (@bcoe) - -### v2.1.2 (2015/02/08 06:05 +00:00) -- [d640745](https://github.com/bcoe/yargs/commit/d640745a7b9f8d476e0223879d056d18d9c265c4) switch to path.relative (@bcoe) -- [3bfd41f](https://github.com/bcoe/yargs/commit/3bfd41ff262a041f29d828b88936a79c63cad594) remove mocha.opts. (@bcoe) -- [47a2f35](https://github.com/bcoe/yargs/commit/47a2f357091db70903a402d6765501c1d63f15fe) document using .string('_') for string ids. see #56 (@bcoe) -- [#57](https://github.com/bcoe/yargs/pull/57) Merge pull request #57 from eush77/option-readme (@eush77) - -### v2.1.1 (2015/02/06 08:08 +00:00) -- [01c6c61](https://github.com/bcoe/yargs/commit/01c6c61d67b4ebf88f41f0b32a345ec67f0ac17d) fix for #71, 'newAliases' of undefined (@bcoe) - -### v2.1.0 (2015/02/06 07:59 +00:00) -- [6a1a3fa](https://github.com/bcoe/yargs/commit/6a1a3fa731958e26ccd56885f183dd8985cc828f) try to guess argument types, and apply sensible defaults see #73 (@bcoe) - -### v2.0.1 (2015/02/06 07:54 +00:00) -- [96a06b2](https://github.com/bcoe/yargs/commit/96a06b2650ff1d085a52b7328d8bba614c20cc12) Fix for strange behavior with --sort option, see #51 (@bcoe) - -### v2.0.0 (2015/02/06 07:45 +00:00) -- [0250517](https://github.com/bcoe/yargs/commit/0250517c9643e53f431b824e8ccfa54937414011) - [108fb84](https://github.com/bcoe/yargs/commit/108fb8409a3a63dcaf99d917fe4dfcfaa1de236d) fixed bug with boolean parsing, when bools separated by = see #66 (@bcoe) -- [a465a59](https://github.com/bcoe/yargs/commit/a465a5915f912715738de890982e4f8395958b10) Add `files` field to the package.json (@shinnn) -- [31043de](https://github.com/bcoe/yargs/commit/31043de7a38a17c4c97711f1099f5fb164334db3) fix for yargs.argv having the same keys added multiple times see #63 (@bcoe) -- [2d68c5b](https://github.com/bcoe/yargs/commit/2d68c5b91c976431001c4863ce47c9297850f1ad) Disable process.exit calls using .exitProcess(false) (@cianclarke) -- [45da9ec](https://github.com/bcoe/yargs/commit/45da9ec4c55a7bd394721bc6a1db0dabad7bc52a) Mention .option in README (@eush77) - -### v1.3.2 (2014/10/06 21:56 +00:00) -- [b8d3472](https://github.com/bcoe/yargs/commit/b8d34725482e5821a3cc809c0df71378f282f526) 1.3.2 (@chevex) - -### list (2014/08/30 18:41 +00:00) -- [fbc777f](https://github.com/bcoe/yargs/commit/fbc777f416eeefd37c84e44d27d7dfc7c1925721) Now that yargs is the successor to optimist, I'm changing the README language to be more universal. Pirate speak isn't very accessible to non-native speakers. (@chevex) -- [a54d068](https://github.com/bcoe/yargs/commit/a54d0682ae2efc2394d407ab171cc8a8bbd135ea) version output will not print extra newline (@boneskull) -- [1cef5d6](https://github.com/bcoe/yargs/commit/1cef5d62a9d6d61a3948a49574892e01932cc6ae) Added contributors section to package.json (@chrisn) -- [cc295c0](https://github.com/bcoe/yargs/commit/cc295c0a80a2de267e0155b60d315fc4b6f7c709) Added 'require' and 'required' as synonyms for 'demand' (@chrisn) -- [d0bf951](https://github.com/bcoe/yargs/commit/d0bf951d949066b6280101ed606593d079ee15c8) Updating minimist. (@chevex) -- [c15f8e7](https://github.com/bcoe/yargs/commit/c15f8e7f245b261e542cf205ce4f4313630cbdb4) Fix #31 (bad interaction between camelCase options and strict mode) (@nylen) -- [d991b9b](https://github.com/bcoe/yargs/commit/d991b9be687a68812dee1e3b185ba64b7778b82d) Added .help() and .version() methods (@chrisn) -- [e8c8aa4](https://github.com/bcoe/yargs/commit/e8c8aa46268379357cb11e9fc34b8c403037724b) Added .showHelpOnFail() method (@chrisn) -- [e855af4](https://github.com/bcoe/yargs/commit/e855af4a933ea966b5bbdd3c4c6397a4bac1a053) Allow boolean flag with .demand() (@chrisn) -- [14dbec2](https://github.com/bcoe/yargs/commit/14dbec24fb7380683198e2b20c4deb8423e64bea) Fixes issue #22. Arguments are no longer printed to the console when using .config. (@chevex) -- [bef74fc](https://github.com/bcoe/yargs/commit/bef74fcddc1544598a804f80d0a3728459f196bf) Informing users that Yargs is the official optimist successor. (@chevex) -- [#24](https://github.com/bcoe/yargs/pull/24) Merge pull request #24 from chrisn/strict (@chrisn) -- [889a2b2](https://github.com/bcoe/yargs/commit/889a2b28eb9768801b05163360a470d0fd6c8b79) Added requiresArg option, for options that require values (@chrisn) -- [eb16369](https://github.com/bcoe/yargs/commit/eb163692262be1fe80b992fd8803d5923c5a9b18) Added .strict() method, to report error if unknown arguments are given (@chrisn) -- [0471c3f](https://github.com/bcoe/yargs/commit/0471c3fd999e1ad4e6cded88b8aa02013b66d14f) Changed optimist to yargs in usage-options.js example (@chrisn) -- [5c88f74](https://github.com/bcoe/yargs/commit/5c88f74e3cf031b17c54b4b6606c83e485ff520e) Change optimist to yargs in examples (@chrisn) -- [66f12c8](https://github.com/bcoe/yargs/commit/66f12c82ba3c943e4de8ca862980e835da8ecb3a) Fix a couple of bad interactions between aliases and defaults (@nylen) -- [8fa1d80](https://github.com/bcoe/yargs/commit/8fa1d80f14b03eb1f2898863a61f1d1615bceb50) Document second argument of usage(message, opts) (@Gobie) -- [56e6528](https://github.com/bcoe/yargs/commit/56e6528cf674ff70d63083fb044ff240f608448e) For "--some-option", also set argv.someOption (@nylen) -- [ed5f6d3](https://github.com/bcoe/yargs/commit/ed5f6d33f57ad1086b11c91b51100f7c6c7fa8ee) Finished porting unit tests to Mocha. (@chevex) - -### v1.0.15 (2014/02/05 23:18 +00:00) -- [e2b1fc0](https://github.com/bcoe/yargs/commit/e2b1fc0c4a59cf532ae9b01b275e1ef57eeb64d2) 1.0.15 update to badges (@chevex) - -### v1.0.14 (2014/02/05 23:17 +00:00) -- [f33bbb0](https://github.com/bcoe/yargs/commit/f33bbb0f00fe18960f849cc8e15a7428a4cd59b8) Revert "Fixed issue which caused .demand function not to work correctly." (@chevex) - -### v1.0.13 (2014/02/05 22:13 +00:00) -- [6509e5e](https://github.com/bcoe/yargs/commit/6509e5e7dee6ef1a1f60eea104be0faa1a045075) Fixed issue which caused .demand function not to work correctly. (@chevex) - -### v1.0.12 (2013/12/13 00:09 +00:00) -- [05eb267](https://github.com/bcoe/yargs/commit/05eb26741c9ce446b33ff006e5d33221f53eaceb) 1.0.12 (@chevex) - -### v1.0.11 (2013/12/13 00:07 +00:00) -- [c1bde46](https://github.com/bcoe/yargs/commit/c1bde46e37318a68b87d17a50c130c861d6ce4a9) 1.0.11 (@chevex) - -### v1.0.10 (2013/12/12 23:57 +00:00) -- [dfebf81](https://github.com/bcoe/yargs/commit/dfebf8164c25c650701528ee581ca483a99dc21c) Fixed formatting in README (@chevex) - -### v1.0.9 (2013/12/12 23:47 +00:00) -- [0b4e34a](https://github.com/bcoe/yargs/commit/0b4e34af5e6d84a9dbb3bb6d02cd87588031c182) Update README.md (@chevex) - -### v1.0.8 (2013/12/06 16:36 +00:00) -- [#1](https://github.com/bcoe/yargs/pull/1) fix error caused by check() see #1 (@martinheidegger) - -### v1.0.7 (2013/11/24 18:01 +00:00) -- [a247d88](https://github.com/bcoe/yargs/commit/a247d88d6e46644cbb7303c18b1bb678fc132d72) Modified Pirate Joe image. (@chevex) - -### v1.0.6 (2013/11/23 19:21 +00:00) -- [d7f69e1](https://github.com/bcoe/yargs/commit/d7f69e1d34bc929736a8bdccdc724583e21b7eab) Updated Pirate Joe image. (@chevex) - -### v1.0.5 (2013/11/23 19:09 +00:00) -- [ece809c](https://github.com/bcoe/yargs/commit/ece809cf317cc659175e1d66d87f3ca68c2760be) Updated readme notice again. (@chevex) - -### v1.0.4 (2013/11/23 19:05 +00:00) -- [9e81e81](https://github.com/bcoe/yargs/commit/9e81e81654028f83ba86ffc3ac772a0476084e5e) Updated README with a notice about yargs being a fork of optimist and what that implies. (@chevex) - -### v1.0.3 (2013/11/23 17:43 +00:00) -- [65e7a78](https://github.com/bcoe/yargs/commit/65e7a782c86764944d63d084416aba9ee6019c5f) Changed some small wording in README.md. (@chevex) -- [459e20e](https://github.com/bcoe/yargs/commit/459e20e539b366b85128dd281ccd42221e96c7da) Fix a bug in the options function, when string and boolean options weren't applied to aliases. (@shockone) - -### v1.0.2 (2013/11/23 09:46 +00:00) -- [3d80ebe](https://github.com/bcoe/yargs/commit/3d80ebed866d3799224b6f7d596247186a3898a9) 1.0.2 (@chevex) - -### v1.0.1 (2013/11/23 09:39 +00:00) -- [f80ff36](https://github.com/bcoe/yargs/commit/f80ff3642d580d4b68bf9f5a94277481bd027142) Updated image. (@chevex) - -### v1.0.0 (2013/11/23 09:33 +00:00) -- [54e31d5](https://github.com/bcoe/yargs/commit/54e31d505f820b80af13644e460894b320bf25a3) Rebranded from optimist to yargs in the spirit of the fork :D (@chevex) -- [4ebb6c5](https://github.com/bcoe/yargs/commit/4ebb6c59f44787db7c24c5b8fe2680f01a23f498) Added documentation for demandCount(). (@chevex) -- [4561ce6](https://github.com/bcoe/yargs/commit/4561ce66dcffa95f49e8b4449b25b94cd68acb25) Simplified the error messages returned by .check(). (@chevex) -- [661c678](https://github.com/bcoe/yargs/commit/661c67886f479b16254a830b7e1db3be29e6b7a6) Fixed an issue with demand not accepting a zero value. (@chevex) -- [731dd3c](https://github.com/bcoe/yargs/commit/731dd3c37624790490bd6df4d5f1da8f4348279e) Add .fail(fn) so death isn't the only option. Should fix issue #39. (@chevex) -- [fa15417](https://github.com/bcoe/yargs/commit/fa15417ff9e70dace0d726627a5818654824c1d8) Added a few missing 'return self' (@chevex) -- [e655e4d](https://github.com/bcoe/yargs/commit/e655e4d99d1ae1d3695ef755d51c2de08d669761) Fix showing help in certain JS environments. (@chevex) -- [a746a31](https://github.com/bcoe/yargs/commit/a746a31cd47c87327028e6ea33762d6187ec5c87) Better string representation of default values. (@chevex) -- [6134619](https://github.com/bcoe/yargs/commit/6134619a7e90b911d5443230b644c5d447c1a68c) Implies: conditional demands (@chevex) -- [046b93b](https://github.com/bcoe/yargs/commit/046b93b5d40a27367af4cb29726e4d781d934639) Added support for JSON config files. (@chevex) -- [a677ec0](https://github.com/bcoe/yargs/commit/a677ec0a0ecccd99c75e571d03323f950688da03) Add .example(cmd, desc) feature. (@chevex) -- [1bd4375](https://github.com/bcoe/yargs/commit/1bd4375e11327ba1687d4bb6e5e9f3c30c1be2af) Added 'defaults' as alias to 'default' so as to avoid usage of a reserved keyword. (@chevex) -- [6b753c1](https://github.com/bcoe/yargs/commit/6b753c16ca09e723060e70b773b430323b29c45c) add .normalize(args..) support for normalizing paths (@chevex) -- [33d7d59](https://github.com/bcoe/yargs/commit/33d7d59341d364f03d3a25f0a55cb99004dbbe4b) Customize error messages with demand(key, msg) (@chevex) -- [647d37f](https://github.com/bcoe/yargs/commit/647d37f164c20f4bafbf67dd9db6cd6e2cd3b49f) Merge branch 'rewrite-duplicate-test' of github.com:isbadawi/node-optimist (@chevex) -- [9059d1a](https://github.com/bcoe/yargs/commit/9059d1ad5e8aea686c2a01c89a23efdf929fff2e) Pass aliases object to check functions for greater versatility. (@chevex) -- [623dc26](https://github.com/bcoe/yargs/commit/623dc26c7331abff2465ef8532e3418996d42fe6) Added ability to count boolean options and rolled minimist library back into project. (@chevex) -- [49f0dce](https://github.com/bcoe/yargs/commit/49f0dcef35de4db544c3966350d36eb5838703f6) Fixed small typo. (@chevex) -- [79ec980](https://github.com/bcoe/yargs/commit/79ec9806d9ca6eb0014cfa4b6d1849f4f004baf2) Removed dependency on wordwrap module. (@chevex) -- [ea14630](https://github.com/bcoe/yargs/commit/ea14630feddd69d1de99dd8c0e08948f4c91f00a) Merge branch 'master' of github.com:chbrown/node-optimist (@chevex) -- [2b75da2](https://github.com/bcoe/yargs/commit/2b75da2624061e0f4f3107d20303c06ec9054906) Merge branch 'master' of github.com:seanzhou1023/node-optimist (@chevex) -- [d9bda11](https://github.com/bcoe/yargs/commit/d9bda1116e26f3b40e833ca9ca19263afea53565) Merge branch 'patch-1' of github.com:thefourtheye/node-optimist (@chevex) -- [d6cc606](https://github.com/bcoe/yargs/commit/d6cc6064a4f1bea38a16a4430b8a1334832fbeff) Renamed README. (@chevex) -- [9498d3f](https://github.com/bcoe/yargs/commit/9498d3f59acfb5e102826503e681623c3a64b178) Renamed readme and added .gitignore. (@chevex) -- [bbd1fe3](https://github.com/bcoe/yargs/commit/bbd1fe37fefa366dde0fb3dc44d91fe8b28f57f5) Included examples for ```help``` and ```showHelp``` functions and fixed few formatting issues (@thefourtheye) -- [37fea04](https://github.com/bcoe/yargs/commit/37fea0470a5796a0294c1dcfff68d8041650e622) .alias({}) behaves differently based on mapping direction when generating descriptions (@chbrown) -- [855b20d](https://github.com/bcoe/yargs/commit/855b20d0be567ca121d06b30bea64001b74f3d6d) Documented function signatures are useful for dynamically typed languages. (@chbrown) - -### 0.6.0 (2013/06/25 08:48 +00:00) -- [d37bfe0](https://github.com/bcoe/yargs/commit/d37bfe05ae6d295a0ab481efe4881222412791f4) all tests passing using minimist (@substack) -- [76f1352](https://github.com/bcoe/yargs/commit/76f135270399d01f2bbc621e524a5966e5c422fd) all parse tests now passing (@substack) -- [a7b6754](https://github.com/bcoe/yargs/commit/a7b6754276c38d1565479a5685c3781aeb947816) using minimist, some tests passing (@substack) -- [6655688](https://github.com/bcoe/yargs/commit/66556882aa731cbbbe16cc4d42c85740a2e98099) Give credit where its due (@DeadAlready) -- [602a2a9](https://github.com/bcoe/yargs/commit/602a2a92a459f93704794ad51b115bbb08b535ce) v0.5.3 - Remove wordwrap as dependency (@DeadAlready) - -### 0.5.2 (2013/05/31 03:46 +00:00) -- [4497ca5](https://github.com/bcoe/yargs/commit/4497ca55e332760a37b866ec119ded347ca27a87) fixed the whitespace bug without breaking anything else (@substack) -- [5a3dd1a](https://github.com/bcoe/yargs/commit/5a3dd1a4e0211a38613c6e02f61328e1031953fa) failing test for whitespace arg (@substack) - -### 0.5.1 (2013/05/30 07:17 +00:00) -- [a20228f](https://github.com/bcoe/yargs/commit/a20228f62a454755dd07f628a7c5759113918327) fix parse() to work with functions before it (@substack) -- [b13bd4c](https://github.com/bcoe/yargs/commit/b13bd4cac856a9821d42fa173bdb58f089365a7d) failing test for parse() with modifiers (@substack) - -### 0.5.0 (2013/05/18 21:59 +00:00) -- [c474a64](https://github.com/bcoe/yargs/commit/c474a649231527915c222156e3b40806d365a87c) fixes for dash (@substack) - -### 0.4.0 (2013/04/13 19:03 +00:00) -- [dafe3e1](https://github.com/bcoe/yargs/commit/dafe3e18d7c6e7c2d68e06559df0e5cbea3adb14) failing short test (@substack) - -### 0.3.7 (2013/04/04 04:07 +00:00) -- [6c7a0ec](https://github.com/bcoe/yargs/commit/6c7a0ec94ce4199a505f0518b4d6635d4e47cc81) Fix for windows. On windows there is no _ in environment. (@hdf) - -### 0.3.6 (2013/04/04 04:04 +00:00) -- [e72346a](https://github.com/bcoe/yargs/commit/e72346a727b7267af5aa008b418db89970873f05) Add support for newlines in -a="" arguments (@danielbeardsley) -- [71e1fb5](https://github.com/bcoe/yargs/commit/71e1fb55ea9987110a669ac6ec12338cfff3821c) drop 0.4, add 0.8 to travis (@substack) - -### 0.3.5 (2012/10/10 11:09 +00:00) -- [ee692b3](https://github.com/bcoe/yargs/commit/ee692b37554c70a0bb16389a50a26b66745cbbea) Fix parsing booleans (@vojtajina) -- [5045122](https://github.com/bcoe/yargs/commit/5045122664c3f5b4805addf1be2148d5856f7ce8) set $0 properly in the tests (@substack) - -### 0.3.4 (2012/04/30 06:54 +00:00) -- [f28c0e6](https://github.com/bcoe/yargs/commit/f28c0e62ca94f6e0bb2e6d82fc3d91a55e69b903) bump for string "true" params (@substack) -- [8f44aeb](https://github.com/bcoe/yargs/commit/8f44aeb74121ddd689580e2bf74ef86a605e9bf2) Fix failing test for aliased booleans. (@coderarity) -- [b9f7b61](https://github.com/bcoe/yargs/commit/b9f7b613b1e68e11e6c23fbda9e555a517dcc976) Add failing test for short aliased booleans. (@coderarity) - -### 0.3.3 (2012/04/30 06:45 +00:00) -- [541bac8](https://github.com/bcoe/yargs/commit/541bac8dd787a5f1a5d28f6d8deb1627871705e7) Fixes #37. - -### 0.3.2 (2012/04/12 20:28 +00:00) -- [3a0f014](https://github.com/bcoe/yargs/commit/3a0f014c1451280ac1c9caa1f639d31675586eec) travis badge (@substack) -- [4fb60bf](https://github.com/bcoe/yargs/commit/4fb60bf17845f4ce3293f8ca49c9a1a7c736cfce) Fix boolean aliases. (@coderarity) -- [f14dda5](https://github.com/bcoe/yargs/commit/f14dda546efc4fe06ace04d36919bfbb7634f79b) Adjusted package.json to use tap (@jfhbrook) -- [88e5d32](https://github.com/bcoe/yargs/commit/88e5d32295be6e544c8d355ff84e355af38a1c74) test/usage.js no longer hangs (@jfhbrook) -- [e1e740c](https://github.com/bcoe/yargs/commit/e1e740c27082f3ce84deca2093d9db2ef735d0e5) two tests for combined boolean/alias opts parsing (@jfhbrook) - -### 0.3.1 (2011/12/31 08:44 +00:00) -- [d09b719](https://github.com/bcoe/yargs/commit/d09b71980ef711b6cf3918cd19beec8257e40e82) If "default" is set to false it was not passed on, fixed. (@wolframkriesing) - -### 0.3.0 (2011/12/09 06:03 +00:00) -- [6e74aa7](https://github.com/bcoe/yargs/commit/6e74aa7b46a65773e20c0cb68d2d336d4a0d553d) bump and documented dot notation (@substack) - -### 0.2.7 (2011/10/20 02:25 +00:00) -- [94adee2](https://github.com/bcoe/yargs/commit/94adee20e17b58d0836f80e8b9cdbe9813800916) argv._ can be told 'Hey! argv._! Don't be messing with my args.', and it WILL obey (@colinta) -- [c46fdd5](https://github.com/bcoe/yargs/commit/c46fdd56a05410ae4a1e724a4820c82e77ff5469) optimistic critter image (@substack) -- [5c95c73](https://github.com/bcoe/yargs/commit/5c95c73aedf4c7482bd423e10c545e86d7c8a125) alias options() to option() (@substack) -- [f7692ea](https://github.com/bcoe/yargs/commit/f7692ea8da342850af819367833abb685fde41d8) [fix] Fix for parsing boolean edge case (@indexzero) -- [d1f92d1](https://github.com/bcoe/yargs/commit/d1f92d1425bd7f356055e78621b30cdf9741a3c2) -- [b01bda8](https://github.com/bcoe/yargs/commit/b01bda8d86e455bbf74ce497864cb8ab5b9fb847) [fix test] Update to ensure optimist is aware of default booleans. Associated tests included (@indexzero) -- [aa753e7](https://github.com/bcoe/yargs/commit/aa753e7c54fb3a12f513769a0ff6d54aa0f63943) [dist test] Update devDependencies in package.json. Update test pathing to be more npm and require.paths future-proof (@indexzero) -- [7bfce2f](https://github.com/bcoe/yargs/commit/7bfce2f3b3c98e6539e7549d35fbabced7e9341e) s/sys/util/ (@substack) -- [d420a7a](https://github.com/bcoe/yargs/commit/d420a7a9c890d2cdb11acfaf3ea3f43bc3e39f41) update usage output (@substack) -- [cf86eed](https://github.com/bcoe/yargs/commit/cf86eede2e5fc7495b6ec15e6d137d9ac814f075) some sage readme protips about parsing rules (@substack) -- [5da9f7a](https://github.com/bcoe/yargs/commit/5da9f7a5c0e1758ec7c5801fb3e94d3f6e970513) documented all the methods finally (@substack) -- [8ca6879](https://github.com/bcoe/yargs/commit/8ca6879311224b25933642987300f6a29de5c21b) fenced syntax highlighting (@substack) -- [b72bacf](https://github.com/bcoe/yargs/commit/b72bacf1d02594778c1935405bc8137eb61761dc) right-alignment of wrapped extra params (@substack) -- [2b980bf](https://github.com/bcoe/yargs/commit/2b980bf2656b4ee8fc5134dc5f56a48855c35198) now with .wrap() (@substack) -- [d614f63](https://github.com/bcoe/yargs/commit/d614f639654057d1b7e35e3f5a306e88ec2ad1e4) don't show 'Options:' when there aren't any (@substack) -- [691eda3](https://github.com/bcoe/yargs/commit/691eda354df97b5a86168317abcbcaabdc08a0fb) failing test for multi-aliasing (@substack) -- [0826c9f](https://github.com/bcoe/yargs/commit/0826c9f462109feab2bc7a99346d22e72bf774b7) "Options:" > "options:" (@substack) -- [72f7490](https://github.com/bcoe/yargs/commit/72f749025d01b7f295738ed370a669d885fbada0) [minor] Update formatting for `.showHelp()` (@indexzero) -- [75aecce](https://github.com/bcoe/yargs/commit/75aeccea74329094072f95800e02c275e7d999aa) options works again, too lazy to write a proper test right now (@substack) -- [f742e54](https://github.com/bcoe/yargs/commit/f742e5439817c662dc3bd8734ddd6467e6018cfd) line_count_options example, which breaks (@substack) -- [4ca06b8](https://github.com/bcoe/yargs/commit/4ca06b8b4ea99b5d5714b315a2a8576bee6e5537) line count example (@substack) -- [eeb8423](https://github.com/bcoe/yargs/commit/eeb8423e0a5ecc9dc3eb1e6df9f3f8c1c88f920b) remove self.argv setting in boolean (@substack) -- [6903412](https://github.com/bcoe/yargs/commit/69034126804660af9cc20ea7f4457b50338ee3d7) removed camel case for now (@substack) -- [5a0d88b](https://github.com/bcoe/yargs/commit/5a0d88bf23e9fa79635dd034e2a1aa992acc83cd) remove dead longest checking code (@substack) -- [d782170](https://github.com/bcoe/yargs/commit/d782170babf7284b1aa34f5350df0dd49c373fa8) .help() too (@substack) -- [622ec17](https://github.com/bcoe/yargs/commit/622ec17379bb5374fdbb190404c82bc600975791) rm old help generator (@substack) -- [7c8baac](https://github.com/bcoe/yargs/commit/7c8baac4d66195e9f5158503ea9ebfb61153dab7) nub keys (@substack) -- [8197785](https://github.com/bcoe/yargs/commit/8197785ad4762465084485b041abd722f69bf344) generate help message based on the previous calls, todo: nub (@substack) -- [3ffbdc3](https://github.com/bcoe/yargs/commit/3ffbdc33c8f5e83d4ea2ac60575ce119570c7ede) stub out new showHelp, better checks (@substack) -- [d4e21f5](https://github.com/bcoe/yargs/commit/d4e21f56a4830f7de841900d3c79756fb9886184) let .options() take single options too (@substack) -- [3c4cf29](https://github.com/bcoe/yargs/commit/3c4cf2901a29bac119cca8e983028d8669230ec6) .options() is now heaps simpler (@substack) -- [89f0d04](https://github.com/bcoe/yargs/commit/89f0d043cbccd302f10ab30c2069e05d2bf817c9) defaults work again, all tests pass (@substack) -- [dd87333](https://github.com/bcoe/yargs/commit/dd8733365423006a6e4156372ebb55f98323af58) update test error messages, down to 2 failing tests (@substack) -- [53f7bc6](https://github.com/bcoe/yargs/commit/53f7bc626b9875f2abdfc5dd7a80bde7f14143a3) fix for bools doubling up, passes the parse test again, others fail (@substack) -- [2213e2d](https://github.com/bcoe/yargs/commit/2213e2ddc7263226fba717fb041dc3fde9bc2ee4) refactored for an argv getter, failing several tests (@substack) -- [d1e7379](https://github.com/bcoe/yargs/commit/d1e737970f15c6c006bebdd8917706827ff2f0f2) just rescan for now, alias test passes (@substack) -- [b2f8c99](https://github.com/bcoe/yargs/commit/b2f8c99cc477a8eb0fdf4cf178e1785b63185cfd) failing alias test (@substack) -- [d0c0174](https://github.com/bcoe/yargs/commit/d0c0174daa144bfb6dc7290fdc448c393c475e15) .alias() (@substack) -- [d85f431](https://github.com/bcoe/yargs/commit/d85f431ad7d07b058af3f2a57daa51495576c164) [api] Remove `.describe()` in favor of building upon the existing `.usage()` API (@indexzero) -- [edbd527](https://github.com/bcoe/yargs/commit/edbd5272a8e213e71acd802782135c7f9699913a) [doc api] Add `.describe()`, `.options()`, and `.showHelp()` methods along with example. (@indexzero) -- [be4902f](https://github.com/bcoe/yargs/commit/be4902ff0961ae8feb9093f2c0a4066463ded2cf) updates for coffee since it now does argv the node way (@substack) -- [e24cb23](https://github.com/bcoe/yargs/commit/e24cb23798ee64e53b60815e7fda78b87f42390c) more general coffeescript detection (@substack) -- [78ac753](https://github.com/bcoe/yargs/commit/78ac753e5d0ec32a96d39d893272afe989e42a4d) Don't trigger the CoffeeScript hack when running under node_g. (@papandreou) -- [bcfe973](https://github.com/bcoe/yargs/commit/bcfe9731d7f90d4632281b8a52e8d76eb0195ae6) .string() but failing test (@substack) -- [1987aca](https://github.com/bcoe/yargs/commit/1987aca28c7ba4e8796c07bbc547cb984804c826) test hex strings (@substack) -- [ef36db3](https://github.com/bcoe/yargs/commit/ef36db32259b0b0d62448dc907c760e5554fb7e7) more keywords (@substack) -- [cc53c56](https://github.com/bcoe/yargs/commit/cc53c56329960bed6ab077a79798e991711ba01d) Added camelCase function that converts --multi-word-option to camel case (so it becomes argv.multiWordOption). (@papandreou) -- [60b57da](https://github.com/bcoe/yargs/commit/60b57da36797716e5783a633c6d5c79099016d45) fixed boolean bug by rescanning (@substack) -- [dff6d07](https://github.com/bcoe/yargs/commit/dff6d078d97f8ac503c7d18dcc7b7a8c364c2883) boolean examples (@substack) -- [0e380b9](https://github.com/bcoe/yargs/commit/0e380b92c4ef4e3c8dac1da18b5c31d85b1d02c9) boolean() with passing test (@substack) -- [62644d4](https://github.com/bcoe/yargs/commit/62644d4bffbb8d1bbf0c2baf58a1d14a6359ef07) coffee compatibility with node regex for versions too (@substack) -- [430fafc](https://github.com/bcoe/yargs/commit/430fafcf1683d23774772826581acff84b456827) argv._ fixed by fixing the coffee detection (@substack) -- [343b8af](https://github.com/bcoe/yargs/commit/343b8afefd98af274ebe21b5a16b3a949ec5429f) whichNodeArgs test fails too (@substack) -- [63df2f3](https://github.com/bcoe/yargs/commit/63df2f371f31e63d7f1dec2cbf0022a5f08da9d2) replicated mnot's bug in whichNodeEmpty test (@substack) -- [35473a4](https://github.com/bcoe/yargs/commit/35473a4d93a45e5e7e512af8bb54ebb532997ae1) test for ./bin usage (@substack) -- [13df151](https://github.com/bcoe/yargs/commit/13df151e44228eed10e5441c7cd163e086c458a4) don't coerce booleans to numbers (@substack) -- [85f8007](https://github.com/bcoe/yargs/commit/85f8007e93b8be7124feea64b1f1916d8ba1894a) package bump for automatic number conversion (@substack) -- [8f17014](https://github.com/bcoe/yargs/commit/8f170141cded4ccc0c6d67a849c5bf996aa29643) updated readme and examples with new auto-numberification goodness (@substack) -- [73dc901](https://github.com/bcoe/yargs/commit/73dc9011ac968e39b55e19e916084a839391b506) auto number conversion works yay (@substack) -- [bcec56b](https://github.com/bcoe/yargs/commit/bcec56b3d031e018064cbb691539ccc4f28c14ad) failing test for not-implemented auto numification (@substack) -- [ebd2844](https://github.com/bcoe/yargs/commit/ebd2844d683feeac583df79af0e5124a7a7db04e) odd that eql doesn't check types careflly (@substack) -- [fd854b0](https://github.com/bcoe/yargs/commit/fd854b02e512ce854b76386d395672a7969c1bc4) package author + keywords (@substack) -- [656a1d5](https://github.com/bcoe/yargs/commit/656a1d5a1b7c0e49d72e80cb13f20671d56f76c6) updated readme with .default() stuff (@substack) -- [cd7f8c5](https://github.com/bcoe/yargs/commit/cd7f8c55f0b82b79b690d14c5f806851236998a1) passing tests for new .default() behavior (@substack) -- [932725e](https://github.com/bcoe/yargs/commit/932725e39ce65bc91a0385a5fab659a5fa976ac2) new default() thing for setting default key/values (@substack) -- [4e6c7ab](https://github.com/bcoe/yargs/commit/4e6c7aba6374ac9ebc6259ecf91f13af7bce40e3) test for coffee usage (@substack) -- [d54ffcc](https://github.com/bcoe/yargs/commit/d54ffccf2a5a905f51ed5108f7c647f35d64ae23) new --key value style with passing tests. NOTE: changes existing behavior (@substack) -- [ed2a2d5](https://github.com/bcoe/yargs/commit/ed2a2d5d828100ebeef6385c0fb88d146a5cfe9b) package bump for summatix's coffee script fix (@substack) -- [75a975e](https://github.com/bcoe/yargs/commit/75a975eed8430d28e2a79dc9e6d819ad545f4587) Added support for CoffeeScript (@summatix) -- [56b2b1d](https://github.com/bcoe/yargs/commit/56b2b1de8d11f8a2b91979d8ae2d6db02d8fe64d) test coverage for the falsy check() usage (@substack) -- [a4843a9](https://github.com/bcoe/yargs/commit/a4843a9f0e69ffb4afdf6a671d89eb6f218be35d) check bug fixed plus a handy string (@substack) -- [857bd2d](https://github.com/bcoe/yargs/commit/857bd2db933a5aaa9cfecba0ced2dc9b415f8111) tests for demandCount, back up to 100% coverage (@substack) -- [073b776](https://github.com/bcoe/yargs/commit/073b7768ebd781668ef05c13f9003aceca2f5c35) call demandCount from demand (@substack) -- [4bd4b7a](https://github.com/bcoe/yargs/commit/4bd4b7a085c8b6ce1d885a0f486cc9865cee2db1) add demandCount to check for the number of arguments in the _ list (@marshall) -- [b8689ac](https://github.com/bcoe/yargs/commit/b8689ac68dacf248119d242bba39a41cb0adfa07) Rebase checks. That will be its own module eventually. (@substack) -- [e688370](https://github.com/bcoe/yargs/commit/e688370b576f0aa733c3f46183df69e1b561668e) a $0 like in perl (@substack) -- [2e5e196](https://github.com/bcoe/yargs/commit/2e5e1960fc19afb21fb3293752316eaa8bcd3609) usage test hacking around process and console (@substack) -- [fcc3521](https://github.com/bcoe/yargs/commit/fcc352163fbec6a1dfe8caf47a0df39de24fe016) description pun (@substack) -- [87a1fe2](https://github.com/bcoe/yargs/commit/87a1fe29037ca2ca5fefda85141aaeb13e8ce761) mit/x11 license (@substack) -- [8d089d2](https://github.com/bcoe/yargs/commit/8d089d24cd687c0bde3640a96c09b78f884900dd) bool example is more consistent and also shows off short option grouping (@substack) -- [448d747](https://github.com/bcoe/yargs/commit/448d7473ac68e8e03d8befc9457b0d9e21725be0) start of the readme and examples (@substack) -- [da74dea](https://github.com/bcoe/yargs/commit/da74dea799a9b59dbf022cbb8001bfdb0d52eec9) more tests for long and short captures (@substack) -- [ab6387e](https://github.com/bcoe/yargs/commit/ab6387e6769ca4af82ca94c4c67c7319f0d9fcfa) silly bug in the tests with s/not/no/, all tests pass now (@substack) -- [102496a](https://github.com/bcoe/yargs/commit/102496a319e8e06f6550d828fc2f72992c7d9ecc) hack an instance for process.argv onto Argv so the export can be called to create an instance or used for argv, which is the most common case (@substack) -- [a01caeb](https://github.com/bcoe/yargs/commit/a01caeb532546d19f68f2b2b87f7036cfe1aaedd) divide example (@substack) -- [443da55](https://github.com/bcoe/yargs/commit/443da55736acbaf8ff8b04d1b9ce19ab016ddda2) start of the lib with a package.json (@substack) diff --git a/node_modules/yargs/LICENSE b/node_modules/yargs/LICENSE deleted file mode 100644 index 747ab114..00000000 --- a/node_modules/yargs/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) -Modified work Copyright 2014 Contributors (ben@npmjs.com) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/yargs/README.md b/node_modules/yargs/README.md deleted file mode 100644 index 679a3eee..00000000 --- a/node_modules/yargs/README.md +++ /dev/null @@ -1,136 +0,0 @@ -

- -

-

Yargs

-

- Yargs be a node.js library fer hearties tryin' ter parse optstrings -

- -
- -[![Build Status][travis-image]][travis-url] -[![Coverage Status][coveralls-image]][coveralls-url] -[![NPM version][npm-image]][npm-url] -[![js-standard-style][standard-image]][standard-url] -[![Conventional Commits][conventional-commits-image]][conventional-commits-url] -[![Slack][slack-image]][slack-url] - -## Description : -Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. - -It gives you: - -* commands and (grouped) options (`my-program.js serve --port=5000`). -* a dynamically generated help menu based on your arguments. - -> - -* bash-completion shortcuts for commands and options. -* and [tons more](/docs/api.md). - -## Installation - -Stable version: -```bash -npm i yargs -``` - -Bleeding edge version with the most recent features: -```bash -npm i yargs@next -``` - -## Usage : - -### Simple Example - -````javascript -#!/usr/bin/env node -const argv = require('yargs').argv - -if (argv.ships > 3 && argv.distance < 53.5) { - console.log('Plunder more riffiwobbles!') -} else { - console.log('Retreat from the xupptumblers!') -} -```` - -```bash -$ ./plunder.js --ships=4 --distance=22 -Plunder more riffiwobbles! - -$ ./plunder.js --ships 12 --distance 98.7 -Retreat from the xupptumblers! -``` - -### Complex Example - -```javascript -#!/usr/bin/env node -require('yargs') // eslint-disable-line - .command('serve [port]', 'start the server', (yargs) => { - yargs - .positional('port', { - describe: 'port to bind on', - default: 5000 - }) - }, (argv) => { - if (argv.verbose) console.info(`start server on :${argv.port}`) - serve(argv.port) - }) - .option('verbose', { - alias: 'v', - type: 'boolean', - description: 'Run with verbose logging' - }) - .argv -``` - -Run the example above with `--help` to see the help for the application. - -## TypeScript - -yargs has type definitions at [@types/yargs][type-definitions]. - -``` -npm i @types/yargs --save-dev -``` - -See usage examples in [docs](/docs/typescript.md). - -## Community : - -Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com). - -## Documentation : - -### Table of Contents - -* [Yargs' API](/docs/api.md) -* [Examples](/docs/examples.md) -* [Parsing Tricks](/docs/tricks.md) - * [Stop the Parser](/docs/tricks.md#stop) - * [Negating Boolean Arguments](/docs/tricks.md#negate) - * [Numbers](/docs/tricks.md#numbers) - * [Arrays](/docs/tricks.md#arrays) - * [Objects](/docs/tricks.md#objects) - * [Quotes](/docs/tricks.md#quotes) -* [Advanced Topics](/docs/advanced.md) - * [Composing Your App Using Commands](/docs/advanced.md#commands) - * [Building Configurable CLI Apps](/docs/advanced.md#configuration) - * [Customizing Yargs' Parser](/docs/advanced.md#customizing) -* [Contributing](/contributing.md) - -[travis-url]: https://travis-ci.org/yargs/yargs -[travis-image]: https://img.shields.io/travis/yargs/yargs/master.svg -[coveralls-url]: https://coveralls.io/github/yargs/yargs -[coveralls-image]: https://img.shields.io/coveralls/yargs/yargs.svg -[npm-url]: https://www.npmjs.com/package/yargs -[npm-image]: https://img.shields.io/npm/v/yargs.svg -[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg -[standard-url]: http://standardjs.com/ -[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg -[conventional-commits-url]: https://conventionalcommits.org/ -[slack-image]: http://devtoolscommunity.herokuapp.com/badge.svg -[slack-url]: http://devtoolscommunity.herokuapp.com -[type-definitions]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs diff --git a/node_modules/yargs/index.js b/node_modules/yargs/index.js deleted file mode 100644 index 2db543ed..00000000 --- a/node_modules/yargs/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict' -// classic singleton yargs API, to use yargs -// without running as a singleton do: -// require('yargs/yargs')(process.argv.slice(2)) -const yargs = require('./yargs') - -Argv(process.argv.slice(2)) - -module.exports = Argv - -function Argv (processArgs, cwd) { - const argv = yargs(processArgs, cwd, require) - singletonify(argv) - return argv -} - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('yargs')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('yargs').argv - to get a parsed version of process.argv. -*/ -function singletonify (inst) { - Object.keys(inst).forEach((key) => { - if (key === 'argv') { - Argv.__defineGetter__(key, inst.__lookupGetter__(key)) - } else if (typeof inst[key] === 'function') { - Argv[key] = inst[key].bind(inst) - } else { - Argv.__defineGetter__('$0', () => { - return inst.$0 - }) - Argv.__defineGetter__('parsed', () => { - return inst.parsed - }) - } - }) -} diff --git a/node_modules/yargs/lib/apply-extends.js b/node_modules/yargs/lib/apply-extends.js deleted file mode 100644 index 643c9133..00000000 --- a/node_modules/yargs/lib/apply-extends.js +++ /dev/null @@ -1,67 +0,0 @@ - -'use strict' -const fs = require('fs') -const path = require('path') -const YError = require('./yerror') - -let previouslyVisitedConfigs = [] - -function checkForCircularExtends (cfgPath) { - if (previouslyVisitedConfigs.indexOf(cfgPath) > -1) { - throw new YError(`Circular extended configurations: '${cfgPath}'.`) - } -} - -function getPathToDefaultConfig (cwd, pathToExtend) { - return path.resolve(cwd, pathToExtend) -} - -function mergeDeep (config1, config2) { - const target = {} - const isObject = obj => obj && typeof obj === 'object' && !Array.isArray(obj) - Object.assign(target, config1) - for (let key of Object.keys(config2)) { - if (isObject(config2[key]) && isObject(target[key])) { - target[key] = mergeDeep(config1[key], config2[key]) - } else { - target[key] = config2[key] - } - } - return target -} - -function applyExtends (config, cwd, mergeExtends) { - let defaultConfig = {} - - if (Object.prototype.hasOwnProperty.call(config, 'extends')) { - if (typeof config.extends !== 'string') return defaultConfig - const isPath = /\.json|\..*rc$/.test(config.extends) - let pathToDefault = null - if (!isPath) { - try { - pathToDefault = require.resolve(config.extends) - } catch (err) { - // most likely this simply isn't a module. - } - } else { - pathToDefault = getPathToDefaultConfig(cwd, config.extends) - } - // maybe the module uses key for some other reason, - // err on side of caution. - if (!pathToDefault && !isPath) return config - - checkForCircularExtends(pathToDefault) - - previouslyVisitedConfigs.push(pathToDefault) - - defaultConfig = isPath ? JSON.parse(fs.readFileSync(pathToDefault, 'utf8')) : require(config.extends) - delete config.extends - defaultConfig = applyExtends(defaultConfig, path.dirname(pathToDefault), mergeExtends) - } - - previouslyVisitedConfigs = [] - - return mergeExtends ? mergeDeep(defaultConfig, config) : Object.assign({}, defaultConfig, config) -} - -module.exports = applyExtends diff --git a/node_modules/yargs/lib/argsert.js b/node_modules/yargs/lib/argsert.js deleted file mode 100644 index f310b4e7..00000000 --- a/node_modules/yargs/lib/argsert.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict' - -// hoisted due to circular dependency on command. -module.exports = argsert -const command = require('./command')() -const YError = require('./yerror') - -const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'] -function argsert (expected, callerArguments, length) { - // TODO: should this eventually raise an exception. - try { - // preface the argument description with "cmd", so - // that we can run it through yargs' command parser. - let position = 0 - let parsed = { demanded: [], optional: [] } - if (typeof expected === 'object') { - length = callerArguments - callerArguments = expected - } else { - parsed = command.parseCommand(`cmd ${expected}`) - } - const args = [].slice.call(callerArguments) - - while (args.length && args[args.length - 1] === undefined) args.pop() - length = length || args.length - - if (length < parsed.demanded.length) { - throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`) - } - - const totalCommands = parsed.demanded.length + parsed.optional.length - if (length > totalCommands) { - throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`) - } - - parsed.demanded.forEach((demanded) => { - const arg = args.shift() - const observedType = guessType(arg) - const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*') - if (matchingTypes.length === 0) argumentTypeError(observedType, demanded.cmd, position, false) - position += 1 - }) - - parsed.optional.forEach((optional) => { - if (args.length === 0) return - const arg = args.shift() - const observedType = guessType(arg) - const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*') - if (matchingTypes.length === 0) argumentTypeError(observedType, optional.cmd, position, true) - position += 1 - }) - } catch (err) { - console.warn(err.stack) - } -} - -function guessType (arg) { - if (Array.isArray(arg)) { - return 'array' - } else if (arg === null) { - return 'null' - } - return typeof arg -} - -function argumentTypeError (observedType, allowedTypes, position, optional) { - throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`) -} diff --git a/node_modules/yargs/lib/command.js b/node_modules/yargs/lib/command.js deleted file mode 100644 index d2a6e4d4..00000000 --- a/node_modules/yargs/lib/command.js +++ /dev/null @@ -1,447 +0,0 @@ -'use strict' - -const inspect = require('util').inspect -const isPromise = require('./is-promise') -const { applyMiddleware, commandMiddlewareFactory } = require('./middleware') -const path = require('path') -const Parser = require('yargs-parser') - -const DEFAULT_MARKER = /(^\*)|(^\$0)/ - -// handles parsing positional arguments, -// and populating argv with said positional -// arguments. -module.exports = function command (yargs, usage, validation, globalMiddleware) { - const self = {} - let handlers = {} - let aliasMap = {} - let defaultCommand - globalMiddleware = globalMiddleware || [] - - self.addHandler = function addHandler (cmd, description, builder, handler, commandMiddleware) { - let aliases = [] - const middlewares = commandMiddlewareFactory(commandMiddleware) - handler = handler || (() => {}) - - if (Array.isArray(cmd)) { - aliases = cmd.slice(1) - cmd = cmd[0] - } else if (typeof cmd === 'object') { - let command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd) - if (cmd.aliases) command = [].concat(command).concat(cmd.aliases) - self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares) - return - } - - // allow a module to be provided instead of separate builder and handler - if (typeof builder === 'object' && builder.builder && typeof builder.handler === 'function') { - self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares) - return - } - - // parse positionals out of cmd string - const parsedCommand = self.parseCommand(cmd) - - // remove positional args from aliases only - aliases = aliases.map(alias => self.parseCommand(alias).cmd) - - // check for default and filter out '*'' - let isDefault = false - const parsedAliases = [parsedCommand.cmd].concat(aliases).filter((c) => { - if (DEFAULT_MARKER.test(c)) { - isDefault = true - return false - } - return true - }) - - // standardize on $0 for default command. - if (parsedAliases.length === 0 && isDefault) parsedAliases.push('$0') - - // shift cmd and aliases after filtering out '*' - if (isDefault) { - parsedCommand.cmd = parsedAliases[0] - aliases = parsedAliases.slice(1) - cmd = cmd.replace(DEFAULT_MARKER, parsedCommand.cmd) - } - - // populate aliasMap - aliases.forEach((alias) => { - aliasMap[alias] = parsedCommand.cmd - }) - - if (description !== false) { - usage.command(cmd, description, isDefault, aliases) - } - - handlers[parsedCommand.cmd] = { - original: cmd, - description: description, - handler, - builder: builder || {}, - middlewares: middlewares || [], - demanded: parsedCommand.demanded, - optional: parsedCommand.optional - } - - if (isDefault) defaultCommand = handlers[parsedCommand.cmd] - } - - self.addDirectory = function addDirectory (dir, context, req, callerFile, opts) { - opts = opts || {} - // disable recursion to support nested directories of subcommands - if (typeof opts.recurse !== 'boolean') opts.recurse = false - // exclude 'json', 'coffee' from require-directory defaults - if (!Array.isArray(opts.extensions)) opts.extensions = ['js'] - // allow consumer to define their own visitor function - const parentVisit = typeof opts.visit === 'function' ? opts.visit : o => o - // call addHandler via visitor function - opts.visit = function visit (obj, joined, filename) { - const visited = parentVisit(obj, joined, filename) - // allow consumer to skip modules with their own visitor - if (visited) { - // check for cyclic reference - // each command file path should only be seen once per execution - if (~context.files.indexOf(joined)) return visited - // keep track of visited files in context.files - context.files.push(joined) - self.addHandler(visited) - } - return visited - } - require('require-directory')({ require: req, filename: callerFile }, dir, opts) - } - - // lookup module object from require()d command and derive name - // if module was not require()d and no name given, throw error - function moduleName (obj) { - const mod = require('which-module')(obj) - if (!mod) throw new Error(`No command name given for module: ${inspect(obj)}`) - return commandFromFilename(mod.filename) - } - - // derive command name from filename - function commandFromFilename (filename) { - return path.basename(filename, path.extname(filename)) - } - - function extractDesc (obj) { - for (let keys = ['describe', 'description', 'desc'], i = 0, l = keys.length, test; i < l; i++) { - test = obj[keys[i]] - if (typeof test === 'string' || typeof test === 'boolean') return test - } - return false - } - - self.parseCommand = function parseCommand (cmd) { - const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, ' ') - const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/) - const bregex = /\.*[\][<>]/g - const parsedCommand = { - cmd: (splitCommand.shift()).replace(bregex, ''), - demanded: [], - optional: [] - } - splitCommand.forEach((cmd, i) => { - let variadic = false - cmd = cmd.replace(/\s/g, '') - if (/\.+[\]>]/.test(cmd) && i === splitCommand.length - 1) variadic = true - if (/^\[/.test(cmd)) { - parsedCommand.optional.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic - }) - } else { - parsedCommand.demanded.push({ - cmd: cmd.replace(bregex, '').split('|'), - variadic - }) - } - }) - return parsedCommand - } - - self.getCommands = () => Object.keys(handlers).concat(Object.keys(aliasMap)) - - self.getCommandHandlers = () => handlers - - self.hasDefaultCommand = () => !!defaultCommand - - self.runCommand = function runCommand (command, yargs, parsed, commandIndex) { - let aliases = parsed.aliases - const commandHandler = handlers[command] || handlers[aliasMap[command]] || defaultCommand - const currentContext = yargs.getContext() - let numFiles = currentContext.files.length - const parentCommands = currentContext.commands.slice() - - // what does yargs look like after the builder is run? - let innerArgv = parsed.argv - let innerYargs = null - let positionalMap = {} - if (command) { - currentContext.commands.push(command) - currentContext.fullCommands.push(commandHandler.original) - } - if (typeof commandHandler.builder === 'function') { - // a function can be provided, which builds - // up a yargs chain and possibly returns it. - innerYargs = commandHandler.builder(yargs.reset(parsed.aliases)) - if (!innerYargs || (typeof innerYargs._parseArgs !== 'function')) { - innerYargs = yargs - } - if (shouldUpdateUsage(innerYargs)) { - innerYargs.getUsageInstance().usage( - usageFromParentCommandsCommandHandler(parentCommands, commandHandler), - commandHandler.description - ) - } - innerArgv = innerYargs._parseArgs(null, null, true, commandIndex) - aliases = innerYargs.parsed.aliases - } else if (typeof commandHandler.builder === 'object') { - // as a short hand, an object can instead be provided, specifying - // the options that a command takes. - innerYargs = yargs.reset(parsed.aliases) - if (shouldUpdateUsage(innerYargs)) { - innerYargs.getUsageInstance().usage( - usageFromParentCommandsCommandHandler(parentCommands, commandHandler), - commandHandler.description - ) - } - Object.keys(commandHandler.builder).forEach((key) => { - innerYargs.option(key, commandHandler.builder[key]) - }) - innerArgv = innerYargs._parseArgs(null, null, true, commandIndex) - aliases = innerYargs.parsed.aliases - } - - if (!yargs._hasOutput()) { - positionalMap = populatePositionals(commandHandler, innerArgv, currentContext, yargs) - } - - const middlewares = globalMiddleware.slice(0).concat(commandHandler.middlewares || []) - applyMiddleware(innerArgv, yargs, middlewares, true) - - // we apply validation post-hoc, so that custom - // checks get passed populated positional arguments. - if (!yargs._hasOutput()) yargs._runValidation(innerArgv, aliases, positionalMap, yargs.parsed.error) - - if (commandHandler.handler && !yargs._hasOutput()) { - yargs._setHasOutput() - // to simplify the parsing of positionals in commands, - // we temporarily populate '--' rather than _, with arguments - const populateDoubleDash = !!yargs.getOptions().configuration['populate--'] - if (!populateDoubleDash) yargs._copyDoubleDash(innerArgv) - - innerArgv = applyMiddleware(innerArgv, yargs, middlewares, false) - let handlerResult - if (isPromise(innerArgv)) { - handlerResult = innerArgv.then(argv => commandHandler.handler(argv)) - } else { - handlerResult = commandHandler.handler(innerArgv) - } - - if (isPromise(handlerResult)) { - yargs.getUsageInstance().cacheHelpMessage() - handlerResult.catch(error => { - try { - yargs.getUsageInstance().fail(null, error) - } catch (err) { - // fail's throwing would cause an unhandled rejection. - } - }) - } - } - - if (command) { - currentContext.commands.pop() - currentContext.fullCommands.pop() - } - numFiles = currentContext.files.length - numFiles - if (numFiles > 0) currentContext.files.splice(numFiles * -1, numFiles) - - return innerArgv - } - - function shouldUpdateUsage (yargs) { - return !yargs.getUsageInstance().getUsageDisabled() && - yargs.getUsageInstance().getUsage().length === 0 - } - - function usageFromParentCommandsCommandHandler (parentCommands, commandHandler) { - const c = DEFAULT_MARKER.test(commandHandler.original) ? commandHandler.original.replace(DEFAULT_MARKER, '').trim() : commandHandler.original - const pc = parentCommands.filter((c) => { return !DEFAULT_MARKER.test(c) }) - pc.push(c) - return `$0 ${pc.join(' ')}` - } - - self.runDefaultBuilderOn = function (yargs) { - if (shouldUpdateUsage(yargs)) { - // build the root-level command string from the default string. - const commandString = DEFAULT_MARKER.test(defaultCommand.original) - ? defaultCommand.original : defaultCommand.original.replace(/^[^[\]<>]*/, '$0 ') - yargs.getUsageInstance().usage( - commandString, - defaultCommand.description - ) - } - const builder = defaultCommand.builder - if (typeof builder === 'function') { - builder(yargs) - } else { - Object.keys(builder).forEach((key) => { - yargs.option(key, builder[key]) - }) - } - } - - // transcribe all positional arguments "command [apple]" - // onto argv. - function populatePositionals (commandHandler, argv, context, yargs) { - argv._ = argv._.slice(context.commands.length) // nuke the current commands - const demanded = commandHandler.demanded.slice(0) - const optional = commandHandler.optional.slice(0) - const positionalMap = {} - - validation.positionalCount(demanded.length, argv._.length) - - while (demanded.length) { - const demand = demanded.shift() - populatePositional(demand, argv, positionalMap) - } - - while (optional.length) { - const maybe = optional.shift() - populatePositional(maybe, argv, positionalMap) - } - - argv._ = context.commands.concat(argv._) - - postProcessPositionals(argv, positionalMap, self.cmdToParseOptions(commandHandler.original)) - - return positionalMap - } - - function populatePositional (positional, argv, positionalMap, parseOptions) { - const cmd = positional.cmd[0] - if (positional.variadic) { - positionalMap[cmd] = argv._.splice(0).map(String) - } else { - if (argv._.length) positionalMap[cmd] = [String(argv._.shift())] - } - } - - // we run yargs-parser against the positional arguments - // applying the same parsing logic used for flags. - function postProcessPositionals (argv, positionalMap, parseOptions) { - // combine the parsing hints we've inferred from the command - // string with explicitly configured parsing hints. - const options = Object.assign({}, yargs.getOptions()) - options.default = Object.assign(parseOptions.default, options.default) - options.alias = Object.assign(parseOptions.alias, options.alias) - options.array = options.array.concat(parseOptions.array) - delete options.config // don't load config when processing positionals. - - const unparsed = [] - Object.keys(positionalMap).forEach((key) => { - positionalMap[key].map((value) => { - unparsed.push(`--${key}`) - unparsed.push(value) - }) - }) - - // short-circuit parse. - if (!unparsed.length) return - - const config = Object.assign({}, options.configuration, { - 'populate--': true - }) - const parsed = Parser.detailed(unparsed, Object.assign({}, options, { - configuration: config - })) - - if (parsed.error) { - yargs.getUsageInstance().fail(parsed.error.message, parsed.error) - } else { - // only copy over positional keys (don't overwrite - // flag arguments that were already parsed). - const positionalKeys = Object.keys(positionalMap) - Object.keys(positionalMap).forEach((key) => { - [].push.apply(positionalKeys, parsed.aliases[key]) - }) - - Object.keys(parsed.argv).forEach((key) => { - if (positionalKeys.indexOf(key) !== -1) { - // any new aliases need to be placed in positionalMap, which - // is used for validation. - if (!positionalMap[key]) positionalMap[key] = parsed.argv[key] - argv[key] = parsed.argv[key] - } - }) - } - } - - self.cmdToParseOptions = function (cmdString) { - const parseOptions = { - array: [], - default: {}, - alias: {}, - demand: {} - } - - const parsed = self.parseCommand(cmdString) - parsed.demanded.forEach((d) => { - const cmds = d.cmd.slice(0) - const cmd = cmds.shift() - if (d.variadic) { - parseOptions.array.push(cmd) - parseOptions.default[cmd] = [] - } - cmds.forEach((c) => { - parseOptions.alias[cmd] = c - }) - parseOptions.demand[cmd] = true - }) - - parsed.optional.forEach((o) => { - const cmds = o.cmd.slice(0) - const cmd = cmds.shift() - if (o.variadic) { - parseOptions.array.push(cmd) - parseOptions.default[cmd] = [] - } - cmds.forEach((c) => { - parseOptions.alias[cmd] = c - }) - }) - - return parseOptions - } - - self.reset = () => { - handlers = {} - aliasMap = {} - defaultCommand = undefined - return self - } - - // used by yargs.parse() to freeze - // the state of commands such that - // we can apply .parse() multiple times - // with the same yargs instance. - let frozens = [] - self.freeze = () => { - let frozen = {} - frozens.push(frozen) - frozen.handlers = handlers - frozen.aliasMap = aliasMap - frozen.defaultCommand = defaultCommand - } - self.unfreeze = () => { - let frozen = frozens.pop() - handlers = frozen.handlers - aliasMap = frozen.aliasMap - defaultCommand = frozen.defaultCommand - } - - return self -} diff --git a/node_modules/yargs/lib/completion-templates.js b/node_modules/yargs/lib/completion-templates.js deleted file mode 100644 index 43714fb6..00000000 --- a/node_modules/yargs/lib/completion-templates.js +++ /dev/null @@ -1,49 +0,0 @@ -exports.completionShTemplate = -`###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc -# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX. -# -_yargs_completions() -{ - local cur_word args type_list - - cur_word="\${COMP_WORDS[COMP_CWORD]}" - args=("\${COMP_WORDS[@]}") - - # ask yargs to generate completions. - type_list=$({{app_path}} --get-yargs-completions "\${args[@]}") - - COMPREPLY=( $(compgen -W "\${type_list}" -- \${cur_word}) ) - - # if no match was found, fall back to filename completion - if [ \${#COMPREPLY[@]} -eq 0 ]; then - COMPREPLY=() - fi - - return 0 -} -complete -o default -F _yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -` - -exports.completionZshTemplate = `###-begin-{{app_name}}-completions-### -# -# yargs command completion script -# -# Installation: {{app_path}} {{completion_command}} >> ~/.zshrc -# or {{app_path}} {{completion_command}} >> ~/.zsh_profile on OSX. -# -_{{app_name}}_yargs_completions() -{ - local reply - local si=$IFS - IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) - IFS=$si - _describe 'values' reply -} -compdef _{{app_name}}_yargs_completions {{app_name}} -###-end-{{app_name}}-completions-### -` diff --git a/node_modules/yargs/lib/completion.js b/node_modules/yargs/lib/completion.js deleted file mode 100644 index 3f3bf16e..00000000 --- a/node_modules/yargs/lib/completion.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict' -const path = require('path') - -// add bash completions to your -// yargs-powered applications. -module.exports = function completion (yargs, usage, command) { - const self = { - completionKey: 'get-yargs-completions' - } - - const zshShell = (process.env.SHELL && process.env.SHELL.indexOf('zsh') !== -1) || - (process.env.ZSH_NAME && process.env.ZSH_NAME.indexOf('zsh') !== -1) - // get a list of completion commands. - // 'args' is the array of strings from the line to be completed - self.getCompletion = function getCompletion (args, done) { - const completions = [] - const current = args.length ? args[args.length - 1] : '' - const argv = yargs.parse(args, true) - const aliases = yargs.parsed.aliases - const parentCommands = yargs.getContext().commands - - // a custom completion function can be provided - // to completion(). - if (completionFunction) { - if (completionFunction.length < 3) { - const result = completionFunction(current, argv) - - // promise based completion function. - if (typeof result.then === 'function') { - return result.then((list) => { - process.nextTick(() => { done(list) }) - }).catch((err) => { - process.nextTick(() => { throw err }) - }) - } - - // synchronous completion function. - return done(result) - } else { - // asynchronous completion function - return completionFunction(current, argv, (completions) => { - done(completions) - }) - } - } - - const handlers = command.getCommandHandlers() - for (let i = 0, ii = args.length; i < ii; ++i) { - if (handlers[args[i]] && handlers[args[i]].builder) { - const builder = handlers[args[i]].builder - if (typeof builder === 'function') { - const y = yargs.reset() - builder(y) - return y.argv - } - } - } - - if (!current.match(/^-/) && parentCommands[parentCommands.length - 1] !== current) { - usage.getCommands().forEach((usageCommand) => { - const commandName = command.parseCommand(usageCommand[0]).cmd - if (args.indexOf(commandName) === -1) { - if (!zshShell) { - completions.push(commandName) - } else { - const desc = usageCommand[1] || '' - completions.push(commandName.replace(/:/g, '\\:') + ':' + desc) - } - } - }) - } - - if (current.match(/^-/) || (current === '' && completions.length === 0)) { - const descs = usage.getDescriptions() - Object.keys(yargs.getOptions().key).forEach((key) => { - // If the key and its aliases aren't in 'args', add the key to 'completions' - const keyAndAliases = [key].concat(aliases[key] || []) - const notInArgs = keyAndAliases.every(val => args.indexOf(`--${val}`) === -1) - if (notInArgs) { - if (!zshShell) { - completions.push(`--${key}`) - } else { - const desc = descs[key] || '' - completions.push(`--${key.replace(/:/g, '\\:')}:${desc.replace('__yargsString__:', '')}`) - } - } - }) - } - - done(completions) - } - - // generate the completion script to add to your .bashrc. - self.generateCompletionScript = function generateCompletionScript ($0, cmd) { - const templates = require('./completion-templates') - let script = zshShell ? templates.completionZshTemplate : templates.completionShTemplate - const name = path.basename($0) - - // add ./to applications not yet installed as bin. - if ($0.match(/\.js$/)) $0 = `./${$0}` - - script = script.replace(/{{app_name}}/g, name) - script = script.replace(/{{completion_command}}/g, cmd) - return script.replace(/{{app_path}}/g, $0) - } - - // register a function to perform your own custom - // completions., this function can be either - // synchrnous or asynchronous. - let completionFunction = null - self.registerFunction = (fn) => { - completionFunction = fn - } - - return self -} diff --git a/node_modules/yargs/lib/is-promise.js b/node_modules/yargs/lib/is-promise.js deleted file mode 100644 index 271d93b2..00000000 --- a/node_modules/yargs/lib/is-promise.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function isPromise (maybePromise) { - return !!maybePromise && !!maybePromise.then && (typeof maybePromise.then === 'function') -} diff --git a/node_modules/yargs/lib/levenshtein.js b/node_modules/yargs/lib/levenshtein.js deleted file mode 100644 index c66c1bab..00000000 --- a/node_modules/yargs/lib/levenshtein.js +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright (c) 2011 Andrei Mackenzie - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -// levenshtein distance algorithm, pulled from Andrei Mackenzie's MIT licensed. -// gist, which can be found here: https://gist.github.com/andrei-m/982927 -'use strict' -// Compute the edit distance between the two given strings -module.exports = function levenshtein (a, b) { - if (a.length === 0) return b.length - if (b.length === 0) return a.length - - const matrix = [] - - // increment along the first column of each row - let i - for (i = 0; i <= b.length; i++) { - matrix[i] = [i] - } - - // increment each column in the first row - let j - for (j = 0; j <= a.length; j++) { - matrix[0][j] = j - } - - // Fill in the rest of the matrix - for (i = 1; i <= b.length; i++) { - for (j = 1; j <= a.length; j++) { - if (b.charAt(i - 1) === a.charAt(j - 1)) { - matrix[i][j] = matrix[i - 1][j - 1] - } else { - matrix[i][j] = Math.min(matrix[i - 1][j - 1] + 1, // substitution - Math.min(matrix[i][j - 1] + 1, // insertion - matrix[i - 1][j] + 1)) // deletion - } - } - } - - return matrix[b.length][a.length] -} diff --git a/node_modules/yargs/lib/middleware.js b/node_modules/yargs/lib/middleware.js deleted file mode 100644 index 56dab752..00000000 --- a/node_modules/yargs/lib/middleware.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -// hoisted due to circular dependency on command. -module.exports = { - applyMiddleware, - commandMiddlewareFactory, - globalMiddlewareFactory -} -const isPromise = require('./is-promise') -const argsert = require('./argsert') - -function globalMiddlewareFactory (globalMiddleware, context) { - return function (callback, applyBeforeValidation = false) { - argsert(' [boolean]', [callback, applyBeforeValidation], arguments.length) - if (Array.isArray(callback)) { - for (let i = 0; i < callback.length; i++) { - if (typeof callback[i] !== 'function') { - throw Error('middleware must be a function') - } - callback[i].applyBeforeValidation = applyBeforeValidation - } - Array.prototype.push.apply(globalMiddleware, callback) - } else if (typeof callback === 'function') { - callback.applyBeforeValidation = applyBeforeValidation - globalMiddleware.push(callback) - } - return context - } -} - -function commandMiddlewareFactory (commandMiddleware) { - if (!commandMiddleware) return [] - return commandMiddleware.map(middleware => { - middleware.applyBeforeValidation = false - return middleware - }) -} - -function applyMiddleware (argv, yargs, middlewares, beforeValidation) { - const beforeValidationError = new Error('middleware cannot return a promise when applyBeforeValidation is true') - return middlewares - .reduce((accumulation, middleware) => { - if (middleware.applyBeforeValidation !== beforeValidation) { - return accumulation - } - - if (isPromise(accumulation)) { - return accumulation - .then(initialObj => - Promise.all([initialObj, middleware(initialObj, yargs)]) - ) - .then(([initialObj, middlewareObj]) => - Object.assign(initialObj, middlewareObj) - ) - } else { - const result = middleware(argv, yargs) - if (beforeValidation && isPromise(result)) throw beforeValidationError - - return isPromise(result) - ? result.then(middlewareObj => Object.assign(accumulation, middlewareObj)) - : Object.assign(accumulation, result) - } - }, argv) -} diff --git a/node_modules/yargs/lib/obj-filter.js b/node_modules/yargs/lib/obj-filter.js deleted file mode 100644 index c344ac58..00000000 --- a/node_modules/yargs/lib/obj-filter.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -module.exports = function objFilter (original, filter) { - const obj = {} - filter = filter || ((k, v) => true) - Object.keys(original || {}).forEach((key) => { - if (filter(key, original[key])) { - obj[key] = original[key] - } - }) - return obj -} diff --git a/node_modules/yargs/lib/usage.js b/node_modules/yargs/lib/usage.js deleted file mode 100644 index 92bf3786..00000000 --- a/node_modules/yargs/lib/usage.js +++ /dev/null @@ -1,549 +0,0 @@ -'use strict' -// this file handles outputting usage instructions, -// failures, etc. keeps logging in one place. -const decamelize = require('decamelize') -const stringWidth = require('string-width') -const objFilter = require('./obj-filter') -const path = require('path') -const setBlocking = require('set-blocking') -const YError = require('./yerror') - -module.exports = function usage (yargs, y18n) { - const __ = y18n.__ - const self = {} - - // methods for ouputting/building failure message. - const fails = [] - self.failFn = function failFn (f) { - fails.push(f) - } - - let failMessage = null - let showHelpOnFail = true - self.showHelpOnFail = function showHelpOnFailFn (enabled, message) { - if (typeof enabled === 'string') { - message = enabled - enabled = true - } else if (typeof enabled === 'undefined') { - enabled = true - } - failMessage = message - showHelpOnFail = enabled - return self - } - - let failureOutput = false - self.fail = function fail (msg, err) { - const logger = yargs._getLoggerInstance() - - if (fails.length) { - for (let i = fails.length - 1; i >= 0; --i) { - fails[i](msg, err, self) - } - } else { - if (yargs.getExitProcess()) setBlocking(true) - - // don't output failure message more than once - if (!failureOutput) { - failureOutput = true - if (showHelpOnFail) { - yargs.showHelp('error') - logger.error() - } - if (msg || err) logger.error(msg || err) - if (failMessage) { - if (msg || err) logger.error('') - logger.error(failMessage) - } - } - - err = err || new YError(msg) - if (yargs.getExitProcess()) { - return yargs.exit(1) - } else if (yargs._hasParseCallback()) { - return yargs.exit(1, err) - } else { - throw err - } - } - } - - // methods for ouputting/building help (usage) message. - let usages = [] - let usageDisabled = false - self.usage = (msg, description) => { - if (msg === null) { - usageDisabled = true - usages = [] - return - } - usageDisabled = false - usages.push([msg, description || '']) - return self - } - self.getUsage = () => { - return usages - } - self.getUsageDisabled = () => { - return usageDisabled - } - - self.getPositionalGroupName = () => { - return __('Positionals:') - } - - let examples = [] - self.example = (cmd, description) => { - examples.push([cmd, description || '']) - } - - let commands = [] - self.command = function command (cmd, description, isDefault, aliases) { - // the last default wins, so cancel out any previously set default - if (isDefault) { - commands = commands.map((cmdArray) => { - cmdArray[2] = false - return cmdArray - }) - } - commands.push([cmd, description || '', isDefault, aliases]) - } - self.getCommands = () => commands - - let descriptions = {} - self.describe = function describe (key, desc) { - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.describe(k, key[k]) - }) - } else { - descriptions[key] = desc - } - } - self.getDescriptions = () => descriptions - - let epilogs = [] - self.epilog = (msg) => { - epilogs.push(msg) - } - - let wrapSet = false - let wrap - self.wrap = (cols) => { - wrapSet = true - wrap = cols - } - - function getWrap () { - if (!wrapSet) { - wrap = windowWidth() - wrapSet = true - } - - return wrap - } - - const deferY18nLookupPrefix = '__yargsString__:' - self.deferY18nLookup = str => deferY18nLookupPrefix + str - - const defaultGroup = 'Options:' - self.help = function help () { - if (cachedHelpMessage) return cachedHelpMessage - normalizeAliases() - - // handle old demanded API - const base$0 = yargs.customScriptName ? yargs.$0 : path.basename(yargs.$0) - const demandedOptions = yargs.getDemandedOptions() - const demandedCommands = yargs.getDemandedCommands() - const groups = yargs.getGroups() - const options = yargs.getOptions() - - let keys = [] - keys = keys.concat(Object.keys(descriptions)) - keys = keys.concat(Object.keys(demandedOptions)) - keys = keys.concat(Object.keys(demandedCommands)) - keys = keys.concat(Object.keys(options.default)) - keys = keys.filter(filterHiddenOptions) - keys = Object.keys(keys.reduce((acc, key) => { - if (key !== '_') acc[key] = true - return acc - }, {})) - - const theWrap = getWrap() - const ui = require('cliui')({ - width: theWrap, - wrap: !!theWrap - }) - - // the usage string. - if (!usageDisabled) { - if (usages.length) { - // user-defined usage. - usages.forEach((usage) => { - ui.div(`${usage[0].replace(/\$0/g, base$0)}`) - if (usage[1]) { - ui.div({ text: `${usage[1]}`, padding: [1, 0, 0, 0] }) - } - }) - ui.div() - } else if (commands.length) { - let u = null - // demonstrate how commands are used. - if (demandedCommands._) { - u = `${base$0} <${__('command')}>\n` - } else { - u = `${base$0} [${__('command')}]\n` - } - ui.div(`${u}`) - } - } - - // your application's commands, i.e., non-option - // arguments populated in '_'. - if (commands.length) { - ui.div(__('Commands:')) - - const context = yargs.getContext() - const parentCommands = context.commands.length ? `${context.commands.join(' ')} ` : '' - - if (yargs.getParserConfiguration()['sort-commands'] === true) { - commands = commands.sort((a, b) => a[0].localeCompare(b[0])) - } - - commands.forEach((command) => { - const commandString = `${base$0} ${parentCommands}${command[0].replace(/^\$0 ?/, '')}` // drop $0 from default commands. - ui.span( - { - text: commandString, - padding: [0, 2, 0, 2], - width: maxWidth(commands, theWrap, `${base$0}${parentCommands}`) + 4 - }, - { text: command[1] } - ) - const hints = [] - if (command[2]) hints.push(`[${__('default:').slice(0, -1)}]`) // TODO hacking around i18n here - if (command[3] && command[3].length) { - hints.push(`[${__('aliases:')} ${command[3].join(', ')}]`) - } - if (hints.length) { - ui.div({ text: hints.join(' '), padding: [0, 0, 0, 2], align: 'right' }) - } else { - ui.div() - } - }) - - ui.div() - } - - // perform some cleanup on the keys array, making it - // only include top-level keys not their aliases. - const aliasKeys = (Object.keys(options.alias) || []) - .concat(Object.keys(yargs.parsed.newAliases) || []) - - keys = keys.filter(key => !yargs.parsed.newAliases[key] && aliasKeys.every(alias => (options.alias[alias] || []).indexOf(key) === -1)) - - // populate 'Options:' group with any keys that have not - // explicitly had a group set. - if (!groups[defaultGroup]) groups[defaultGroup] = [] - addUngroupedKeys(keys, options.alias, groups) - - // display 'Options:' table along with any custom tables: - Object.keys(groups).forEach((groupName) => { - if (!groups[groupName].length) return - - // if we've grouped the key 'f', but 'f' aliases 'foobar', - // normalizedKeys should contain only 'foobar'. - const normalizedKeys = groups[groupName].filter(filterHiddenOptions).map((key) => { - if (~aliasKeys.indexOf(key)) return key - for (let i = 0, aliasKey; (aliasKey = aliasKeys[i]) !== undefined; i++) { - if (~(options.alias[aliasKey] || []).indexOf(key)) return aliasKey - } - return key - }) - - if (normalizedKeys.length < 1) return - - ui.div(__(groupName)) - - // actually generate the switches string --foo, -f, --bar. - const switches = normalizedKeys.reduce((acc, key) => { - acc[key] = [ key ].concat(options.alias[key] || []) - .map(sw => { - // for the special positional group don't - // add '--' or '-' prefix. - if (groupName === self.getPositionalGroupName()) return sw - else return (sw.length > 1 ? '--' : '-') + sw - }) - .join(', ') - - return acc - }, {}) - - normalizedKeys.forEach((key) => { - const kswitch = switches[key] - let desc = descriptions[key] || '' - let type = null - - if (~desc.lastIndexOf(deferY18nLookupPrefix)) desc = __(desc.substring(deferY18nLookupPrefix.length)) - - if (~options.boolean.indexOf(key)) type = `[${__('boolean')}]` - if (~options.count.indexOf(key)) type = `[${__('count')}]` - if (~options.string.indexOf(key)) type = `[${__('string')}]` - if (~options.normalize.indexOf(key)) type = `[${__('string')}]` - if (~options.array.indexOf(key)) type = `[${__('array')}]` - if (~options.number.indexOf(key)) type = `[${__('number')}]` - - const extra = [ - type, - (key in demandedOptions) ? `[${__('required')}]` : null, - options.choices && options.choices[key] ? `[${__('choices:')} ${ - self.stringifiedValues(options.choices[key])}]` : null, - defaultString(options.default[key], options.defaultDescription[key]) - ].filter(Boolean).join(' ') - - ui.span( - { text: kswitch, padding: [0, 2, 0, 2], width: maxWidth(switches, theWrap) + 4 }, - desc - ) - - if (extra) ui.div({ text: extra, padding: [0, 0, 0, 2], align: 'right' }) - else ui.div() - }) - - ui.div() - }) - - // describe some common use-cases for your application. - if (examples.length) { - ui.div(__('Examples:')) - - examples.forEach((example) => { - example[0] = example[0].replace(/\$0/g, base$0) - }) - - examples.forEach((example) => { - if (example[1] === '') { - ui.div( - { - text: example[0], - padding: [0, 2, 0, 2] - } - ) - } else { - ui.div( - { - text: example[0], - padding: [0, 2, 0, 2], - width: maxWidth(examples, theWrap) + 4 - }, { - text: example[1] - } - ) - } - }) - - ui.div() - } - - // the usage string. - if (epilogs.length > 0) { - const e = epilogs.map(epilog => epilog.replace(/\$0/g, base$0)).join('\n') - ui.div(`${e}\n`) - } - - // Remove the trailing white spaces - return ui.toString().replace(/\s*$/, '') - } - - // return the maximum width of a string - // in the left-hand column of a table. - function maxWidth (table, theWrap, modifier) { - let width = 0 - - // table might be of the form [leftColumn], - // or {key: leftColumn} - if (!Array.isArray(table)) { - table = Object.keys(table).map(key => [table[key]]) - } - - table.forEach((v) => { - width = Math.max( - stringWidth(modifier ? `${modifier} ${v[0]}` : v[0]), - width - ) - }) - - // if we've enabled 'wrap' we should limit - // the max-width of the left-column. - if (theWrap) width = Math.min(width, parseInt(theWrap * 0.5, 10)) - - return width - } - - // make sure any options set for aliases, - // are copied to the keys being aliased. - function normalizeAliases () { - // handle old demanded API - const demandedOptions = yargs.getDemandedOptions() - const options = yargs.getOptions() - - ;(Object.keys(options.alias) || []).forEach((key) => { - options.alias[key].forEach((alias) => { - // copy descriptions. - if (descriptions[alias]) self.describe(key, descriptions[alias]) - // copy demanded. - if (alias in demandedOptions) yargs.demandOption(key, demandedOptions[alias]) - // type messages. - if (~options.boolean.indexOf(alias)) yargs.boolean(key) - if (~options.count.indexOf(alias)) yargs.count(key) - if (~options.string.indexOf(alias)) yargs.string(key) - if (~options.normalize.indexOf(alias)) yargs.normalize(key) - if (~options.array.indexOf(alias)) yargs.array(key) - if (~options.number.indexOf(alias)) yargs.number(key) - }) - }) - } - - // if yargs is executing an async handler, we take a snapshot of the - // help message to display on failure: - let cachedHelpMessage - self.cacheHelpMessage = function () { - cachedHelpMessage = this.help() - } - - // given a set of keys, place any keys that are - // ungrouped under the 'Options:' grouping. - function addUngroupedKeys (keys, aliases, groups) { - let groupedKeys = [] - let toCheck = null - Object.keys(groups).forEach((group) => { - groupedKeys = groupedKeys.concat(groups[group]) - }) - - keys.forEach((key) => { - toCheck = [key].concat(aliases[key]) - if (!toCheck.some(k => groupedKeys.indexOf(k) !== -1)) { - groups[defaultGroup].push(key) - } - }) - return groupedKeys - } - - function filterHiddenOptions (key) { - return yargs.getOptions().hiddenOptions.indexOf(key) < 0 || yargs.parsed.argv[yargs.getOptions().showHiddenOpt] - } - - self.showHelp = (level) => { - const logger = yargs._getLoggerInstance() - if (!level) level = 'error' - const emit = typeof level === 'function' ? level : logger[level] - emit(self.help()) - } - - self.functionDescription = (fn) => { - const description = fn.name ? decamelize(fn.name, '-') : __('generated-value') - return ['(', description, ')'].join('') - } - - self.stringifiedValues = function stringifiedValues (values, separator) { - let string = '' - const sep = separator || ', ' - const array = [].concat(values) - - if (!values || !array.length) return string - - array.forEach((value) => { - if (string.length) string += sep - string += JSON.stringify(value) - }) - - return string - } - - // format the default-value-string displayed in - // the right-hand column. - function defaultString (value, defaultDescription) { - let string = `[${__('default:')} ` - - if (value === undefined && !defaultDescription) return null - - if (defaultDescription) { - string += defaultDescription - } else { - switch (typeof value) { - case 'string': - string += `"${value}"` - break - case 'object': - string += JSON.stringify(value) - break - default: - string += value - } - } - - return `${string}]` - } - - // guess the width of the console window, max-width 80. - function windowWidth () { - const maxWidth = 80 - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return Math.min(maxWidth, process.stdout.columns) - } else { - return maxWidth - } - } - - // logic for displaying application version. - let version = null - self.version = (ver) => { - version = ver - } - - self.showVersion = () => { - const logger = yargs._getLoggerInstance() - logger.log(version) - } - - self.reset = function reset (localLookup) { - // do not reset wrap here - // do not reset fails here - failMessage = null - failureOutput = false - usages = [] - usageDisabled = false - epilogs = [] - examples = [] - commands = [] - descriptions = objFilter(descriptions, (k, v) => !localLookup[k]) - return self - } - - let frozens = [] - self.freeze = function freeze () { - let frozen = {} - frozens.push(frozen) - frozen.failMessage = failMessage - frozen.failureOutput = failureOutput - frozen.usages = usages - frozen.usageDisabled = usageDisabled - frozen.epilogs = epilogs - frozen.examples = examples - frozen.commands = commands - frozen.descriptions = descriptions - } - self.unfreeze = function unfreeze () { - let frozen = frozens.pop() - failMessage = frozen.failMessage - failureOutput = frozen.failureOutput - usages = frozen.usages - usageDisabled = frozen.usageDisabled - epilogs = frozen.epilogs - examples = frozen.examples - commands = frozen.commands - descriptions = frozen.descriptions - } - - return self -} diff --git a/node_modules/yargs/lib/validation.js b/node_modules/yargs/lib/validation.js deleted file mode 100644 index 35659a35..00000000 --- a/node_modules/yargs/lib/validation.js +++ /dev/null @@ -1,350 +0,0 @@ -'use strict' -const argsert = require('./argsert') -const objFilter = require('./obj-filter') -const specialKeys = ['$0', '--', '_'] - -// validation-type-stuff, missing params, -// bad implications, custom checks. -module.exports = function validation (yargs, usage, y18n) { - const __ = y18n.__ - const __n = y18n.__n - const self = {} - - // validate appropriate # of non-option - // arguments were provided, i.e., '_'. - self.nonOptionCount = function nonOptionCount (argv) { - const demandedCommands = yargs.getDemandedCommands() - // don't count currently executing commands - const _s = argv._.length - yargs.getContext().commands.length - - if (demandedCommands._ && (_s < demandedCommands._.min || _s > demandedCommands._.max)) { - if (_s < demandedCommands._.min) { - if (demandedCommands._.minMsg !== undefined) { - usage.fail( - // replace $0 with observed, $1 with expected. - demandedCommands._.minMsg ? demandedCommands._.minMsg.replace(/\$0/g, _s).replace(/\$1/, demandedCommands._.min) : null - ) - } else { - usage.fail( - __('Not enough non-option arguments: got %s, need at least %s', _s, demandedCommands._.min) - ) - } - } else if (_s > demandedCommands._.max) { - if (demandedCommands._.maxMsg !== undefined) { - usage.fail( - // replace $0 with observed, $1 with expected. - demandedCommands._.maxMsg ? demandedCommands._.maxMsg.replace(/\$0/g, _s).replace(/\$1/, demandedCommands._.max) : null - ) - } else { - usage.fail( - __('Too many non-option arguments: got %s, maximum of %s', _s, demandedCommands._.max) - ) - } - } - } - } - - // validate the appropriate # of - // positional arguments were provided: - self.positionalCount = function positionalCount (required, observed) { - if (observed < required) { - usage.fail( - __('Not enough non-option arguments: got %s, need at least %s', observed, required) - ) - } - } - - // make sure all the required arguments are present. - self.requiredArguments = function requiredArguments (argv) { - const demandedOptions = yargs.getDemandedOptions() - let missing = null - - Object.keys(demandedOptions).forEach((key) => { - if (!argv.hasOwnProperty(key) || typeof argv[key] === 'undefined') { - missing = missing || {} - missing[key] = demandedOptions[key] - } - }) - - if (missing) { - const customMsgs = [] - Object.keys(missing).forEach((key) => { - const msg = missing[key] - if (msg && customMsgs.indexOf(msg) < 0) { - customMsgs.push(msg) - } - }) - - const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : '' - - usage.fail(__n( - 'Missing required argument: %s', - 'Missing required arguments: %s', - Object.keys(missing).length, - Object.keys(missing).join(', ') + customMsg - )) - } - } - - // check for unknown arguments (strict-mode). - self.unknownArguments = function unknownArguments (argv, aliases, positionalMap) { - const commandKeys = yargs.getCommandInstance().getCommands() - const unknown = [] - const currentContext = yargs.getContext() - - Object.keys(argv).forEach((key) => { - if (specialKeys.indexOf(key) === -1 && - !positionalMap.hasOwnProperty(key) && - !yargs._getParseContext().hasOwnProperty(key) && - !self.isValidAndSomeAliasIsNotNew(key, aliases) - ) { - unknown.push(key) - } - }) - - if ((currentContext.commands.length > 0) || (commandKeys.length > 0)) { - argv._.slice(currentContext.commands.length).forEach((key) => { - if (commandKeys.indexOf(key) === -1) { - unknown.push(key) - } - }) - } - - if (unknown.length > 0) { - usage.fail(__n( - 'Unknown argument: %s', - 'Unknown arguments: %s', - unknown.length, - unknown.join(', ') - )) - } - } - - // check for a key that is not an alias, or for which every alias is new, - // implying that it was invented by the parser, e.g., during camelization - self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew (key, aliases) { - if (!aliases.hasOwnProperty(key)) { - return false - } - const newAliases = yargs.parsed.newAliases - for (let a of [key, ...aliases[key]]) { - if (!newAliases.hasOwnProperty(a) || !newAliases[key]) { - return true - } - } - return false - } - - // validate arguments limited to enumerated choices - self.limitedChoices = function limitedChoices (argv) { - const options = yargs.getOptions() - const invalid = {} - - if (!Object.keys(options.choices).length) return - - Object.keys(argv).forEach((key) => { - if (specialKeys.indexOf(key) === -1 && - options.choices.hasOwnProperty(key)) { - [].concat(argv[key]).forEach((value) => { - // TODO case-insensitive configurability - if (options.choices[key].indexOf(value) === -1 && - value !== undefined) { - invalid[key] = (invalid[key] || []).concat(value) - } - }) - } - }) - - const invalidKeys = Object.keys(invalid) - - if (!invalidKeys.length) return - - let msg = __('Invalid values:') - invalidKeys.forEach((key) => { - msg += `\n ${__( - 'Argument: %s, Given: %s, Choices: %s', - key, - usage.stringifiedValues(invalid[key]), - usage.stringifiedValues(options.choices[key]) - )}` - }) - usage.fail(msg) - } - - // custom checks, added using the `check` option on yargs. - let checks = [] - self.check = function check (f, global) { - checks.push({ - func: f, - global - }) - } - - self.customChecks = function customChecks (argv, aliases) { - for (let i = 0, f; (f = checks[i]) !== undefined; i++) { - const func = f.func - let result = null - try { - result = func(argv, aliases) - } catch (err) { - usage.fail(err.message ? err.message : err, err) - continue - } - - if (!result) { - usage.fail(__('Argument check failed: %s', func.toString())) - } else if (typeof result === 'string' || result instanceof Error) { - usage.fail(result.toString(), result) - } - } - } - - // check implications, argument foo implies => argument bar. - let implied = {} - self.implies = function implies (key, value) { - argsert(' [array|number|string]', [key, value], arguments.length) - - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.implies(k, key[k]) - }) - } else { - yargs.global(key) - if (!implied[key]) { - implied[key] = [] - } - if (Array.isArray(value)) { - value.forEach((i) => self.implies(key, i)) - } else { - implied[key].push(value) - } - } - } - self.getImplied = function getImplied () { - return implied - } - - function keyExists (argv, val) { - // convert string '1' to number 1 - let num = Number(val) - val = isNaN(num) ? val : num - - if (typeof val === 'number') { - // check length of argv._ - val = argv._.length >= val - } else if (val.match(/^--no-.+/)) { - // check if key/value doesn't exist - val = val.match(/^--no-(.+)/)[1] - val = !argv[val] - } else { - // check if key/value exists - val = argv[val] - } - return val - } - - self.implications = function implications (argv) { - const implyFail = [] - - Object.keys(implied).forEach((key) => { - const origKey = key - ;(implied[key] || []).forEach((value) => { - let key = origKey - const origValue = value - key = keyExists(argv, key) - value = keyExists(argv, value) - - if (key && !value) { - implyFail.push(` ${origKey} -> ${origValue}`) - } - }) - }) - - if (implyFail.length) { - let msg = `${__('Implications failed:')}\n` - - implyFail.forEach((value) => { - msg += (value) - }) - - usage.fail(msg) - } - } - - let conflicting = {} - self.conflicts = function conflicts (key, value) { - argsert(' [array|string]', [key, value], arguments.length) - - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.conflicts(k, key[k]) - }) - } else { - yargs.global(key) - if (!conflicting[key]) { - conflicting[key] = [] - } - if (Array.isArray(value)) { - value.forEach((i) => self.conflicts(key, i)) - } else { - conflicting[key].push(value) - } - } - } - self.getConflicting = () => conflicting - - self.conflicting = function conflictingFn (argv) { - Object.keys(argv).forEach((key) => { - if (conflicting[key]) { - conflicting[key].forEach((value) => { - // we default keys to 'undefined' that have been configured, we should not - // apply conflicting check unless they are a value other than 'undefined'. - if (value && argv[key] !== undefined && argv[value] !== undefined) { - usage.fail(__('Arguments %s and %s are mutually exclusive', key, value)) - } - }) - } - }) - } - - self.recommendCommands = function recommendCommands (cmd, potentialCommands) { - const distance = require('./levenshtein') - const threshold = 3 // if it takes more than three edits, let's move on. - potentialCommands = potentialCommands.sort((a, b) => b.length - a.length) - - let recommended = null - let bestDistance = Infinity - for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) { - const d = distance(cmd, candidate) - if (d <= threshold && d < bestDistance) { - bestDistance = d - recommended = candidate - } - } - if (recommended) usage.fail(__('Did you mean %s?', recommended)) - } - - self.reset = function reset (localLookup) { - implied = objFilter(implied, (k, v) => !localLookup[k]) - conflicting = objFilter(conflicting, (k, v) => !localLookup[k]) - checks = checks.filter(c => c.global) - return self - } - - let frozens = [] - self.freeze = function freeze () { - let frozen = {} - frozens.push(frozen) - frozen.implied = implied - frozen.checks = checks - frozen.conflicting = conflicting - } - self.unfreeze = function unfreeze () { - let frozen = frozens.pop() - implied = frozen.implied - checks = frozen.checks - conflicting = frozen.conflicting - } - - return self -} diff --git a/node_modules/yargs/lib/yerror.js b/node_modules/yargs/lib/yerror.js deleted file mode 100644 index 53375a0f..00000000 --- a/node_modules/yargs/lib/yerror.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -function YError (msg) { - this.name = 'YError' - this.message = msg || 'yargs error' - Error.captureStackTrace(this, YError) -} - -YError.prototype = Object.create(Error.prototype) -YError.prototype.constructor = YError - -module.exports = YError diff --git a/node_modules/yargs/locales/be.json b/node_modules/yargs/locales/be.json deleted file mode 100644 index 141ebe1e..00000000 --- a/node_modules/yargs/locales/be.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Каманды:", - "Options:": "Опцыі:", - "Examples:": "Прыклады:", - "boolean": "булевы тып", - "count": "падлік", - "string": "радковы тып", - "number": "лік", - "array": "масіў", - "required": "неабходна", - "default:": "па змаўчанні:", - "choices:": "магчымасці:", - "aliases:": "аліасы:", - "generated-value": "згенераванае значэнне", - "Not enough non-option arguments: got %s, need at least %s": "Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s", - "Too many non-option arguments: got %s, maximum of %s": "Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s", - "Missing argument value: %s": { - "one": "Не хапае значэння аргументу: %s", - "other": "Не хапае значэнняў аргументаў: %s" - }, - "Missing required argument: %s": { - "one": "Не хапае неабходнага аргументу: %s", - "other": "Не хапае неабходных аргументаў: %s" - }, - "Unknown argument: %s": { - "one": "Невядомы аргумент: %s", - "other": "Невядомыя аргументы: %s" - }, - "Invalid values:": "Несапраўдныя значэння:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s", - "Argument check failed: %s": "Праверка аргументаў не ўдалася: %s", - "Implications failed:": "Дадзены аргумент патрабуе наступны дадатковы аргумент:", - "Not enough arguments following: %s": "Недастаткова наступных аргументаў: %s", - "Invalid JSON config file: %s": "Несапраўдны файл канфігурацыі JSON: %s", - "Path to JSON config file": "Шлях да файла канфігурацыі JSON", - "Show help": "Паказаць дапамогу", - "Show version number": "Паказаць нумар версіі", - "Did you mean %s?": "Вы мелі на ўвазе %s?" -} diff --git a/node_modules/yargs/locales/de.json b/node_modules/yargs/locales/de.json deleted file mode 100644 index 05d98373..00000000 --- a/node_modules/yargs/locales/de.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Kommandos:", - "Options:": "Optionen:", - "Examples:": "Beispiele:", - "boolean": "boolean", - "count": "Zähler", - "string": "string", - "number": "Zahl", - "array": "array", - "required": "erforderlich", - "default:": "Standard:", - "choices:": "Möglichkeiten:", - "aliases:": "Aliase:", - "generated-value": "Generierter-Wert", - "Not enough non-option arguments: got %s, need at least %s": "Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt", - "Too many non-option arguments: got %s, maximum of %s": "Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt", - "Missing argument value: %s": { - "one": "Fehlender Argumentwert: %s", - "other": "Fehlende Argumentwerte: %s" - }, - "Missing required argument: %s": { - "one": "Fehlendes Argument: %s", - "other": "Fehlende Argumente: %s" - }, - "Unknown argument: %s": { - "one": "Unbekanntes Argument: %s", - "other": "Unbekannte Argumente: %s" - }, - "Invalid values:": "Unzulässige Werte:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeben: %s, Möglichkeiten: %s", - "Argument check failed: %s": "Argumente-Check fehlgeschlagen: %s", - "Implications failed:": "Fehlende abhängige Argumente:", - "Not enough arguments following: %s": "Nicht genügend Argumente nach: %s", - "Invalid JSON config file: %s": "Fehlerhafte JSON-Config Datei: %s", - "Path to JSON config file": "Pfad zur JSON-Config Datei", - "Show help": "Hilfe anzeigen", - "Show version number": "Version anzeigen", - "Did you mean %s?": "Meintest du %s?" -} diff --git a/node_modules/yargs/locales/en.json b/node_modules/yargs/locales/en.json deleted file mode 100644 index b32a63f2..00000000 --- a/node_modules/yargs/locales/en.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "Commands:", - "Options:": "Options:", - "Examples:": "Examples:", - "boolean": "boolean", - "count": "count", - "string": "string", - "number": "number", - "array": "array", - "required": "required", - "default:": "default:", - "choices:": "choices:", - "aliases:": "aliases:", - "generated-value": "generated-value", - "Not enough non-option arguments: got %s, need at least %s": "Not enough non-option arguments: got %s, need at least %s", - "Too many non-option arguments: got %s, maximum of %s": "Too many non-option arguments: got %s, maximum of %s", - "Missing argument value: %s": { - "one": "Missing argument value: %s", - "other": "Missing argument values: %s" - }, - "Missing required argument: %s": { - "one": "Missing required argument: %s", - "other": "Missing required arguments: %s" - }, - "Unknown argument: %s": { - "one": "Unknown argument: %s", - "other": "Unknown arguments: %s" - }, - "Invalid values:": "Invalid values:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Given: %s, Choices: %s", - "Argument check failed: %s": "Argument check failed: %s", - "Implications failed:": "Missing dependent arguments:", - "Not enough arguments following: %s": "Not enough arguments following: %s", - "Invalid JSON config file: %s": "Invalid JSON config file: %s", - "Path to JSON config file": "Path to JSON config file", - "Show help": "Show help", - "Show version number": "Show version number", - "Did you mean %s?": "Did you mean %s?", - "Arguments %s and %s are mutually exclusive" : "Arguments %s and %s are mutually exclusive", - "Positionals:": "Positionals:", - "command": "command" -} diff --git a/node_modules/yargs/locales/es.json b/node_modules/yargs/locales/es.json deleted file mode 100644 index d7c8af9f..00000000 --- a/node_modules/yargs/locales/es.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opciones:", - "Examples:": "Ejemplos:", - "boolean": "booleano", - "count": "cuenta", - "string": "cadena de caracteres", - "number": "número", - "array": "tabla", - "required": "requerido", - "default:": "defecto:", - "choices:": "selección:", - "aliases:": "alias:", - "generated-value": "valor-generado", - "Not enough non-option arguments: got %s, need at least %s": "Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s", - "Missing argument value: %s": { - "one": "Falta argumento: %s", - "other": "Faltan argumentos: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento requerido: %s", - "other": "Faltan argumentos requeridos: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconocido: %s", - "other": "Argumentos desconocidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Recibido: %s, Seleccionados: %s", - "Argument check failed: %s": "Verificación de argumento ha fallado: %s", - "Implications failed:": "Implicaciones fallidas:", - "Not enough arguments following: %s": "No hay suficientes argumentos después de: %s", - "Invalid JSON config file: %s": "Archivo de configuración JSON inválido: %s", - "Path to JSON config file": "Ruta al archivo de configuración JSON", - "Show help": "Muestra ayuda", - "Show version number": "Muestra número de versión", - "Did you mean %s?": "Quisiste decir %s?" -} diff --git a/node_modules/yargs/locales/fr.json b/node_modules/yargs/locales/fr.json deleted file mode 100644 index cf9c74bf..00000000 --- a/node_modules/yargs/locales/fr.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Commands:": "Commandes:", - "Options:": "Options:", - "Examples:": "Exemples:", - "boolean": "booléen", - "count": "comptage", - "string": "chaine de caractère", - "number": "nombre", - "array": "tableau", - "required": "requis", - "default:": "défaut:", - "choices:": "choix:", - "generated-value": "valeur générée", - "Not enough non-option arguments: got %s, need at least %s": "Pas assez d'arguments non-option: reçu %s, besoin d'au moins %s", - "Too many non-option arguments: got %s, maximum of %s": "Trop d'arguments non-option: reçu %s, maximum %s", - "Missing argument value: %s": { - "one": "Argument manquant: %s", - "other": "Arguments manquants: %s" - }, - "Missing required argument: %s": { - "one": "Argument requis manquant: %s", - "other": "Arguments requis manquants: %s" - }, - "Unknown argument: %s": { - "one": "Argument inconnu: %s", - "other": "Arguments inconnus: %s" - }, - "Invalid values:": "Valeurs invalides:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Donné: %s, Choix: %s", - "Argument check failed: %s": "Echec de la vérification de l'argument: %s", - "Implications failed:": "Arguments dépendants manquants:", - "Not enough arguments following: %s": "Pas assez d'arguments suivant: %s", - "Invalid JSON config file: %s": "Fichier de configuration JSON invalide: %s", - "Path to JSON config file": "Chemin du fichier de configuration JSON", - "Show help": "Affiche de l'aide", - "Show version number": "Affiche le numéro de version" -} diff --git a/node_modules/yargs/locales/hi.json b/node_modules/yargs/locales/hi.json deleted file mode 100644 index 2cd677ac..00000000 --- a/node_modules/yargs/locales/hi.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "आदेश:", - "Options:": "विकल्प:", - "Examples:": "उदाहरण:", - "boolean": "सत्यता", - "count": "संख्या", - "string": "वर्णों का तार ", - "number": "अंक", - "array": "सरणी", - "required": "आवश्यक", - "default:": "डिफॉल्ट:", - "choices:": "विकल्प:", - "aliases:": "उपनाम:", - "generated-value": "उत्पन्न-मूल्य", - "Not enough non-option arguments: got %s, need at least %s": "पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है", - "Too many non-option arguments: got %s, maximum of %s": "बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य", - "Missing argument value: %s": { - "one": "कुछ तर्को के मूल्य गुम हैं: %s", - "other": "कुछ तर्को के मूल्य गुम हैं: %s" - }, - "Missing required argument: %s": { - "one": "आवश्यक तर्क गुम हैं: %s", - "other": "आवश्यक तर्क गुम हैं: %s" - }, - "Unknown argument: %s": { - "one": "अज्ञात तर्क प्राप्त: %s", - "other": "अज्ञात तर्क प्राप्त: %s" - }, - "Invalid values:": "अमान्य मूल्य:", - "Argument: %s, Given: %s, Choices: %s": "तर्क: %s, प्राप्त: %s, विकल्प: %s", - "Argument check failed: %s": "तर्क जांच विफल: %s", - "Implications failed:": "दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:", - "Not enough arguments following: %s": "निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s", - "Invalid JSON config file: %s": "अमान्य JSON config फाइल: %s", - "Path to JSON config file": "JSON config फाइल का पथ", - "Show help": "सहायता दिखाएँ", - "Show version number": "Version संख्या दिखाएँ", - "Did you mean %s?": "क्या आपका मतलब है %s?", - "Arguments %s and %s are mutually exclusive" : "तर्क %s और %s परस्पर अनन्य हैं", - "Positionals:": "स्थानीय:", - "command": "आदेश" -} diff --git a/node_modules/yargs/locales/hu.json b/node_modules/yargs/locales/hu.json deleted file mode 100644 index 7b7d1660..00000000 --- a/node_modules/yargs/locales/hu.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Parancsok:", - "Options:": "Opciók:", - "Examples:": "Példák:", - "boolean": "boolean", - "count": "számláló", - "string": "szöveg", - "number": "szám", - "array": "tömb", - "required": "kötelező", - "default:": "alapértelmezett:", - "choices:": "lehetőségek:", - "aliases:": "aliaszok:", - "generated-value": "generált-érték", - "Not enough non-option arguments: got %s, need at least %s": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell", - "Too many non-option arguments: got %s, maximum of %s": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet", - "Missing argument value: %s": { - "one": "Hiányzó argumentum érték: %s", - "other": "Hiányzó argumentum értékek: %s" - }, - "Missing required argument: %s": { - "one": "Hiányzó kötelező argumentum: %s", - "other": "Hiányzó kötelező argumentumok: %s" - }, - "Unknown argument: %s": { - "one": "Ismeretlen argumentum: %s", - "other": "Ismeretlen argumentumok: %s" - }, - "Invalid values:": "Érvénytelen érték:", - "Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s", - "Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s", - "Implications failed:": "Implikációk sikertelenek:", - "Not enough arguments following: %s": "Nem elég argumentum követi: %s", - "Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s", - "Path to JSON config file": "JSON konfigurációs file helye", - "Show help": "Súgo megjelenítése", - "Show version number": "Verziószám megjelenítése", - "Did you mean %s?": "Erre gondoltál %s?" -} diff --git a/node_modules/yargs/locales/id.json b/node_modules/yargs/locales/id.json deleted file mode 100644 index 87e441cd..00000000 --- a/node_modules/yargs/locales/id.json +++ /dev/null @@ -1,43 +0,0 @@ - -{ - "Commands:": "Perintah:", - "Options:": "Pilihan:", - "Examples:": "Contoh:", - "boolean": "boolean", - "count": "jumlah", - "number": "nomor", - "string": "string", - "array": "larik", - "required": "diperlukan", - "default:": "bawaan:", - "aliases:": "istilah lain:", - "choices:": "pilihan:", - "generated-value": "nilai-yang-dihasilkan", - "Not enough non-option arguments: got %s, need at least %s": "Argumen wajib kurang: hanya %s, minimal %s", - "Too many non-option arguments: got %s, maximum of %s": "Terlalu banyak argumen wajib: ada %s, maksimal %s", - "Missing argument value: %s": { - "one": "Kurang argumen: %s", - "other": "Kurang argumen: %s" - }, - "Missing required argument: %s": { - "one": "Kurang argumen wajib: %s", - "other": "Kurang argumen wajib: %s" - }, - "Unknown argument: %s": { - "one": "Argumen tak diketahui: %s", - "other": "Argumen tak diketahui: %s" - }, - "Invalid values:": "Nilai-nilai tidak valid:", - "Argument: %s, Given: %s, Choices: %s": "Argumen: %s, Diberikan: %s, Pilihan: %s", - "Argument check failed: %s": "Pemeriksaan argument gagal: %s", - "Implications failed:": "Implikasi gagal:", - "Not enough arguments following: %s": "Kurang argumen untuk: %s", - "Invalid JSON config file: %s": "Berkas konfigurasi JSON tidak valid: %s", - "Path to JSON config file": "Alamat berkas konfigurasi JSON", - "Show help": "Lihat bantuan", - "Show version number": "Lihat nomor versi", - "Did you mean %s?": "Maksud Anda: %s?", - "Arguments %s and %s are mutually exclusive" : "Argumen %s dan %s saling eksklusif", - "Positionals:": "Posisional-posisional:", - "command": "perintah" -} diff --git a/node_modules/yargs/locales/it.json b/node_modules/yargs/locales/it.json deleted file mode 100644 index 9ee900d3..00000000 --- a/node_modules/yargs/locales/it.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Comandi:", - "Options:": "Opzioni:", - "Examples:": "Esempi:", - "boolean": "booleano", - "count": "contatore", - "string": "stringa", - "number": "numero", - "array": "vettore", - "required": "richiesto", - "default:": "predefinito:", - "choices:": "scelte:", - "aliases:": "alias:", - "generated-value": "valore generato", - "Not enough non-option arguments: got %s, need at least %s": "Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s", - "Too many non-option arguments: got %s, maximum of %s": "Troppi argomenti non opzione: inseriti %s, massimo possibile %s", - "Missing argument value: %s": { - "one": "Argomento mancante: %s", - "other": "Argomenti mancanti: %s" - }, - "Missing required argument: %s": { - "one": "Argomento richiesto mancante: %s", - "other": "Argomenti richiesti mancanti: %s" - }, - "Unknown argument: %s": { - "one": "Argomento sconosciuto: %s", - "other": "Argomenti sconosciuti: %s" - }, - "Invalid values:": "Valori non validi:", - "Argument: %s, Given: %s, Choices: %s": "Argomento: %s, Richiesto: %s, Scelte: %s", - "Argument check failed: %s": "Controllo dell'argomento fallito: %s", - "Implications failed:": "Argomenti dipendenti mancanti:", - "Not enough arguments following: %s": "Argomenti insufficienti dopo: %s", - "Invalid JSON config file: %s": "File di configurazione JSON non valido: %s", - "Path to JSON config file": "Percorso del file di configurazione JSON", - "Show help": "Mostra la schermata di aiuto", - "Show version number": "Mostra il numero di versione", - "Did you mean %s?": "Intendi forse %s?" -} diff --git a/node_modules/yargs/locales/ja.json b/node_modules/yargs/locales/ja.json deleted file mode 100644 index 64ee6d3f..00000000 --- a/node_modules/yargs/locales/ja.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "コマンド:", - "Options:": "オプション:", - "Examples:": "例:", - "boolean": "真偽", - "count": "カウント", - "string": "文字列", - "number": "数値", - "array": "配列", - "required": "必須", - "default:": "デフォルト:", - "choices:": "選択してください:", - "aliases:": "エイリアス:", - "generated-value": "生成された値", - "Not enough non-option arguments: got %s, need at least %s": "オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:", - "Too many non-option arguments: got %s, maximum of %s": "オプションではない引数が %s 個では多すぎます。最大で %s 個までです:", - "Missing argument value: %s": { - "one": "引数が見つかりません: %s", - "other": "引数が見つかりません: %s" - }, - "Missing required argument: %s": { - "one": "必須の引数が見つかりません: %s", - "other": "必須の引数が見つかりません: %s" - }, - "Unknown argument: %s": { - "one": "未知の引数です: %s", - "other": "未知の引数です: %s" - }, - "Invalid values:": "不正な値です:", - "Argument: %s, Given: %s, Choices: %s": "引数は %s です。指定できるのは %s つです。選択してください: %s", - "Argument check failed: %s": "引数のチェックに失敗しました: %s", - "Implications failed:": "オプションの組み合わせで不正が生じました:", - "Not enough arguments following: %s": "次の引数が不足しています。: %s", - "Invalid JSON config file: %s": "JSONの設定ファイルが不正です: %s", - "Path to JSON config file": "JSONの設定ファイルまでのpath", - "Show help": "ヘルプを表示", - "Show version number": "バージョンを表示", - "Did you mean %s?": "もしかして %s?", - "Arguments %s and %s are mutually exclusive" : "引数 %s と %s は同時に指定できません", - "Positionals:": "位置:", - "command": "コマンド" -} diff --git a/node_modules/yargs/locales/ko.json b/node_modules/yargs/locales/ko.json deleted file mode 100644 index 0eaeab2f..00000000 --- a/node_modules/yargs/locales/ko.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "명령:", - "Options:": "옵션:", - "Examples:": "예시:", - "boolean": "여부", - "count": "개수", - "string": "문자열", - "number": "숫자", - "array": "배열", - "required": "필수", - "default:": "기본:", - "choices:": "선택:", - "aliases:": "별칭:", - "generated-value": "생성된 값", - "Not enough non-option arguments: got %s, need at least %s": "옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다", - "Too many non-option arguments: got %s, maximum of %s": "옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다", - "Missing argument value: %s": { - "one": "인자값을 받지 못했습니다: %s", - "other": "인자값들을 받지 못했습니다: %s" - }, - "Missing required argument: %s": { - "one": "필수 인자를 받지 못했습니다: %s", - "other": "필수 인자들을 받지 못했습니다: %s" - }, - "Unknown argument: %s": { - "one": "알 수 없는 인자입니다: %s", - "other": "알 수 없는 인자들입니다: %s" - }, - "Invalid values:": "잘못된 값입니다:", - "Argument: %s, Given: %s, Choices: %s": "인자: %s, 입력받은 값: %s, 선택지: %s", - "Argument check failed: %s": "유효하지 않은 인자입니다: %s", - "Implications failed:": "옵션의 조합이 잘못되었습니다:", - "Not enough arguments following: %s": "인자가 충분하게 주어지지 않았습니다: %s", - "Invalid JSON config file: %s": "유효하지 않은 JSON 설정파일입니다: %s", - "Path to JSON config file": "JSON 설정파일 경로", - "Show help": "도움말을 보여줍니다", - "Show version number": "버전 넘버를 보여줍니다", - "Did you mean %s?": "찾고계신게 %s입니까?", - "Arguments %s and %s are mutually exclusive" : "%s와 %s 인자는 같이 사용될 수 없습니다", - "Positionals:": "위치:", - "command": "명령" -} diff --git a/node_modules/yargs/locales/nb.json b/node_modules/yargs/locales/nb.json deleted file mode 100644 index 55be1fbe..00000000 --- a/node_modules/yargs/locales/nb.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Commands:": "Kommandoer:", - "Options:": "Alternativer:", - "Examples:": "Eksempler:", - "boolean": "boolsk", - "count": "antall", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default:": "standard:", - "choices:": "valg:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": "Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s", - "Too many non-option arguments: got %s, maximum of %s": "For mange ikke-alternativ argumenter: fikk %s, maksimum %s", - "Missing argument value: %s": { - "one": "Mangler argument verdi: %s", - "other": "Mangler argument verdier: %s" - }, - "Missing required argument: %s": { - "one": "Mangler obligatorisk argument: %s", - "other": "Mangler obligatoriske argumenter: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjente argumenter: %s" - }, - "Invalid values:": "Ugyldige verdier:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gitt: %s, Valg: %s", - "Argument check failed: %s": "Argumentsjekk mislyktes: %s", - "Implications failed:": "Konsekvensene mislyktes:", - "Not enough arguments following: %s": "Ikke nok følgende argumenter: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs/locales/nl.json b/node_modules/yargs/locales/nl.json deleted file mode 100644 index 5d62e0fc..00000000 --- a/node_modules/yargs/locales/nl.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "Commando's:", - "Options:": "Opties:", - "Examples:": "Voorbeelden:", - "boolean": "booleaans", - "count": "aantal", - "string": "string", - "number": "getal", - "array": "lijst", - "required": "verplicht", - "default:": "standaard:", - "choices:": "keuzes:", - "aliases:": "aliassen:", - "generated-value": "gegenereerde waarde", - "Not enough non-option arguments: got %s, need at least %s": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig", - "Too many non-option arguments: got %s, maximum of %s": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s", - "Missing argument value: %s": { - "one": "Missende argumentwaarde: %s", - "other": "Missende argumentwaarden: %s" - }, - "Missing required argument: %s": { - "one": "Missend verplicht argument: %s", - "other": "Missende verplichte argumenten: %s" - }, - "Unknown argument: %s": { - "one": "Onbekend argument: %s", - "other": "Onbekende argumenten: %s" - }, - "Invalid values:": "Ongeldige waarden:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s", - "Argument check failed: %s": "Argumentcontrole mislukt: %s", - "Implications failed:": "Ontbrekende afhankelijke argumenten:", - "Not enough arguments following: %s": "Niet genoeg argumenten na: %s", - "Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s", - "Path to JSON config file": "Pad naar JSON-config-bestand", - "Show help": "Toon help", - "Show version number": "Toon versienummer", - "Did you mean %s?": "Bedoelde u misschien %s?", - "Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden", - "Positionals:": "Positie-afhankelijke argumenten", - "command": "commando" -} diff --git a/node_modules/yargs/locales/nn.json b/node_modules/yargs/locales/nn.json deleted file mode 100644 index 5a3c9514..00000000 --- a/node_modules/yargs/locales/nn.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Kommandoar:", - "Options:": "Alternativ:", - "Examples:": "Døme:", - "boolean": "boolsk", - "count": "mengd", - "string": "streng", - "number": "nummer", - "array": "matrise", - "required": "obligatorisk", - "default:": "standard:", - "choices:": "val:", - "generated-value": "generert-verdi", - "Not enough non-option arguments: got %s, need at least %s": - "Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s", - "Too many non-option arguments: got %s, maximum of %s": - "For mange ikkje-alternativ argument: fekk %s, maksimum %s", - "Missing argument value: %s": { - "one": "Manglar argumentverdi: %s", - "other": "Manglar argumentverdiar: %s" - }, - "Missing required argument: %s": { - "one": "Manglar obligatorisk argument: %s", - "other": "Manglar obligatoriske argument: %s" - }, - "Unknown argument: %s": { - "one": "Ukjent argument: %s", - "other": "Ukjende argument: %s" - }, - "Invalid values:": "Ugyldige verdiar:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gjeve: %s, Val: %s", - "Argument check failed: %s": "Argumentsjekk mislukkast: %s", - "Implications failed:": "Konsekvensane mislukkast:", - "Not enough arguments following: %s": "Ikkje nok fylgjande argument: %s", - "Invalid JSON config file: %s": "Ugyldig JSON konfigurasjonsfil: %s", - "Path to JSON config file": "Bane til JSON konfigurasjonsfil", - "Show help": "Vis hjelp", - "Show version number": "Vis versjonsnummer" -} diff --git a/node_modules/yargs/locales/pirate.json b/node_modules/yargs/locales/pirate.json deleted file mode 100644 index dcb5cb75..00000000 --- a/node_modules/yargs/locales/pirate.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "Commands:": "Choose yer command:", - "Options:": "Options for me hearties!", - "Examples:": "Ex. marks the spot:", - "required": "requi-yar-ed", - "Missing required argument: %s": { - "one": "Ye be havin' to set the followin' argument land lubber: %s", - "other": "Ye be havin' to set the followin' arguments land lubber: %s" - }, - "Show help": "Parlay this here code of conduct", - "Show version number": "'Tis the version ye be askin' fer", - "Arguments %s and %s are mutually exclusive" : "Yon scurvy dogs %s and %s be as bad as rum and a prudish wench" -} diff --git a/node_modules/yargs/locales/pl.json b/node_modules/yargs/locales/pl.json deleted file mode 100644 index 6926a454..00000000 --- a/node_modules/yargs/locales/pl.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "Polecenia:", - "Options:": "Opcje:", - "Examples:": "Przykłady:", - "boolean": "boolean", - "count": "ilość", - "string": "ciąg znaków", - "number": "liczba", - "array": "tablica", - "required": "wymagany", - "default:": "domyślny:", - "choices:": "dostępne:", - "aliases:": "aliasy:", - "generated-value": "wygenerowana-wartość", - "Not enough non-option arguments: got %s, need at least %s": "Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s", - "Too many non-option arguments: got %s, maximum of %s": "Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s", - "Missing argument value: %s": { - "one": "Brak wartości dla argumentu: %s", - "other": "Brak wartości dla argumentów: %s" - }, - "Missing required argument: %s": { - "one": "Brak wymaganego argumentu: %s", - "other": "Brak wymaganych argumentów: %s" - }, - "Unknown argument: %s": { - "one": "Nieznany argument: %s", - "other": "Nieznane argumenty: %s" - }, - "Invalid values:": "Nieprawidłowe wartości:", - "Argument: %s, Given: %s, Choices: %s": "Argument: %s, Otrzymano: %s, Dostępne: %s", - "Argument check failed: %s": "Weryfikacja argumentów nie powiodła się: %s", - "Implications failed:": "Założenia nie zostały spełnione:", - "Not enough arguments following: %s": "Niewystarczająca ilość argumentów następujących po: %s", - "Invalid JSON config file: %s": "Nieprawidłowy plik konfiguracyjny JSON: %s", - "Path to JSON config file": "Ścieżka do pliku konfiguracyjnego JSON", - "Show help": "Pokaż pomoc", - "Show version number": "Pokaż numer wersji", - "Did you mean %s?": "Czy chodziło Ci o %s?", - "Arguments %s and %s are mutually exclusive": "Argumenty %s i %s wzajemnie się wykluczają", - "Positionals:": "Pozycyjne:", - "command": "polecenie" -} diff --git a/node_modules/yargs/locales/pt.json b/node_modules/yargs/locales/pt.json deleted file mode 100644 index 75c3921c..00000000 --- a/node_modules/yargs/locales/pt.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "boolean", - "count": "contagem", - "string": "cadeia de caracteres", - "number": "número", - "array": "arranjo", - "required": "requerido", - "default:": "padrão:", - "choices:": "escolhas:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos não opcionais: recebido %s, máximo de %s", - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Escolhas: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Insuficientes argumentos a seguir: %s", - "Invalid JSON config file: %s": "Arquivo de configuração em JSON esta inválido: %s", - "Path to JSON config file": "Caminho para o arquivo de configuração em JSON", - "Show help": "Mostra ajuda", - "Show version number": "Mostra número de versão", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos" -} diff --git a/node_modules/yargs/locales/pt_BR.json b/node_modules/yargs/locales/pt_BR.json deleted file mode 100644 index 904cb66e..00000000 --- a/node_modules/yargs/locales/pt_BR.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "Commands:": "Comandos:", - "Options:": "Opções:", - "Examples:": "Exemplos:", - "boolean": "booleano", - "count": "contagem", - "string": "string", - "number": "número", - "array": "array", - "required": "obrigatório", - "default:": "padrão:", - "choices:": "opções:", - "aliases:": "sinônimos:", - "generated-value": "valor-gerado", - "Not enough non-option arguments: got %s, need at least %s": "Argumentos insuficientes: Argumento %s, necessário pelo menos %s", - "Too many non-option arguments: got %s, maximum of %s": "Excesso de argumentos: recebido %s, máximo de %s", - "Missing argument value: %s": { - "one": "Falta valor de argumento: %s", - "other": "Falta valores de argumento: %s" - }, - "Missing required argument: %s": { - "one": "Falta argumento obrigatório: %s", - "other": "Faltando argumentos obrigatórios: %s" - }, - "Unknown argument: %s": { - "one": "Argumento desconhecido: %s", - "other": "Argumentos desconhecidos: %s" - }, - "Invalid values:": "Valores inválidos:", - "Argument: %s, Given: %s, Choices: %s": "Argumento: %s, Dado: %s, Opções: %s", - "Argument check failed: %s": "Verificação de argumento falhou: %s", - "Implications failed:": "Implicações falharam:", - "Not enough arguments following: %s": "Argumentos insuficientes a seguir: %s", - "Invalid JSON config file: %s": "Arquivo JSON de configuração inválido: %s", - "Path to JSON config file": "Caminho para o arquivo JSON de configuração", - "Show help": "Exibe ajuda", - "Show version number": "Exibe a versão", - "Did you mean %s?": "Você quis dizer %s?", - "Arguments %s and %s are mutually exclusive" : "Argumentos %s e %s são mutualmente exclusivos", - "Positionals:": "Posicionais:", - "command": "comando" -} diff --git a/node_modules/yargs/locales/ru.json b/node_modules/yargs/locales/ru.json deleted file mode 100644 index cb7b88b4..00000000 --- a/node_modules/yargs/locales/ru.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "Команды:", - "Options:": "Опции:", - "Examples:": "Примеры:", - "boolean": "булевый тип", - "count": "подсчет", - "string": "строковой тип", - "number": "число", - "array": "массив", - "required": "необходимо", - "default:": "по умолчанию:", - "choices:": "возможности:", - "aliases:": "алиасы:", - "generated-value": "генерированное значение", - "Not enough non-option arguments: got %s, need at least %s": "Недостаточно неопционных аргументов: есть %s, нужно как минимум %s", - "Too many non-option arguments: got %s, maximum of %s": "Слишком много неопционных аргументов: есть %s, максимум допустимо %s", - "Missing argument value: %s": { - "one": "Не хватает значения аргумента: %s", - "other": "Не хватает значений аргументов: %s" - }, - "Missing required argument: %s": { - "one": "Не хватает необходимого аргумента: %s", - "other": "Не хватает необходимых аргументов: %s" - }, - "Unknown argument: %s": { - "one": "Неизвестный аргумент: %s", - "other": "Неизвестные аргументы: %s" - }, - "Invalid values:": "Недействительные значения:", - "Argument: %s, Given: %s, Choices: %s": "Аргумент: %s, Данное значение: %s, Возможности: %s", - "Argument check failed: %s": "Проверка аргументов не удалась: %s", - "Implications failed:": "Данный аргумент требует следующий дополнительный аргумент:", - "Not enough arguments following: %s": "Недостаточно следующих аргументов: %s", - "Invalid JSON config file: %s": "Недействительный файл конфигурации JSON: %s", - "Path to JSON config file": "Путь к файлу конфигурации JSON", - "Show help": "Показать помощь", - "Show version number": "Показать номер версии", - "Did you mean %s?": "Вы имели в виду %s?" -} diff --git a/node_modules/yargs/locales/th.json b/node_modules/yargs/locales/th.json deleted file mode 100644 index 3f08dcd2..00000000 --- a/node_modules/yargs/locales/th.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "Commands:": "คอมมาน", - "Options:": "ออฟชั่น", - "Examples:": "ตัวอย่าง", - "boolean": "บูลีน", - "count": "นับ", - "string": "สตริง", - "number": "ตัวเลข", - "array": "อาเรย์", - "required": "จำเป็น", - "default:": "ค่าเริ่มต้น", - "choices:": "ตัวเลือก", - "aliases:": "เอเลียส", - "generated-value": "ค่าที่ถูกสร้างขึ้น", - "Not enough non-option arguments: got %s, need at least %s": "ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า", - "Too many non-option arguments: got %s, maximum of %s": "ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า", - "Missing argument value: %s": { - "one": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s", - "other": "ค่าอาร์กิวเมนต์ที่ขาดไป: %s" - }, - "Missing required argument: %s": { - "one": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s", - "other": "อาร์กิวเมนต์จำเป็นที่ขาดไป: %s" - }, - "Unknown argument: %s": { - "one": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s", - "other": "อาร์กิวเมนต์ที่ไม่รู้จัก: %s" - }, - "Invalid values:": "ค่าไม่ถูกต้อง:", - "Argument: %s, Given: %s, Choices: %s": "อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s", - "Argument check failed: %s": "ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s", - "Implications failed:": "Implications ไม่สำเร็จ:", - "Not enough arguments following: %s": "ใส่อาร์กิวเมนต์ไม่ครบ: %s", - "Invalid JSON config file: %s": "ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s", - "Path to JSON config file": "พาทไฟล์คอนฟิค JSON", - "Show help": "ขอความช่วยเหลือ", - "Show version number": "แสดงตัวเลขเวอร์ชั่น", - "Did you mean %s?": "คุณหมายถึง %s?" -} diff --git a/node_modules/yargs/locales/tr.json b/node_modules/yargs/locales/tr.json deleted file mode 100644 index 9b06c52a..00000000 --- a/node_modules/yargs/locales/tr.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "Commands:": "Komutlar:", - "Options:": "Seçenekler:", - "Examples:": "Örnekler:", - "boolean": "boolean", - "count": "sayı", - "string": "string", - "number": "numara", - "array": "array", - "required": "zorunlu", - "default:": "varsayılan:", - "choices:": "seçimler:", - "aliases:": "takma adlar:", - "generated-value": "oluşturulan-değer", - "Not enough non-option arguments: got %s, need at least %s": "Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli", - "Too many non-option arguments: got %s, maximum of %s": "Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s", - "Missing argument value: %s": { - "one": "Eksik argüman değeri: %s", - "other": "Eksik argüman değerleri: %s" - }, - "Missing required argument: %s": { - "one": "Eksik zorunlu argüman: %s", - "other": "Eksik zorunlu argümanlar: %s" - }, - "Unknown argument: %s": { - "one": "Bilinmeyen argüman: %s", - "other": "Bilinmeyen argümanlar: %s" - }, - "Invalid values:": "Geçersiz değerler:", - "Argument: %s, Given: %s, Choices: %s": "Argüman: %s, Verilen: %s, Seçimler: %s", - "Argument check failed: %s": "Argüman kontrolü başarısız oldu: %s", - "Implications failed:": "Sonuçlar başarısız oldu:", - "Not enough arguments following: %s": "%s için yeterli argüman bulunamadı", - "Invalid JSON config file: %s": "Geçersiz JSON yapılandırma dosyası: %s", - "Path to JSON config file": "JSON yapılandırma dosya konumu", - "Show help": "Yardım detaylarını göster", - "Show version number": "Versiyon detaylarını göster", - "Did you mean %s?": "Bunu mu demek istediniz: %s?", - "Positionals:": "Sıralılar:", - "command": "komut" -} diff --git a/node_modules/yargs/locales/zh_CN.json b/node_modules/yargs/locales/zh_CN.json deleted file mode 100644 index 03a3d94f..00000000 --- a/node_modules/yargs/locales/zh_CN.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "选项:", - "Examples:": "示例:", - "boolean": "布尔", - "count": "计数", - "string": "字符串", - "number": "数字", - "array": "数组", - "required": "必需", - "default:": "默认值:", - "choices:": "可选值:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": "缺少 non-option 参数:传入了 %s 个, 至少需要 %s 个", - "Too many non-option arguments: got %s, maximum of %s": "non-option 参数过多:传入了 %s 个, 最大允许 %s 个", - "Missing argument value: %s": { - "one": "没有给此选项指定值:%s", - "other": "没有给这些选项指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必须的选项:%s", - "other": "缺少这些必须的选项:%s" - }, - "Unknown argument: %s": { - "one": "无法识别的选项:%s", - "other": "无法识别这些选项:%s" - }, - "Invalid values:": "无效的选项值:", - "Argument: %s, Given: %s, Choices: %s": "选项名称: %s, 传入的值: %s, 可选的值:%s", - "Argument check failed: %s": "选项值验证失败:%s", - "Implications failed:": "缺少依赖的选项:", - "Not enough arguments following: %s": "没有提供足够的值给此选项:%s", - "Invalid JSON config file: %s": "无效的 JSON 配置文件:%s", - "Path to JSON config file": "JSON 配置文件的路径", - "Show help": "显示帮助信息", - "Show version number": "显示版本号", - "Did you mean %s?": "是指 %s?", - "Arguments %s and %s are mutually exclusive" : "选项 %s 和 %s 是互斥的", - "Positionals:": "位置:", - "command": "命令" -} diff --git a/node_modules/yargs/locales/zh_TW.json b/node_modules/yargs/locales/zh_TW.json deleted file mode 100644 index 12498888..00000000 --- a/node_modules/yargs/locales/zh_TW.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "Commands:": "命令:", - "Options:": "選項:", - "Examples:": "例:", - "boolean": "布林", - "count": "次數", - "string": "字串", - "number": "數字", - "array": "陣列", - "required": "必須", - "default:": "預設值:", - "choices:": "可選值:", - "aliases:": "別名:", - "generated-value": "生成的值", - "Not enough non-option arguments: got %s, need at least %s": "non-option 引數不足:只傳入了 %s 個, 至少要 %s 個", - "Too many non-option arguments: got %s, maximum of %s": "non-option 引數過多:傳入了 %s 個, 但最多 %s 個", - "Missing argument value: %s": { - "one": "此引數無指定值:%s", - "other": "這些引數無指定值:%s" - }, - "Missing required argument: %s": { - "one": "缺少必須的引數:%s", - "other": "缺少這些必須的引數:%s" - }, - "Unknown argument: %s": { - "one": "未知的引數:%s", - "other": "未知的這些引數:%s" - }, - "Invalid values:": "無效的選項值:", - "Argument: %s, Given: %s, Choices: %s": "引數名稱: %s, 傳入的值: %s, 可選的值:%s", - "Argument check failed: %s": "引數驗證失敗:%s", - "Implications failed:": "缺少依賴的選項:", - "Not enough arguments following: %s": "沒有提供足夠的值給此引數:%s", - "Invalid JSON config file: %s": "無效的 JSON 設置文件:%s", - "Path to JSON config file": "JSON 設置文件的路徑", - "Show help": "顯示說明", - "Show version number": "顯示版本", - "Did you mean %s?": "是指 %s?", - "Arguments %s and %s are mutually exclusive" : "引數 %s 和 %s 是互斥的" -} diff --git a/node_modules/yargs/package.json b/node_modules/yargs/package.json deleted file mode 100644 index 92424d22..00000000 --- a/node_modules/yargs/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "yargs", - "version": "14.2.3", - "description": "yargs the modern, pirate-themed, successor to optimist.", - "main": "./index.js", - "contributors": [ - { - "name": "Yargs Contributors", - "url": "https://github.com/yargs/yargs/graphs/contributors" - } - ], - "files": [ - "index.js", - "yargs.js", - "lib", - "locales", - "completion.sh.hbs", - "completion.zsh.hbs", - "LICENSE" - ], - "dependencies": { - "cliui": "^5.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.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": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^15.0.1" - }, - "devDependencies": { - "chai": "^4.2.0", - "chalk": "^2.4.2", - "coveralls": "^3.0.3", - "cpr": "^3.0.1", - "cross-spawn": "^6.0.4", - "es6-promise": "^4.2.5", - "hashish": "0.0.4", - "mocha": "^5.2.0", - "nyc": "^14.1.0", - "rimraf": "^2.6.3", - "standard": "^12.0.1", - "standard-version": "^7.0.0", - "which": "^1.3.1", - "yargs-test-extends": "^1.0.1" - }, - "scripts": { - "pretest": "standard", - "test": "nyc --cache mocha --require ./test/before.js --timeout=12000 --check-leaks", - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "standard-version" - }, - "repository": { - "type": "git", - "url": "https://github.com/yargs/yargs.git" - }, - "homepage": "https://yargs.js.org/", - "standard": { - "ignore": [ - "**/example/**" - ] - }, - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "license": "MIT", - "engine": { - "node": ">=6" - } -} diff --git a/node_modules/yargs/yargs.js b/node_modules/yargs/yargs.js deleted file mode 100644 index fdc8a095..00000000 --- a/node_modules/yargs/yargs.js +++ /dev/null @@ -1,1252 +0,0 @@ -'use strict' -const argsert = require('./lib/argsert') -const fs = require('fs') -const Command = require('./lib/command') -const Completion = require('./lib/completion') -const Parser = require('yargs-parser') -const path = require('path') -const Usage = require('./lib/usage') -const Validation = require('./lib/validation') -const Y18n = require('y18n') -const objFilter = require('./lib/obj-filter') -const setBlocking = require('set-blocking') -const applyExtends = require('./lib/apply-extends') -const { globalMiddlewareFactory } = require('./lib/middleware') -const YError = require('./lib/yerror') - -exports = module.exports = Yargs -function Yargs (processArgs, cwd, parentRequire) { - processArgs = processArgs || [] // handle calling yargs(). - - const self = {} - let command = null - let completion = null - let groups = {} - let globalMiddleware = [] - let output = '' - let preservedGroups = {} - let usage = null - let validation = null - - const y18n = Y18n({ - directory: path.resolve(__dirname, './locales'), - updateFiles: false - }) - - self.middleware = globalMiddlewareFactory(globalMiddleware, self) - - if (!cwd) cwd = process.cwd() - - self.scriptName = function (scriptName) { - self.customScriptName = true - self.$0 = scriptName - return self - } - - // ignore the node bin, specify this in your - // bin file with #!/usr/bin/env node - if (/\b(node|iojs|electron)(\.exe)?$/.test(process.argv[0])) { - self.$0 = process.argv.slice(1, 2) - } else { - self.$0 = process.argv.slice(0, 1) - } - - self.$0 = self.$0 - .map((x, i) => { - const b = rebase(cwd, x) - return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x - }) - .join(' ').trim() - - if (process.env._ !== undefined && process.argv[1] === process.env._) { - self.$0 = process.env._.replace( - `${path.dirname(process.execPath)}/`, '' - ) - } - - // use context object to keep track of resets, subcommand execution, etc - // submodules should modify and check the state of context as necessary - const context = { resets: -1, commands: [], fullCommands: [], files: [] } - self.getContext = () => context - - // puts yargs back into an initial state. any keys - // that have been set to "global" will not be reset - // by this action. - let options - self.resetOptions = self.reset = function resetOptions (aliases) { - context.resets++ - aliases = aliases || {} - options = options || {} - // put yargs back into an initial state, this - // logic is used to build a nested command - // hierarchy. - const tmpOptions = {} - tmpOptions.local = options.local ? options.local : [] - tmpOptions.configObjects = options.configObjects ? options.configObjects : [] - - // if a key has been explicitly set as local, - // we should reset it before passing options to command. - const localLookup = {} - tmpOptions.local.forEach((l) => { - localLookup[l] = true - ;(aliases[l] || []).forEach((a) => { - localLookup[a] = true - }) - }) - - // add all groups not set to local to preserved groups - Object.assign( - preservedGroups, - Object.keys(groups).reduce((acc, groupName) => { - const keys = groups[groupName].filter(key => !(key in localLookup)) - if (keys.length > 0) { - acc[groupName] = keys - } - return acc - }, {}) - ) - // groups can now be reset - groups = {} - - const arrayOptions = [ - 'array', 'boolean', 'string', 'skipValidation', - 'count', 'normalize', 'number', - 'hiddenOptions' - ] - - const objectOptions = [ - 'narg', 'key', 'alias', 'default', 'defaultDescription', - 'config', 'choices', 'demandedOptions', 'demandedCommands', 'coerce' - ] - - arrayOptions.forEach((k) => { - tmpOptions[k] = (options[k] || []).filter(k => !localLookup[k]) - }) - - objectOptions.forEach((k) => { - tmpOptions[k] = objFilter(options[k], (k, v) => !localLookup[k]) - }) - - tmpOptions.envPrefix = options.envPrefix - options = tmpOptions - - // if this is the first time being executed, create - // instances of all our helpers -- otherwise just reset. - usage = usage ? usage.reset(localLookup) : Usage(self, y18n) - validation = validation ? validation.reset(localLookup) : Validation(self, usage, y18n) - command = command ? command.reset() : Command(self, usage, validation, globalMiddleware) - if (!completion) completion = Completion(self, usage, command) - - completionCommand = null - output = '' - exitError = null - hasOutput = false - self.parsed = false - - return self - } - self.resetOptions() - - // temporary hack: allow "freezing" of reset-able state for parse(msg, cb) - let frozens = [] - function freeze () { - let frozen = {} - frozens.push(frozen) - frozen.options = options - frozen.configObjects = options.configObjects.slice(0) - frozen.exitProcess = exitProcess - frozen.groups = groups - usage.freeze() - validation.freeze() - command.freeze() - frozen.strict = strict - frozen.completionCommand = completionCommand - frozen.output = output - frozen.exitError = exitError - frozen.hasOutput = hasOutput - frozen.parsed = self.parsed - frozen.parseFn = parseFn - frozen.parseContext = parseContext - } - function unfreeze () { - let frozen = frozens.pop() - options = frozen.options - options.configObjects = frozen.configObjects - exitProcess = frozen.exitProcess - groups = frozen.groups - output = frozen.output - exitError = frozen.exitError - hasOutput = frozen.hasOutput - self.parsed = frozen.parsed - usage.unfreeze() - validation.unfreeze() - command.unfreeze() - strict = frozen.strict - completionCommand = frozen.completionCommand - parseFn = frozen.parseFn - parseContext = frozen.parseContext - } - - self.boolean = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('boolean', keys) - return self - } - - self.array = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('array', keys) - return self - } - - self.number = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('number', keys) - return self - } - - self.normalize = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('normalize', keys) - return self - } - - self.count = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('count', keys) - return self - } - - self.string = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('string', keys) - return self - } - - self.requiresArg = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintObject(self.nargs, false, 'narg', keys, 1) - return self - } - - self.skipValidation = function (keys) { - argsert('', [keys], arguments.length) - populateParserHintArray('skipValidation', keys) - return self - } - - function populateParserHintArray (type, keys, value) { - keys = [].concat(keys) - keys.forEach((key) => { - key = sanitizeKey(key) - options[type].push(key) - }) - } - - self.nargs = function (key, value) { - argsert(' [number]', [key, value], arguments.length) - populateParserHintObject(self.nargs, false, 'narg', key, value) - return self - } - - self.choices = function (key, value) { - argsert(' [string|array]', [key, value], arguments.length) - populateParserHintObject(self.choices, true, 'choices', key, value) - return self - } - - self.alias = function (key, value) { - argsert(' [string|array]', [key, value], arguments.length) - populateParserHintObject(self.alias, true, 'alias', key, value) - return self - } - - // TODO: actually deprecate self.defaults. - self.default = self.defaults = function (key, value, defaultDescription) { - argsert(' [*] [string]', [key, value, defaultDescription], arguments.length) - if (defaultDescription) options.defaultDescription[key] = defaultDescription - if (typeof value === 'function') { - if (!options.defaultDescription[key]) options.defaultDescription[key] = usage.functionDescription(value) - value = value.call() - } - populateParserHintObject(self.default, false, 'default', key, value) - return self - } - - self.describe = function (key, desc) { - argsert(' [string]', [key, desc], arguments.length) - populateParserHintObject(self.describe, false, 'key', key, true) - usage.describe(key, desc) - return self - } - - self.demandOption = function (keys, msg) { - argsert(' [string]', [keys, msg], arguments.length) - populateParserHintObject(self.demandOption, false, 'demandedOptions', keys, msg) - return self - } - - self.coerce = function (keys, value) { - argsert(' [function]', [keys, value], arguments.length) - populateParserHintObject(self.coerce, false, 'coerce', keys, value) - return self - } - - function populateParserHintObject (builder, isArray, type, key, value) { - if (Array.isArray(key)) { - const temp = Object.create(null) - // an array of keys with one value ['x', 'y', 'z'], function parse () {} - key.forEach((k) => { - temp[k] = value - }) - builder(temp) - } else if (typeof key === 'object') { - // an object of key value pairs: {'x': parse () {}, 'y': parse() {}} - Object.keys(key).forEach((k) => { - builder(k, key[k]) - }) - } else { - key = sanitizeKey(key) - // a single key value pair 'x', parse() {} - if (isArray) { - options[type][key] = (options[type][key] || []).concat(value) - } else { - options[type][key] = value - } - } - } - - // TODO(bcoe): in future major versions move more objects towards - // Object.create(null): - function sanitizeKey (key) { - if (key === '__proto__') return '___proto___' - return key - } - - function deleteFromParserHintObject (optionKey) { - // delete from all parsing hints: - // boolean, array, key, alias, etc. - Object.keys(options).forEach((hintKey) => { - const hint = options[hintKey] - if (Array.isArray(hint)) { - if (~hint.indexOf(optionKey)) hint.splice(hint.indexOf(optionKey), 1) - } else if (typeof hint === 'object') { - delete hint[optionKey] - } - }) - // now delete the description from usage.js. - delete usage.getDescriptions()[optionKey] - } - - self.config = function config (key, msg, parseFn) { - argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length) - // allow a config object to be provided directly. - if (typeof key === 'object') { - key = applyExtends(key, cwd, self.getParserConfiguration()['deep-merge-config']) - options.configObjects = (options.configObjects || []).concat(key) - return self - } - - // allow for a custom parsing function. - if (typeof msg === 'function') { - parseFn = msg - msg = null - } - - key = key || 'config' - self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file')) - ;(Array.isArray(key) ? key : [key]).forEach((k) => { - options.config[k] = parseFn || true - }) - - return self - } - - self.example = function (cmd, description) { - argsert(' [string]', [cmd, description], arguments.length) - usage.example(cmd, description) - return self - } - - self.command = function (cmd, description, builder, handler, middlewares) { - argsert(' [string|boolean] [function|object] [function] [array]', [cmd, description, builder, handler, middlewares], arguments.length) - command.addHandler(cmd, description, builder, handler, middlewares) - return self - } - - self.commandDir = function (dir, opts) { - argsert(' [object]', [dir, opts], arguments.length) - const req = parentRequire || require - command.addDirectory(dir, self.getContext(), req, require('get-caller-file')(), opts) - return self - } - - // TODO: deprecate self.demand in favor of - // .demandCommand() .demandOption(). - self.demand = self.required = self.require = function demand (keys, max, msg) { - // you can optionally provide a 'max' key, - // which will raise an exception if too many '_' - // options are provided. - if (Array.isArray(max)) { - max.forEach((key) => { - self.demandOption(key, msg) - }) - max = Infinity - } else if (typeof max !== 'number') { - msg = max - max = Infinity - } - - if (typeof keys === 'number') { - self.demandCommand(keys, max, msg, msg) - } else if (Array.isArray(keys)) { - keys.forEach((key) => { - self.demandOption(key, msg) - }) - } else { - if (typeof msg === 'string') { - self.demandOption(keys, msg) - } else if (msg === true || typeof msg === 'undefined') { - self.demandOption(keys) - } - } - - return self - } - - self.demandCommand = function demandCommand (min, max, minMsg, maxMsg) { - argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length) - - if (typeof min === 'undefined') min = 1 - - if (typeof max !== 'number') { - minMsg = max - max = Infinity - } - - self.global('_', false) - - options.demandedCommands._ = { - min, - max, - minMsg, - maxMsg - } - - return self - } - - self.getDemandedOptions = () => { - argsert([], 0) - return options.demandedOptions - } - - self.getDemandedCommands = () => { - argsert([], 0) - return options.demandedCommands - } - - self.implies = function (key, value) { - argsert(' [number|string|array]', [key, value], arguments.length) - validation.implies(key, value) - return self - } - - self.conflicts = function (key1, key2) { - argsert(' [string|array]', [key1, key2], arguments.length) - validation.conflicts(key1, key2) - return self - } - - self.usage = function (msg, description, builder, handler) { - argsert(' [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length) - - if (description !== undefined) { - // .usage() can be used as an alias for defining - // a default command. - if ((msg || '').match(/^\$0( |$)/)) { - return self.command(msg, description, builder, handler) - } else { - throw new YError('.usage() description must start with $0 if being used as alias for .command()') - } - } else { - usage.usage(msg) - return self - } - } - - self.epilogue = self.epilog = function (msg) { - argsert('', [msg], arguments.length) - usage.epilog(msg) - return self - } - - self.fail = function (f) { - argsert('', [f], arguments.length) - usage.failFn(f) - return self - } - - self.check = function (f, _global) { - argsert(' [boolean]', [f, _global], arguments.length) - validation.check(f, _global !== false) - return self - } - - self.global = function global (globals, global) { - argsert(' [boolean]', [globals, global], arguments.length) - globals = [].concat(globals) - if (global !== false) { - options.local = options.local.filter(l => globals.indexOf(l) === -1) - } else { - globals.forEach((g) => { - if (options.local.indexOf(g) === -1) options.local.push(g) - }) - } - return self - } - - self.pkgConf = function pkgConf (key, rootPath) { - argsert(' [string]', [key, rootPath], arguments.length) - let conf = null - // prefer cwd to require-main-filename in this method - // since we're looking for e.g. "nyc" config in nyc consumer - // rather than "yargs" config in nyc (where nyc is the main filename) - const obj = pkgUp(rootPath || cwd) - - // If an object exists in the key, add it to options.configObjects - if (obj[key] && typeof obj[key] === 'object') { - conf = applyExtends(obj[key], rootPath || cwd, self.getParserConfiguration()['deep-merge-config']) - options.configObjects = (options.configObjects || []).concat(conf) - } - - return self - } - - const pkgs = {} - function pkgUp (rootPath) { - const npath = rootPath || '*' - if (pkgs[npath]) return pkgs[npath] - const findUp = require('find-up') - - let obj = {} - try { - let startDir = rootPath || require('require-main-filename')(parentRequire || require) - - // When called in an environment that lacks require.main.filename, such as a jest test runner, - // startDir is already process.cwd(), and should not be shortened. - // Whether or not it is _actually_ a directory (e.g., extensionless bin) is irrelevant, find-up handles it. - if (!rootPath && path.extname(startDir)) { - startDir = path.dirname(startDir) - } - - const pkgJsonPath = findUp.sync('package.json', { - cwd: startDir - }) - obj = JSON.parse(fs.readFileSync(pkgJsonPath)) - } catch (noop) {} - - pkgs[npath] = obj || {} - return pkgs[npath] - } - - let parseFn = null - let parseContext = null - self.parse = function parse (args, shortCircuit, _parseFn) { - argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length) - freeze() - if (typeof args === 'undefined') { - const argv = self._parseArgs(processArgs) - const tmpParsed = self.parsed - unfreeze() - // TODO: remove this compatibility hack when we release yargs@15.x: - self.parsed = tmpParsed - return argv - } - - // a context object can optionally be provided, this allows - // additional information to be passed to a command handler. - if (typeof shortCircuit === 'object') { - parseContext = shortCircuit - shortCircuit = _parseFn - } - - // by providing a function as a second argument to - // parse you can capture output that would otherwise - // default to printing to stdout/stderr. - if (typeof shortCircuit === 'function') { - parseFn = shortCircuit - shortCircuit = null - } - // completion short-circuits the parsing process, - // skipping validation, etc. - if (!shortCircuit) processArgs = args - - if (parseFn) exitProcess = false - - const parsed = self._parseArgs(args, shortCircuit) - if (parseFn) parseFn(exitError, parsed, output) - unfreeze() - - return parsed - } - - self._getParseContext = () => parseContext || {} - - self._hasParseCallback = () => !!parseFn - - self.option = self.options = function option (key, opt) { - argsert(' [object]', [key, opt], arguments.length) - if (typeof key === 'object') { - Object.keys(key).forEach((k) => { - self.options(k, key[k]) - }) - } else { - if (typeof opt !== 'object') { - opt = {} - } - - options.key[key] = true // track manually set keys. - - if (opt.alias) self.alias(key, opt.alias) - - const demand = opt.demand || opt.required || opt.require - - // deprecated, use 'demandOption' instead - if (demand) { - self.demand(key, demand) - } - - if (opt.demandOption) { - self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined) - } - - if ('conflicts' in opt) { - self.conflicts(key, opt.conflicts) - } - - if ('default' in opt) { - self.default(key, opt.default) - } - - if ('implies' in opt) { - self.implies(key, opt.implies) - } - - if ('nargs' in opt) { - self.nargs(key, opt.nargs) - } - - if (opt.config) { - self.config(key, opt.configParser) - } - - if (opt.normalize) { - self.normalize(key) - } - - if ('choices' in opt) { - self.choices(key, opt.choices) - } - - if ('coerce' in opt) { - self.coerce(key, opt.coerce) - } - - if ('group' in opt) { - self.group(key, opt.group) - } - - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key) - if (opt.alias) self.boolean(opt.alias) - } - - if (opt.array || opt.type === 'array') { - self.array(key) - if (opt.alias) self.array(opt.alias) - } - - if (opt.number || opt.type === 'number') { - self.number(key) - if (opt.alias) self.number(opt.alias) - } - - if (opt.string || opt.type === 'string') { - self.string(key) - if (opt.alias) self.string(opt.alias) - } - - if (opt.count || opt.type === 'count') { - self.count(key) - } - - if (typeof opt.global === 'boolean') { - self.global(key, opt.global) - } - - if (opt.defaultDescription) { - options.defaultDescription[key] = opt.defaultDescription - } - - if (opt.skipValidation) { - self.skipValidation(key) - } - - const desc = opt.describe || opt.description || opt.desc - self.describe(key, desc) - if (opt.hidden) { - self.hide(key) - } - - if (opt.requiresArg) { - self.requiresArg(key) - } - } - - return self - } - self.getOptions = () => options - - self.positional = function (key, opts) { - argsert(' ', [key, opts], arguments.length) - if (context.resets === 0) { - throw new YError(".positional() can only be called in a command's builder function") - } - - // .positional() only supports a subset of the configuration - // options available to .option(). - const supportedOpts = ['default', 'defaultDescription', 'implies', 'normalize', - 'choices', 'conflicts', 'coerce', 'type', 'describe', - 'desc', 'description', 'alias'] - opts = objFilter(opts, (k, v) => { - let accept = supportedOpts.indexOf(k) !== -1 - // type can be one of string|number|boolean. - if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1) accept = false - return accept - }) - - // copy over any settings that can be inferred from the command string. - const fullCommand = context.fullCommands[context.fullCommands.length - 1] - const parseOptions = fullCommand ? command.cmdToParseOptions(fullCommand) : { - array: [], - alias: {}, - default: {}, - demand: {} - } - Object.keys(parseOptions).forEach((pk) => { - if (Array.isArray(parseOptions[pk])) { - if (parseOptions[pk].indexOf(key) !== -1) opts[pk] = true - } else { - if (parseOptions[pk][key] && !(pk in opts)) opts[pk] = parseOptions[pk][key] - } - }) - self.group(key, usage.getPositionalGroupName()) - return self.option(key, opts) - } - - self.group = function group (opts, groupName) { - argsert(' ', [opts, groupName], arguments.length) - const existing = preservedGroups[groupName] || groups[groupName] - if (preservedGroups[groupName]) { - // we now only need to track this group name in groups. - delete preservedGroups[groupName] - } - - const seen = {} - groups[groupName] = (existing || []).concat(opts).filter((key) => { - if (seen[key]) return false - return (seen[key] = true) - }) - return self - } - // combine explicit and preserved groups. explicit groups should be first - self.getGroups = () => Object.assign({}, groups, preservedGroups) - - // as long as options.envPrefix is not undefined, - // parser will apply env vars matching prefix to argv - self.env = function (prefix) { - argsert('[string|boolean]', [prefix], arguments.length) - if (prefix === false) options.envPrefix = undefined - else options.envPrefix = prefix || '' - return self - } - - self.wrap = function (cols) { - argsert('', [cols], arguments.length) - usage.wrap(cols) - return self - } - - let strict = false - self.strict = function (enabled) { - argsert('[boolean]', [enabled], arguments.length) - strict = enabled !== false - return self - } - self.getStrict = () => strict - - let parserConfig = {} - self.parserConfiguration = function parserConfiguration (config) { - argsert('', [config], arguments.length) - parserConfig = config - return self - } - self.getParserConfiguration = () => parserConfig - - self.showHelp = function (level) { - argsert('[string|function]', [level], arguments.length) - if (!self.parsed) self._parseArgs(processArgs) // run parser, if it has not already been executed. - if (command.hasDefaultCommand()) { - context.resets++ // override the restriction on top-level positoinals. - command.runDefaultBuilderOn(self, true) - } - usage.showHelp(level) - return self - } - - let versionOpt = null - self.version = function version (opt, msg, ver) { - const defaultVersionOpt = 'version' - argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length) - - // nuke the key previously configured - // to return version #. - if (versionOpt) { - deleteFromParserHintObject(versionOpt) - usage.version(undefined) - versionOpt = null - } - - if (arguments.length === 0) { - ver = guessVersion() - opt = defaultVersionOpt - } else if (arguments.length === 1) { - if (opt === false) { // disable default 'version' key. - return self - } - ver = opt - opt = defaultVersionOpt - } else if (arguments.length === 2) { - ver = msg - msg = null - } - - versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt - msg = msg || usage.deferY18nLookup('Show version number') - - usage.version(ver || undefined) - self.boolean(versionOpt) - self.describe(versionOpt, msg) - return self - } - - function guessVersion () { - const obj = pkgUp() - - return obj.version || 'unknown' - } - - let helpOpt = null - self.addHelpOpt = self.help = function addHelpOpt (opt, msg) { - const defaultHelpOpt = 'help' - argsert('[string|boolean] [string]', [opt, msg], arguments.length) - - // nuke the key previously configured - // to return help. - if (helpOpt) { - deleteFromParserHintObject(helpOpt) - helpOpt = null - } - - if (arguments.length === 1) { - if (opt === false) return self - } - - // use arguments, fallback to defaults for opt and msg - helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt - self.boolean(helpOpt) - self.describe(helpOpt, msg || usage.deferY18nLookup('Show help')) - return self - } - - const defaultShowHiddenOpt = 'show-hidden' - options.showHiddenOpt = defaultShowHiddenOpt - self.addShowHiddenOpt = self.showHidden = function addShowHiddenOpt (opt, msg) { - argsert('[string|boolean] [string]', [opt, msg], arguments.length) - - if (arguments.length === 1) { - if (opt === false) return self - } - - const showHiddenOpt = typeof opt === 'string' ? opt : defaultShowHiddenOpt - self.boolean(showHiddenOpt) - self.describe(showHiddenOpt, msg || usage.deferY18nLookup('Show hidden options')) - options.showHiddenOpt = showHiddenOpt - return self - } - - self.hide = function hide (key) { - argsert('', [key], arguments.length) - options.hiddenOptions.push(key) - return self - } - - self.showHelpOnFail = function showHelpOnFail (enabled, message) { - argsert('[boolean|string] [string]', [enabled, message], arguments.length) - usage.showHelpOnFail(enabled, message) - return self - } - - var exitProcess = true - self.exitProcess = function (enabled) { - argsert('[boolean]', [enabled], arguments.length) - if (typeof enabled !== 'boolean') { - enabled = true - } - exitProcess = enabled - return self - } - self.getExitProcess = () => exitProcess - - var completionCommand = null - self.completion = function (cmd, desc, fn) { - argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length) - - // a function to execute when generating - // completions can be provided as the second - // or third argument to completion. - if (typeof desc === 'function') { - fn = desc - desc = null - } - - // register the completion command. - completionCommand = cmd || completionCommand || 'completion' - if (!desc && desc !== false) { - desc = 'generate completion script' - } - self.command(completionCommand, desc) - - // a function can be provided - if (fn) completion.registerFunction(fn) - - return self - } - - self.showCompletionScript = function ($0, cmd) { - argsert('[string] [string]', [$0, cmd], arguments.length) - $0 = $0 || self.$0 - _logger.log(completion.generateCompletionScript($0, cmd || completionCommand || 'completion')) - return self - } - - self.getCompletion = function (args, done) { - argsert(' ', [args, done], arguments.length) - completion.getCompletion(args, done) - } - - self.locale = function (locale) { - argsert('[string]', [locale], arguments.length) - if (arguments.length === 0) { - guessLocale() - return y18n.getLocale() - } - detectLocale = false - y18n.setLocale(locale) - return self - } - - self.updateStrings = self.updateLocale = function (obj) { - argsert('', [obj], arguments.length) - detectLocale = false - y18n.updateLocale(obj) - return self - } - - let detectLocale = true - self.detectLocale = function (detect) { - argsert('', [detect], arguments.length) - detectLocale = detect - return self - } - self.getDetectLocale = () => detectLocale - - var hasOutput = false - var exitError = null - // maybe exit, always capture - // context about why we wanted to exit. - self.exit = (code, err) => { - hasOutput = true - exitError = err - if (exitProcess) process.exit(code) - } - - // we use a custom logger that buffers output, - // so that we can print to non-CLIs, e.g., chat-bots. - const _logger = { - log () { - const args = [] - for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) - if (!self._hasParseCallback()) console.log.apply(console, args) - hasOutput = true - if (output.length) output += '\n' - output += args.join(' ') - }, - error () { - const args = [] - for (let i = 0; i < arguments.length; i++) args.push(arguments[i]) - if (!self._hasParseCallback()) console.error.apply(console, args) - hasOutput = true - if (output.length) output += '\n' - output += args.join(' ') - } - } - self._getLoggerInstance = () => _logger - // has yargs output an error our help - // message in the current execution context. - self._hasOutput = () => hasOutput - - self._setHasOutput = () => { - hasOutput = true - } - - let recommendCommands - self.recommendCommands = function (recommend) { - argsert('[boolean]', [recommend], arguments.length) - recommendCommands = typeof recommend === 'boolean' ? recommend : true - return self - } - - self.getUsageInstance = () => usage - - self.getValidationInstance = () => validation - - self.getCommandInstance = () => command - - self.terminalWidth = () => { - argsert([], 0) - return typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null - } - - Object.defineProperty(self, 'argv', { - get: () => self._parseArgs(processArgs), - enumerable: true - }) - - self._parseArgs = function parseArgs (args, shortCircuit, _calledFromCommand, commandIndex) { - let skipValidation = !!_calledFromCommand - args = args || processArgs - - options.__ = y18n.__ - options.configuration = self.getParserConfiguration() - // Deprecated - let pkgConfig = pkgUp()['yargs'] - if (pkgConfig) { - console.warn('Configuring yargs through package.json is deprecated and will be removed in a future major release, please use the JS API instead.') - options.configuration = Object.assign({}, pkgConfig, options.configuration) - } - - const populateDoubleDash = !!options.configuration['populate--'] - const config = Object.assign({}, options.configuration, { - 'populate--': true - }) - const parsed = Parser.detailed(args, Object.assign({}, options, { - configuration: config - })) - - let argv = parsed.argv - if (parseContext) argv = Object.assign({}, argv, parseContext) - const aliases = parsed.aliases - - argv.$0 = self.$0 - self.parsed = parsed - - try { - guessLocale() // guess locale lazily, so that it can be turned off in chain. - - // while building up the argv object, there - // are two passes through the parser. If completion - // is being performed short-circuit on the first pass. - if (shortCircuit) { - return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv) - } - - // if there's a handler associated with a - // command defer processing to it. - if (helpOpt) { - // consider any multi-char helpOpt alias as a valid help command - // unless all helpOpt aliases are single-char - // note that parsed.aliases is a normalized bidirectional map :) - const helpCmds = [helpOpt] - .concat(aliases[helpOpt] || []) - .filter(k => k.length > 1) - // check if help should trigger and strip it from _. - if (~helpCmds.indexOf(argv._[argv._.length - 1])) { - argv._.pop() - argv[helpOpt] = true - } - } - - const handlerKeys = command.getCommands() - const requestCompletions = completion.completionKey in argv - const skipRecommendation = argv[helpOpt] || requestCompletions - const skipDefaultCommand = skipRecommendation && (handlerKeys.length > 1 || handlerKeys[0] !== '$0') - - if (argv._.length) { - if (handlerKeys.length) { - let firstUnknownCommand - for (let i = (commandIndex || 0), cmd; argv._[i] !== undefined; i++) { - cmd = String(argv._[i]) - if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) { - // commands are executed using a recursive algorithm that executes - // the deepest command first; we keep track of the position in the - // argv._ array that is currently being executed. - const innerArgv = command.runCommand(cmd, self, parsed, i + 1) - return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv) - } else if (!firstUnknownCommand && cmd !== completionCommand) { - firstUnknownCommand = cmd - break - } - } - - // run the default command, if defined - if (command.hasDefaultCommand() && !skipDefaultCommand) { - const innerArgv = command.runCommand(null, self, parsed) - return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv) - } - - // recommend a command if recommendCommands() has - // been enabled, and no commands were found to execute - if (recommendCommands && firstUnknownCommand && !skipRecommendation) { - validation.recommendCommands(firstUnknownCommand, handlerKeys) - } - } - - // generate a completion script for adding to ~/.bashrc. - if (completionCommand && ~argv._.indexOf(completionCommand) && !requestCompletions) { - if (exitProcess) setBlocking(true) - self.showCompletionScript() - self.exit(0) - } - } else if (command.hasDefaultCommand() && !skipDefaultCommand) { - const innerArgv = command.runCommand(null, self, parsed) - return populateDoubleDash ? innerArgv : self._copyDoubleDash(innerArgv) - } - - // we must run completions first, a user might - // want to complete the --help or --version option. - if (requestCompletions) { - if (exitProcess) setBlocking(true) - - // we allow for asynchronous completions, - // e.g., loading in a list of commands from an API. - const completionArgs = args.slice(args.indexOf(`--${completion.completionKey}`) + 1) - completion.getCompletion(completionArgs, (completions) => { - ;(completions || []).forEach((completion) => { - _logger.log(completion) - }) - - self.exit(0) - }) - return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv) - } - - // Handle 'help' and 'version' options - // if we haven't already output help! - if (!hasOutput) { - Object.keys(argv).forEach((key) => { - if (key === helpOpt && argv[key]) { - if (exitProcess) setBlocking(true) - - skipValidation = true - self.showHelp('log') - self.exit(0) - } else if (key === versionOpt && argv[key]) { - if (exitProcess) setBlocking(true) - - skipValidation = true - usage.showVersion() - self.exit(0) - } - }) - } - - // Check if any of the options to skip validation were provided - if (!skipValidation && options.skipValidation.length > 0) { - skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true) - } - - // If the help or version options where used and exitProcess is false, - // or if explicitly skipped, we won't run validations. - if (!skipValidation) { - if (parsed.error) throw new YError(parsed.error.message) - - // if we're executed via bash completion, don't - // bother with validation. - if (!requestCompletions) { - self._runValidation(argv, aliases, {}, parsed.error) - } - } - } catch (err) { - if (err instanceof YError) usage.fail(err.message, err) - else throw err - } - - return (populateDoubleDash || _calledFromCommand) ? argv : self._copyDoubleDash(argv) - } - - // to simplify the parsing of positionals in commands, - // we temporarily populate '--' rather than _, with arguments - // after the '--' directive. After the parse, we copy these back. - self._copyDoubleDash = function (argv) { - if (!argv._ || !argv['--']) return argv - argv._.push.apply(argv._, argv['--']) - - // TODO(bcoe): refactor command parsing such that this delete is not - // necessary: https://github.com/yargs/yargs/issues/1482 - try { - delete argv['--'] - } catch (_err) {} - - return argv - } - - self._runValidation = function runValidation (argv, aliases, positionalMap, parseErrors) { - if (parseErrors) throw new YError(parseErrors.message || parseErrors) - validation.nonOptionCount(argv) - validation.requiredArguments(argv) - if (strict) validation.unknownArguments(argv, aliases, positionalMap) - validation.customChecks(argv, aliases) - validation.limitedChoices(argv) - validation.implications(argv) - validation.conflicting(argv) - } - - function guessLocale () { - if (!detectLocale) return - - try { - const { env } = process - const locale = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE || 'en_US' - self.locale(locale.replace(/[.:].*/, '')) - } catch (err) { - // if we explode looking up locale just noop - // we'll keep using the default language 'en'. - } - } - - // an app should almost always have --version and --help, - // if you *really* want to disable this use .help(false)/.version(false). - self.help() - self.version() - - return self -} - -// rebase an absolute path to a relative one with respect to a base directory -// exported for tests -exports.rebase = rebase -function rebase (base, dir) { - return path.relative(base, dir) -}
- - Get professional support for 'camelcase' with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-