diff --git a/dist/.DS_Store b/dist/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/dist/.DS_Store differ diff --git a/node_modules/@aashutoshrathi/word-wrap/LICENSE b/node_modules/@aashutoshrathi/word-wrap/LICENSE new file mode 100644 index 00000000..842218cf --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +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/@aashutoshrathi/word-wrap/README.md b/node_modules/@aashutoshrathi/word-wrap/README.md new file mode 100644 index 00000000..3abb8824 --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/README.md @@ -0,0 +1,182 @@ +# word-wrap [![NPM version](https://img.shields.io/npm/v/word-wrap.svg?style=flat)](https://www.npmjs.com/package/word-wrap) [![NPM monthly downloads](https://img.shields.io/npm/dm/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![NPM total downloads](https://img.shields.io/npm/dt/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/word-wrap.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/word-wrap) + +> Wrap words to a specified length. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save word-wrap +``` + +## Usage + +```js +var wrap = require('word-wrap'); + +wrap('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'); +``` + +Results in: + +``` + Lorem ipsum dolor sit amet, consectetur adipiscing + elit, sed do eiusmod tempor incididunt ut labore + et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. +``` + +## Options + +![image](https://cloud.githubusercontent.com/assets/383994/6543728/7a381c08-c4f6-11e4-8b7d-b6ba197569c9.png) + +### options.width + +Type: `Number` + +Default: `50` + +The width of the text before wrapping to a new line. + +**Example:** + +```js +wrap(str, {width: 60}); +``` + +### options.indent + +Type: `String` + +Default: `` (none) + +The string to use at the beginning of each line. + +**Example:** + +```js +wrap(str, {indent: ' '}); +``` + +### options.newline + +Type: `String` + +Default: `\n` + +The string to use at the end of each line. + +**Example:** + +```js +wrap(str, {newline: '\n\n'}); +``` + +### options.escape + +Type: `function` + +Default: `function(str){return str;}` + +An escape function to run on each line after splitting them. + +**Example:** + +```js +var xmlescape = require('xml-escape'); +wrap(str, { + escape: function(string){ + return xmlescape(string); + } +}); +``` + +### options.trim + +Type: `Boolean` + +Default: `false` + +Trim trailing whitespace from the returned string. This option is included since `.trim()` would also strip the leading indentation from the first line. + +**Example:** + +```js +wrap(str, {trim: true}); +``` + +### options.cut + +Type: `Boolean` + +Default: `false` + +Break a word between any two letters when the word is longer than the specified width. + +**Example:** + +```js +wrap(str, {cut: true}); +``` + +## About + +### Related projects + +* [common-words](https://www.npmjs.com/package/common-words): Updated list (JSON) of the 100 most common words in the English language. Useful for… [more](https://github.com/jonschlinkert/common-words) | [homepage](https://github.com/jonschlinkert/common-words "Updated list (JSON) of the 100 most common words in the English language. Useful for excluding these words from arrays.") +* [shuffle-words](https://www.npmjs.com/package/shuffle-words): Shuffle the words in a string and optionally the letters in each word using the… [more](https://github.com/jonschlinkert/shuffle-words) | [homepage](https://github.com/jonschlinkert/shuffle-words "Shuffle the words in a string and optionally the letters in each word using the Fisher-Yates algorithm. Useful for creating test fixtures, benchmarking samples, etc.") +* [unique-words](https://www.npmjs.com/package/unique-words): Return the unique words in a string or array. | [homepage](https://github.com/jonschlinkert/unique-words "Return the unique words in a string or array.") +* [wordcount](https://www.npmjs.com/package/wordcount): Count the words in a string. Support for english, CJK and Cyrillic. | [homepage](https://github.com/jonschlinkert/wordcount "Count the words in a string. Support for english, CJK and Cyrillic.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 43 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [lordvlad](https://github.com/lordvlad) | +| 2 | [hildjj](https://github.com/hildjj) | +| 1 | [danilosampaio](https://github.com/danilosampaio) | +| 1 | [2fd](https://github.com/2fd) | +| 1 | [toddself](https://github.com/toddself) | +| 1 | [wolfgang42](https://github.com/wolfgang42) | +| 1 | [zachhale](https://github.com/zachhale) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 02, 2017._ diff --git a/node_modules/@aashutoshrathi/word-wrap/index.d.ts b/node_modules/@aashutoshrathi/word-wrap/index.d.ts new file mode 100644 index 00000000..1acd4256 --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/index.d.ts @@ -0,0 +1,50 @@ +/** + * Wrap words to a specified length. + */ +export = wrap; + +declare function wrap(str: string, options?: wrap.IOptions): string; + +declare namespace wrap { + export interface IOptions { + + /** + * The width of the text before wrapping to a new line. + * @default ´50´ + */ + width?: number; + + /** + * The string to use at the beginning of each line. + * @default ´´ (none) + */ + indent?: string; + + /** + * The string to use at the end of each line. + * @default ´\n´ + */ + newline?: string; + + /** + * An escape function to run on each line after splitting them. + * @default (str: string) => string; + */ + escape?: (str: string) => string; + + /** + * Trim trailing whitespace from the returned string. + * This option is included since .trim() would also strip + * the leading indentation from the first line. + * @default true + */ + trim?: boolean; + + /** + * Break a word between any two letters when the word is longer + * than the specified width. + * @default false + */ + cut?: boolean; + } +} diff --git a/node_modules/@aashutoshrathi/word-wrap/index.js b/node_modules/@aashutoshrathi/word-wrap/index.js new file mode 100644 index 00000000..461a17cd --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/index.js @@ -0,0 +1,52 @@ +/*! + * word-wrap + * + * Copyright (c) 2014-2023, Jon Schlinkert. + * Released under the MIT License. + */ + +function trimTabAndSpaces(str) { + const lines = str.split('\n'); + const trimmedLines = lines.map((line) => line.trimEnd()); + return trimmedLines.join('\n'); +} + +module.exports = function(str, options) { + options = options || {}; + if (str == null) { + return str; + } + + var width = options.width || 50; + var indent = (typeof options.indent === 'string') + ? options.indent + : ''; + + var newline = options.newline || '\n' + indent; + var escape = typeof options.escape === 'function' + ? options.escape + : identity; + + var regexString = '.{1,' + width + '}'; + if (options.cut !== true) { + regexString += '([\\s\u200B]+|$)|[^\\s\u200B]+?([\\s\u200B]+|$)'; + } + + var re = new RegExp(regexString, 'g'); + var lines = str.match(re) || []; + var result = indent + lines.map(function(line) { + if (line.slice(-1) === '\n') { + line = line.slice(0, line.length - 1); + } + return escape(line); + }).join(newline); + + if (options.trim === true) { + result = trimTabAndSpaces(result); + } + return result; +}; + +function identity(str) { + return str; +} diff --git a/node_modules/@aashutoshrathi/word-wrap/package.json b/node_modules/@aashutoshrathi/word-wrap/package.json new file mode 100644 index 00000000..e33e077c --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/package.json @@ -0,0 +1,81 @@ +{ + "name": "@aashutoshrathi/word-wrap", + "description": "Wrap words to a specified length.", + "version": "1.2.6", + "homepage": "https://github.com/aashutoshrathi/word-wrap", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Aashutosh Rathi ", + "Danilo Sampaio (localhost:8080)", + "Fede Ramirez (https://2fd.github.io)", + "Joe Hildebrand (https://twitter.com/hildjj)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Todd Kennedy (https://tck.io)", + "Waldemar Reusch (https://github.com/lordvlad)", + "Wolfgang Faust (http://www.linestarve.com)", + "Zach Hale (http://zachhale.com)" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/aashutoshrathi/word-wrap.git" + }, + "bugs": { + "url": "https://github.com/aashutoshrathi/word-wrap/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^10.2.0" + }, + "keywords": [ + "break", + "carriage", + "line", + "new-line", + "newline", + "return", + "soft", + "text", + "word", + "word-wrap", + "words", + "wrap" + ], + "typings": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "common-words", + "shuffle-words", + "unique-words", + "wordcount" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map new file mode 100644 index 00000000..dd0449dd --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map @@ -0,0 +1 @@ +{"version":3,"names":["nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","RegExp","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","code","set","pos","i","length","isIdentifierStart","test","String","fromCharCode","isIdentifierChar","isIdentifierName","name","isFirst","cp","charCodeAt","trail"],"sources":["../src/identifier.ts"],"sourcesContent":["import * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.js`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c5d\\u0c60\\u0c61\\u0c80\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cdd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d04-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d54-\\u0d56\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e86-\\u0e8a\\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.js`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n"],"mappings":";;;;;;;;AAWA,IAAIA,4BAA4B,GAAG,8qIAA8qI;AAEjtI,IAAIC,uBAAuB,GAAG,mkFAAmkF;AAEjmF,MAAMC,uBAAuB,GAAG,IAAIC,MAAM,CACxC,GAAG,GAAGH,4BAA4B,GAAG,GACvC,CAAC;AACD,MAAMI,kBAAkB,GAAG,IAAID,MAAM,CACnC,GAAG,GAAGH,4BAA4B,GAAGC,uBAAuB,GAAG,GACjE,CAAC;AAEDD,4BAA4B,GAAGC,uBAAuB,GAAG,IAAI;AAQ7D,MAAMI,0BAA0B,GAAG,CAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAA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KAAuB,EAAE,OAAOA,IAAI,OAAyB;EACrE,IAAIA,IAAI,OAAwB,EAAE,OAAO,IAAI;EAC7C,IAAIA,IAAI,IAAI,MAAM,EAAE;IAClB,OAAOA,IAAI,IAAI,IAAI,IAAIJ,kBAAkB,CAACU,IAAI,CAACC,MAAM,CAACC,YAAY,CAACR,IAAI,CAAC,CAAC;EAC3E;EACA,OACED,aAAa,CAACC,IAAI,EAAEH,0BAA0B,CAAC,IAC/CE,aAAa,CAACC,IAAI,EAAEF,qBAAqB,CAAC;AAE9C;AAIO,SAASY,gBAAgBA,CAACC,IAAY,EAAW;EACtD,IAAIC,OAAO,GAAG,IAAI;EAClB,KAAK,IAAIT,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAED,CAAC,EAAE,EAAE;IAKpC,IAAIU,EAAE,GAAGF,IAAI,CAACG,UAAU,CAACX,CAAC,CAAC;IAC3B,IAAI,CAACU,EAAE,GAAG,MAAM,MAAM,MAAM,IAAIV,CAAC,GAAG,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAE;MACnD,MAAMW,KAAK,GAAGJ,IAAI,CAACG,UAAU,CAAC,EAAEX,CAAC,CAAC;MAClC,IAAI,CAACY,KAAK,GAAG,MAAM,MAAM,MAAM,EAAE;QAC/BF,EAAE,GAAG,OAAO,IAAI,CAACA,EAAE,GAAG,KAAK,KAAK,EAAE,CAAC,IAAIE,KAAK,GAAG,KAAK,CAAC;MACvD;IACF;IACA,IAAIH,OAAO,EAAE;MACXA,OAAO,GAAG,KAAK;MACf,IAAI,CAACP,iBAAiB,CAACQ,EAAE,CAAC,EAAE;QAC1B,OAAO,KAAK;MACd;IACF,CAAC,MAAM,IAAI,CAACJ,gBAAgB,CAACI,EAAE,CAAC,EAAE;MAChC,OAAO,KAAK;IACd;EACF;EACA,OAAO,CAACD,OAAO;AACjB"} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js.map b/node_modules/@babel/helper-validator-identifier/lib/index.js.map new file mode 100644 index 00000000..cc9ad3d9 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA"} \ No newline at end of file diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map new file mode 100644 index 00000000..52a9e991 --- /dev/null +++ b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map @@ -0,0 +1 @@ +{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B"} \ No newline at end of file diff --git a/node_modules/@babel/highlight/lib/index.js.map b/node_modules/@babel/highlight/lib/index.js.map new file mode 100644 index 00000000..f39fafe9 --- /dev/null +++ b/node_modules/@babel/highlight/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_jsTokens","require","_helperValidatorIdentifier","_chalk","sometimesKeywords","Set","getDefs","chalk","keyword","cyan","capitalized","yellow","jsxIdentifier","punctuator","number","magenta","string","green","regex","comment","grey","invalid","white","bgRed","bold","NEWLINE","BRACKET","tokenize","JSX_TAG","getTokenType","token","offset","text","type","isKeyword","value","isStrictReservedWord","has","test","slice","toLowerCase","match","jsTokens","default","exec","matchToToken","index","highlightTokens","defs","highlighted","colorize","split","map","str","join","shouldHighlight","options","Chalk","supportsColor","forceColor","getChalk","constructor","enabled","level","highlight","code"],"sources":["../src/index.ts"],"sourcesContent":["/// \n\nimport type { Token as JSToken, JSXToken } from \"js-tokens\";\nimport jsTokens from \"js-tokens\";\n\nimport {\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\nimport Chalk from \"chalk\";\n\ntype ChalkClass = ReturnType;\n\n/**\n * Names that are always allowed as identifiers, but also appear as keywords\n * within certain syntactic productions.\n *\n * https://tc39.es/ecma262/#sec-keywords-and-reserved-words\n *\n * `target` has been omitted since it is very likely going to be a false\n * positive.\n */\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\n\ntype InternalTokenType =\n | \"keyword\"\n | \"capitalized\"\n | \"jsxIdentifier\"\n | \"punctuator\"\n | \"number\"\n | \"string\"\n | \"regex\"\n | \"comment\"\n | \"invalid\";\n\ntype Token = {\n type: InternalTokenType | \"uncolored\";\n value: string;\n};\n/**\n * Chalk styles for token types.\n */\nfunction getDefs(chalk: ChalkClass): Record {\n return {\n keyword: chalk.cyan,\n capitalized: chalk.yellow,\n jsxIdentifier: chalk.yellow,\n punctuator: chalk.yellow,\n number: chalk.magenta,\n string: chalk.green,\n regex: chalk.magenta,\n comment: chalk.grey,\n invalid: chalk.white.bgRed.bold,\n };\n}\n\n/**\n * RegExp to test for newlines in terminal.\n */\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * RegExp to test for the three types of brackets.\n */\nconst BRACKET = /^[()[\\]{}]$/;\n\nlet tokenize: (\n text: string,\n) => Generator<{ type: InternalTokenType | \"uncolored\"; value: string }>;\n\nif (process.env.BABEL_8_BREAKING) {\n /**\n * Get the type of token, specifying punctuator type.\n */\n const getTokenType = function (\n token: JSToken | JSXToken,\n ): InternalTokenType | \"uncolored\" {\n if (token.type === \"IdentifierName\") {\n if (\n isKeyword(token.value) ||\n isStrictReservedWord(token.value, true) ||\n sometimesKeywords.has(token.value)\n ) {\n return \"keyword\";\n }\n\n if (token.value[0] !== token.value[0].toLowerCase()) {\n return \"capitalized\";\n }\n }\n\n if (token.type === \"Punctuator\" && BRACKET.test(token.value)) {\n return \"uncolored\";\n }\n\n if (token.type === \"Invalid\" && token.value === \"@\") {\n return \"punctuator\";\n }\n\n switch (token.type) {\n case \"NumericLiteral\":\n return \"number\";\n\n case \"StringLiteral\":\n case \"JSXString\":\n case \"NoSubstitutionTemplate\":\n return \"string\";\n\n case \"RegularExpressionLiteral\":\n return \"regex\";\n\n case \"Punctuator\":\n case \"JSXPunctuator\":\n return \"punctuator\";\n\n case \"MultiLineComment\":\n case \"SingleLineComment\":\n return \"comment\";\n\n case \"Invalid\":\n case \"JSXInvalid\":\n return \"invalid\";\n\n case \"JSXIdentifier\":\n return \"jsxIdentifier\";\n\n default:\n return \"uncolored\";\n }\n };\n\n /**\n * Turn a string of JS into an array of objects.\n */\n tokenize = function* (text: string): Generator {\n for (const token of jsTokens(text, { jsx: true })) {\n switch (token.type) {\n case \"TemplateHead\":\n yield { type: \"string\", value: token.value.slice(0, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateMiddle\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateTail\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1) };\n break;\n\n default:\n yield {\n type: getTokenType(token),\n value: token.value,\n };\n }\n }\n };\n} else {\n /**\n * RegExp to test for what seems to be a JSX tag name.\n */\n const JSX_TAG = /^[a-z][\\w-]*$/i;\n\n // The token here is defined in js-tokens@4. However we don't bother\n // typing it since the whole block will be removed in Babel 8\n const getTokenType = function (token: any, offset: number, text: string) {\n if (token.type === \"name\") {\n if (\n isKeyword(token.value) ||\n isStrictReservedWord(token.value, true) ||\n sometimesKeywords.has(token.value)\n ) {\n return \"keyword\";\n }\n\n if (\n JSX_TAG.test(token.value) &&\n (text[offset - 1] === \"<\" || text.slice(offset - 2, offset) == \", text: string) {\n let highlighted = \"\";\n\n for (const { type, value } of tokenize(text)) {\n const colorize = defs[type];\n if (colorize) {\n highlighted += value\n .split(NEWLINE)\n .map(str => colorize(str))\n .join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n\n return highlighted;\n}\n\n/**\n * Highlight `text` using the token definitions in `defs`.\n */\n\ntype Options = {\n forceColor?: boolean;\n};\n\n/**\n * Whether the code should be highlighted given the passed options.\n */\nexport function shouldHighlight(options: Options): boolean {\n return !!Chalk.supportsColor || options.forceColor;\n}\n\n/**\n * The Chalk instance that should be used given the passed options.\n */\nexport function getChalk(options: Options) {\n return options.forceColor\n ? new Chalk.constructor({ enabled: true, level: 1 })\n : Chalk;\n}\n\n/**\n * Highlight `code`.\n */\nexport default function highlight(code: string, options: Options = {}): string {\n if (code !== \"\" && shouldHighlight(options)) {\n const chalk = getChalk(options);\n const defs = getDefs(chalk);\n return highlightTokens(defs, code);\n } else {\n return code;\n }\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAD,OAAA;AAIA,IAAAE,MAAA,GAAAF,OAAA;AAaA,MAAMG,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AAoB9E,SAASC,OAAOA,CAACC,KAAiB,EAAyC;EACzE,OAAO;IACLC,OAAO,EAAED,KAAK,CAACE,IAAI;IACnBC,WAAW,EAAEH,KAAK,CAACI,MAAM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AKO,SAASC,QAAQA,CAACJ,OAAgB,EAAE;EACzC,OAAOA,OAAO,CAACG,UAAU,GACrB,IAAIF,MAAK,CAACI,WAAW,CAAC;IAAEC,OAAO,EAAE,IAAI;IAAEC,KAAK,EAAE;EAAE,CAAC,CAAC,GAClDN,MAAK;AACX;AAKe,SAASO,SAASA,CAACC,IAAY,EAAET,OAAgB,GAAG,CAAC,CAAC,EAAU;EAC7E,IAAIS,IAAI,KAAK,EAAE,IAAIV,eAAe,CAACC,OAAO,CAAC,EAAE;IAC3C,MAAMjD,KAAK,GAAGqD,QAAQ,CAACJ,OAAO,CAAC;IAC/B,MAAMR,IAAI,GAAG1C,OAAO,CAACC,KAAK,CAAC;IAC3B,OAAOwC,eAAe,CAACC,IAAI,EAAEiB,IAAI,CAAC;EACpC,CAAC,MAAM;IACL,OAAOA,IAAI;EACb;AACF"} \ No newline at end of file diff --git a/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js b/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js new file mode 100644 index 00000000..7834bf9b --- /dev/null +++ b/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; diff --git a/node_modules/@babel/highlight/node_modules/escape-string-regexp/license b/node_modules/@babel/highlight/node_modules/escape-string-regexp/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/@babel/highlight/node_modules/escape-string-regexp/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/@babel/highlight/node_modules/escape-string-regexp/package.json b/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json new file mode 100644 index 00000000..f307df34 --- /dev/null +++ b/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json @@ -0,0 +1,41 @@ +{ + "name": "escape-string-regexp", + "version": "1.0.5", + "description": "Escape RegExp special characters", + "license": "MIT", + "repository": "sindresorhus/escape-string-regexp", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Boy Nicolai Appelman (jbna.nl)" + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "escape", + "regex", + "regexp", + "re", + "regular", + "expression", + "string", + "str", + "special", + "characters" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + } +} diff --git a/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md b/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md new file mode 100644 index 00000000..87ac82d5 --- /dev/null +++ b/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md @@ -0,0 +1,27 @@ +# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) + +> Escape RegExp special characters + + +## Install + +``` +$ npm install --save escape-string-regexp +``` + + +## Usage + +```js +const escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('how much $ for a unicorn?'); +//=> 'how much \$ for a unicorn\?' + +new RegExp(escapedString); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/@humanwhocodes/config-array/LICENSE b/node_modules/@humanwhocodes/config-array/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/node_modules/@humanwhocodes/config-array/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@humanwhocodes/config-array/README.md b/node_modules/@humanwhocodes/config-array/README.md new file mode 100644 index 00000000..9cfe637b --- /dev/null +++ b/node_modules/@humanwhocodes/config-array/README.md @@ -0,0 +1,258 @@ +# Config Array + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate). + +## Description + +A config array is a way of managing configurations that are based on glob pattern matching of filenames. Each config array contains the information needed to determine the correct configuration for any file based on the filename. + +## Background + +In 2019, I submitted an [ESLint RFC](https://github.com/eslint/rfcs/pull/9) proposing a new way of configuring ESLint. The goal was to streamline what had become an increasingly complicated configuration process. Over several iterations, this proposal was eventually born. + +The basic idea is that all configuration, including overrides, can be represented by a single array where each item in the array is a config object. Config objects appearing later in the array override config objects appearing earlier in the array. You can calculate a config for a given file by traversing all config objects in the array to find the ones that match the filename. Matching is done by specifying glob patterns in `files` and `ignores` properties on each config object. Here's an example: + +```js +export default [ + + // match all JSON files + { + name: "JSON Handler", + files: ["**/*.json"], + handler: jsonHandler + }, + + // match only package.json + { + name: "package.json Handler", + files: ["package.json"], + handler: packageJsonHandler + } +]; +``` + +In this example, there are two config objects: the first matches all JSON files in all directories and the second matches just `package.json` in the base path directory (all the globs are evaluated as relative to a base path that can be specified). When you retrieve a configuration for `foo.json`, only the first config object matches so `handler` is equal to `jsonHandler`; when you retrieve a configuration for `package.json`, `handler` is equal to `packageJsonHandler` (because both config objects match, the second one wins). + +## Installation + +You can install the package using npm or Yarn: + +```bash +npm install @humanwhocodes/config-array --save + +# or + +yarn add @humanwhocodes/config-array +``` + +## Usage + +First, import the `ConfigArray` constructor: + +```js +import { ConfigArray } from "@humanwhocodes/config-array"; + +// or using CommonJS + +const { ConfigArray } = require("@humanwhocodes/config-array"); +``` + +When you create a new instance of `ConfigArray`, you must pass in two arguments: an array of configs and an options object. The array of configs is most likely read in from a configuration file, so here's a typical example: + +```js +const configFilename = path.resolve(process.cwd(), "my.config.js"); +const { default: rawConfigs } = await import(configFilename); +const configs = new ConfigArray(rawConfigs, { + + // the path to match filenames from + basePath: process.cwd(), + + // additional items in each config + schema: mySchema +}); +``` + +This example reads in an object or array from `my.config.js` and passes it into the `ConfigArray` constructor as the first argument. The second argument is an object specifying the `basePath` (the directoy in which `my.config.js` is found) and a `schema` to define the additional properties of a config object beyond `files`, `ignores`, and `name`. + +### Specifying a Schema + +The `schema` option is required for you to use additional properties in config objects. The schema is object that follows the format of an [`ObjectSchema`](https://npmjs.com/package/@humanwhocodes/object-schema). The schema specifies both validation and merge rules that the `ConfigArray` instance needs to combine configs when there are multiple matches. Here's an example: + +```js +const configFilename = path.resolve(process.cwd(), "my.config.js"); +const { default: rawConfigs } = await import(configFilename); + +const mySchema = { + + // define the handler key in configs + handler: { + required: true, + merge(a, b) { + if (!b) return a; + if (!a) return b; + }, + validate(value) { + if (typeof value !== "function") { + throw new TypeError("Function expected."); + } + } + } +}; + +const configs = new ConfigArray(rawConfigs, { + + // the path to match filenames from + basePath: process.cwd(), + + // additional items in each config + schema: mySchema +}); +``` + +### Config Arrays + +Config arrays can be multidimensional, so it's possible for a config array to contain another config array, such as: + +```js +export default [ + + // JS config + { + files: ["**/*.js"], + handler: jsHandler + }, + + // JSON configs + [ + + // match all JSON files + { + name: "JSON Handler", + files: ["**/*.json"], + handler: jsonHandler + }, + + // match only package.json + { + name: "package.json Handler", + files: ["package.json"], + handler: packageJsonHandler + } + ], + + // filename must match function + { + files: [ filePath => filePath.endsWith(".md") ], + handler: markdownHandler + }, + + // filename must match all patterns in subarray + { + files: [ ["*.test.*", "*.js"] ], + handler: jsTestHandler + }, + + // filename must not match patterns beginning with ! + { + name: "Non-JS files", + files: ["!*.js"], + settings: { + js: false + } + } +]; +``` + +In this example, the array contains both config objects and a config array. When a config array is normalized (see details below), it is flattened so only config objects remain. However, the order of evaluation remains the same. + +If the `files` array contains a function, then that function is called with the absolute path of the file and is expected to return `true` if there is a match and `false` if not. (The `ignores` array can also contain functions.) + +If the `files` array contains an item that is an array of strings and functions, then all patterns must match in order for the config to match. In the preceding examples, both `*.test.*` and `*.js` must match in order for the config object to be used. + +If a pattern in the files array begins with `!` then it excludes that pattern. In the preceding example, any filename that doesn't end with `.js` will automatically getting a `settings.js` property set to `false`. + +### Config Functions + +Config arrays can also include config functions. A config function accepts a single parameter, `context` (defined by you), and must return either a config object or a config array (it cannot return another function). Config functions allow end users to execute code in the creation of appropriate config objects. Here's an example: + +```js +export default [ + + // JS config + { + files: ["**/*.js"], + handler: jsHandler + }, + + // JSON configs + function (context) { + return [ + + // match all JSON files + { + name: context.name + " JSON Handler", + files: ["**/*.json"], + handler: jsonHandler + }, + + // match only package.json + { + name: context.name + " package.json Handler", + files: ["package.json"], + handler: packageJsonHandler + } + ]; + } +]; +``` + +When a config array is normalized, each function is executed and replaced in the config array with the return value. + +**Note:** Config functions cannot be async. This will be added in a future version. + +### Normalizing Config Arrays + +Once a config array has been created and loaded with all of the raw config data, it must be normalized before it can be used. The normalization process goes through and flattens the config array as well as executing all config functions to get their final values. + +To normalize a config array, call the `normalize()` method and pass in a context object: + +```js +await configs.normalize({ + name: "MyApp" +}); +``` + +The `normalize()` method returns a promise, so be sure to use the `await` operator. The config array instance is normalized in-place, so you don't need to create a new variable. + +**Important:** Once a `ConfigArray` is normalized, it cannot be changed further. You can, however, create a new `ConfigArray` and pass in the normalized instance to create an unnormalized copy. + +### Getting Config for a File + +To get the config for a file, use the `getConfig()` method on a normalized config array and pass in the filename to get a config for: + +```js +// pass in absolute filename +const fileConfig = configs.getConfig(path.resolve(process.cwd(), "package.json")); +``` + +The config array always returns an object, even if there are no configs matching the given filename. You can then inspect the returned config object to determine how to proceed. + +A few things to keep in mind: + +* You must pass in the absolute filename to get a config for. +* The returned config object never has `files`, `ignores`, or `name` properties; the only properties on the object will be the other configuration options specified. +* The config array caches configs, so subsequent calls to `getConfig()` with the same filename will return in a fast lookup rather than another calculation. + +## Acknowledgements + +The design of this project was influenced by feedback on the ESLint RFC, and incorporates ideas from: + +* Teddy Katz (@not-an-aardvark) +* Toru Nagashima (@mysticatea) +* Kai Cataldo (@kaicataldo) + +## License + +Apache 2.0 diff --git a/node_modules/@humanwhocodes/config-array/api.js b/node_modules/@humanwhocodes/config-array/api.js new file mode 100644 index 00000000..a9aacf46 --- /dev/null +++ b/node_modules/@humanwhocodes/config-array/api.js @@ -0,0 +1,457 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var path = _interopDefault(require('path')); +var minimatch = _interopDefault(require('minimatch')); +var createDebug = _interopDefault(require('debug')); +var objectSchema = require('@humanwhocodes/object-schema'); + +/** + * @fileoverview ConfigSchema + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Assets that a given value is an array. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array. + */ +function assertIsArray(value) { + if (!Array.isArray(value)) { + throw new TypeError('Expected value to be an array.'); + } +} + +/** + * Assets that a given value is an array containing only strings and functions. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array of strings and functions. + */ +function assertIsArrayOfStringsAndFunctions(value, name) { + assertIsArray(value); + + if (value.some(item => typeof item !== 'string' && typeof item !== 'function')) { + throw new TypeError('Expected array to only contain strings.'); + } +} + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The base schema that every ConfigArray uses. + * @type Object + */ +const baseSchema = Object.freeze({ + name: { + required: false, + merge() { + return undefined; + }, + validate(value) { + if (typeof value !== 'string') { + throw new TypeError('Property must be a string.'); + } + } + }, + files: { + required: false, + merge() { + return undefined; + }, + validate(value) { + + // first check if it's an array + assertIsArray(value); + + // then check each member + value.forEach(item => { + if (Array.isArray(item)) { + assertIsArrayOfStringsAndFunctions(item); + } else if (typeof item !== 'string' && typeof item !== 'function') { + throw new TypeError('Items must be a string, a function, or an array of strings and functions.'); + } + }); + + } + }, + ignores: { + required: false, + merge() { + return undefined; + }, + validate: assertIsArrayOfStringsAndFunctions + } +}); + +/** + * @fileoverview ConfigArray + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const debug = createDebug('@hwc/config-array'); + +const MINIMATCH_OPTIONS = { + matchBase: true +}; + +/** + * Shorthand for checking if a value is a string. + * @param {any} value The value to check. + * @returns {boolean} True if a string, false if not. + */ +function isString(value) { + return typeof value === 'string'; +} + +/** + * Normalizes a `ConfigArray` by flattening it and executing any functions + * that are found inside. + * @param {Array} items The items in a `ConfigArray`. + * @param {Object} context The context object to pass into any function + * found. + * @returns {Array} A flattened array containing only config objects. + * @throws {TypeError} When a config function returns a function. + */ +async function normalize(items, context) { + + // TODO: Allow async config functions + + function *flatTraverse(array) { + for (let item of array) { + if (typeof item === 'function') { + item = item(context); + } + + if (Array.isArray(item)) { + yield * flatTraverse(item); + } else if (typeof item === 'function') { + throw new TypeError('A config function can only return an object or array.'); + } else { + yield item; + } + } + } + + return [...flatTraverse(items)]; +} + +/** + * Determines if a given file path is matched by a config. If the config + * has no `files` field, then it matches; otherwise, if a `files` field + * is present then we match the globs in `files` and exclude any globs in + * `ignores`. + * @param {string} filePath The absolute file path to check. + * @param {Object} config The config object to check. + * @returns {boolean} True if the file path is matched by the config, + * false if not. + */ +function pathMatches(filePath, basePath, config) { + + // a config without a `files` field always matches + if (!config.files) { + return true; + } + + // if files isn't an array, throw an error + if (!Array.isArray(config.files) || config.files.length === 0) { + throw new TypeError('The files key must be a non-empty array.'); + } + + const relativeFilePath = path.relative(basePath, filePath); + + // match both strings and functions + const match = pattern => { + if (isString(pattern)) { + return minimatch(relativeFilePath, pattern, MINIMATCH_OPTIONS); + } + + if (typeof pattern === 'function') { + return pattern(filePath); + } + }; + + // check for all matches to config.files + let matches = config.files.some(pattern => { + if (Array.isArray(pattern)) { + return pattern.every(match); + } + + return match(pattern); + }); + + /* + * If the file path matches the config.files patterns, then check to see + * if there are any files to ignore. + */ + if (matches && config.ignores) { + matches = !config.ignores.some(pattern => { + return minimatch(filePath, pattern, MINIMATCH_OPTIONS); + }); + } + + return matches; +} + +/** + * Ensures that a ConfigArray has been normalized. + * @param {ConfigArray} configArray The ConfigArray to check. + * @returns {void} + * @throws {Error} When the `ConfigArray` is not normalized. + */ +function assertNormalized(configArray) { + // TODO: Throw more verbose error + if (!configArray.isNormalized()) { + throw new Error('ConfigArray must be normalized to perform this operation.'); + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +const ConfigArraySymbol = { + isNormalized: Symbol('isNormalized'), + configCache: Symbol('configCache'), + schema: Symbol('schema'), + finalizeConfig: Symbol('finalizeConfig'), + preprocessConfig: Symbol('preprocessConfig') +}; + +/** + * Represents an array of config objects and provides method for working with + * those config objects. + */ +class ConfigArray extends Array { + + /** + * Creates a new instance of ConfigArray. + * @param {Iterable|Function|Object} configs An iterable yielding config + * objects, or a config function, or a config object. + * @param {string} [options.basePath=""] The path of the config file + * @param {boolean} [options.normalized=false] Flag indicating if the + * configs have already been normalized. + * @param {Object} [options.schema] The additional schema + * definitions to use for the ConfigArray schema. + */ + constructor(configs, { basePath = '', normalized = false, schema: customSchema } = {}) { + super(); + + /** + * Tracks if the array has been normalized. + * @property isNormalized + * @type boolean + * @private + */ + this[ConfigArraySymbol.isNormalized] = normalized; + + /** + * The schema used for validating and merging configs. + * @property schema + * @type ObjectSchema + * @private + */ + this[ConfigArraySymbol.schema] = new objectSchema.ObjectSchema({ + ...customSchema, + ...baseSchema + }); + + /** + * The path of the config file that this array was loaded from. + * This is used to calculate filename matches. + * @property basePath + * @type string + */ + this.basePath = basePath; + + /** + * A cache to store calculated configs for faster repeat lookup. + * @property configCache + * @type Map + * @private + */ + this[ConfigArraySymbol.configCache] = new Map(); + + // load the configs into this array + if (Array.isArray(configs)) { + this.push(...configs); + } else { + this.push(configs); + } + + } + + /** + * Prevent normal array methods from creating a new `ConfigArray` instance. + * This is to ensure that methods such as `slice()` won't try to create a + * new instance of `ConfigArray` behind the scenes as doing so may throw + * an error due to the different constructor signature. + * @returns {Function} The `Array` constructor. + */ + static get [Symbol.species]() { + return Array; + } + + /** + * Returns the `files` globs from every config object in the array. + * Negated patterns (those beginning with `!`) are not returned. + * This can be used to determine which files will be matched by a + * config array or to use as a glob pattern when no patterns are provided + * for a command line interface. + * @returns {string[]} An array of string patterns. + */ + get files() { + + assertNormalized(this); + + const result = []; + + for (const config of this) { + if (config.files) { + config.files.forEach(filePattern => { + if (Array.isArray(filePattern)) { + result.push(...filePattern.filter(pattern => { + return isString(pattern) && !pattern.startsWith('!'); + })); + } else if (isString(filePattern) && !filePattern.startsWith('!')) { + result.push(filePattern); + } + }); + } + } + + return result; + } + + /** + * Returns the file globs that should always be ignored regardless of + * the matching `files` fields in any configs. This is necessary to mimic + * the behavior of things like .gitignore and .eslintignore, allowing a + * globbing operation to be faster. + * @returns {string[]} An array of string patterns to be ignored. + */ + get ignores() { + + assertNormalized(this); + + const result = []; + + for (const config of this) { + if (config.ignores && !config.files) { + result.push(...config.ignores.filter(isString)); + } + } + + return result; + } + + /** + * Indicates if the config array has been normalized. + * @returns {boolean} True if the config array is normalized, false if not. + */ + isNormalized() { + return this[ConfigArraySymbol.isNormalized]; + } + + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {ConfigContext} context The context object for config functions. + * @returns {ConfigArray} A new ConfigArray instance that is normalized. + */ + async normalize(context = {}) { + + if (!this.isNormalized()) { + const normalizedConfigs = await normalize(this, context); + this.length = 0; + this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig])); + this[ConfigArraySymbol.isNormalized] = true; + + // prevent further changes + Object.freeze(this); + } + + return this; + } + + /** + * Finalizes the state of a config before being cached and returned by + * `getConfig()`. Does nothing by default but is provided to be + * overridden by subclasses as necessary. + * @param {Object} config The config to finalize. + * @returns {Object} The finalized config. + */ + [ConfigArraySymbol.finalizeConfig](config) { + return config; + } + + /** + * Preprocesses a config during the normalization process. This is the + * method to override if you want to convert an array item before it is + * validated for the first time. For example, if you want to replace a + * string with an object, this is the method to override. + * @param {Object} config The config to preprocess. + * @returns {Object} The config to use in place of the argument. + */ + [ConfigArraySymbol.preprocessConfig](config) { + return config; + } + + /** + * Returns the config object for a given file path. + * @param {string} filePath The complete path of a file to get a config for. + * @returns {Object} The config object for this file. + */ + getConfig(filePath) { + + assertNormalized(this); + + // first check the cache to avoid duplicate work + let finalConfig = this[ConfigArraySymbol.configCache].get(filePath); + + if (finalConfig) { + return finalConfig; + } + + // No config found in cache, so calculate a new one + + const matchingConfigs = []; + + for (const config of this) { + if (pathMatches(filePath, this.basePath, config)) { + debug(`Matching config found for ${filePath}`); + matchingConfigs.push(config); + } else { + debug(`No matching config found for ${filePath}`); + } + } + + finalConfig = matchingConfigs.reduce((result, config) => { + return this[ConfigArraySymbol.schema].merge(result, config); + }, {}, this); + + finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig); + + this[ConfigArraySymbol.configCache].set(filePath, finalConfig); + + return finalConfig; + } + +} + +exports.ConfigArray = ConfigArray; +exports.ConfigArraySymbol = ConfigArraySymbol; diff --git a/node_modules/@humanwhocodes/config-array/package.json b/node_modules/@humanwhocodes/config-array/package.json new file mode 100644 index 00000000..4dc3a4e5 --- /dev/null +++ b/node_modules/@humanwhocodes/config-array/package.json @@ -0,0 +1,61 @@ +{ + "name": "@humanwhocodes/config-array", + "version": "0.5.0", + "description": "Glob-based configuration matching.", + "author": "Nicholas C. Zakas", + "main": "api.js", + "files": [ + "api.js" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/config-array.git" + }, + "bugs": { + "url": "https://github.com/humanwhocodes/config-array/issues" + }, + "homepage": "https://github.com/humanwhocodes/config-array#readme", + "scripts": { + "build": "rollup -c", + "format": "nitpik", + "lint": "eslint *.config.js src/*.js tests/*.js", + "prepublish": "npm run build", + "test:coverage": "nyc --include src/*.js npm run test", + "test": "mocha -r esm tests/ --recursive" + }, + "gitHooks": { + "pre-commit": "lint-staged" + }, + "lint-staged": { + "*.js": [ + "nitpik", + "eslint --fix --ignore-pattern '!.eslintrc.js'" + ] + }, + "keywords": [ + "configuration", + "configarray", + "config file" + ], + "license": "Apache-2.0", + "engines": { + "node": ">=10.10.0" + }, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "devDependencies": { + "@nitpik/javascript": "^0.3.3", + "@nitpik/node": "0.0.5", + "chai": "^4.2.0", + "eslint": "^6.7.1", + "esm": "^3.2.25", + "lint-staged": "^10.2.8", + "mocha": "^6.1.4", + "nyc": "^14.1.1", + "rollup": "^1.12.3", + "yorkie": "^2.0.0" + } +} \ No newline at end of file diff --git a/node_modules/@humanwhocodes/object-schema/.eslintrc.js b/node_modules/@humanwhocodes/object-schema/.eslintrc.js new file mode 100644 index 00000000..4934076c --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/.eslintrc.js @@ -0,0 +1,29 @@ +module.exports = { + "env": { + "commonjs": true, + "es6": true, + "node": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 2018 + }, + "rules": { + "indent": [ + "error", + 4 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "always" + ] + } +}; \ No newline at end of file diff --git a/node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml b/node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml new file mode 100644 index 00000000..8ea19514 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml @@ -0,0 +1,27 @@ +name: Node CI + +on: [push, pull_request] + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [windows-latest, macOS-latest, ubuntu-latest] + node: [8.x, 10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm test + env: + CI: true diff --git a/node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml b/node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml new file mode 100644 index 00000000..42f75f73 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml @@ -0,0 +1,39 @@ +on: + push: + branches: + - main +name: release-please +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: GoogleCloudPlatform/release-please-action@v2 + id: release + with: + release-type: node + package-name: test-release-please + # The logic below handles the npm publication: + - uses: actions/checkout@v2 + # these if statements ensure that a publication only occurs when + # a new release is created: + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: 'https://registry.npmjs.org' + if: ${{ steps.release.outputs.release_created }} + - run: npm ci + if: ${{ steps.release.outputs.release_created }} + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ steps.release.outputs.release_created }} + + # Tweets out release announcement + - run: 'npx @humanwhocodes/tweet "Object Schema v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released!\n\n${{ github.event.release.html_url }}"' + if: ${{ steps.release.outputs.release_created }} + env: + TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} + TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} + TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} diff --git a/node_modules/@humanwhocodes/object-schema/CHANGELOG.md b/node_modules/@humanwhocodes/object-schema/CHANGELOG.md new file mode 100644 index 00000000..bb63f5fe --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +### [1.2.1](https://www.github.com/humanwhocodes/object-schema/compare/v1.2.0...v1.2.1) (2021-11-02) + + +### Bug Fixes + +* Never return original object from individual config ([5463c5c](https://www.github.com/humanwhocodes/object-schema/commit/5463c5c6d2cb35a7b7948dffc37c899a41d1775f)) diff --git a/node_modules/@humanwhocodes/object-schema/LICENSE b/node_modules/@humanwhocodes/object-schema/LICENSE new file mode 100644 index 00000000..a5e3ae46 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Human Who Codes +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@humanwhocodes/object-schema/README.md b/node_modules/@humanwhocodes/object-schema/README.md new file mode 100644 index 00000000..2163797f --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/README.md @@ -0,0 +1,234 @@ +# JavaScript ObjectSchema Package + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate). + +## Overview + +A JavaScript object merge/validation utility where you can define a different merge and validation strategy for each key. This is helpful when you need to validate complex data structures and then merge them in a way that is more complex than `Object.assign()`. + +## Installation + +You can install using either npm: + +``` +npm install @humanwhocodes/object-schema +``` + +Or Yarn: + +``` +yarn add @humanwhocodes/object-schema +``` + +## Usage + +Use CommonJS to get access to the `ObjectSchema` constructor: + +```js +const { ObjectSchema } = require("@humanwhocodes/object-schema"); + +const schema = new ObjectSchema({ + + // define a definition for the "downloads" key + downloads: { + required: true, + merge(value1, value2) { + return value1 + value2; + }, + validate(value) { + if (typeof value !== "number") { + throw new Error("Expected downloads to be a number."); + } + } + }, + + // define a strategy for the "versions" key + version: { + required: true, + merge(value1, value2) { + return value1.concat(value2); + }, + validate(value) { + if (!Array.isArray(value)) { + throw new Error("Expected versions to be an array."); + } + } + } +}); + +const record1 = { + downloads: 25, + versions: [ + "v1.0.0", + "v1.1.0", + "v1.2.0" + ] +}; + +const record2 = { + downloads: 125, + versions: [ + "v2.0.0", + "v2.1.0", + "v3.0.0" + ] +}; + +// make sure the records are valid +schema.validate(record1); +schema.validate(record2); + +// merge together (schema.merge() accepts any number of objects) +const result = schema.merge(record1, record2); + +// result looks like this: + +const result = { + downloads: 75, + versions: [ + "v1.0.0", + "v1.1.0", + "v1.2.0", + "v2.0.0", + "v2.1.0", + "v3.0.0" + ] +}; +``` + +## Tips and Tricks + +### Named merge strategies + +Instead of specifying a `merge()` method, you can specify one of the following strings to use a default merge strategy: + +* `"assign"` - use `Object.assign()` to merge the two values into one object. +* `"overwrite"` - the second value always replaces the first. +* `"replace"` - the second value replaces the first if the second is not `undefined`. + +For example: + +```js +const schema = new ObjectSchema({ + name: { + merge: "replace", + validate() {} + } +}); +``` + +### Named validation strategies + +Instead of specifying a `validate()` method, you can specify one of the following strings to use a default validation strategy: + +* `"array"` - value must be an array. +* `"boolean"` - value must be a boolean. +* `"number"` - value must be a number. +* `"object"` - value must be an object. +* `"object?"` - value must be an object or null. +* `"string"` - value must be a string. +* `"string!"` - value must be a non-empty string. + +For example: + +```js +const schema = new ObjectSchema({ + name: { + merge: "replace", + validate: "string" + } +}); +``` + +### Subschemas + +If you are defining a key that is, itself, an object, you can simplify the process by using a subschema. Instead of defining `merge()` and `validate()`, assign a `schema` key that contains a schema definition, like this: + +```js +const schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } +}); + +schema.validate({ + name: { + first: "n", + last: "z" + } +}); +``` + +### Remove Keys During Merge + +If the merge strategy for a key returns `undefined`, then the key will not appear in the final object. For example: + +```js +const schema = new ObjectSchema({ + date: { + merge() { + return undefined; + }, + validate(value) { + Date.parse(value); // throws an error when invalid + } + } +}); + +const object1 = { date: "5/5/2005" }; +const object2 = { date: "6/6/2006" }; + +const result = schema.merge(object1, object2); + +console.log("date" in result); // false +``` + +### Requiring Another Key Be Present + +If you'd like the presence of one key to require the presence of another key, you can use the `requires` property to specify an array of other properties that any key requires. For example: + +```js +const schema = new ObjectSchema(); + +const schema = new ObjectSchema({ + date: { + merge() { + return undefined; + }, + validate(value) { + Date.parse(value); // throws an error when invalid + } + }, + time: { + requires: ["date"], + merge(first, second) { + return second; + }, + validate(value) { + // ... + } + } +}); + +// throws error: Key "time" requires keys "date" +schema.validate({ + time: "13:45" +}); +``` + +In this example, even though `date` is an optional key, it is required to be present whenever `time` is present. + +## License + +BSD 3-Clause diff --git a/node_modules/@humanwhocodes/object-schema/package.json b/node_modules/@humanwhocodes/object-schema/package.json new file mode 100644 index 00000000..9fc90bf3 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/package.json @@ -0,0 +1,33 @@ +{ + "name": "@humanwhocodes/object-schema", + "version": "1.2.1", + "description": "An object schema merger/validator", + "main": "src/index.js", + "directories": { + "test": "tests" + }, + "scripts": { + "test": "mocha tests/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/object-schema.git" + }, + "keywords": [ + "object", + "validation", + "schema", + "merge" + ], + "author": "Nicholas C. Zakas", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/humanwhocodes/object-schema/issues" + }, + "homepage": "https://github.com/humanwhocodes/object-schema#readme", + "devDependencies": { + "chai": "^4.2.0", + "eslint": "^5.13.0", + "mocha": "^5.2.0" + } +} diff --git a/node_modules/@humanwhocodes/object-schema/src/index.js b/node_modules/@humanwhocodes/object-schema/src/index.js new file mode 100644 index 00000000..b2bc4fb9 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/src/index.js @@ -0,0 +1,7 @@ +/** + * @filedescription Object Schema Package + */ + +exports.ObjectSchema = require("./object-schema").ObjectSchema; +exports.MergeStrategy = require("./merge-strategy").MergeStrategy; +exports.ValidationStrategy = require("./validation-strategy").ValidationStrategy; diff --git a/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js b/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js new file mode 100644 index 00000000..82174492 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js @@ -0,0 +1,53 @@ +/** + * @filedescription Merge Strategy + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Container class for several different merge strategies. + */ +class MergeStrategy { + + /** + * Merges two keys by overwriting the first with the second. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value. + */ + static overwrite(value1, value2) { + return value2; + } + + /** + * Merges two keys by replacing the first with the second only if the + * second is defined. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value if it is defined. + */ + static replace(value1, value2) { + if (typeof value2 !== "undefined") { + return value2; + } + + return value1; + } + + /** + * Merges two properties by assigning properties from the second to the first. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} A new object containing properties from both value1 and + * value2. + */ + static assign(value1, value2) { + return Object.assign({}, value1, value2); + } +} + +exports.MergeStrategy = MergeStrategy; diff --git a/node_modules/@humanwhocodes/object-schema/src/object-schema.js b/node_modules/@humanwhocodes/object-schema/src/object-schema.js new file mode 100644 index 00000000..b6632365 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/src/object-schema.js @@ -0,0 +1,235 @@ +/** + * @filedescription Object Schema + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const { MergeStrategy } = require("./merge-strategy"); +const { ValidationStrategy } = require("./validation-strategy"); + +//----------------------------------------------------------------------------- +// Private +//----------------------------------------------------------------------------- + +const strategies = Symbol("strategies"); +const requiredKeys = Symbol("requiredKeys"); + +/** + * Validates a schema strategy. + * @param {string} name The name of the key this strategy is for. + * @param {Object} strategy The strategy for the object key. + * @param {boolean} [strategy.required=true] Whether the key is required. + * @param {string[]} [strategy.requires] Other keys that are required when + * this key is present. + * @param {Function} strategy.merge A method to call when merging two objects + * with the same key. + * @param {Function} strategy.validate A method to call when validating an + * object with the key. + * @returns {void} + * @throws {Error} When the strategy is missing a name. + * @throws {Error} When the strategy is missing a merge() method. + * @throws {Error} When the strategy is missing a validate() method. + */ +function validateDefinition(name, strategy) { + + let hasSchema = false; + if (strategy.schema) { + if (typeof strategy.schema === "object") { + hasSchema = true; + } else { + throw new TypeError("Schema must be an object."); + } + } + + if (typeof strategy.merge === "string") { + if (!(strategy.merge in MergeStrategy)) { + throw new TypeError(`Definition for key "${name}" missing valid merge strategy.`); + } + } else if (!hasSchema && typeof strategy.merge !== "function") { + throw new TypeError(`Definition for key "${name}" must have a merge property.`); + } + + if (typeof strategy.validate === "string") { + if (!(strategy.validate in ValidationStrategy)) { + throw new TypeError(`Definition for key "${name}" missing valid validation strategy.`); + } + } else if (!hasSchema && typeof strategy.validate !== "function") { + throw new TypeError(`Definition for key "${name}" must have a validate() method.`); + } +} + + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Represents an object validation/merging schema. + */ +class ObjectSchema { + + /** + * Creates a new instance. + */ + constructor(definitions) { + + if (!definitions) { + throw new Error("Schema definitions missing."); + } + + /** + * Track all strategies in the schema by key. + * @type {Map} + * @property strategies + */ + this[strategies] = new Map(); + + /** + * Separately track any keys that are required for faster validation. + * @type {Map} + * @property requiredKeys + */ + this[requiredKeys] = new Map(); + + // add in all strategies + for (const key of Object.keys(definitions)) { + validateDefinition(key, definitions[key]); + + // normalize merge and validate methods if subschema is present + if (typeof definitions[key].schema === "object") { + const schema = new ObjectSchema(definitions[key].schema); + definitions[key] = { + ...definitions[key], + merge(first = {}, second = {}) { + return schema.merge(first, second); + }, + validate(value) { + ValidationStrategy.object(value); + schema.validate(value); + } + }; + } + + // normalize the merge method in case there's a string + if (typeof definitions[key].merge === "string") { + definitions[key] = { + ...definitions[key], + merge: MergeStrategy[definitions[key].merge] + }; + }; + + // normalize the validate method in case there's a string + if (typeof definitions[key].validate === "string") { + definitions[key] = { + ...definitions[key], + validate: ValidationStrategy[definitions[key].validate] + }; + }; + + this[strategies].set(key, definitions[key]); + + if (definitions[key].required) { + this[requiredKeys].set(key, definitions[key]); + } + } + } + + /** + * Determines if a strategy has been registered for the given object key. + * @param {string} key The object key to find a strategy for. + * @returns {boolean} True if the key has a strategy registered, false if not. + */ + hasKey(key) { + return this[strategies].has(key); + } + + /** + * Merges objects together to create a new object comprised of the keys + * of the all objects. Keys are merged based on the each key's merge + * strategy. + * @param {...Object} objects The objects to merge. + * @returns {Object} A new object with a mix of all objects' keys. + * @throws {Error} If any object is invalid. + */ + merge(...objects) { + + // double check arguments + if (objects.length < 2) { + throw new Error("merge() requires at least two arguments."); + } + + if (objects.some(object => (object == null || typeof object !== "object"))) { + throw new Error("All arguments must be objects."); + } + + return objects.reduce((result, object) => { + + this.validate(object); + + for (const [key, strategy] of this[strategies]) { + try { + if (key in result || key in object) { + const value = strategy.merge.call(this, result[key], object[key]); + if (value !== undefined) { + result[key] = value; + } + } + } catch (ex) { + ex.message = `Key "${key}": ` + ex.message; + throw ex; + } + } + return result; + }, {}); + } + + /** + * Validates an object's keys based on the validate strategy for each key. + * @param {Object} object The object to validate. + * @returns {void} + * @throws {Error} When the object is invalid. + */ + validate(object) { + + // check existing keys first + for (const key of Object.keys(object)) { + + // check to see if the key is defined + if (!this.hasKey(key)) { + throw new Error(`Unexpected key "${key}" found.`); + } + + // validate existing keys + const strategy = this[strategies].get(key); + + // first check to see if any other keys are required + if (Array.isArray(strategy.requires)) { + if (!strategy.requires.every(otherKey => otherKey in object)) { + throw new Error(`Key "${key}" requires keys "${strategy.requires.join("\", \"")}".`); + } + } + + // now apply remaining validation strategy + try { + strategy.validate.call(strategy, object[key]); + } catch (ex) { + ex.message = `Key "${key}": ` + ex.message; + throw ex; + } + } + + // ensure required keys aren't missing + for (const [key] of this[requiredKeys]) { + if (!(key in object)) { + throw new Error(`Missing required key "${key}".`); + } + } + + } +} + +exports.ObjectSchema = ObjectSchema; diff --git a/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js b/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js new file mode 100644 index 00000000..ecf918bd --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js @@ -0,0 +1,102 @@ +/** + * @filedescription Validation Strategy + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Container class for several different validation strategies. + */ +class ValidationStrategy { + + /** + * Validates that a value is an array. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static array(value) { + if (!Array.isArray(value)) { + throw new TypeError("Expected an array."); + } + } + + /** + * Validates that a value is a boolean. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static boolean(value) { + if (typeof value !== "boolean") { + throw new TypeError("Expected a Boolean."); + } + } + + /** + * Validates that a value is a number. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static number(value) { + if (typeof value !== "number") { + throw new TypeError("Expected a number."); + } + } + + /** + * Validates that a value is a object. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static object(value) { + if (!value || typeof value !== "object") { + throw new TypeError("Expected an object."); + } + } + + /** + * Validates that a value is a object or null. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "object?"(value) { + if (typeof value !== "object") { + throw new TypeError("Expected an object or null."); + } + } + + /** + * Validates that a value is a string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static string(value) { + if (typeof value !== "string") { + throw new TypeError("Expected a string."); + } + } + + /** + * Validates that a value is a non-empty string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "string!"(value) { + if (typeof value !== "string" || value.length === 0) { + throw new TypeError("Expected a non-empty string."); + } + } + +} + +exports.ValidationStrategy = ValidationStrategy; diff --git a/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js b/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js new file mode 100644 index 00000000..84032d7e --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js @@ -0,0 +1,66 @@ +/** + * @filedescription Merge Strategy Tests + */ +/* global it, describe, beforeEach */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const assert = require("chai").assert; +const { MergeStrategy } = require("../src/"); + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +describe("MergeStrategy", () => { + + + describe("overwrite()", () => { + + it("should overwrite the first value with the second when the second is defined", () => { + const result = MergeStrategy.overwrite(1, 2); + assert.strictEqual(result, 2); + }); + + it("should overwrite the first value with the second when the second is undefined", () => { + const result = MergeStrategy.overwrite(1, undefined); + assert.strictEqual(result, undefined); + }); + + }); + + describe("replace()", () => { + + it("should overwrite the first value with the second when the second is defined", () => { + const result = MergeStrategy.replace(1, 2); + assert.strictEqual(result, 2); + }); + + it("should return the first value when the second is undefined", () => { + const result = MergeStrategy.replace(1, undefined); + assert.strictEqual(result, 1); + }); + + }); + + describe("assign()", () => { + + it("should merge properties from two objects when called", () => { + + const object1 = { foo: 1, bar: 3 }; + const object2 = { foo: 2 }; + + const result = MergeStrategy.assign(object1, object2); + assert.deepStrictEqual(result, { + foo: 2, + bar: 3 + }); + }); + + }); + +}); diff --git a/node_modules/@humanwhocodes/object-schema/tests/object-schema.js b/node_modules/@humanwhocodes/object-schema/tests/object-schema.js new file mode 100644 index 00000000..d86ef6e9 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/tests/object-schema.js @@ -0,0 +1,611 @@ +/** + * @filedescription Object Schema Tests + */ +/* global it, describe, beforeEach */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const assert = require("chai").assert; +const { ObjectSchema } = require("../src/"); + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +describe("ObjectSchema", () => { + + let schema; + + describe("new ObjectSchema()", () => { + + it("should add a new key when a strategy is passed", () => { + schema = new ObjectSchema({ + foo: { + merge() {}, + validate() {} + } + }); + + assert.isTrue(schema.hasKey("foo")); + }); + + it("should throw an error when a strategy is missing a merge() method", () => { + assert.throws(() => { + schema = new ObjectSchema({ + foo: { + validate() { } + } + }); + }, /Definition for key "foo" must have a merge property/); + }); + + it("should throw an error when a strategy is missing a merge() method", () => { + assert.throws(() => { + schema = new ObjectSchema(); + }, /Schema definitions missing/); + }); + + it("should throw an error when a strategy is missing a validate() method", () => { + assert.throws(() => { + schema = new ObjectSchema({ + foo: { + merge() { }, + } + }); + }, /Definition for key "foo" must have a validate\(\) method/); + }); + + it("should throw an error when merge is an invalid string", () => { + assert.throws(() => { + new ObjectSchema({ + foo: { + merge: "bar", + validate() { } + } + }); + }, /key "foo" missing valid merge strategy/); + }); + + it("should throw an error when validate is an invalid string", () => { + assert.throws(() => { + new ObjectSchema({ + foo: { + merge: "assign", + validate: "s" + } + }); + }, /key "foo" missing valid validation strategy/); + }); + + }); + + + describe("merge()", () => { + + it("should throw an error when an unexpected key is found", () => { + let schema = new ObjectSchema({}); + + assert.throws(() => { + schema.merge({ foo: true }, { foo: true }); + }, /Unexpected key "foo"/); + }); + + it("should throw an error when merge() throws an error", () => { + let schema = new ObjectSchema({ + foo: { + merge() { + throw new Error("Boom!"); + }, + validate() {} + } + }); + + assert.throws(() => { + schema.merge({ foo: true }, { foo: true }); + }, /Key "foo": Boom!/); + + }); + + it("should call the merge() strategy for one key when called", () => { + + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() {} + } + }); + + const result = schema.merge({ foo: true }, { foo: false }); + assert.propertyVal(result, "foo", "bar"); + }); + + it("should not call the merge() strategy when both objects don't contain the key", () => { + + let called = false; + + schema = new ObjectSchema({ + foo: { + merge() { + called = true; + }, + validate() {} + } + }); + + schema.merge({}, {}); + assert.isFalse(called, "The merge() strategy should not have been called."); + }); + + it("should omit returning the key when the merge() strategy returns undefined", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return undefined; + }, + validate() { } + } + }); + + const result = schema.merge({ foo: true }, { foo: false }); + assert.notProperty(result, "foo"); + }); + + it("should call the merge() strategy for two keys when called", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { } + }, + bar: { + merge() { + return "baz"; + }, + validate() {} + } + }); + + const result = schema.merge({ foo: true, bar: 1 }, { foo: true, bar: 2 }); + assert.propertyVal(result, "foo", "bar"); + assert.propertyVal(result, "bar", "baz"); + }); + + it("should call the merge() strategy for two keys when called on three objects", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { } + }, + bar: { + merge() { + return "baz"; + }, + validate() { } + } + }); + + const result = schema.merge( + { foo: true, bar: 1 }, + { foo: true, bar: 3 }, + { foo: false, bar: 2 } + ); + assert.propertyVal(result, "foo", "bar"); + assert.propertyVal(result, "bar", "baz"); + }); + + it("should call the merge() strategy when defined as 'overwrite'", () => { + schema = new ObjectSchema({ + foo: { + merge: "overwrite", + validate() { } + } + }); + + const result = schema.merge( + { foo: true }, + { foo: false } + ); + assert.propertyVal(result, "foo", false); + }); + + it("should call the merge() strategy when defined as 'assign'", () => { + schema = new ObjectSchema({ + foo: { + merge: "assign", + validate() { } + } + }); + + const result = schema.merge( + { foo: { bar: true } }, + { foo: { baz: false } } + ); + + assert.strictEqual(result.foo.bar, true); + assert.strictEqual(result.foo.baz, false); + }); + + it("should call the merge strategy when there's a subschema", () => { + + schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + }); + + const result = schema.merge({ + name: { + first: "n", + last: "z" + } + }, { + name: { + first: "g" + } + }); + + assert.strictEqual(result.name.first, "g"); + assert.strictEqual(result.name.last, "z"); + }); + + it("should return separate objects when using subschema", () => { + + schema = new ObjectSchema({ + age: { + merge: "replace", + validate: "number" + }, + address: { + schema: { + street: { + schema: { + number: { + merge: "replace", + validate: "number" + }, + streetName: { + merge: "replace", + validate: "string" + } + } + }, + state: { + merge: "replace", + validate: "string" + } + } + } + }); + + const baseObject = { + address: { + street: { + number: 100, + streetName: "Foo St" + }, + state: "HA" + } + }; + + const result = schema.merge(baseObject, { + age: 29 + }); + + assert.notStrictEqual(result.address.street, baseObject.address.street); + assert.deepStrictEqual(result.address, baseObject.address); + }); + + it("should not error when calling the merge strategy when there's a subschema and no matching key in second object", () => { + + schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + }); + + const result = schema.merge({ + name: { + first: "n", + last: "z" + } + }, { + }); + + assert.strictEqual(result.name.first, "n"); + assert.strictEqual(result.name.last, "z"); + }); + + it("should not error when calling the merge strategy when there's multiple subschemas and no matching key in second object", () => { + + schema = new ObjectSchema({ + user: { + schema: { + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + + } + } + }); + + const result = schema.merge({ + user: { + name: { + first: "n", + last: "z" + } + } + }, { + }); + + assert.strictEqual(result.user.name.first, "n"); + assert.strictEqual(result.user.name.last, "z"); + }); + + + }); + + describe("validate()", () => { + + it("should throw an error when an unexpected key is found", () => { + let schema = new ObjectSchema({}); + assert.throws(() => { + schema.validate({ foo: true }); + }, /Unexpected key "foo"/); + }); + + it("should not throw an error when an expected key is found", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() {} + } + }); + + schema.validate({ foo: true }); + }); + + it("should pass the property value into validate() when key is found", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate(value) { + assert.isTrue(value); + } + } + }); + + schema.validate({ foo: true }); + }); + + it("should not throw an error when expected keys are found", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() {} + }, + bar: { + merge() { + return "baz"; + }, + validate() {} + } + }); + + schema.validate({ foo: true, bar: true }); + }); + + it("should not throw an error when expected keys are found with required keys", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { } + }, + bar: { + requires: ["foo"], + merge() { + return "baz"; + }, + validate() { } + } + }); + + schema.validate({ foo: true, bar: true }); + }); + + it("should throw an error when expected keys are found without required keys", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { } + }, + baz: { + merge() { + return "baz"; + }, + validate() { } + }, + bar: { + name: "bar", + requires: ["foo", "baz"], + merge() { }, + validate() { } + } + }); + + assert.throws(() => { + schema.validate({ bar: true }); + }, /Key "bar" requires keys "foo", "baz"./); + }); + + + it("should throw an error when an expected key is found but is invalid", () => { + + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { + throw new Error("Invalid key."); + } + } + }); + + assert.throws(() => { + schema.validate({ foo: true }); + }, /Key "foo": Invalid key/); + }); + + it("should throw an error when an expected key is found but is invalid with a string validator", () => { + + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate: "string" + } + }); + + assert.throws(() => { + schema.validate({ foo: true }); + }, /Key "foo": Expected a string/); + }); + + it("should throw an error when an expected key is found but is invalid with a number validator", () => { + + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate: "number" + } + }); + + assert.throws(() => { + schema.validate({ foo: true }); + }, /Key "foo": Expected a number/); + }); + + it("should throw an error when a required key is missing", () => { + + schema = new ObjectSchema({ + foo: { + required: true, + merge() { + return "bar"; + }, + validate() {} + } + }); + + assert.throws(() => { + schema.validate({}); + }, /Missing required key "foo"/); + }); + + it("should throw an error when a subschema is provided and the value doesn't validate", () => { + + schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + }); + + assert.throws(() => { + schema.validate({ + name: { + first: 123, + last: "z" + } + }); + + }, /Key "name": Key "first": Expected a string/); + }); + + it("should not throw an error when a subschema is provided and the value validates", () => { + + schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + }); + + schema.validate({ + name: { + first: "n", + last: "z" + } + }); + + }); + + }); + +}); diff --git a/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js b/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js new file mode 100644 index 00000000..5d3e4a24 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js @@ -0,0 +1,186 @@ +/** + * @filedescription Merge Strategy Tests + */ +/* global it, describe, beforeEach */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const assert = require("chai").assert; +const { ValidationStrategy } = require("../src/"); + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +describe("ValidationStrategy", () => { + + describe("boolean", () => { + it("should not throw an error when the value is a boolean", () => { + ValidationStrategy.boolean(true); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.boolean(null); + }, /Expected a Boolean/); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy.boolean("foo"); + }, /Expected a Boolean/); + }); + + it("should throw an error when the value is a number", () => { + assert.throws(() => { + ValidationStrategy.boolean(123); + }, /Expected a Boolean/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy.boolean({}); + }, /Expected a Boolean/); + }); + }); + + describe("number", () => { + it("should not throw an error when the value is a number", () => { + ValidationStrategy.number(25); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.number(null); + }, /Expected a number/); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy.number("foo"); + }, /Expected a number/); + }); + + it("should throw an error when the value is a boolean", () => { + assert.throws(() => { + ValidationStrategy.number(true); + }, /Expected a number/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy.number({}); + }, /Expected a number/); + }); + }); + + describe("object", () => { + it("should not throw an error when the value is an object", () => { + ValidationStrategy.object({}); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.object(null); + }, /Expected an object/); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy.object(""); + }, /Expected an object/); + }); + }); + + describe("array", () => { + it("should not throw an error when the value is an array", () => { + ValidationStrategy.array([]); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.array(null); + }, /Expected an array/); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy.array(""); + }, /Expected an array/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy.array({}); + }, /Expected an array/); + }); + }); + + describe("object?", () => { + it("should not throw an error when the value is an object", () => { + ValidationStrategy["object?"]({}); + }); + + it("should not throw an error when the value is null", () => { + ValidationStrategy["object?"](null); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy["object?"](""); + }, /Expected an object/); + }); + }); + + describe("string", () => { + it("should not throw an error when the value is a string", () => { + ValidationStrategy.string("foo"); + }); + + it("should not throw an error when the value is an empty string", () => { + ValidationStrategy.string(""); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.string(null); + }, /Expected a string/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy.string({}); + }, /Expected a string/); + }); + }); + + describe("string!", () => { + it("should not throw an error when the value is an string", () => { + ValidationStrategy["string!"]("foo"); + }); + + it("should throw an error when the value is an empty string", () => { + assert.throws(() => { + ValidationStrategy["string!"](""); + }, /Expected a non-empty string/); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy["string!"](null); + }, /Expected a non-empty string/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy["string!"]({}); + }, /Expected a non-empty string/); + }); + }); + + +}); diff --git a/node_modules/acorn-jsx/index.d.ts b/node_modules/acorn-jsx/index.d.ts new file mode 100644 index 00000000..f37b1df4 --- /dev/null +++ b/node_modules/acorn-jsx/index.d.ts @@ -0,0 +1,12 @@ +import { Parser } from 'acorn' + +declare const jsx: (options?: jsx.Options) => (BaseParser: typeof Parser) => typeof Parser; + +declare namespace jsx { + interface Options { + allowNamespacedObjects?: boolean; + allowNamespaces?: boolean; + } +} + +export = jsx; diff --git a/node_modules/escape-string-regexp/index.d.ts b/node_modules/escape-string-regexp/index.d.ts new file mode 100644 index 00000000..7d34edc7 --- /dev/null +++ b/node_modules/escape-string-regexp/index.d.ts @@ -0,0 +1,18 @@ +/** +Escape RegExp special characters. + +You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. + +@example +``` +import escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('How much $ for a 🦄?'); +//=> 'How much \\$ for a 🦄\\?' + +new RegExp(escapedString); +``` +*/ +declare const escapeStringRegexp: (string: string) => string; + +export = escapeStringRegexp; diff --git a/node_modules/eslint/lib/config/default-config.js b/node_modules/eslint/lib/config/default-config.js new file mode 100644 index 00000000..cb6f4033 --- /dev/null +++ b/node_modules/eslint/lib/config/default-config.js @@ -0,0 +1,52 @@ +/** + * @fileoverview Default configuration + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const Rules = require("../rules"); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + + +exports.defaultConfig = [ + { + plugins: { + "@": { + parsers: { + espree: require("espree") + }, + + /* + * Because we try to delay loading rules until absolutely + * necessary, a proxy allows us to hook into the lazy-loading + * aspect of the rules map while still keeping all of the + * relevant configuration inside of the config array. + */ + rules: new Proxy({}, { + get(target, property) { + return Rules.get(property); + }, + + has(target, property) { + return Rules.has(property); + } + }) + } + }, + ignores: [ + "**/node_modules/**", + ".git/**" + ], + languageOptions: { + parser: "@/espree" + } + } +]; diff --git a/node_modules/eslint/lib/config/flat-config-array.js b/node_modules/eslint/lib/config/flat-config-array.js new file mode 100644 index 00000000..ecf396a3 --- /dev/null +++ b/node_modules/eslint/lib/config/flat-config-array.js @@ -0,0 +1,125 @@ +/** + * @fileoverview Flat Config Array + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const { ConfigArray, ConfigArraySymbol } = require("@humanwhocodes/config-array"); +const { flatConfigSchema } = require("./flat-config-schema"); +const { RuleValidator } = require("./rule-validator"); +const { defaultConfig } = require("./default-config"); +const recommendedConfig = require("../../conf/eslint-recommended"); +const allConfig = require("../../conf/eslint-all"); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const ruleValidator = new RuleValidator(); + +/** + * Splits a plugin identifier in the form a/b/c into two parts: a/b and c. + * @param {string} identifier The identifier to parse. + * @returns {{objectName: string, pluginName: string}} The parts of the plugin + * name. + */ +function splitPluginIdentifier(identifier) { + const parts = identifier.split("/"); + + return { + objectName: parts.pop(), + pluginName: parts.join("/") + }; +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Represents an array containing configuration information for ESLint. + */ +class FlatConfigArray extends ConfigArray { + + /** + * Creates a new instance. + * @param {*[]} configs An array of configuration information. + * @param {{basePath: string, baseConfig: FlatConfig}} options The options + * to use for the config array instance. + */ + constructor(configs, { basePath, baseConfig = defaultConfig }) { + super(configs, { + basePath, + schema: flatConfigSchema + }); + + this.unshift(baseConfig); + } + + /* eslint-disable class-methods-use-this */ + /** + * Replaces a config with another config to allow us to put strings + * in the config array that will be replaced by objects before + * normalization. + * @param {Object} config The config to preprocess. + * @returns {Object} The preprocessed config. + */ + [ConfigArraySymbol.preprocessConfig](config) { + if (config === "eslint:recommended") { + return recommendedConfig; + } + + if (config === "eslint:all") { + return allConfig; + } + + return config; + } + + /** + * Finalizes the config by replacing plugin references with their objects + * and validating rule option schemas. + * @param {Object} config The config to finalize. + * @returns {Object} The finalized config. + * @throws {TypeError} If the config is invalid. + */ + [ConfigArraySymbol.finalizeConfig](config) { + + const { plugins, languageOptions, processor } = config; + + // Check parser value + if (languageOptions && languageOptions.parser && typeof languageOptions.parser === "string") { + const { pluginName, objectName: parserName } = splitPluginIdentifier(languageOptions.parser); + + if (!plugins || !plugins[pluginName] || !plugins[pluginName].parsers || !plugins[pluginName].parsers[parserName]) { + throw new TypeError(`Key "parser": Could not find "${parserName}" in plugin "${pluginName}".`); + } + + languageOptions.parser = plugins[pluginName].parsers[parserName]; + } + + // Check processor value + if (processor && typeof processor === "string") { + const { pluginName, objectName: processorName } = splitPluginIdentifier(processor); + + if (!plugins || !plugins[pluginName] || !plugins[pluginName].processors || !plugins[pluginName].processors[processorName]) { + throw new TypeError(`Key "processor": Could not find "${processorName}" in plugin "${pluginName}".`); + } + + config.processor = plugins[pluginName].processors[processorName]; + } + + ruleValidator.validate(config); + + return config; + } + /* eslint-enable class-methods-use-this */ + +} + +exports.FlatConfigArray = FlatConfigArray; diff --git a/node_modules/eslint/lib/config/flat-config-schema.js b/node_modules/eslint/lib/config/flat-config-schema.js new file mode 100644 index 00000000..80785476 --- /dev/null +++ b/node_modules/eslint/lib/config/flat-config-schema.js @@ -0,0 +1,452 @@ +/** + * @fileoverview Flat config schema + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + +/** + * @typedef ObjectPropertySchema + * @property {Function|string} merge The function or name of the function to call + * to merge multiple objects with this property. + * @property {Function|string} validate The function or name of the function to call + * to validate the value of this property. + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const ruleSeverities = new Map([ + [0, 0], ["off", 0], + [1, 1], ["warn", 1], + [2, 2], ["error", 2] +]); + +const globalVariablesValues = new Set([ + true, "true", "writable", "writeable", + false, "false", "readonly", "readable", null, + "off" +]); + +/** + * Check if a value is a non-null object. + * @param {any} value The value to check. + * @returns {boolean} `true` if the value is a non-null object. + */ +function isNonNullObject(value) { + return typeof value === "object" && value !== null; +} + +/** + * Check if a value is undefined. + * @param {any} value The value to check. + * @returns {boolean} `true` if the value is undefined. + */ +function isUndefined(value) { + return typeof value === "undefined"; +} + +/** + * Deeply merges two objects. + * @param {Object} first The base object. + * @param {Object} second The overrides object. + * @returns {Object} An object with properties from both first and second. + */ +function deepMerge(first = {}, second = {}) { + + /* + * If the second value is an array, just return it. We don't merge + * arrays because order matters and we can't know the correct order. + */ + if (Array.isArray(second)) { + return second; + } + + /* + * First create a result object where properties from the second object + * overwrite properties from the first. This sets up a baseline to use + * later rather than needing to inspect and change every property + * individually. + */ + const result = { + ...first, + ...second + }; + + for (const key of Object.keys(second)) { + + // avoid hairy edge case + if (key === "__proto__") { + continue; + } + + const firstValue = first[key]; + const secondValue = second[key]; + + if (isNonNullObject(firstValue)) { + result[key] = deepMerge(firstValue, secondValue); + } else if (isUndefined(firstValue)) { + if (isNonNullObject(secondValue)) { + result[key] = deepMerge( + Array.isArray(secondValue) ? [] : {}, + secondValue + ); + } else if (!isUndefined(secondValue)) { + result[key] = secondValue; + } + } + } + + return result; + +} + +/** + * Normalizes the rule options config for a given rule by ensuring that + * it is an array and that the first item is 0, 1, or 2. + * @param {Array|string|number} ruleOptions The rule options config. + * @returns {Array} An array of rule options. + */ +function normalizeRuleOptions(ruleOptions) { + + const finalOptions = Array.isArray(ruleOptions) + ? ruleOptions.slice(0) + : [ruleOptions]; + + finalOptions[0] = ruleSeverities.get(finalOptions[0]); + return finalOptions; +} + +//----------------------------------------------------------------------------- +// Assertions +//----------------------------------------------------------------------------- + +/** + * Validates that a value is a valid rule options entry. + * @param {any} value The value to check. + * @returns {void} + * @throws {TypeError} If the value isn't a valid rule options. + */ +function assertIsRuleOptions(value) { + + if (typeof value !== "string" && typeof value !== "number" && !Array.isArray(value)) { + throw new TypeError("Expected a string, number, or array."); + } +} + +/** + * Validates that a value is valid rule severity. + * @param {any} value The value to check. + * @returns {void} + * @throws {TypeError} If the value isn't a valid rule severity. + */ +function assertIsRuleSeverity(value) { + const severity = typeof value === "string" + ? ruleSeverities.get(value.toLowerCase()) + : ruleSeverities.get(value); + + if (typeof severity === "undefined") { + throw new TypeError("Expected severity of \"off\", 0, \"warn\", 1, \"error\", or 2."); + } +} + +/** + * Validates that a given string is the form pluginName/objectName. + * @param {string} value The string to check. + * @returns {void} + * @throws {TypeError} If the string isn't in the correct format. + */ +function assertIsPluginMemberName(value) { + if (!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(value)) { + throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${value}".`); + } +} + +/** + * Validates that a value is an object. + * @param {any} value The value to check. + * @returns {void} + * @throws {TypeError} If the value isn't an object. + */ +function assertIsObject(value) { + if (!isNonNullObject(value)) { + throw new TypeError("Expected an object."); + } +} + +/** + * Validates that a value is an object or a string. + * @param {any} value The value to check. + * @returns {void} + * @throws {TypeError} If the value isn't an object or a string. + */ +function assertIsObjectOrString(value) { + if ((!value || typeof value !== "object") && typeof value !== "string") { + throw new TypeError("Expected an object or string."); + } +} + +//----------------------------------------------------------------------------- +// Low-Level Schemas +//----------------------------------------------------------------------------- + + +/** @type {ObjectPropertySchema} */ +const numberSchema = { + merge: "replace", + validate: "number" +}; + +/** @type {ObjectPropertySchema} */ +const booleanSchema = { + merge: "replace", + validate: "boolean" +}; + +/** @type {ObjectPropertySchema} */ +const deepObjectAssignSchema = { + merge(first = {}, second = {}) { + return deepMerge(first, second); + }, + validate: "object" +}; + +//----------------------------------------------------------------------------- +// High-Level Schemas +//----------------------------------------------------------------------------- + +/** @type {ObjectPropertySchema} */ +const globalsSchema = { + merge: "assign", + validate(value) { + + assertIsObject(value); + + for (const key of Object.keys(value)) { + + // avoid hairy edge case + if (key === "__proto__") { + continue; + } + + if (key !== key.trim()) { + throw new TypeError(`Global "${key}" has leading or trailing whitespace.`); + } + + if (!globalVariablesValues.has(value[key])) { + throw new TypeError(`Key "${key}": Expected "readonly", "writable", or "off".`); + } + } + } +}; + +/** @type {ObjectPropertySchema} */ +const parserSchema = { + merge: "replace", + validate(value) { + assertIsObjectOrString(value); + + if (typeof value === "object" && typeof value.parse !== "function" && typeof value.parseForESLint !== "function") { + throw new TypeError("Expected object to have a parse() or parseForESLint() method."); + } + + if (typeof value === "string") { + assertIsPluginMemberName(value); + } + } +}; + +/** @type {ObjectPropertySchema} */ +const pluginsSchema = { + merge(first = {}, second = {}) { + const keys = new Set([...Object.keys(first), ...Object.keys(second)]); + const result = {}; + + // manually validate that plugins are not redefined + for (const key of keys) { + + // avoid hairy edge case + if (key === "__proto__") { + continue; + } + + if (key in first && key in second && first[key] !== second[key]) { + throw new TypeError(`Cannot redefine plugin "${key}".`); + } + + result[key] = second[key] || first[key]; + } + + return result; + }, + validate(value) { + + // first check the value to be sure it's an object + if (value === null || typeof value !== "object") { + throw new TypeError("Expected an object."); + } + + // second check the keys to make sure they are objects + for (const key of Object.keys(value)) { + + // avoid hairy edge case + if (key === "__proto__") { + continue; + } + + if (value[key] === null || typeof value[key] !== "object") { + throw new TypeError(`Key "${key}": Expected an object.`); + } + } + } +}; + +/** @type {ObjectPropertySchema} */ +const processorSchema = { + merge: "replace", + validate(value) { + if (typeof value === "string") { + assertIsPluginMemberName(value); + } else if (value && typeof value === "object") { + if (typeof value.preprocess !== "function" || typeof value.postprocess !== "function") { + throw new TypeError("Object must have a preprocess() and a postprocess() method."); + } + } else { + throw new TypeError("Expected an object or a string."); + } + } +}; + +/** @type {ObjectPropertySchema} */ +const rulesSchema = { + merge(first = {}, second = {}) { + + const result = { + ...first, + ...second + }; + + for (const ruleId of Object.keys(result)) { + + // avoid hairy edge case + if (ruleId === "__proto__") { + + /* eslint-disable-next-line no-proto */ + delete result.__proto__; + continue; + } + + result[ruleId] = normalizeRuleOptions(result[ruleId]); + + /* + * If either rule config is missing, then the correct + * config is already present and we just need to normalize + * the severity. + */ + if (!(ruleId in first) || !(ruleId in second)) { + continue; + } + + const firstRuleOptions = normalizeRuleOptions(first[ruleId]); + const secondRuleOptions = normalizeRuleOptions(second[ruleId]); + + /* + * If the second rule config only has a severity (length of 1), + * then use that severity and keep the rest of the options from + * the first rule config. + */ + if (secondRuleOptions.length === 1) { + result[ruleId] = [secondRuleOptions[0], ...firstRuleOptions.slice(1)]; + continue; + } + + /* + * In any other situation, then the second rule config takes + * precedence. That means the value at `result[ruleId]` is + * already correct and no further work is necessary. + */ + } + + return result; + }, + + validate(value) { + assertIsObject(value); + + let lastRuleId; + + // Performance: One try-catch has less overhead than one per loop iteration + try { + + /* + * We are not checking the rule schema here because there is no + * guarantee that the rule definition is present at this point. Instead + * we wait and check the rule schema during the finalization step + * of calculating a config. + */ + for (const ruleId of Object.keys(value)) { + + // avoid hairy edge case + if (ruleId === "__proto__") { + continue; + } + + lastRuleId = ruleId; + + const ruleOptions = value[ruleId]; + + assertIsRuleOptions(ruleOptions); + + if (Array.isArray(ruleOptions)) { + assertIsRuleSeverity(ruleOptions[0]); + } else { + assertIsRuleSeverity(ruleOptions); + } + } + } catch (error) { + error.message = `Key "${lastRuleId}": ${error.message}`; + throw error; + } + } +}; + +/** @type {ObjectPropertySchema} */ +const sourceTypeSchema = { + merge: "replace", + validate(value) { + if (typeof value !== "string" || !/^(?:script|module|commonjs)$/u.test(value)) { + throw new TypeError("Expected \"script\", \"module\", or \"commonjs\"."); + } + } +}; + +//----------------------------------------------------------------------------- +// Full schema +//----------------------------------------------------------------------------- + +exports.flatConfigSchema = { + settings: deepObjectAssignSchema, + linterOptions: { + schema: { + noInlineConfig: booleanSchema, + reportUnusedDisableDirectives: booleanSchema + } + }, + languageOptions: { + schema: { + ecmaVersion: numberSchema, + sourceType: sourceTypeSchema, + globals: globalsSchema, + parser: parserSchema, + parserOptions: deepObjectAssignSchema + } + }, + processor: processorSchema, + plugins: pluginsSchema, + rules: rulesSchema +}; diff --git a/node_modules/eslint/lib/config/rule-validator.js b/node_modules/eslint/lib/config/rule-validator.js new file mode 100644 index 00000000..f162dd81 --- /dev/null +++ b/node_modules/eslint/lib/config/rule-validator.js @@ -0,0 +1,169 @@ +/** + * @fileoverview Rule Validator + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const ajv = require("../shared/ajv")(); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * Finds a rule with the given ID in the given config. + * @param {string} ruleId The ID of the rule to find. + * @param {Object} config The config to search in. + * @returns {{create: Function, schema: (Array|null)}} THe rule object. + */ +function findRuleDefinition(ruleId, config) { + const ruleIdParts = ruleId.split("/"); + let pluginName, ruleName; + + // built-in rule + if (ruleIdParts.length === 1) { + pluginName = "@"; + ruleName = ruleIdParts[0]; + } else { + ruleName = ruleIdParts.pop(); + pluginName = ruleIdParts.join("/"); + } + + if (!config.plugins || !config.plugins[pluginName]) { + throw new TypeError(`Key "rules": Key "${ruleId}": Could not find plugin "${pluginName}".`); + } + + if (!config.plugins[pluginName].rules || !config.plugins[pluginName].rules[ruleName]) { + throw new TypeError(`Key "rules": Key "${ruleId}": Could not find "${ruleName}" in plugin "${pluginName}".`); + } + + return config.plugins[pluginName].rules[ruleName]; + +} + +/** + * Gets a complete options schema for a rule. + * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object + * @returns {Object} JSON Schema for the rule's options. + */ +function getRuleOptionsSchema(rule) { + + if (!rule) { + return null; + } + + const schema = rule.schema || rule.meta && rule.meta.schema; + + if (Array.isArray(schema)) { + if (schema.length) { + return { + type: "array", + items: schema, + minItems: 0, + maxItems: schema.length + }; + } + return { + type: "array", + minItems: 0, + maxItems: 0 + }; + + } + + // Given a full schema, leave it alone + return schema || null; +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Implements validation functionality for the rules portion of a config. + */ +class RuleValidator { + + /** + * Creates a new instance. + */ + constructor() { + + /** + * A collection of compiled validators for rules that have already + * been validated. + * @type {WeakMap} + * @property validators + */ + this.validators = new WeakMap(); + } + + /** + * Validates all of the rule configurations in a config against each + * rule's schema. + * @param {Object} config The full config to validate. This object must + * contain both the rules section and the plugins section. + * @returns {void} + * @throws {Error} If a rule's configuration does not match its schema. + */ + validate(config) { + + if (!config.rules) { + return; + } + + for (const [ruleId, ruleOptions] of Object.entries(config.rules)) { + + // check for edge case + if (ruleId === "__proto__") { + continue; + } + + /* + * If a rule is disabled, we don't do any validation. This allows + * users to safely set any value to 0 or "off" without worrying + * that it will cause a validation error. + * + * Note: ruleOptions is always an array at this point because + * this validation occurs after FlatConfigArray has merged and + * normalized values. + */ + if (ruleOptions[0] === 0) { + continue; + } + + const rule = findRuleDefinition(ruleId, config); + + // Precompile and cache validator the first time + if (!this.validators.has(rule)) { + const schema = getRuleOptionsSchema(rule); + + if (schema) { + this.validators.set(rule, ajv.compile(schema)); + } + } + + const validateRule = this.validators.get(rule); + + if (validateRule) { + + validateRule(ruleOptions.slice(1)); + + if (validateRule.errors) { + throw new Error(`Key "rules": Key "${ruleId}": ${ + validateRule.errors.map( + error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n` + ).join("") + }`); + } + } + } + } +} + +exports.RuleValidator = RuleValidator; diff --git a/node_modules/eslint/lib/shared/string-utils.js b/node_modules/eslint/lib/shared/string-utils.js new file mode 100644 index 00000000..e4a55d79 --- /dev/null +++ b/node_modules/eslint/lib/shared/string-utils.js @@ -0,0 +1,22 @@ +/** + * @fileoverview Utilities to operate on strings. + * @author Stephen Wade + */ + +"use strict"; + +/** + * Converts the first letter of a string to uppercase. + * @param {string} string The string to operate on + * @returns {string} The converted string + */ +function upperCaseFirst(string) { + if (string.length <= 1) { + return string.toUpperCase(); + } + return string[0].toUpperCase() + string.slice(1); +} + +module.exports = { + upperCaseFirst +}; diff --git a/node_modules/eslint/messages/all-files-ignored.js b/node_modules/eslint/messages/all-files-ignored.js new file mode 100644 index 00000000..d85828d3 --- /dev/null +++ b/node_modules/eslint/messages/all-files-ignored.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function(it) { + const { pattern } = it; + + return ` +You are linting "${pattern}", but all of the files matching the glob pattern "${pattern}" are ignored. + +If you don't want to lint these files, remove the pattern "${pattern}" from the list of arguments passed to ESLint. + +If you do want to lint these files, try the following solutions: + +* Check your .eslintignore file, or the eslintIgnore property in package.json, to ensure that the files are not configured to be ignored. +* Explicitly list the files from this glob that you'd like to lint on the command-line, rather than providing a glob as an argument. +`.trimLeft(); +}; diff --git a/node_modules/eslint/messages/extend-config-missing.js b/node_modules/eslint/messages/extend-config-missing.js new file mode 100644 index 00000000..db8a5c64 --- /dev/null +++ b/node_modules/eslint/messages/extend-config-missing.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function(it) { + const { configName, importerName } = it; + + return ` +ESLint couldn't find the config "${configName}" to extend from. Please check that the name of the config is correct. + +The config "${configName}" was referenced from the config file in "${importerName}". + +If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. +`.trimLeft(); +}; diff --git a/node_modules/eslint/messages/failed-to-read-json.js b/node_modules/eslint/messages/failed-to-read-json.js new file mode 100644 index 00000000..5114de30 --- /dev/null +++ b/node_modules/eslint/messages/failed-to-read-json.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function(it) { + const { path, message } = it; + + return ` +Failed to read JSON file at ${path}: + +${message} +`.trimLeft(); +}; diff --git a/node_modules/eslint/messages/file-not-found.js b/node_modules/eslint/messages/file-not-found.js new file mode 100644 index 00000000..26a5d57e --- /dev/null +++ b/node_modules/eslint/messages/file-not-found.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function(it) { + const { pattern, globDisabled } = it; + + return ` +No files matching the pattern "${pattern}"${globDisabled ? " (with disabling globs)" : ""} were found. +Please check for typing mistakes in the pattern. +`.trimLeft(); +}; diff --git a/node_modules/eslint/messages/no-config-found.js b/node_modules/eslint/messages/no-config-found.js new file mode 100644 index 00000000..1042143f --- /dev/null +++ b/node_modules/eslint/messages/no-config-found.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function(it) { + const { directoryPath } = it; + + return ` +ESLint couldn't find a configuration file. To set up a configuration file for this project, please run: + + eslint --init + +ESLint looked for configuration files in ${directoryPath} and its ancestors. If it found none, it then looked in your home directory. + +If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://eslint.org/chat/help +`.trimLeft(); +}; diff --git a/node_modules/eslint/messages/plugin-conflict.js b/node_modules/eslint/messages/plugin-conflict.js new file mode 100644 index 00000000..c8c060e2 --- /dev/null +++ b/node_modules/eslint/messages/plugin-conflict.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function(it) { + const { pluginId, plugins } = it; + + let result = `ESLint couldn't determine the plugin "${pluginId}" uniquely. +`; + + for (const { filePath, importerName } of plugins) { + result += ` +- ${filePath} (loaded in "${importerName}")`; + } + + result += ` + +Please remove the "plugins" setting from either config or remove either plugin installation. + +If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. +`; + + return result; +}; diff --git a/node_modules/eslint/messages/plugin-invalid.js b/node_modules/eslint/messages/plugin-invalid.js new file mode 100644 index 00000000..7913576f --- /dev/null +++ b/node_modules/eslint/messages/plugin-invalid.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function(it) { + const { configName, importerName } = it; + + return ` +"${configName}" is invalid syntax for a config specifier. + +* If your intention is to extend from a configuration exported from the plugin, add the configuration name after a slash: e.g. "${configName}/myConfig". +* If this is the name of a shareable config instead of a plugin, remove the "plugin:" prefix: i.e. "${configName.slice("plugin:".length)}". + +"${configName}" was referenced from the config file in "${importerName}". + +If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. +`.trimLeft(); +}; diff --git a/node_modules/eslint/messages/plugin-missing.js b/node_modules/eslint/messages/plugin-missing.js new file mode 100644 index 00000000..f58c78ce --- /dev/null +++ b/node_modules/eslint/messages/plugin-missing.js @@ -0,0 +1,19 @@ +"use strict"; + +module.exports = function(it) { + const { pluginName, resolvePluginsRelativeTo, importerName } = it; + + return ` +ESLint couldn't find the plugin "${pluginName}". + +(The package "${pluginName}" was not found when loaded as a Node module from the directory "${resolvePluginsRelativeTo}".) + +It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: + + npm install ${pluginName}@latest --save-dev + +The plugin "${pluginName}" was referenced from the config file in "${importerName}". + +If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. +`.trimLeft(); +}; diff --git a/node_modules/eslint/messages/print-config-with-directory-path.js b/node_modules/eslint/messages/print-config-with-directory-path.js new file mode 100644 index 00000000..6a5d571d --- /dev/null +++ b/node_modules/eslint/messages/print-config-with-directory-path.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function() { + return ` +The '--print-config' CLI option requires a path to a source code file rather than a directory. +See also: https://eslint.org/docs/user-guide/command-line-interface#--print-config +`.trimLeft(); +}; diff --git a/node_modules/eslint/messages/whitespace-found.js b/node_modules/eslint/messages/whitespace-found.js new file mode 100644 index 00000000..4ce49ca3 --- /dev/null +++ b/node_modules/eslint/messages/whitespace-found.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function(it) { + const { pluginName } = it; + + return ` +ESLint couldn't find the plugin "${pluginName}". because there is whitespace in the name. Please check your configuration and remove all whitespace from the plugin name. + +If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. +`.trimLeft(); +}; diff --git a/node_modules/flatted/esm.js b/node_modules/flatted/esm.js new file mode 100644 index 00000000..c20ae09e --- /dev/null +++ b/node_modules/flatted/esm.js @@ -0,0 +1,2 @@ +/*! (c) 2020 Andrea Giammarchi */ +const{parse:t,stringify:e}=JSON,{keys:n}=Object,o=String,c={},r=(t,e)=>e,s=t=>t instanceof o?o(t):t,l=(t,e)=>"string"==typeof e?new o(e):e,a=(t,e,r,s)=>{const l=[];for(let a=n(r),{length:f}=a,i=0;i{const c=o(e.push(n)-1);return t.set(n,c),c},i=(e,n)=>{const o=t(e,l).map(s),c=o[0],f=n||r,i="object"==typeof c&&c?a(o,new Set,c,f):c;return f.call({"":i},"",i)},p=(t,n,o)=>{const c=n&&"object"==typeof n?(t,e)=>""===t||-1t(p(e)),g=t=>i(e(t));export{g as fromJSON,i as parse,p as stringify,u as toJSON}; diff --git a/node_modules/lodash.merge/LICENSE b/node_modules/lodash.merge/LICENSE new file mode 100644 index 00000000..77c42f14 --- /dev/null +++ b/node_modules/lodash.merge/LICENSE @@ -0,0 +1,47 @@ +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +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. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/node_modules/lodash.merge/README.md b/node_modules/lodash.merge/README.md new file mode 100644 index 00000000..91b75386 --- /dev/null +++ b/node_modules/lodash.merge/README.md @@ -0,0 +1,18 @@ +# lodash.merge v4.6.2 + +The [Lodash](https://lodash.com/) method `_.merge` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.merge +``` + +In Node.js: +```js +var merge = require('lodash.merge'); +``` + +See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/4.6.2-npm-packages/lodash.merge) for more details. diff --git a/node_modules/lodash.merge/index.js b/node_modules/lodash.merge/index.js new file mode 100644 index 00000000..8e75d955 --- /dev/null +++ b/node_modules/lodash.merge/index.js @@ -0,0 +1,1977 @@ +/** + * Lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +/** Detect free variable `exports`. */ +var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; + +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; + +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; + +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); + +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + +/** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); +} + +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); + }; +} + +/** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function getValue(object, key) { + return object == null ? undefined : object[key]; +} + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +/** Used for built-in method references. */ +var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined, + Symbol = root.Symbol, + Uint8Array = root.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeMax = Math.max, + nativeNow = Date.now; + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'), + nativeCreate = getNative(Object, 'create'); + +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); + +/** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; +} + +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; +} + +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} + +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; +} + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; +} + +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; + +/** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; +} + +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} + +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} + +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; + +/** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ +function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; +} + +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +/** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + +/** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; +} + +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} + +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); +} + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; +} + +/** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); +} + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; +} + +/** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; + + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); +} + +/** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} + +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} + +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; +} + +/** + * Creates a clone of `arrayBuffer`. + * + * @private + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; +} + +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); +} + +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} + +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; + + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; +} + +/** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); +} + +/** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +/** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; +} + +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} + +/** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; + + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; +} + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; +} + +/** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; +} + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +/** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); +} + +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; +} + +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +/** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; +} + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + +/** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; +} + +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} + +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; + +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; + +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); +} + +/** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} + +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; + +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} + +/** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} + +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); +} + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} + +/** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); +} + +/** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} + +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} + +module.exports = merge; diff --git a/node_modules/lodash.merge/package.json b/node_modules/lodash.merge/package.json new file mode 100644 index 00000000..3130fc8f --- /dev/null +++ b/node_modules/lodash.merge/package.json @@ -0,0 +1,16 @@ +{ + "name": "lodash.merge", + "version": "4.6.2", + "description": "The Lodash method `_.merge` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": "lodash-modularized, merge", + "author": "John-David Dalton ", + "contributors": [ + "John-David Dalton ", + "Mathias Bynens " + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/node_modules/table/dist/src/alignSpanningCell.d.ts b/node_modules/table/dist/src/alignSpanningCell.d.ts new file mode 100644 index 00000000..a1b6e29d --- /dev/null +++ b/node_modules/table/dist/src/alignSpanningCell.d.ts @@ -0,0 +1,7 @@ +import type { SpanningCellContext } from './spanningCellManager'; +import type { RangeConfig } from './types/internal'; +/** + * Fill content into all cells in range in order to calculate total height + */ +export declare const wrapRangeContent: (rangeConfig: RangeConfig, rangeWidth: number, context: SpanningCellContext) => string[]; +export declare const alignVerticalRangeContent: (range: RangeConfig, content: string[], context: SpanningCellContext) => string[]; diff --git a/node_modules/table/dist/src/alignSpanningCell.js b/node_modules/table/dist/src/alignSpanningCell.js new file mode 100644 index 00000000..de2ec778 --- /dev/null +++ b/node_modules/table/dist/src/alignSpanningCell.js @@ -0,0 +1,48 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.alignVerticalRangeContent = exports.wrapRangeContent = void 0; +const string_width_1 = __importDefault(require("string-width")); +const alignString_1 = require("./alignString"); +const mapDataUsingRowHeights_1 = require("./mapDataUsingRowHeights"); +const padTableData_1 = require("./padTableData"); +const truncateTableData_1 = require("./truncateTableData"); +const utils_1 = require("./utils"); +const wrapCell_1 = require("./wrapCell"); +/** + * Fill content into all cells in range in order to calculate total height + */ +const wrapRangeContent = (rangeConfig, rangeWidth, context) => { + const { topLeft, paddingRight, paddingLeft, truncate, wrapWord, alignment } = rangeConfig; + const originalContent = context.rows[topLeft.row][topLeft.col]; + const contentWidth = rangeWidth - paddingLeft - paddingRight; + return (0, wrapCell_1.wrapCell)((0, truncateTableData_1.truncateString)(originalContent, truncate), contentWidth, wrapWord).map((line) => { + const alignedLine = (0, alignString_1.alignString)(line, contentWidth, alignment); + return (0, padTableData_1.padString)(alignedLine, paddingLeft, paddingRight); + }); +}; +exports.wrapRangeContent = wrapRangeContent; +const alignVerticalRangeContent = (range, content, context) => { + const { rows, drawHorizontalLine, rowHeights } = context; + const { topLeft, bottomRight, verticalAlignment } = range; + // They are empty before calculateRowHeights function run + if (rowHeights.length === 0) { + return []; + } + const totalCellHeight = (0, utils_1.sumArray)(rowHeights.slice(topLeft.row, bottomRight.row + 1)); + const totalBorderHeight = bottomRight.row - topLeft.row; + const hiddenHorizontalBorderCount = (0, utils_1.sequence)(topLeft.row + 1, bottomRight.row).filter((horizontalBorderIndex) => { + return !drawHorizontalLine(horizontalBorderIndex, rows.length); + }).length; + const availableRangeHeight = totalCellHeight + totalBorderHeight - hiddenHorizontalBorderCount; + return (0, mapDataUsingRowHeights_1.padCellVertically)(content, availableRangeHeight, verticalAlignment).map((line) => { + if (line.length === 0) { + return ' '.repeat((0, string_width_1.default)(content[0])); + } + return line; + }); +}; +exports.alignVerticalRangeContent = alignVerticalRangeContent; +//# sourceMappingURL=alignSpanningCell.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/alignSpanningCell.js.map b/node_modules/table/dist/src/alignSpanningCell.js.map new file mode 100644 index 00000000..9d44671d --- /dev/null +++ b/node_modules/table/dist/src/alignSpanningCell.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alignSpanningCell.js","sourceRoot":"","sources":["../../src/alignSpanningCell.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAuC;AACvC,+CAEuB;AACvB,qEAEkC;AAClC,iDAEwB;AAIxB,2DAE6B;AAI7B,mCAEiB;AACjB,yCAEoB;AAEpB;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,WAAwB,EAAE,UAAkB,EAAE,OAA4B,EAAY,EAAE;IACvH,MAAM,EAAC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAC,GAAG,WAAW,CAAC;IAExF,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/D,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC;IAE7D,OAAO,IAAA,mBAAQ,EAAC,IAAA,kCAAc,EAAC,eAAe,EAAE,QAAQ,CAA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AAE,iBAAiB,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACtF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,OAAO,GAAG,CAAC,MAAM,CAAC,IAAA,sBAAW,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC5C;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAxBW,QAAA,yBAAyB,6BAwBpC"} \ No newline at end of file diff --git a/node_modules/table/dist/src/alignString.d.ts b/node_modules/table/dist/src/alignString.d.ts new file mode 100644 index 00000000..459fa7ea --- /dev/null +++ b/node_modules/table/dist/src/alignString.d.ts @@ -0,0 +1,6 @@ +import type { Alignment } from './types/api'; +/** + * Pads a string to the left and/or right to position the subject + * text in a desired alignment within a container. + */ +export declare const alignString: (subject: string, containerWidth: number, alignment: Alignment) => string; diff --git a/node_modules/table/dist/src/alignString.js b/node_modules/table/dist/src/alignString.js new file mode 100644 index 00000000..a15231a2 --- /dev/null +++ b/node_modules/table/dist/src/alignString.js @@ -0,0 +1,60 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.alignString = void 0; +const string_width_1 = __importDefault(require("string-width")); +const utils_1 = require("./utils"); +const alignLeft = (subject, width) => { + return subject + ' '.repeat(width); +}; +const alignRight = (subject, width) => { + return ' '.repeat(width) + subject; +}; +const alignCenter = (subject, width) => { + return ' '.repeat(Math.floor(width / 2)) + subject + ' '.repeat(Math.ceil(width / 2)); +}; +const alignJustify = (subject, width) => { + const spaceSequenceCount = (0, utils_1.countSpaceSequence)(subject); + if (spaceSequenceCount === 0) { + return alignLeft(subject, width); + } + const addingSpaces = (0, utils_1.distributeUnevenly)(width, spaceSequenceCount); + if (Math.max(...addingSpaces) > 3) { + return alignLeft(subject, width); + } + let spaceSequenceIndex = 0; + return subject.replace(/\s+/g, (groupSpace) => { + return groupSpace + ' '.repeat(addingSpaces[spaceSequenceIndex++]); + }); +}; +/** + * Pads a string to the left and/or right to position the subject + * text in a desired alignment within a container. + */ +const alignString = (subject, containerWidth, alignment) => { + const subjectWidth = (0, string_width_1.default)(subject); + if (subjectWidth === containerWidth) { + return subject; + } + if (subjectWidth > containerWidth) { + throw new Error('Subject parameter value width cannot be greater than the container width.'); + } + if (subjectWidth === 0) { + return ' '.repeat(containerWidth); + } + const availableWidth = containerWidth - subjectWidth; + if (alignment === 'left') { + return alignLeft(subject, availableWidth); + } + if (alignment === 'right') { + return alignRight(subject, availableWidth); + } + if (alignment === 'justify') { + return alignJustify(subject, availableWidth); + } + return alignCenter(subject, availableWidth); +}; +exports.alignString = alignString; +//# sourceMappingURL=alignString.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/alignString.js.map b/node_modules/table/dist/src/alignString.js.map new file mode 100644 index 00000000..8324952e --- /dev/null +++ b/node_modules/table/dist/src/alignString.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alignString.js","sourceRoot":"","sources":["../../src/alignString.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAuC;AAIvC,mCAEiB;AAEjB,MAAM,SAAS,GAAG,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE;IAC3D,OAAO,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE;IAC5D,OAAO,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,OAAe,EAAE,KAAa,EAAU,EAAE;IAC7D,OAAO,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,IA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,MAAM,EAAE;QACxB,OAAO,SAAS,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC3C;IAED,IAAI,SAAS,KAAK,OAAO,EAAE;QACzB,OAAO,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC5C;IAED,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,OAAO,YAAY,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;KAC9C;IAED,OAAO,WAAW,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;AAC9C,CAAC,CAAC;AA9BW,QAAA,WAAW,eA8BtB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/alignTableData.d.ts b/node_modules/table/dist/src/alignTableData.d.ts new file mode 100644 index 00000000..73314d83 --- /dev/null +++ b/node_modules/table/dist/src/alignTableData.d.ts @@ -0,0 +1,2 @@ +import type { BaseConfig, Row } from './types/internal'; +export declare const alignTableData: (rows: Row[], config: BaseConfig) => Row[]; diff --git a/node_modules/table/dist/src/alignTableData.js b/node_modules/table/dist/src/alignTableData.js new file mode 100644 index 00000000..942cb3b7 --- /dev/null +++ b/node_modules/table/dist/src/alignTableData.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.alignTableData = void 0; +const alignString_1 = require("./alignString"); +const alignTableData = (rows, config) => { + return rows.map((row, rowIndex) => { + return row.map((cell, cellIndex) => { + var _a; + const { width, alignment } = config.columns[cellIndex]; + const containingRange = (_a = config.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, + row: rowIndex }, { mapped: true }); + if (containingRange) { + return cell; + } + return (0, alignString_1.alignString)(cell, width, alignment); + }); + }); +}; +exports.alignTableData = alignTableData; +//# sourceMappingURL=alignTableData.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/alignTableData.js.map b/node_modules/table/dist/src/alignTableData.js.map new file mode 100644 index 00000000..c7a9ba3d --- /dev/null +++ b/node_modules/table/dist/src/alignTableData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"alignTableData.js","sourceRoot":"","sources":["../../src/alignTableData.ts"],"names":[],"mappings":";;;AAAA,+CAEuB;AAMhB,MAAM,cAAc,GAAG,CAAC,IAAW,EAAE,MAAkB,EAAS,EAAE;IACvE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;QAChC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE;;YACjC,MAAM,EAAC,KAAK,EAAE,SAAS,EAAC,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAErD,MAAM,eAAe,GAAG,MAAA,MAAM,CAAC,mBAAmB,0CAAE,kBAAkB,CAAC,EAAC,GAAG,EAAE,SAAS;gBACpF,GAAG,EAAE,QAAQ,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;YAClC,IAAI,eAAe,EAAE;gBACnB,OAAO,IAAI,CAAC;aACb;YAED,OAAO,IAAA,yBAAW,EAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAdW,QAAA,cAAc,kBAczB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateCellHeight.d.ts b/node_modules/table/dist/src/calculateCellHeight.d.ts new file mode 100644 index 00000000..76fd7f1e --- /dev/null +++ b/node_modules/table/dist/src/calculateCellHeight.d.ts @@ -0,0 +1,4 @@ +/** + * Calculates height of cell content in regard to its width and word wrapping. + */ +export declare const calculateCellHeight: (value: string, columnWidth: number, useWrapWord?: boolean) => number; diff --git a/node_modules/table/dist/src/calculateCellHeight.js b/node_modules/table/dist/src/calculateCellHeight.js new file mode 100644 index 00000000..010c41f0 --- /dev/null +++ b/node_modules/table/dist/src/calculateCellHeight.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calculateCellHeight = void 0; +const wrapCell_1 = require("./wrapCell"); +/** + * Calculates height of cell content in regard to its width and word wrapping. + */ +const calculateCellHeight = (value, columnWidth, useWrapWord = false) => { + return (0, wrapCell_1.wrapCell)(value, columnWidth, useWrapWord).length; +}; +exports.calculateCellHeight = calculateCellHeight; +//# sourceMappingURL=calculateCellHeight.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateCellHeight.js.map b/node_modules/table/dist/src/calculateCellHeight.js.map new file mode 100644 index 00000000..61af1210 --- /dev/null +++ b/node_modules/table/dist/src/calculateCellHeight.js.map @@ -0,0 +1 @@ +{"version":3,"file":"calculateCellHeight.js","sourceRoot":"","sources":["../../src/calculateCellHeight.ts"],"names":[],"mappings":";;;AAAA,yCAEoB;AAEpB;;GAEG;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,WAAmB,EAAE,WAAW,GAAG,KAAK,EAAU,EAAE;IACrG,OAAO,IAAA,mBAAQ,EAAC,KAAK,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC;AAC1D,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateMaximumColumnWidths.d.ts b/node_modules/table/dist/src/calculateMaximumColumnWidths.d.ts new file mode 100644 index 00000000..d1de524b --- /dev/null +++ b/node_modules/table/dist/src/calculateMaximumColumnWidths.d.ts @@ -0,0 +1,7 @@ +import type { SpanningCellConfig } from './types/api'; +import type { Row, Cell } from './types/internal'; +export declare const calculateMaximumCellWidth: (cell: Cell) => number; +/** + * Produces an array of values that describe the largest value length (width) in every column. + */ +export declare const calculateMaximumColumnWidths: (rows: Row[], spanningCellConfigs?: SpanningCellConfig[]) => number[]; diff --git a/node_modules/table/dist/src/calculateMaximumColumnWidths.js b/node_modules/table/dist/src/calculateMaximumColumnWidths.js new file mode 100644 index 00000000..5b677ed9 --- /dev/null +++ b/node_modules/table/dist/src/calculateMaximumColumnWidths.js @@ -0,0 +1,36 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calculateMaximumColumnWidths = exports.calculateMaximumCellWidth = void 0; +const string_width_1 = __importDefault(require("string-width")); +const utils_1 = require("./utils"); +const calculateMaximumCellWidth = (cell) => { + return Math.max(...cell.split('\n').map(string_width_1.default)); +}; +exports.calculateMaximumCellWidth = calculateMaximumCellWidth; +/** + * Produces an array of values that describe the largest value length (width) in every column. + */ +const calculateMaximumColumnWidths = (rows, spanningCellConfigs = []) => { + const columnWidths = new Array(rows[0].length).fill(0); + const rangeCoordinates = spanningCellConfigs.map(utils_1.calculateRangeCoordinate); + const isSpanningCell = (rowIndex, columnIndex) => { + return rangeCoordinates.some((rangeCoordinate) => { + return (0, utils_1.isCellInRange)({ col: columnIndex, + row: rowIndex }, rangeCoordinate); + }); + }; + rows.forEach((row, rowIndex) => { + row.forEach((cell, cellIndex) => { + if (isSpanningCell(rowIndex, cellIndex)) { + return; + } + columnWidths[cellIndex] = Math.max(columnWidths[cellIndex], (0, exports.calculateMaximumCellWidth)(cell)); + }); + }); + return columnWidths; +}; +exports.calculateMaximumColumnWidths = calculateMaximumColumnWidths; +//# sourceMappingURL=calculateMaximumColumnWidths.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateMaximumColumnWidths.js.map b/node_modules/table/dist/src/calculateMaximumColumnWidths.js.map new file mode 100644 index 00000000..5cb01fc2 --- /dev/null +++ b/node_modules/table/dist/src/calculateMaximumColumnWidths.js.map @@ -0,0 +1 @@ +{"version":3,"file":"calculateMaximumColumnWidths.js","sourceRoot":"","sources":["../../src/calculateMaximumColumnWidths.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAuC;AAQvC,mCAEiB;AAEV,MAAM,yBAAyB,GAAG,CAAC,IAAU,EAAU,EAAE;IAC9D,OAAO,IAAI,CAAC,GAAG,CACb,GAAG,I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d.ts new file mode 100644 index 00000000..f16bb54e --- /dev/null +++ b/node_modules/table/dist/src/calculateOutputColumnWidths.d.ts @@ -0,0 +1,2 @@ +import type { TableConfig } from './types/internal'; +export declare const calculateOutputColumnWidths: (config: TableConfig) => number[]; diff --git a/node_modules/table/dist/src/calculateOutputColumnWidths.js b/node_modules/table/dist/src/calculateOutputColumnWidths.js new file mode 100644 index 00000000..7a419297 --- /dev/null +++ b/node_modules/table/dist/src/calculateOutputColumnWidths.js @@ -0,0 +1,10 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calculateOutputColumnWidths = void 0; +const calculateOutputColumnWidths = (config) => { + return config.columns.map((col) => { + return col.paddingLeft + col.width + col.paddingRight; + }); +}; +exports.calculateOutputColumnWidths = calculateOutputColumnWidths; +//# sourceMappingURL=calculateOutputColumnWidths.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateOutputColumnWidths.js.map b/node_modules/table/dist/src/calculateOutputColumnWidths.js.map new file mode 100644 index 00000000..dafe7748 --- /dev/null +++ b/node_modules/table/dist/src/calculateOutputColumnWidths.js.map @@ -0,0 +1 @@ +{"version":3,"file":"calculateOutputColumnWidths.js","sourceRoot":"","sources":["../../src/calculateOutputColumnWidths.ts"],"names":[],"mappings":";;;AAIO,MAAM,2BAA2B,GAAG,CAAC,MAAmB,EAAY,EAAE;IAC3E,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAChC,OAAO,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,YAAY,CAAC;IACxD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAJW,QAAA,2BAA2B,+BAItC"} \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateRowHeights.d.ts b/node_modules/table/dist/src/calculateRowHeights.d.ts new file mode 100644 index 00000000..27c9183a --- /dev/null +++ b/node_modules/table/dist/src/calculateRowHeights.d.ts @@ -0,0 +1,5 @@ +import type { BaseConfig, Row } from './types/internal'; +/** + * Produces an array of values that describe the largest value length (height) in every row. + */ +export declare const calculateRowHeights: (rows: Row[], config: BaseConfig) => number[]; diff --git a/node_modules/table/dist/src/calculateRowHeights.js b/node_modules/table/dist/src/calculateRowHeights.js new file mode 100644 index 00000000..72ec05a4 --- /dev/null +++ b/node_modules/table/dist/src/calculateRowHeights.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calculateRowHeights = void 0; +const calculateCellHeight_1 = require("./calculateCellHeight"); +const utils_1 = require("./utils"); +/** + * Produces an array of values that describe the largest value length (height) in every row. + */ +const calculateRowHeights = (rows, config) => { + const rowHeights = []; + for (const [rowIndex, row] of rows.entries()) { + let rowHeight = 1; + row.forEach((cell, cellIndex) => { + var _a; + const containingRange = (_a = config.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, + row: rowIndex }); + if (!containingRange) { + const cellHeight = (0, calculateCellHeight_1.calculateCellHeight)(cell, config.columns[cellIndex].width, config.columns[cellIndex].wrapWord); + rowHeight = Math.max(rowHeight, cellHeight); + return; + } + const { topLeft, bottomRight, height } = containingRange; + // bottom-most cell of a range needs to contain all remain lines of spanning cells + if (rowIndex === bottomRight.row) { + const totalOccupiedSpanningCellHeight = (0, utils_1.sumArray)(rowHeights.slice(topLeft.row)); + const totalHorizontalBorderHeight = bottomRight.row - topLeft.row; + const totalHiddenHorizontalBorderHeight = (0, utils_1.sequence)(topLeft.row + 1, bottomRight.row).filter((horizontalBorderIndex) => { + var _a; + /* istanbul ignore next */ + return !((_a = config.drawHorizontalLine) === null || _a === void 0 ? void 0 : _a.call(config, horizontalBorderIndex, rows.length)); + }).length; + const cellHeight = height - totalOccupiedSpanningCellHeight - totalHorizontalBorderHeight + totalHiddenHorizontalBorderHeight; + rowHeight = Math.max(rowHeight, cellHeight); + } + // otherwise, just depend on other sibling cell heights in the row + }); + rowHeights.push(rowHeight); + } + return rowHeights; +}; +exports.calculateRowHeights = calculateRowHeights; +//# sourceMappingURL=calculateRowHeights.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateRowHeights.js.map b/node_modules/table/dist/src/calculateRowHeights.js.map new file mode 100644 index 00000000..1a7a2d96 --- /dev/null +++ b/node_modules/table/dist/src/calculateRowHeights.js.map @@ -0,0 +1 @@ +{"version":3,"file":"calculateRowHeights.js","sourceRoot":"","sources":["../../src/calculateRowHeights.ts"],"names":[],"mappings":";;;AAAA,+DAE+B;AAK/B,mCAGiB;AAEjB;;GAEG;AACI,MAAM,mBAAmB,GAAG,CAAC,IAAW,EAAE,MAAkB,EAAY,EAAE;IAC/E,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,KAAK,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;QAC5C,IAAI,SAAS,GAAG,CAAC,CAAC;QAElB,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE;;YAC9B,MAAM,eAAe,GAAG,MAAA,MAAM,CAAC,mBAAmB,0CAAE,kBAAkB,CAAC,EAAC,GAAG,EAAE,SAAS;gBACpF,GAAG,EAAE,QAAQ,EAAC,CAAC,CAAC;YAElB,IAAI,CAAC,eAAe,EAAE;gBACpB,MAAM,UAAU,GAAG,IAAA,yCAAmB,EAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;gBAClH,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;gBAE5C,OAAO;aACR;YACD,MAAM,EAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAC,GAAG,eAAe,CAAC;YAEvD,kFAAkF;YAClF,IAAI,QAAQ,KAAK,WAAW,CAAC,GAAG,EAAE;gBAChC,MAAM,+BAA+B,GAAG,IAAA,gBAAQ,EAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;gBAChF,MAAM,2BAA2B,GAAG,WAAW,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;gBAClE,MAAM,iCAAiC,GAAG,IAAA,gBAAQ,EAAC,OAAO,CAAC,GAAG,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,qBAAqB,EAAE,EAAE;;oBACpH,0BAA0B;oBAC1B,OAAO,CAAC,CAAA,MAAA,MAAM,CAAC,kBAAkB,+CAAzB,MAAM,EAAsB,qBAAqB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA,CAAC;gBAC1E,CAAC,CAAC,CAAC,MAAM,CAAC;gBAEV,MAAM,UAAU,GAAG,MAAM,GAAG,+BAA+B,GAAG,2BAA2B,GAAG,iCAAiC,CAAC;gBAC9H,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;aAC7C;YAED,kEAAkE;QACpE,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC5B;IAED,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAtCW,QAAA,mBAAmB,uBAsC9B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateSpanningCellWidth.d.ts b/node_modules/table/dist/src/calculateSpanningCellWidth.d.ts new file mode 100644 index 00000000..8a2820dd --- /dev/null +++ b/node_modules/table/dist/src/calculateSpanningCellWidth.d.ts @@ -0,0 +1,3 @@ +import type { SpanningCellParameters } from './spanningCellManager'; +import type { RangeConfig } from './types/internal'; +export declare const calculateSpanningCellWidth: (rangeConfig: RangeConfig, dependencies: SpanningCellParameters) => number; diff --git a/node_modules/table/dist/src/calculateSpanningCellWidth.js b/node_modules/table/dist/src/calculateSpanningCellWidth.js new file mode 100644 index 00000000..fc8866c0 --- /dev/null +++ b/node_modules/table/dist/src/calculateSpanningCellWidth.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calculateSpanningCellWidth = void 0; +const utils_1 = require("./utils"); +const calculateSpanningCellWidth = (rangeConfig, dependencies) => { + const { columnsConfig, drawVerticalLine } = dependencies; + const { topLeft, bottomRight } = rangeConfig; + const totalWidth = (0, utils_1.sumArray)(columnsConfig.slice(topLeft.col, bottomRight.col + 1).map(({ width }) => { + return width; + })); + const totalPadding = topLeft.col === bottomRight.col ? + columnsConfig[topLeft.col].paddingRight + + columnsConfig[bottomRight.col].paddingLeft : + (0, utils_1.sumArray)(columnsConfig + .slice(topLeft.col, bottomRight.col + 1) + .map(({ paddingLeft, paddingRight }) => { + return paddingLeft + paddingRight; + })); + const totalBorderWidths = bottomRight.col - topLeft.col; + const totalHiddenVerticalBorders = (0, utils_1.sequence)(topLeft.col + 1, bottomRight.col).filter((verticalBorderIndex) => { + return !drawVerticalLine(verticalBorderIndex, columnsConfig.length); + }).length; + return totalWidth + totalPadding + totalBorderWidths - totalHiddenVerticalBorders; +}; +exports.calculateSpanningCellWidth = calculateSpanningCellWidth; +//# sourceMappingURL=calculateSpanningCellWidth.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/calculateSpanningCellWidth.js.map b/node_modules/table/dist/src/calculateSpanningCellWidth.js.map new file mode 100644 index 00000000..b0de977a --- /dev/null +++ b/node_modules/table/dist/src/calculateSpanningCellWidth.js.map @@ -0,0 +1 @@ +{"version":3,"file":"calculateSpanningCellWidth.js","sourceRoot":"","sources":["../../src/calculateSpanningCellWidth.ts"],"names":[],"mappings":";;;AAMA,mCAEiB;AAEV,MAAM,0BAA0B,GAAG,CAAC,WAAwB,EAAE,YAAoC,EAAU,EAAE;IACnH,MAAM,EAAC,aAAa,EAAE,gBAAgB,EAAC,GAAG,YAAY,CAAC;IACvD,MAAM,EAAC,OAAO,EAAE,WAAW,EAAC,GAAG,WAAW,CAAC;IAE3C,MAAM,UAAU,GAAG,IAAA,gBAAQ,EACzB,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE;QACpE,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CACH,CAAC;IAEF,MAAM,YAAY,GAChB,OAAO,CAAC,GAAG,KAAK,WAAW,CAAC,GAAG,CAAC,CAAC;QAC/B,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,YAAY;YACvC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC;QAC5C,IAAA,gBAAQ,EACN,aAAa;aACV,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,GAAG,CAAC,CAAC;aACvC,GAAG,CAAC,CAAC,EAAC,WAAW,EAAE,YAAY,EAAC,EAAE,EAAE;YACnC,OAAO,WAAW,GAAG,YAAY,CAAC;QACpC,CAAC,CAAC,CACL,CAAC;IACN,MAAM,iBAAiB,GAAG,WAAW,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAExD,MAAM,0BAA0B,GAAG,IAAA,gBAAQ,EAAC,OAAO,CAAC,GAAG,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,mBAAmB,EAAE,EAAE;QAC3G,OAAO,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC,MAAM,CAAC;IAEV,OAAO,UAAU,GAAG,YAAY,GAAG,iBAAiB,GAAG,0BAA0B,CAAC;AACpF,CAAC,CAAC;AA5BW,QAAA,0BAA0B,8BA4BrC"} \ No newline at end of file diff --git a/node_modules/table/dist/src/createStream.d.ts b/node_modules/table/dist/src/createStream.d.ts new file mode 100644 index 00000000..9c2df8eb --- /dev/null +++ b/node_modules/table/dist/src/createStream.d.ts @@ -0,0 +1,2 @@ +import type { StreamUserConfig, WritableStream } from './types/api'; +export declare const createStream: (userConfig: StreamUserConfig) => WritableStream; diff --git a/node_modules/table/dist/src/createStream.js b/node_modules/table/dist/src/createStream.js new file mode 100644 index 00000000..d526161d --- /dev/null +++ b/node_modules/table/dist/src/createStream.js @@ -0,0 +1,74 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createStream = void 0; +const alignTableData_1 = require("./alignTableData"); +const calculateRowHeights_1 = require("./calculateRowHeights"); +const drawBorder_1 = require("./drawBorder"); +const drawRow_1 = require("./drawRow"); +const makeStreamConfig_1 = require("./makeStreamConfig"); +const mapDataUsingRowHeights_1 = require("./mapDataUsingRowHeights"); +const padTableData_1 = require("./padTableData"); +const stringifyTableData_1 = require("./stringifyTableData"); +const truncateTableData_1 = require("./truncateTableData"); +const utils_1 = require("./utils"); +const prepareData = (data, config) => { + let rows = (0, stringifyTableData_1.stringifyTableData)(data); + rows = (0, truncateTableData_1.truncateTableData)(rows, (0, utils_1.extractTruncates)(config)); + const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config); + rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config); + rows = (0, alignTableData_1.alignTableData)(rows, config); + rows = (0, padTableData_1.padTableData)(rows, config); + return rows; +}; +const create = (row, columnWidths, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, drawRow_1.drawRow)(literalRow, config); + }).join(''); + let output; + output = ''; + output += (0, drawBorder_1.drawBorderTop)(columnWidths, config); + output += body; + output += (0, drawBorder_1.drawBorderBottom)(columnWidths, config); + output = output.trimEnd(); + process.stdout.write(output); +}; +const append = (row, columnWidths, config) => { + const rows = prepareData([row], config); + const body = rows.map((literalRow) => { + return (0, drawRow_1.drawRow)(literalRow, config); + }).join(''); + let output = ''; + const bottom = (0, drawBorder_1.drawBorderBottom)(columnWidths, config); + if (bottom !== '\n') { + output = '\r\u001B[K'; + } + output += (0, drawBorder_1.drawBorderJoin)(columnWidths, config); + output += body; + output += bottom; + output = output.trimEnd(); + process.stdout.write(output); +}; +const createStream = (userConfig) => { + const config = (0, makeStreamConfig_1.makeStreamConfig)(userConfig); + const columnWidths = Object.values(config.columns).map((column) => { + return column.width + column.paddingLeft + column.paddingRight; + }); + let empty = true; + return { + write: (row) => { + if (row.length !== config.columnCount) { + throw new Error('Row cell count does not match the config.columnCount.'); + } + if (empty) { + empty = false; + create(row, columnWidths, config); + } + else { + append(row, columnWidths, config); + } + }, + }; +}; +exports.createStream = createStream; +//# sourceMappingURL=createStream.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/createStream.js.map b/node_modules/table/dist/src/createStream.js.map new file mode 100644 index 00000000..7ec269cf --- /dev/null +++ b/node_modules/table/dist/src/createStream.js.map @@ -0,0 +1 @@ +{"version":3,"file":"createStream.js","sourceRoot":"","sources":["../../src/createStream.ts"],"names":[],"mappings":";;;AAAA,qDAE0B;AAC1B,+DAE+B;AAC/B,6CAIsB;AACtB,uCAEmB;AACnB,yDAE4B;AAC5B,qEAEkC;AAClC,iDAEwB;AACxB,6DAE8B;AAC9B,2DAE6B;AAQ7B,mCAEiB;AAEjB,MAAM,WAAW,GAAG,CAAC,IAAW,EAAE,MAAoB,EAAE,EAAE;IACxD,IAAI,IAAI,GAAG,IAAA,uCAAkB,EAAC,IAAI,CAAC,CAAC;IAEpC,IAAI,GAAG,IAAA,qCAAiB,EAAC,IAAI,EAAE,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC,CAAC;IAEzD,MAAM,UAAU,GAAG,IAAA,yCAAmB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAErD,IAAI,GAAG,IAAA,+CAAsB,EAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACxD,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,IAAI,GAAG,IAAA,2BA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tD,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,MAAM,GAAG,YAAY,CAAC;KACvB;IAED,MAAM,IAAI,IAAA,2BAAc,EAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC/C,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,MAAM,CAAC;IAEjB,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IAE1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEK,MAAM,YAAY,GAAG,CAAC,UAA4B,EAAkB,EAAE;IAC3E,MAAM,MAAM,GAAG,IAAA,mCAAgB,EAAC,UAAU,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAChE,OAAO,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,IAAI,KAAK,GAAG,IAAI,CAAC;IAEjB,OAAO;QACL,KAAK,EAAE,CAAC,GAAa,EAAE,EAAE;YACvB,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,EAAE;gBACrC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;aAC1E;YAED,IAAI,KAAK,EAAE;gBACT,KAAK,GAAG,KAAK,CAAC;gBAEd,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;aACnC;iBAAM;gBACL,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;aACnC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,YAAY,gBAwBvB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/drawBorder.d.ts b/node_modules/table/dist/src/drawBorder.d.ts new file mode 100644 index 00000000..82b4dc54 --- /dev/null +++ b/node_modules/table/dist/src/drawBorder.d.ts @@ -0,0 +1,34 @@ +import type { SpanningCellManager } from './spanningCellManager'; +import type { BorderConfig, DrawVerticalLine } from './types/api'; +import type { SeparatorGetter } from './types/internal'; +declare type Separator = { + readonly left: string; + readonly right: string; + readonly body: string; + readonly bodyJoinOuter?: string; + readonly bodyJoinInner?: string; + readonly join: string; + readonly joinUp?: string; + readonly joinDown?: string; + readonly joinLeft?: string; + readonly joinRight?: string; +}; +export declare const drawBorderSegments: (columnWidths: number[], parameters: Parameters[1]) => string[]; +export declare const createSeparatorGetter: (dependencies: Parameters[1]) => (verticalBorderIndex: number, columnCount: number) => string; +export declare const drawBorder: (columnWidths: number[], parameters: Omit & { + separator: Separator; +}) => string; +export declare const drawBorderTop: (columnWidths: number[], parameters: DrawBorderParameters) => string; +export declare const drawBorderJoin: (columnWidths: number[], parameters: DrawBorderParameters) => string; +export declare const drawBorderBottom: (columnWidths: number[], parameters: DrawBorderParameters) => string; +export declare type BorderGetterParameters = { + border: BorderConfig; + drawVerticalLine: DrawVerticalLine; + spanningCellManager?: SpanningCellManager; + rowCount?: number; +}; +export declare type DrawBorderParameters = Omit & { + horizontalBorderIndex?: number; +}; +export declare const createTableBorderGetter: (columnWidths: number[], parameters: BorderGetterParameters) => SeparatorGetter; +export {}; diff --git a/node_modules/table/dist/src/drawBorder.js b/node_modules/table/dist/src/drawBorder.js new file mode 100644 index 00000000..81ede506 --- /dev/null +++ b/node_modules/table/dist/src/drawBorder.js @@ -0,0 +1,202 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createTableBorderGetter = exports.drawBorderBottom = exports.drawBorderJoin = exports.drawBorderTop = exports.drawBorder = exports.createSeparatorGetter = exports.drawBorderSegments = void 0; +const drawContent_1 = require("./drawContent"); +const drawBorderSegments = (columnWidths, parameters) => { + const { separator, horizontalBorderIndex, spanningCellManager } = parameters; + return columnWidths.map((columnWidth, columnIndex) => { + const normalSegment = separator.body.repeat(columnWidth); + if (horizontalBorderIndex === undefined) { + return normalSegment; + } + /* istanbul ignore next */ + const range = spanningCellManager === null || spanningCellManager === void 0 ? void 0 : spanningCellManager.getContainingRange({ col: columnIndex, + row: horizontalBorderIndex }); + if (!range) { + return normalSegment; + } + const { topLeft } = range; + // draw border segments as usual for top border of spanning cell + if (horizontalBorderIndex === topLeft.row) { + return normalSegment; + } + // if for first column/row of spanning cell, just skip + if (columnIndex !== topLeft.col) { + return ''; + } + return range.extractBorderContent(horizontalBorderIndex); + }); +}; +exports.drawBorderSegments = drawBorderSegments; +const createSeparatorGetter = (dependencies) => { + const { separator, spanningCellManager, horizontalBorderIndex, rowCount } = dependencies; + // eslint-disable-next-line complexity + return (verticalBorderIndex, columnCount) => { + const inSameRange = spanningCellManager === null || spanningCellManager === void 0 ? void 0 : spanningCellManager.inSameRange; + if (horizontalBorderIndex !== undefined && inSameRange) { + const topCell = { col: verticalBorderIndex, + row: horizontalBorderIndex - 1 }; + const leftCell = { col: verticalBorderIndex - 1, + row: horizontalBorderIndex }; + const oppositeCell = { col: verticalBorderIndex - 1, + row: horizontalBorderIndex - 1 }; + const currentCell = { col: verticalBorderIndex, + row: horizontalBorderIndex }; + const pairs = [ + [oppositeCell, topCell], + [topCell, currentCell], + [currentCell, leftCell], + [leftCell, oppositeCell], + ]; + // left side of horizontal border + if (verticalBorderIndex === 0) { + if (inSameRange(currentCell, topCell) && separator.bodyJoinOuter) { + return separator.bodyJoinOuter; + } + return separator.left; + } + // right side of horizontal border + if (verticalBorderIndex === columnCount) { + if (inSameRange(oppositeCell, leftCell) && separator.bodyJoinOuter) { + return separator.bodyJoinOuter; + } + return separator.right; + } + // top horizontal border + if (horizontalBorderIndex === 0) { + if (inSameRange(currentCell, leftCell)) { + return separator.body; + } + return separator.join; + } + // bottom horizontal border + if (horizontalBorderIndex === rowCount) { + if (inSameRange(topCell, oppositeCell)) { + return separator.body; + } + return separator.join; + } + const sameRangeCount = pairs.map((pair) => { + return inSameRange(...pair); + }).filter(Boolean).length; + // four cells are belongs to different spanning cells + if (sameRangeCount === 0) { + return separator.join; + } + // belong to one spanning cell + if (sameRangeCount === 4) { + return ''; + } + // belongs to two spanning cell + if (sameRangeCount === 2) { + if (inSameRange(...pairs[1]) && inSameRange(...pairs[3]) && separator.bodyJoinInner) { + return separator.bodyJoinInner; + } + return separator.body; + } + /* istanbul ignore next */ + if (sameRangeCount === 1) { + if (!separator.joinRight || !separator.joinLeft || !separator.joinUp || !separator.joinDown) { + throw new Error(`Can not get border separator for position [${horizontalBorderIndex}, ${verticalBorderIndex}]`); + } + if (inSameRange(...pairs[0])) { + return separator.joinDown; + } + if (inSameRange(...pairs[1])) { + return separator.joinLeft; + } + if (inSameRange(...pairs[2])) { + return separator.joinUp; + } + return separator.joinRight; + } + /* istanbul ignore next */ + throw new Error('Invalid case'); + } + if (verticalBorderIndex === 0) { + return separator.left; + } + if (verticalBorderIndex === columnCount) { + return separator.right; + } + return separator.join; + }; +}; +exports.createSeparatorGetter = createSeparatorGetter; +const drawBorder = (columnWidths, parameters) => { + const borderSegments = (0, exports.drawBorderSegments)(columnWidths, parameters); + const { drawVerticalLine, horizontalBorderIndex, spanningCellManager } = parameters; + return (0, drawContent_1.drawContent)({ + contents: borderSegments, + drawSeparator: drawVerticalLine, + elementType: 'border', + rowIndex: horizontalBorderIndex, + separatorGetter: (0, exports.createSeparatorGetter)(parameters), + spanningCellManager, + }) + '\n'; +}; +exports.drawBorder = drawBorder; +const drawBorderTop = (columnWidths, parameters) => { + const { border } = parameters; + const result = (0, exports.drawBorder)(columnWidths, { + ...parameters, + separator: { + body: border.topBody, + join: border.topJoin, + left: border.topLeft, + right: border.topRight, + }, + }); + if (result === '\n') { + return ''; + } + return result; +}; +exports.drawBorderTop = drawBorderTop; +const drawBorderJoin = (columnWidths, parameters) => { + const { border } = parameters; + return (0, exports.drawBorder)(columnWidths, { + ...parameters, + separator: { + body: border.joinBody, + bodyJoinInner: border.bodyJoin, + bodyJoinOuter: border.bodyLeft, + join: border.joinJoin, + joinDown: border.joinMiddleDown, + joinLeft: border.joinMiddleLeft, + joinRight: border.joinMiddleRight, + joinUp: border.joinMiddleUp, + left: border.joinLeft, + right: border.joinRight, + }, + }); +}; +exports.drawBorderJoin = drawBorderJoin; +const drawBorderBottom = (columnWidths, parameters) => { + const { border } = parameters; + return (0, exports.drawBorder)(columnWidths, { + ...parameters, + separator: { + body: border.bottomBody, + join: border.bottomJoin, + left: border.bottomLeft, + right: border.bottomRight, + }, + }); +}; +exports.drawBorderBottom = drawBorderBottom; +const createTableBorderGetter = (columnWidths, parameters) => { + return (index, size) => { + const drawBorderParameters = { ...parameters, + horizontalBorderIndex: index }; + if (index === 0) { + return (0, exports.drawBorderTop)(columnWidths, drawBorderParameters); + } + else if (index === size) { + return (0, exports.drawBorderBottom)(columnWidths, drawBorderParameters); + } + return (0, exports.drawBorderJoin)(columnWidths, drawBorderParameters); + }; +}; +exports.createTableBorderGetter = createTableBorderGetter; +//# sourceMappingURL=drawBorder.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/drawBorder.js.map b/node_modules/table/dist/src/drawBorder.js.map new file mode 100644 index 00000000..c14af9b9 --- /dev/null +++ b/node_modules/table/dist/src/drawBorder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"drawBorder.js","sourceRoot":"","sources":["../../src/drawBorder.ts"],"names":[],"mappings":";;;AAAA,+CAEuB;AA0BhB,MAAM,kBAAkB,GAAG,CAAC,YAAsB,EAAE,UAA4C,EAAY,EAAE;IACnH,MAAM,EAAC,SAAS,EAAE,qBAAqB,EAAE,mBAAmB,EAAC,GAAG,UAAU,CAAC;IAE3E,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,EAAE;QACnD,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACzD,IAAI,qBAAqB,KAAK,SAAS,EAAE;YACvC,OAAO,aAAa,CAAC;SACtB;QA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AAE;QACrC,MAAM,oBAAoB,GAAyB,EAAC,GAAG,UAAU;YAC/D,qBAAqB,EAAE,KAAK,EAAC,CAAC;QAEhC,IAAI,KAAK,KAAK,CAAC,EAAE;YACf,OAAO,IAAA,qBAAa,EAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC;SAC1D;aAAM,IAAI,KAAK,KAAK,IAAI,EAAE;YACzB,OAAO,IAAA,wBAAgB,EAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC;SAC7D;QAED,OAAO,IAAA,sBAAc,EAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC;IAC5D,CAAC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,uBAAuB,2BAalC"} \ No newline at end of file diff --git a/node_modules/table/dist/src/drawContent.d.ts b/node_modules/table/dist/src/drawContent.d.ts new file mode 100644 index 00000000..3ac2f8ce --- /dev/null +++ b/node_modules/table/dist/src/drawContent.d.ts @@ -0,0 +1,14 @@ +import type { SpanningCellManager } from './spanningCellManager'; +/** + * Shared function to draw horizontal borders, rows or the entire table + */ +declare type DrawContentParameters = { + contents: string[]; + drawSeparator: (index: number, size: number) => boolean; + separatorGetter: (index: number, size: number) => string; + spanningCellManager?: SpanningCellManager; + rowIndex?: number; + elementType?: 'border' | 'cell' | 'row'; +}; +export declare const drawContent: (parameters: DrawContentParameters) => string; +export {}; diff --git a/node_modules/table/dist/src/drawContent.js b/node_modules/table/dist/src/drawContent.js new file mode 100644 index 00000000..98d494ea --- /dev/null +++ b/node_modules/table/dist/src/drawContent.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.drawContent = void 0; +const drawContent = (parameters) => { + const { contents, separatorGetter, drawSeparator, spanningCellManager, rowIndex, elementType } = parameters; + const contentSize = contents.length; + const result = []; + if (drawSeparator(0, contentSize)) { + result.push(separatorGetter(0, contentSize)); + } + contents.forEach((content, contentIndex) => { + if (!elementType || elementType === 'border' || elementType === 'row') { + result.push(content); + } + if (elementType === 'cell' && rowIndex === undefined) { + result.push(content); + } + if (elementType === 'cell' && rowIndex !== undefined) { + /* istanbul ignore next */ + const containingRange = spanningCellManager === null || spanningCellManager === void 0 ? void 0 : spanningCellManager.getContainingRange({ col: contentIndex, + row: rowIndex }); + // when drawing content row, just add a cell when it is a normal cell + // or belongs to first column of spanning cell + if (!containingRange || contentIndex === containingRange.topLeft.col) { + result.push(content); + } + } + // Only append the middle separator if the content is not the last + if (contentIndex + 1 < contentSize && drawSeparator(contentIndex + 1, contentSize)) { + const separator = separatorGetter(contentIndex + 1, contentSize); + if (elementType === 'cell' && rowIndex !== undefined) { + const currentCell = { col: contentIndex + 1, + row: rowIndex }; + /* istanbul ignore next */ + const containingRange = spanningCellManager === null || spanningCellManager === void 0 ? void 0 : spanningCellManager.getContainingRange(currentCell); + if (!containingRange || containingRange.topLeft.col === currentCell.col) { + result.push(separator); + } + } + else { + result.push(separator); + } + } + }); + if (drawSeparator(contentSize, contentSize)) { + result.push(separatorGetter(contentSize, contentSize)); + } + return result.join(''); +}; +exports.drawContent = drawContent; +//# sourceMappingURL=drawContent.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/drawContent.js.map b/node_modules/table/dist/src/drawContent.js.map new file mode 100644 index 00000000..991c2a5d --- /dev/null +++ b/node_modules/table/dist/src/drawContent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"drawContent.js","sourceRoot":"","sources":["../../src/drawContent.ts"],"names":[],"mappings":";;;AAmBO,MAAM,WAAW,GAAG,CAAC,UAAiC,EAAU,EAAE;IACvE,MAAM,EAAC,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAE,QAAQ,EAAE,WAAW,EAAC,GAAG,UAAU,CAAC;IAC1G,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC;IACpC,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,IAAI,aAAa,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE;QACjC,MAAM,CAAC,IAAI,CA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WAAW,CAAC,CAAC;gBAC7E,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,KAAK,WAAW,CAAC,GAAG,EAAE;oBACvE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACxB;aACF;iBAAM;gBACL,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aACxB;SACF;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE;QAC3C,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;KACxD;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC,CAAC;AArDW,QAAA,WAAW,eAqDtB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/drawRow.d.ts b/node_modules/table/dist/src/drawRow.d.ts new file mode 100644 index 00000000..c0238a8d --- /dev/null +++ b/node_modules/table/dist/src/drawRow.d.ts @@ -0,0 +1,10 @@ +import type { SpanningCellManager } from './spanningCellManager'; +import type { DrawVerticalLine } from './types/api'; +import type { BodyBorderConfig, Row } from './types/internal'; +export declare type DrawRowConfig = { + border: BodyBorderConfig; + drawVerticalLine: DrawVerticalLine; + spanningCellManager?: SpanningCellManager; + rowIndex?: number; +}; +export declare const drawRow: (row: Row, config: DrawRowConfig) => string; diff --git a/node_modules/table/dist/src/drawRow.js b/node_modules/table/dist/src/drawRow.js new file mode 100644 index 00000000..a86a2790 --- /dev/null +++ b/node_modules/table/dist/src/drawRow.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.drawRow = void 0; +const drawContent_1 = require("./drawContent"); +const drawRow = (row, config) => { + const { border, drawVerticalLine, rowIndex, spanningCellManager } = config; + return (0, drawContent_1.drawContent)({ + contents: row, + drawSeparator: drawVerticalLine, + elementType: 'cell', + rowIndex, + separatorGetter: (index, columnCount) => { + if (index === 0) { + return border.bodyLeft; + } + if (index === columnCount) { + return border.bodyRight; + } + return border.bodyJoin; + }, + spanningCellManager, + }) + '\n'; +}; +exports.drawRow = drawRow; +//# sourceMappingURL=drawRow.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/drawRow.js.map b/node_modules/table/dist/src/drawRow.js.map new file mode 100644 index 00000000..ca3c5bd9 --- /dev/null +++ b/node_modules/table/dist/src/drawRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"drawRow.js","sourceRoot":"","sources":["../../src/drawRow.ts"],"names":[],"mappings":";;;AAAA,+CAEuB;AAmBhB,MAAM,OAAO,GAAG,CAAC,GAAQ,EAAE,MAAqB,EAAU,EAAE;IACjE,MAAM,EAAC,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,mBAAmB,EAAC,GAAG,MAAM,CAAC;IAEzE,OAAO,IAAA,yBAAW,EAAC;QACjB,QAAQ,EAAE,GAAG;QACb,aAAa,EAAE,gBAAgB;QAC/B,WAAW,EAAE,MAAM;QACnB,QAAQ;QACR,eAAe,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE;YACtC,IAAI,KAAK,KAAK,CAAC,EAAE;gBACf,OAAO,MAAM,CAAC,QAAQ,CAAC;aACxB;YAED,IAAI,KAAK,KAAK,WAAW,EAAE;gBACzB,OAAO,MAAM,CAAC,SAAS,CAAC;aACzB;YAED,OAAO,MAAM,CAAC,QAAQ,CAAC;QACzB,CAAC;QACD,mBAAmB;KACpB,CAAC,GAAG,IAAI,CAAC;AACZ,CAAC,CAAC;AArBW,QAAA,OAAO,WAqBlB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/drawTable.d.ts b/node_modules/table/dist/src/drawTable.d.ts new file mode 100644 index 00000000..f234f304 --- /dev/null +++ b/node_modules/table/dist/src/drawTable.d.ts @@ -0,0 +1,2 @@ +import type { TableConfig, Row } from './types/internal'; +export declare const drawTable: (rows: Row[], outputColumnWidths: number[], rowHeights: number[], config: TableConfig) => string; diff --git a/node_modules/table/dist/src/drawTable.js b/node_modules/table/dist/src/drawTable.js new file mode 100644 index 00000000..dab8f987 --- /dev/null +++ b/node_modules/table/dist/src/drawTable.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.drawTable = void 0; +const drawBorder_1 = require("./drawBorder"); +const drawContent_1 = require("./drawContent"); +const drawRow_1 = require("./drawRow"); +const utils_1 = require("./utils"); +const drawTable = (rows, outputColumnWidths, rowHeights, config) => { + const { drawHorizontalLine, singleLine, } = config; + const contents = (0, utils_1.groupBySizes)(rows, rowHeights).map((group, groupIndex) => { + return group.map((row) => { + return (0, drawRow_1.drawRow)(row, { ...config, + rowIndex: groupIndex }); + }).join(''); + }); + return (0, drawContent_1.drawContent)({ contents, + drawSeparator: (index, size) => { + // Top/bottom border + if (index === 0 || index === size) { + return drawHorizontalLine(index, size); + } + return !singleLine && drawHorizontalLine(index, size); + }, + elementType: 'row', + rowIndex: -1, + separatorGetter: (0, drawBorder_1.createTableBorderGetter)(outputColumnWidths, { ...config, + rowCount: contents.length }), + spanningCellManager: config.spanningCellManager }); +}; +exports.drawTable = drawTable; +//# sourceMappingURL=drawTable.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/drawTable.js.map b/node_modules/table/dist/src/drawTable.js.map new file mode 100644 index 00000000..882d6e37 --- /dev/null +++ b/node_modules/table/dist/src/drawTable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"drawTable.js","sourceRoot":"","sources":["../../src/drawTable.ts"],"names":[],"mappings":";;;AAAA,6CAEsB;AACtB,+CAEuB;AACvB,uCAEmB;AAInB,mCAEiB;AAEV,MAAM,SAAS,GAAG,CAAC,IAAW,EAAE,kBAA4B,EAAE,UAAoB,EAAE,MAAmB,EAAU,EAAE;IACxH,MAAM,EACJ,kBAAkB,EAClB,UAAU,GACX,GAAG,MAAM,CAAC;IAEX,MAAM,QAAQ,GAAG,IAAA,oBAAY,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE;QACxE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACvB,OAAO,IAAA,iBAAO,EAAC,GAAG,EAAE,EAAC,GAAG,MAAM;gBAC5B,QAAQ,EAAE,UAAU,EAAC,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,yBAAW,EAAC,EAAC,QAAQ;QAC1B,aAAa,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YAC7B,oBAAoB;YACpB,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,EAAE;gBACjC,OAAO,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;aACxC;YAED,OAAO,CAAC,UAAU,IAAI,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACxD,CAAC;QACD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,CAAC,CAAC;QACZ,eAAe,EAAE,IAAA,oCAAuB,EAAC,kBAAkB,EAAE,EAAC,GAAG,MAAM;YACrE,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAC,CAAC;QAC7B,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,EAAC,CAAC,CAAC;AACtD,CAAC,CAAC;AA3BW,QAAA,SAAS,aA2BpB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/generated/validators.d.ts b/node_modules/table/dist/src/generated/validators.d.ts new file mode 100644 index 00000000..bec42e4a --- /dev/null +++ b/node_modules/table/dist/src/generated/validators.d.ts @@ -0,0 +1,13 @@ +declare function validate43(data: any, { instancePath, parentData, parentDataProperty, rootData }?: { + instancePath?: string | undefined; + parentData: any; + parentDataProperty: any; + rootData?: any; +}): boolean; +declare function validate86(data: any, { instancePath, parentData, parentDataProperty, rootData }?: { + instancePath?: string | undefined; + parentData: any; + parentDataProperty: any; + rootData?: any; +}): boolean; +export { validate43 as _config_json, validate86 as _streamConfig_json }; diff --git a/node_modules/table/dist/src/generated/validators.js b/node_modules/table/dist/src/generated/validators.js new file mode 100644 index 00000000..6e5fc667 --- /dev/null +++ b/node_modules/table/dist/src/generated/validators.js @@ -0,0 +1,2694 @@ +"use strict"; +exports["config.json"] = validate43; +const schema13 = { + "$id": "config.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "shared.json#/definitions/borders" + }, + "header": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "alignment": { + "$ref": "shared.json#/definitions/alignment" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "integer" + }, + "paddingLeft": { + "type": "integer" + }, + "paddingRight": { + "type": "integer" + } + }, + "required": ["content"], + "additionalProperties": false + }, + "columns": { + "$ref": "shared.json#/definitions/columns" + }, + "columnDefault": { + "$ref": "shared.json#/definitions/column" + }, + "drawVerticalLine": { + "typeof": "function" + }, + "drawHorizontalLine": { + "typeof": "function" + }, + "singleLine": { + "typeof": "boolean" + }, + "spanningCells": { + "type": "array", + "items": { + "type": "object", + "properties": { + "col": { + "type": "integer", + "minimum": 0 + }, + "row": { + "type": "integer", + "minimum": 0 + }, + "colSpan": { + "type": "integer", + "minimum": 1 + }, + "rowSpan": { + "type": "integer", + "minimum": 1 + }, + "alignment": { + "$ref": "shared.json#/definitions/alignment" + }, + "verticalAlignment": { + "$ref": "shared.json#/definitions/verticalAlignment" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "integer" + }, + "paddingLeft": { + "type": "integer" + }, + "paddingRight": { + "type": "integer" + } + }, + "required": ["row", "col"], + "additionalProperties": false + } + } + }, + "additionalProperties": false +}; +const schema15 = { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "headerJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + }, + "joinMiddleUp": { + "$ref": "#/definitions/border" + }, + "joinMiddleDown": { + "$ref": "#/definitions/border" + }, + "joinMiddleLeft": { + "$ref": "#/definitions/border" + }, + "joinMiddleRight": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false +}; +const func8 = Object.prototype.hasOwnProperty; +const schema16 = { + "type": "string" +}; +function validate46(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (typeof data !== "string") { + const err0 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "string" + }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + validate46.errors = vErrors; + return errors === 0; +} +function validate45(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (data && typeof data == "object" && !Array.isArray(data)) { + for (const key0 in data) { + if (!(func8.call(schema15.properties, key0))) { + const err0 = { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + } + if (data.topBody !== undefined) { + if (!(validate46(data.topBody, { + instancePath: instancePath + "/topBody", + parentData: data, + parentDataProperty: "topBody", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.topJoin !== undefined) { + if (!(validate46(data.topJoin, { + instancePath: instancePath + "/topJoin", + parentData: data, + parentDataProperty: "topJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.topLeft !== undefined) { + if (!(validate46(data.topLeft, { + instancePath: instancePath + "/topLeft", + parentData: data, + parentDataProperty: "topLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.topRight !== undefined) { + if (!(validate46(data.topRight, { + instancePath: instancePath + "/topRight", + parentData: data, + parentDataProperty: "topRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bottomBody !== undefined) { + if (!(validate46(data.bottomBody, { + instancePath: instancePath + "/bottomBody", + parentData: data, + parentDataProperty: "bottomBody", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bottomJoin !== undefined) { + if (!(validate46(data.bottomJoin, { + instancePath: instancePath + "/bottomJoin", + parentData: data, + parentDataProperty: "bottomJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bottomLeft !== undefined) { + if (!(validate46(data.bottomLeft, { + instancePath: instancePath + "/bottomLeft", + parentData: data, + parentDataProperty: "bottomLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bottomRight !== undefined) { + if (!(validate46(data.bottomRight, { + instancePath: instancePath + "/bottomRight", + parentData: data, + parentDataProperty: "bottomRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bodyLeft !== undefined) { + if (!(validate46(data.bodyLeft, { + instancePath: instancePath + "/bodyLeft", + parentData: data, + parentDataProperty: "bodyLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bodyRight !== undefined) { + if (!(validate46(data.bodyRight, { + instancePath: instancePath + "/bodyRight", + parentData: data, + parentDataProperty: "bodyRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bodyJoin !== undefined) { + if (!(validate46(data.bodyJoin, { + instancePath: instancePath + "/bodyJoin", + parentData: data, + parentDataProperty: "bodyJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.headerJoin !== undefined) { + if (!(validate46(data.headerJoin, { + instancePath: instancePath + "/headerJoin", + parentData: data, + parentDataProperty: "headerJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinBody !== undefined) { + if (!(validate46(data.joinBody, { + instancePath: instancePath + "/joinBody", + parentData: data, + parentDataProperty: "joinBody", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinLeft !== undefined) { + if (!(validate46(data.joinLeft, { + instancePath: instancePath + "/joinLeft", + parentData: data, + parentDataProperty: "joinLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinRight !== undefined) { + if (!(validate46(data.joinRight, { + instancePath: instancePath + "/joinRight", + parentData: data, + parentDataProperty: "joinRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinJoin !== undefined) { + if (!(validate46(data.joinJoin, { + instancePath: instancePath + "/joinJoin", + parentData: data, + parentDataProperty: "joinJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinMiddleUp !== undefined) { + if (!(validate46(data.joinMiddleUp, { + instancePath: instancePath + "/joinMiddleUp", + parentData: data, + parentDataProperty: "joinMiddleUp", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinMiddleDown !== undefined) { + if (!(validate46(data.joinMiddleDown, { + instancePath: instancePath + "/joinMiddleDown", + parentData: data, + parentDataProperty: "joinMiddleDown", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinMiddleLeft !== undefined) { + if (!(validate46(data.joinMiddleLeft, { + instancePath: instancePath + "/joinMiddleLeft", + parentData: data, + parentDataProperty: "joinMiddleLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinMiddleRight !== undefined) { + if (!(validate46(data.joinMiddleRight, { + instancePath: instancePath + "/joinMiddleRight", + parentData: data, + parentDataProperty: "joinMiddleRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + } + else { + const err1 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + validate45.errors = vErrors; + return errors === 0; +} +const schema17 = { + "type": "string", + "enum": ["left", "right", "center", "justify"] +}; +const func0 = require("ajv/dist/runtime/equal").default; +function validate68(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (typeof data !== "string") { + const err0 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "string" + }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + if (!((((data === "left") || (data === "right")) || (data === "center")) || (data === "justify"))) { + const err1 = { + instancePath, + schemaPath: "#/enum", + keyword: "enum", + params: { + allowedValues: schema17.enum + }, + message: "must be equal to one of the allowed values" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + validate68.errors = vErrors; + return errors === 0; +} +const schema18 = { + "oneOf": [{ + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, { + "type": "array", + "items": { + "$ref": "#/definitions/column" + } + }] +}; +const pattern0 = new RegExp("^[0-9]+$", "u"); +const schema19 = { + "type": "object", + "properties": { + "alignment": { + "$ref": "#/definitions/alignment" + }, + "verticalAlignment": { + "$ref": "#/definitions/verticalAlignment" + }, + "width": { + "type": "integer", + "minimum": 1 + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "integer" + }, + "paddingLeft": { + "type": "integer" + }, + "paddingRight": { + "type": "integer" + } + }, + "additionalProperties": false +}; +function validate72(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (typeof data !== "string") { + const err0 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "string" + }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + if (!((((data === "left") || (data === "right")) || (data === "center")) || (data === "justify"))) { + const err1 = { + instancePath, + schemaPath: "#/enum", + keyword: "enum", + params: { + allowedValues: schema17.enum + }, + message: "must be equal to one of the allowed values" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + validate72.errors = vErrors; + return errors === 0; +} +const schema21 = { + "type": "string", + "enum": ["top", "middle", "bottom"] +}; +function validate74(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (typeof data !== "string") { + const err0 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "string" + }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + if (!(((data === "top") || (data === "middle")) || (data === "bottom"))) { + const err1 = { + instancePath, + schemaPath: "#/enum", + keyword: "enum", + params: { + allowedValues: schema21.enum + }, + message: "must be equal to one of the allowed values" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + validate74.errors = vErrors; + return errors === 0; +} +function validate71(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (data && typeof data == "object" && !Array.isArray(data)) { + for (const key0 in data) { + if (!(((((((key0 === "alignment") || (key0 === "verticalAlignment")) || (key0 === "width")) || (key0 === "wrapWord")) || (key0 === "truncate")) || (key0 === "paddingLeft")) || (key0 === "paddingRight"))) { + const err0 = { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + } + if (data.alignment !== undefined) { + if (!(validate72(data.alignment, { + instancePath: instancePath + "/alignment", + parentData: data, + parentDataProperty: "alignment", + rootData + }))) { + vErrors = vErrors === null ? validate72.errors : vErrors.concat(validate72.errors); + errors = vErrors.length; + } + } + if (data.verticalAlignment !== undefined) { + if (!(validate74(data.verticalAlignment, { + instancePath: instancePath + "/verticalAlignment", + parentData: data, + parentDataProperty: "verticalAlignment", + rootData + }))) { + vErrors = vErrors === null ? validate74.errors : vErrors.concat(validate74.errors); + errors = vErrors.length; + } + } + if (data.width !== undefined) { + let data2 = data.width; + if (!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))) { + const err1 = { + instancePath: instancePath + "/width", + schemaPath: "#/properties/width/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + if ((typeof data2 == "number") && (isFinite(data2))) { + if (data2 < 1 || isNaN(data2)) { + const err2 = { + instancePath: instancePath + "/width", + schemaPath: "#/properties/width/minimum", + keyword: "minimum", + params: { + comparison: ">=", + limit: 1 + }, + message: "must be >= 1" + }; + if (vErrors === null) { + vErrors = [err2]; + } + else { + vErrors.push(err2); + } + errors++; + } + } + } + if (data.wrapWord !== undefined) { + if (typeof data.wrapWord !== "boolean") { + const err3 = { + instancePath: instancePath + "/wrapWord", + schemaPath: "#/properties/wrapWord/type", + keyword: "type", + params: { + type: "boolean" + }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } + else { + vErrors.push(err3); + } + errors++; + } + } + if (data.truncate !== undefined) { + let data4 = data.truncate; + if (!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))) { + const err4 = { + instancePath: instancePath + "/truncate", + schemaPath: "#/properties/truncate/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err4]; + } + else { + vErrors.push(err4); + } + errors++; + } + } + if (data.paddingLeft !== undefined) { + let data5 = data.paddingLeft; + if (!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))) { + const err5 = { + instancePath: instancePath + "/paddingLeft", + schemaPath: "#/properties/paddingLeft/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err5]; + } + else { + vErrors.push(err5); + } + errors++; + } + } + if (data.paddingRight !== undefined) { + let data6 = data.paddingRight; + if (!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))) { + const err6 = { + instancePath: instancePath + "/paddingRight", + schemaPath: "#/properties/paddingRight/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err6]; + } + else { + vErrors.push(err6); + } + errors++; + } + } + } + else { + const err7 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err7]; + } + else { + vErrors.push(err7); + } + errors++; + } + validate71.errors = vErrors; + return errors === 0; +} +function validate70(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + let passing0 = null; + const _errs1 = errors; + if (data && typeof data == "object" && !Array.isArray(data)) { + for (const key0 in data) { + if (!(pattern0.test(key0))) { + const err0 = { + instancePath, + schemaPath: "#/oneOf/0/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + } + for (const key1 in data) { + if (pattern0.test(key1)) { + if (!(validate71(data[key1], { + instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), + parentData: data, + parentDataProperty: key1, + rootData + }))) { + vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors); + errors = vErrors.length; + } + } + } + } + else { + const err1 = { + instancePath, + schemaPath: "#/oneOf/0/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + var _valid0 = _errs1 === errors; + if (_valid0) { + valid0 = true; + passing0 = 0; + } + const _errs5 = errors; + if (Array.isArray(data)) { + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + if (!(validate71(data[i0], { + instancePath: instancePath + "/" + i0, + parentData: data, + parentDataProperty: i0, + rootData + }))) { + vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors); + errors = vErrors.length; + } + } + } + else { + const err2 = { + instancePath, + schemaPath: "#/oneOf/1/type", + keyword: "type", + params: { + type: "array" + }, + message: "must be array" + }; + if (vErrors === null) { + vErrors = [err2]; + } + else { + vErrors.push(err2); + } + errors++; + } + var _valid0 = _errs5 === errors; + if (_valid0 && valid0) { + valid0 = false; + passing0 = [passing0, 1]; + } + else { + if (_valid0) { + valid0 = true; + passing0 = 1; + } + } + if (!valid0) { + const err3 = { + instancePath, + schemaPath: "#/oneOf", + keyword: "oneOf", + params: { + passingSchemas: passing0 + }, + message: "must match exactly one schema in oneOf" + }; + if (vErrors === null) { + vErrors = [err3]; + } + else { + vErrors.push(err3); + } + errors++; + } + else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } + else { + vErrors = null; + } + } + } + validate70.errors = vErrors; + return errors === 0; +} +function validate79(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (data && typeof data == "object" && !Array.isArray(data)) { + for (const key0 in data) { + if (!(((((((key0 === "alignment") || (key0 === "verticalAlignment")) || (key0 === "width")) || (key0 === "wrapWord")) || (key0 === "truncate")) || (key0 === "paddingLeft")) || (key0 === "paddingRight"))) { + const err0 = { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + } + if (data.alignment !== undefined) { + if (!(validate72(data.alignment, { + instancePath: instancePath + "/alignment", + parentData: data, + parentDataProperty: "alignment", + rootData + }))) { + vErrors = vErrors === null ? validate72.errors : vErrors.concat(validate72.errors); + errors = vErrors.length; + } + } + if (data.verticalAlignment !== undefined) { + if (!(validate74(data.verticalAlignment, { + instancePath: instancePath + "/verticalAlignment", + parentData: data, + parentDataProperty: "verticalAlignment", + rootData + }))) { + vErrors = vErrors === null ? validate74.errors : vErrors.concat(validate74.errors); + errors = vErrors.length; + } + } + if (data.width !== undefined) { + let data2 = data.width; + if (!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))) { + const err1 = { + instancePath: instancePath + "/width", + schemaPath: "#/properties/width/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + if ((typeof data2 == "number") && (isFinite(data2))) { + if (data2 < 1 || isNaN(data2)) { + const err2 = { + instancePath: instancePath + "/width", + schemaPath: "#/properties/width/minimum", + keyword: "minimum", + params: { + comparison: ">=", + limit: 1 + }, + message: "must be >= 1" + }; + if (vErrors === null) { + vErrors = [err2]; + } + else { + vErrors.push(err2); + } + errors++; + } + } + } + if (data.wrapWord !== undefined) { + if (typeof data.wrapWord !== "boolean") { + const err3 = { + instancePath: instancePath + "/wrapWord", + schemaPath: "#/properties/wrapWord/type", + keyword: "type", + params: { + type: "boolean" + }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } + else { + vErrors.push(err3); + } + errors++; + } + } + if (data.truncate !== undefined) { + let data4 = data.truncate; + if (!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))) { + const err4 = { + instancePath: instancePath + "/truncate", + schemaPath: "#/properties/truncate/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err4]; + } + else { + vErrors.push(err4); + } + errors++; + } + } + if (data.paddingLeft !== undefined) { + let data5 = data.paddingLeft; + if (!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))) { + const err5 = { + instancePath: instancePath + "/paddingLeft", + schemaPath: "#/properties/paddingLeft/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err5]; + } + else { + vErrors.push(err5); + } + errors++; + } + } + if (data.paddingRight !== undefined) { + let data6 = data.paddingRight; + if (!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))) { + const err6 = { + instancePath: instancePath + "/paddingRight", + schemaPath: "#/properties/paddingRight/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err6]; + } + else { + vErrors.push(err6); + } + errors++; + } + } + } + else { + const err7 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err7]; + } + else { + vErrors.push(err7); + } + errors++; + } + validate79.errors = vErrors; + return errors === 0; +} +function validate84(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (typeof data !== "string") { + const err0 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "string" + }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + if (!(((data === "top") || (data === "middle")) || (data === "bottom"))) { + const err1 = { + instancePath, + schemaPath: "#/enum", + keyword: "enum", + params: { + allowedValues: schema21.enum + }, + message: "must be equal to one of the allowed values" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + validate84.errors = vErrors; + return errors === 0; +} +function validate43(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + /*# sourceURL="config.json" */ ; + let vErrors = null; + let errors = 0; + if (data && typeof data == "object" && !Array.isArray(data)) { + for (const key0 in data) { + if (!((((((((key0 === "border") || (key0 === "header")) || (key0 === "columns")) || (key0 === "columnDefault")) || (key0 === "drawVerticalLine")) || (key0 === "drawHorizontalLine")) || (key0 === "singleLine")) || (key0 === "spanningCells"))) { + const err0 = { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + } + if (data.border !== undefined) { + if (!(validate45(data.border, { + instancePath: instancePath + "/border", + parentData: data, + parentDataProperty: "border", + rootData + }))) { + vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors); + errors = vErrors.length; + } + } + if (data.header !== undefined) { + let data1 = data.header; + if (data1 && typeof data1 == "object" && !Array.isArray(data1)) { + if (data1.content === undefined) { + const err1 = { + instancePath: instancePath + "/header", + schemaPath: "#/properties/header/required", + keyword: "required", + params: { + missingProperty: "content" + }, + message: "must have required property '" + "content" + "'" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + for (const key1 in data1) { + if (!((((((key1 === "content") || (key1 === "alignment")) || (key1 === "wrapWord")) || (key1 === "truncate")) || (key1 === "paddingLeft")) || (key1 === "paddingRight"))) { + const err2 = { + instancePath: instancePath + "/header", + schemaPath: "#/properties/header/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key1 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err2]; + } + else { + vErrors.push(err2); + } + errors++; + } + } + if (data1.content !== undefined) { + if (typeof data1.content !== "string") { + const err3 = { + instancePath: instancePath + "/header/content", + schemaPath: "#/properties/header/properties/content/type", + keyword: "type", + params: { + type: "string" + }, + message: "must be string" + }; + if (vErrors === null) { + vErrors = [err3]; + } + else { + vErrors.push(err3); + } + errors++; + } + } + if (data1.alignment !== undefined) { + if (!(validate68(data1.alignment, { + instancePath: instancePath + "/header/alignment", + parentData: data1, + parentDataProperty: "alignment", + rootData + }))) { + vErrors = vErrors === null ? validate68.errors : vErrors.concat(validate68.errors); + errors = vErrors.length; + } + } + if (data1.wrapWord !== undefined) { + if (typeof data1.wrapWord !== "boolean") { + const err4 = { + instancePath: instancePath + "/header/wrapWord", + schemaPath: "#/properties/header/properties/wrapWord/type", + keyword: "type", + params: { + type: "boolean" + }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err4]; + } + else { + vErrors.push(err4); + } + errors++; + } + } + if (data1.truncate !== undefined) { + let data5 = data1.truncate; + if (!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))) { + const err5 = { + instancePath: instancePath + "/header/truncate", + schemaPath: "#/properties/header/properties/truncate/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err5]; + } + else { + vErrors.push(err5); + } + errors++; + } + } + if (data1.paddingLeft !== undefined) { + let data6 = data1.paddingLeft; + if (!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))) { + const err6 = { + instancePath: instancePath + "/header/paddingLeft", + schemaPath: "#/properties/header/properties/paddingLeft/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err6]; + } + else { + vErrors.push(err6); + } + errors++; + } + } + if (data1.paddingRight !== undefined) { + let data7 = data1.paddingRight; + if (!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))) { + const err7 = { + instancePath: instancePath + "/header/paddingRight", + schemaPath: "#/properties/header/properties/paddingRight/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err7]; + } + else { + vErrors.push(err7); + } + errors++; + } + } + } + else { + const err8 = { + instancePath: instancePath + "/header", + schemaPath: "#/properties/header/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err8]; + } + else { + vErrors.push(err8); + } + errors++; + } + } + if (data.columns !== undefined) { + if (!(validate70(data.columns, { + instancePath: instancePath + "/columns", + parentData: data, + parentDataProperty: "columns", + rootData + }))) { + vErrors = vErrors === null ? validate70.errors : vErrors.concat(validate70.errors); + errors = vErrors.length; + } + } + if (data.columnDefault !== undefined) { + if (!(validate79(data.columnDefault, { + instancePath: instancePath + "/columnDefault", + parentData: data, + parentDataProperty: "columnDefault", + rootData + }))) { + vErrors = vErrors === null ? validate79.errors : vErrors.concat(validate79.errors); + errors = vErrors.length; + } + } + if (data.drawVerticalLine !== undefined) { + if (typeof data.drawVerticalLine != "function") { + const err9 = { + instancePath: instancePath + "/drawVerticalLine", + schemaPath: "#/properties/drawVerticalLine/typeof", + keyword: "typeof", + params: {}, + message: "must pass \"typeof\" keyword validation" + }; + if (vErrors === null) { + vErrors = [err9]; + } + else { + vErrors.push(err9); + } + errors++; + } + } + if (data.drawHorizontalLine !== undefined) { + if (typeof data.drawHorizontalLine != "function") { + const err10 = { + instancePath: instancePath + "/drawHorizontalLine", + schemaPath: "#/properties/drawHorizontalLine/typeof", + keyword: "typeof", + params: {}, + message: "must pass \"typeof\" keyword validation" + }; + if (vErrors === null) { + vErrors = [err10]; + } + else { + vErrors.push(err10); + } + errors++; + } + } + if (data.singleLine !== undefined) { + if (typeof data.singleLine != "boolean") { + const err11 = { + instancePath: instancePath + "/singleLine", + schemaPath: "#/properties/singleLine/typeof", + keyword: "typeof", + params: {}, + message: "must pass \"typeof\" keyword validation" + }; + if (vErrors === null) { + vErrors = [err11]; + } + else { + vErrors.push(err11); + } + errors++; + } + } + if (data.spanningCells !== undefined) { + let data13 = data.spanningCells; + if (Array.isArray(data13)) { + const len0 = data13.length; + for (let i0 = 0; i0 < len0; i0++) { + let data14 = data13[i0]; + if (data14 && typeof data14 == "object" && !Array.isArray(data14)) { + if (data14.row === undefined) { + const err12 = { + instancePath: instancePath + "/spanningCells/" + i0, + schemaPath: "#/properties/spanningCells/items/required", + keyword: "required", + params: { + missingProperty: "row" + }, + message: "must have required property '" + "row" + "'" + }; + if (vErrors === null) { + vErrors = [err12]; + } + else { + vErrors.push(err12); + } + errors++; + } + if (data14.col === undefined) { + const err13 = { + instancePath: instancePath + "/spanningCells/" + i0, + schemaPath: "#/properties/spanningCells/items/required", + keyword: "required", + params: { + missingProperty: "col" + }, + message: "must have required property '" + "col" + "'" + }; + if (vErrors === null) { + vErrors = [err13]; + } + else { + vErrors.push(err13); + } + errors++; + } + for (const key2 in data14) { + if (!(func8.call(schema13.properties.spanningCells.items.properties, key2))) { + const err14 = { + instancePath: instancePath + "/spanningCells/" + i0, + schemaPath: "#/properties/spanningCells/items/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key2 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err14]; + } + else { + vErrors.push(err14); + } + errors++; + } + } + if (data14.col !== undefined) { + let data15 = data14.col; + if (!(((typeof data15 == "number") && (!(data15 % 1) && !isNaN(data15))) && (isFinite(data15)))) { + const err15 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/col", + schemaPath: "#/properties/spanningCells/items/properties/col/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err15]; + } + else { + vErrors.push(err15); + } + errors++; + } + if ((typeof data15 == "number") && (isFinite(data15))) { + if (data15 < 0 || isNaN(data15)) { + const err16 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/col", + schemaPath: "#/properties/spanningCells/items/properties/col/minimum", + keyword: "minimum", + params: { + comparison: ">=", + limit: 0 + }, + message: "must be >= 0" + }; + if (vErrors === null) { + vErrors = [err16]; + } + else { + vErrors.push(err16); + } + errors++; + } + } + } + if (data14.row !== undefined) { + let data16 = data14.row; + if (!(((typeof data16 == "number") && (!(data16 % 1) && !isNaN(data16))) && (isFinite(data16)))) { + const err17 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/row", + schemaPath: "#/properties/spanningCells/items/properties/row/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err17]; + } + else { + vErrors.push(err17); + } + errors++; + } + if ((typeof data16 == "number") && (isFinite(data16))) { + if (data16 < 0 || isNaN(data16)) { + const err18 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/row", + schemaPath: "#/properties/spanningCells/items/properties/row/minimum", + keyword: "minimum", + params: { + comparison: ">=", + limit: 0 + }, + message: "must be >= 0" + }; + if (vErrors === null) { + vErrors = [err18]; + } + else { + vErrors.push(err18); + } + errors++; + } + } + } + if (data14.colSpan !== undefined) { + let data17 = data14.colSpan; + if (!(((typeof data17 == "number") && (!(data17 % 1) && !isNaN(data17))) && (isFinite(data17)))) { + const err19 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/colSpan", + schemaPath: "#/properties/spanningCells/items/properties/colSpan/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err19]; + } + else { + vErrors.push(err19); + } + errors++; + } + if ((typeof data17 == "number") && (isFinite(data17))) { + if (data17 < 1 || isNaN(data17)) { + const err20 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/colSpan", + schemaPath: "#/properties/spanningCells/items/properties/colSpan/minimum", + keyword: "minimum", + params: { + comparison: ">=", + limit: 1 + }, + message: "must be >= 1" + }; + if (vErrors === null) { + vErrors = [err20]; + } + else { + vErrors.push(err20); + } + errors++; + } + } + } + if (data14.rowSpan !== undefined) { + let data18 = data14.rowSpan; + if (!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))) { + const err21 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/rowSpan", + schemaPath: "#/properties/spanningCells/items/properties/rowSpan/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err21]; + } + else { + vErrors.push(err21); + } + errors++; + } + if ((typeof data18 == "number") && (isFinite(data18))) { + if (data18 < 1 || isNaN(data18)) { + const err22 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/rowSpan", + schemaPath: "#/properties/spanningCells/items/properties/rowSpan/minimum", + keyword: "minimum", + params: { + comparison: ">=", + limit: 1 + }, + message: "must be >= 1" + }; + if (vErrors === null) { + vErrors = [err22]; + } + else { + vErrors.push(err22); + } + errors++; + } + } + } + if (data14.alignment !== undefined) { + if (!(validate68(data14.alignment, { + instancePath: instancePath + "/spanningCells/" + i0 + "/alignment", + parentData: data14, + parentDataProperty: "alignment", + rootData + }))) { + vErrors = vErrors === null ? validate68.errors : vErrors.concat(validate68.errors); + errors = vErrors.length; + } + } + if (data14.verticalAlignment !== undefined) { + if (!(validate84(data14.verticalAlignment, { + instancePath: instancePath + "/spanningCells/" + i0 + "/verticalAlignment", + parentData: data14, + parentDataProperty: "verticalAlignment", + rootData + }))) { + vErrors = vErrors === null ? validate84.errors : vErrors.concat(validate84.errors); + errors = vErrors.length; + } + } + if (data14.wrapWord !== undefined) { + if (typeof data14.wrapWord !== "boolean") { + const err23 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/wrapWord", + schemaPath: "#/properties/spanningCells/items/properties/wrapWord/type", + keyword: "type", + params: { + type: "boolean" + }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err23]; + } + else { + vErrors.push(err23); + } + errors++; + } + } + if (data14.truncate !== undefined) { + let data22 = data14.truncate; + if (!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))) { + const err24 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/truncate", + schemaPath: "#/properties/spanningCells/items/properties/truncate/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err24]; + } + else { + vErrors.push(err24); + } + errors++; + } + } + if (data14.paddingLeft !== undefined) { + let data23 = data14.paddingLeft; + if (!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))) { + const err25 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/paddingLeft", + schemaPath: "#/properties/spanningCells/items/properties/paddingLeft/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err25]; + } + else { + vErrors.push(err25); + } + errors++; + } + } + if (data14.paddingRight !== undefined) { + let data24 = data14.paddingRight; + if (!(((typeof data24 == "number") && (!(data24 % 1) && !isNaN(data24))) && (isFinite(data24)))) { + const err26 = { + instancePath: instancePath + "/spanningCells/" + i0 + "/paddingRight", + schemaPath: "#/properties/spanningCells/items/properties/paddingRight/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err26]; + } + else { + vErrors.push(err26); + } + errors++; + } + } + } + else { + const err27 = { + instancePath: instancePath + "/spanningCells/" + i0, + schemaPath: "#/properties/spanningCells/items/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err27]; + } + else { + vErrors.push(err27); + } + errors++; + } + } + } + else { + const err28 = { + instancePath: instancePath + "/spanningCells", + schemaPath: "#/properties/spanningCells/type", + keyword: "type", + params: { + type: "array" + }, + message: "must be array" + }; + if (vErrors === null) { + vErrors = [err28]; + } + else { + vErrors.push(err28); + } + errors++; + } + } + } + else { + const err29 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err29]; + } + else { + vErrors.push(err29); + } + errors++; + } + validate43.errors = vErrors; + return errors === 0; +} +exports["streamConfig.json"] = validate86; +const schema24 = { + "$id": "streamConfig.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "shared.json#/definitions/borders" + }, + "columns": { + "$ref": "shared.json#/definitions/columns" + }, + "columnDefault": { + "$ref": "shared.json#/definitions/column" + }, + "columnCount": { + "type": "integer", + "minimum": 1 + }, + "drawVerticalLine": { + "typeof": "function" + } + }, + "required": ["columnDefault", "columnCount"], + "additionalProperties": false +}; +function validate87(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (data && typeof data == "object" && !Array.isArray(data)) { + for (const key0 in data) { + if (!(func8.call(schema15.properties, key0))) { + const err0 = { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + } + if (data.topBody !== undefined) { + if (!(validate46(data.topBody, { + instancePath: instancePath + "/topBody", + parentData: data, + parentDataProperty: "topBody", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.topJoin !== undefined) { + if (!(validate46(data.topJoin, { + instancePath: instancePath + "/topJoin", + parentData: data, + parentDataProperty: "topJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.topLeft !== undefined) { + if (!(validate46(data.topLeft, { + instancePath: instancePath + "/topLeft", + parentData: data, + parentDataProperty: "topLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.topRight !== undefined) { + if (!(validate46(data.topRight, { + instancePath: instancePath + "/topRight", + parentData: data, + parentDataProperty: "topRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bottomBody !== undefined) { + if (!(validate46(data.bottomBody, { + instancePath: instancePath + "/bottomBody", + parentData: data, + parentDataProperty: "bottomBody", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bottomJoin !== undefined) { + if (!(validate46(data.bottomJoin, { + instancePath: instancePath + "/bottomJoin", + parentData: data, + parentDataProperty: "bottomJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bottomLeft !== undefined) { + if (!(validate46(data.bottomLeft, { + instancePath: instancePath + "/bottomLeft", + parentData: data, + parentDataProperty: "bottomLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bottomRight !== undefined) { + if (!(validate46(data.bottomRight, { + instancePath: instancePath + "/bottomRight", + parentData: data, + parentDataProperty: "bottomRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bodyLeft !== undefined) { + if (!(validate46(data.bodyLeft, { + instancePath: instancePath + "/bodyLeft", + parentData: data, + parentDataProperty: "bodyLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bodyRight !== undefined) { + if (!(validate46(data.bodyRight, { + instancePath: instancePath + "/bodyRight", + parentData: data, + parentDataProperty: "bodyRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.bodyJoin !== undefined) { + if (!(validate46(data.bodyJoin, { + instancePath: instancePath + "/bodyJoin", + parentData: data, + parentDataProperty: "bodyJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.headerJoin !== undefined) { + if (!(validate46(data.headerJoin, { + instancePath: instancePath + "/headerJoin", + parentData: data, + parentDataProperty: "headerJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinBody !== undefined) { + if (!(validate46(data.joinBody, { + instancePath: instancePath + "/joinBody", + parentData: data, + parentDataProperty: "joinBody", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinLeft !== undefined) { + if (!(validate46(data.joinLeft, { + instancePath: instancePath + "/joinLeft", + parentData: data, + parentDataProperty: "joinLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinRight !== undefined) { + if (!(validate46(data.joinRight, { + instancePath: instancePath + "/joinRight", + parentData: data, + parentDataProperty: "joinRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinJoin !== undefined) { + if (!(validate46(data.joinJoin, { + instancePath: instancePath + "/joinJoin", + parentData: data, + parentDataProperty: "joinJoin", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinMiddleUp !== undefined) { + if (!(validate46(data.joinMiddleUp, { + instancePath: instancePath + "/joinMiddleUp", + parentData: data, + parentDataProperty: "joinMiddleUp", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinMiddleDown !== undefined) { + if (!(validate46(data.joinMiddleDown, { + instancePath: instancePath + "/joinMiddleDown", + parentData: data, + parentDataProperty: "joinMiddleDown", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinMiddleLeft !== undefined) { + if (!(validate46(data.joinMiddleLeft, { + instancePath: instancePath + "/joinMiddleLeft", + parentData: data, + parentDataProperty: "joinMiddleLeft", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + if (data.joinMiddleRight !== undefined) { + if (!(validate46(data.joinMiddleRight, { + instancePath: instancePath + "/joinMiddleRight", + parentData: data, + parentDataProperty: "joinMiddleRight", + rootData + }))) { + vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); + errors = vErrors.length; + } + } + } + else { + const err1 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + validate87.errors = vErrors; + return errors === 0; +} +function validate109(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + const _errs0 = errors; + let valid0 = false; + let passing0 = null; + const _errs1 = errors; + if (data && typeof data == "object" && !Array.isArray(data)) { + for (const key0 in data) { + if (!(pattern0.test(key0))) { + const err0 = { + instancePath, + schemaPath: "#/oneOf/0/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + } + for (const key1 in data) { + if (pattern0.test(key1)) { + if (!(validate71(data[key1], { + instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), + parentData: data, + parentDataProperty: key1, + rootData + }))) { + vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors); + errors = vErrors.length; + } + } + } + } + else { + const err1 = { + instancePath, + schemaPath: "#/oneOf/0/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + var _valid0 = _errs1 === errors; + if (_valid0) { + valid0 = true; + passing0 = 0; + } + const _errs5 = errors; + if (Array.isArray(data)) { + const len0 = data.length; + for (let i0 = 0; i0 < len0; i0++) { + if (!(validate71(data[i0], { + instancePath: instancePath + "/" + i0, + parentData: data, + parentDataProperty: i0, + rootData + }))) { + vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors); + errors = vErrors.length; + } + } + } + else { + const err2 = { + instancePath, + schemaPath: "#/oneOf/1/type", + keyword: "type", + params: { + type: "array" + }, + message: "must be array" + }; + if (vErrors === null) { + vErrors = [err2]; + } + else { + vErrors.push(err2); + } + errors++; + } + var _valid0 = _errs5 === errors; + if (_valid0 && valid0) { + valid0 = false; + passing0 = [passing0, 1]; + } + else { + if (_valid0) { + valid0 = true; + passing0 = 1; + } + } + if (!valid0) { + const err3 = { + instancePath, + schemaPath: "#/oneOf", + keyword: "oneOf", + params: { + passingSchemas: passing0 + }, + message: "must match exactly one schema in oneOf" + }; + if (vErrors === null) { + vErrors = [err3]; + } + else { + vErrors.push(err3); + } + errors++; + } + else { + errors = _errs0; + if (vErrors !== null) { + if (_errs0) { + vErrors.length = _errs0; + } + else { + vErrors = null; + } + } + } + validate109.errors = vErrors; + return errors === 0; +} +function validate113(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + let vErrors = null; + let errors = 0; + if (data && typeof data == "object" && !Array.isArray(data)) { + for (const key0 in data) { + if (!(((((((key0 === "alignment") || (key0 === "verticalAlignment")) || (key0 === "width")) || (key0 === "wrapWord")) || (key0 === "truncate")) || (key0 === "paddingLeft")) || (key0 === "paddingRight"))) { + const err0 = { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + } + if (data.alignment !== undefined) { + if (!(validate72(data.alignment, { + instancePath: instancePath + "/alignment", + parentData: data, + parentDataProperty: "alignment", + rootData + }))) { + vErrors = vErrors === null ? validate72.errors : vErrors.concat(validate72.errors); + errors = vErrors.length; + } + } + if (data.verticalAlignment !== undefined) { + if (!(validate74(data.verticalAlignment, { + instancePath: instancePath + "/verticalAlignment", + parentData: data, + parentDataProperty: "verticalAlignment", + rootData + }))) { + vErrors = vErrors === null ? validate74.errors : vErrors.concat(validate74.errors); + errors = vErrors.length; + } + } + if (data.width !== undefined) { + let data2 = data.width; + if (!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))) { + const err1 = { + instancePath: instancePath + "/width", + schemaPath: "#/properties/width/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + if ((typeof data2 == "number") && (isFinite(data2))) { + if (data2 < 1 || isNaN(data2)) { + const err2 = { + instancePath: instancePath + "/width", + schemaPath: "#/properties/width/minimum", + keyword: "minimum", + params: { + comparison: ">=", + limit: 1 + }, + message: "must be >= 1" + }; + if (vErrors === null) { + vErrors = [err2]; + } + else { + vErrors.push(err2); + } + errors++; + } + } + } + if (data.wrapWord !== undefined) { + if (typeof data.wrapWord !== "boolean") { + const err3 = { + instancePath: instancePath + "/wrapWord", + schemaPath: "#/properties/wrapWord/type", + keyword: "type", + params: { + type: "boolean" + }, + message: "must be boolean" + }; + if (vErrors === null) { + vErrors = [err3]; + } + else { + vErrors.push(err3); + } + errors++; + } + } + if (data.truncate !== undefined) { + let data4 = data.truncate; + if (!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))) { + const err4 = { + instancePath: instancePath + "/truncate", + schemaPath: "#/properties/truncate/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err4]; + } + else { + vErrors.push(err4); + } + errors++; + } + } + if (data.paddingLeft !== undefined) { + let data5 = data.paddingLeft; + if (!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))) { + const err5 = { + instancePath: instancePath + "/paddingLeft", + schemaPath: "#/properties/paddingLeft/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err5]; + } + else { + vErrors.push(err5); + } + errors++; + } + } + if (data.paddingRight !== undefined) { + let data6 = data.paddingRight; + if (!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))) { + const err6 = { + instancePath: instancePath + "/paddingRight", + schemaPath: "#/properties/paddingRight/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err6]; + } + else { + vErrors.push(err6); + } + errors++; + } + } + } + else { + const err7 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err7]; + } + else { + vErrors.push(err7); + } + errors++; + } + validate113.errors = vErrors; + return errors === 0; +} +function validate86(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) { + /*# sourceURL="streamConfig.json" */ ; + let vErrors = null; + let errors = 0; + if (data && typeof data == "object" && !Array.isArray(data)) { + if (data.columnDefault === undefined) { + const err0 = { + instancePath, + schemaPath: "#/required", + keyword: "required", + params: { + missingProperty: "columnDefault" + }, + message: "must have required property '" + "columnDefault" + "'" + }; + if (vErrors === null) { + vErrors = [err0]; + } + else { + vErrors.push(err0); + } + errors++; + } + if (data.columnCount === undefined) { + const err1 = { + instancePath, + schemaPath: "#/required", + keyword: "required", + params: { + missingProperty: "columnCount" + }, + message: "must have required property '" + "columnCount" + "'" + }; + if (vErrors === null) { + vErrors = [err1]; + } + else { + vErrors.push(err1); + } + errors++; + } + for (const key0 in data) { + if (!(((((key0 === "border") || (key0 === "columns")) || (key0 === "columnDefault")) || (key0 === "columnCount")) || (key0 === "drawVerticalLine"))) { + const err2 = { + instancePath, + schemaPath: "#/additionalProperties", + keyword: "additionalProperties", + params: { + additionalProperty: key0 + }, + message: "must NOT have additional properties" + }; + if (vErrors === null) { + vErrors = [err2]; + } + else { + vErrors.push(err2); + } + errors++; + } + } + if (data.border !== undefined) { + if (!(validate87(data.border, { + instancePath: instancePath + "/border", + parentData: data, + parentDataProperty: "border", + rootData + }))) { + vErrors = vErrors === null ? validate87.errors : vErrors.concat(validate87.errors); + errors = vErrors.length; + } + } + if (data.columns !== undefined) { + if (!(validate109(data.columns, { + instancePath: instancePath + "/columns", + parentData: data, + parentDataProperty: "columns", + rootData + }))) { + vErrors = vErrors === null ? validate109.errors : vErrors.concat(validate109.errors); + errors = vErrors.length; + } + } + if (data.columnDefault !== undefined) { + if (!(validate113(data.columnDefault, { + instancePath: instancePath + "/columnDefault", + parentData: data, + parentDataProperty: "columnDefault", + rootData + }))) { + vErrors = vErrors === null ? validate113.errors : vErrors.concat(validate113.errors); + errors = vErrors.length; + } + } + if (data.columnCount !== undefined) { + let data3 = data.columnCount; + if (!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) { + const err3 = { + instancePath: instancePath + "/columnCount", + schemaPath: "#/properties/columnCount/type", + keyword: "type", + params: { + type: "integer" + }, + message: "must be integer" + }; + if (vErrors === null) { + vErrors = [err3]; + } + else { + vErrors.push(err3); + } + errors++; + } + if ((typeof data3 == "number") && (isFinite(data3))) { + if (data3 < 1 || isNaN(data3)) { + const err4 = { + instancePath: instancePath + "/columnCount", + schemaPath: "#/properties/columnCount/minimum", + keyword: "minimum", + params: { + comparison: ">=", + limit: 1 + }, + message: "must be >= 1" + }; + if (vErrors === null) { + vErrors = [err4]; + } + else { + vErrors.push(err4); + } + errors++; + } + } + } + if (data.drawVerticalLine !== undefined) { + if (typeof data.drawVerticalLine != "function") { + const err5 = { + instancePath: instancePath + "/drawVerticalLine", + schemaPath: "#/properties/drawVerticalLine/typeof", + keyword: "typeof", + params: {}, + message: "must pass \"typeof\" keyword validation" + }; + if (vErrors === null) { + vErrors = [err5]; + } + else { + vErrors.push(err5); + } + errors++; + } + } + } + else { + const err6 = { + instancePath, + schemaPath: "#/type", + keyword: "type", + params: { + type: "object" + }, + message: "must be object" + }; + if (vErrors === null) { + vErrors = [err6]; + } + else { + vErrors.push(err6); + } + errors++; + } + validate86.errors = vErrors; + return errors === 0; +} +//# sourceMappingURL=validators.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/generated/validators.js.map b/node_modules/table/dist/src/generated/validators.js.map new file mode 100644 index 00000000..0436fc2e --- /dev/null +++ b/node_modules/table/dist/src/generated/validators.js.map @@ -0,0 +1 @@ +{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/generated/validators.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC;AACpC,MAAM,QAAQ,GAAG;IACb,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,yCAAyC;IACpD,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE;QACV,QAAQ,EAAE;YACN,MAAM,EAAE,kCAAkC;SAC7C;QACD,QAAQ,EAAE;YACN,MAAM,EAAE,QAAQ;YAChB,YAAY,EAAE;gBACV,SAAS,EAAE;oBACP,MAAM,EAAE,QAAQ;iBACnB;gBACD,WAAW,EAAE;oBACT,MAAM,EAAE,oCAAoC;iBAC/C;gBACD,UAAU,EAAE;oBACR,MAAM,EAAE,SAAS;iBACpB;gBACD,UAAU,EAAE;oBACR,MAAM,EAAE,SAAS;iBACpB;gBACD,aAAa,EAAE;oBACX,MAAM,EAAE,SAAS;iBACpB;gBACD,cAAc,EAAE;oBACZ,MAA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M,EAAE,CAAC;iBACZ;aACJ;SACJ;QACD,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE;YACrC,IAAI,OAAO,IAAI,CAAC,gBAAgB,IAAI,UAAU,EAAE;gBAC5C,MAAM,IAAI,GAAG;oBACT,YAAY,EAAE,YAAY,GAAG,mBAAmB;oBAChD,UAAU,EAAE,sCAAsC;oBAClD,OAAO,EAAE,QAAQ;oBACjB,MAAM,EAAE,EAAE;oBACV,OAAO,EAAE,yCAAyC;iBACrD,CAAC;gBACF,IAAI,OAAO,KAAK,IAAI,EAAE;oBAClB,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;iBACpB;qBAAM;oBACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACtB;gBACD,MAAM,EAAE,CAAC;aACZ;SACJ;KACJ;SAAM;QACH,MAAM,IAAI,GAAG;YACT,YAAY;YACZ,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,MAAM;YACf,MAAM,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACjB;YACD,OAAO,EAAE,gBAAgB;SAC5B,CAAC;QACF,IAAI,OAAO,KAAK,IAAI,EAAE;YAClB,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;SACpB;aAAM;YACH,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACtB;QACD,MAAM,EAAE,CAAC;KACZ;IACD,UAAU,CAAC,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,MAAM,KAAK,CAAC,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/node_modules/table/dist/src/getBorderCharacters.d.ts b/node_modules/table/dist/src/getBorderCharacters.d.ts new file mode 100644 index 00000000..334489bc --- /dev/null +++ b/node_modules/table/dist/src/getBorderCharacters.d.ts @@ -0,0 +1,2 @@ +import type { BorderConfig } from './types/api'; +export declare const getBorderCharacters: (name: string) => BorderConfig; diff --git a/node_modules/table/dist/src/getBorderCharacters.js b/node_modules/table/dist/src/getBorderCharacters.js new file mode 100644 index 00000000..24b2612c --- /dev/null +++ b/node_modules/table/dist/src/getBorderCharacters.js @@ -0,0 +1,105 @@ +"use strict"; +/* eslint-disable sort-keys-fix/sort-keys-fix */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getBorderCharacters = void 0; +const getBorderCharacters = (name) => { + if (name === 'honeywell') { + return { + topBody: '═', + topJoin: '╤', + topLeft: '╔', + topRight: '╗', + bottomBody: '═', + bottomJoin: '╧', + bottomLeft: '╚', + bottomRight: '╝', + bodyLeft: '║', + bodyRight: '║', + bodyJoin: '│', + headerJoin: '┬', + joinBody: '─', + joinLeft: '╟', + joinRight: '╢', + joinJoin: '┼', + joinMiddleDown: '┬', + joinMiddleUp: '┴', + joinMiddleLeft: '┤', + joinMiddleRight: '├', + }; + } + if (name === 'norc') { + return { + topBody: '─', + topJoin: '┬', + topLeft: '┌', + topRight: '┐', + bottomBody: '─', + bottomJoin: '┴', + bottomLeft: '└', + bottomRight: '┘', + bodyLeft: '│', + bodyRight: '│', + bodyJoin: '│', + headerJoin: '┬', + joinBody: '─', + joinLeft: '├', + joinRight: '┤', + joinJoin: '┼', + joinMiddleDown: '┬', + joinMiddleUp: '┴', + joinMiddleLeft: '┤', + joinMiddleRight: '├', + }; + } + if (name === 'ramac') { + return { + topBody: '-', + topJoin: '+', + topLeft: '+', + topRight: '+', + bottomBody: '-', + bottomJoin: '+', + bottomLeft: '+', + bottomRight: '+', + bodyLeft: '|', + bodyRight: '|', + bodyJoin: '|', + headerJoin: '+', + joinBody: '-', + joinLeft: '|', + joinRight: '|', + joinJoin: '|', + joinMiddleDown: '+', + joinMiddleUp: '+', + joinMiddleLeft: '+', + joinMiddleRight: '+', + }; + } + if (name === 'void') { + return { + topBody: '', + topJoin: '', + topLeft: '', + topRight: '', + bottomBody: '', + bottomJoin: '', + bottomLeft: '', + bottomRight: '', + bodyLeft: '', + bodyRight: '', + bodyJoin: '', + headerJoin: '', + joinBody: '', + joinLeft: '', + joinRight: '', + joinJoin: '', + joinMiddleDown: '', + joinMiddleUp: '', + joinMiddleLeft: '', + joinMiddleRight: '', + }; + } + throw new Error('Unknown border template "' + name + '".'); +}; +exports.getBorderCharacters = getBorderCharacters; +//# sourceMappingURL=getBorderCharacters.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/getBorderCharacters.js.map b/node_modules/table/dist/src/getBorderCharacters.js.map new file mode 100644 index 00000000..848b993e --- /dev/null +++ b/node_modules/table/dist/src/getBorderCharacters.js.map @@ -0,0 +1 @@ +{"version":3,"file":"getBorderCharacters.js","sourceRoot":"","sources":["../../src/getBorderCharacters.ts"],"names":[],"mappings":";AAAA,gDAAgD;;;AAMzC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAgB,EAAE;IAChE,IAAI,IAAI,KAAK,WAAW,EAAE;QACxB,OAAO;YACL,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,GAAG;YACZ,QAAQ,EAAE,GAAG;YAEb,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,GAAG;YACf,WAAW,EAAE,GAAG;YAEhB,QAAQ,EAAE,GAAG;YACb,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,GAAG;YACb,UAAU,EAAE,GAAG;YAEf,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,GAAG;YACb,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,GAAG;YACb,cAAc,EAAE,GAAG;YACnB,YAAY,EAAE,GAAG;YACjB,cAAc,EAAE,GAAG;YACnB,eAAe,EAAE,GAAG;SACrB,CAAC;KACH;IAED,IAAI,IAAI,KAAK,MAAM,EAAE;QACnB,OAAO;YACL,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,GAAG;YACZ,QAAQ,EAAE,GAAG;YAEb,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,GAAG;YACf,WAAW,EAA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E;YACZ,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,cAAc,EAAE,EAAE;YAClB,YAAY,EAAE,EAAE;YAChB,cAAc,EAAE,EAAE;YAClB,eAAe,EAAE,EAAE;SACpB,CAAC;KACH;IAED,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAC7D,CAAC,CAAC;AAlHW,QAAA,mBAAmB,uBAkH9B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/index.d.ts b/node_modules/table/dist/src/index.d.ts new file mode 100644 index 00000000..7ac2d57d --- /dev/null +++ b/node_modules/table/dist/src/index.d.ts @@ -0,0 +1,5 @@ +import { createStream } from './createStream'; +import { getBorderCharacters } from './getBorderCharacters'; +import { table } from './table'; +export { table, createStream, getBorderCharacters, }; +export * from './types/api'; diff --git a/node_modules/table/dist/src/index.js b/node_modules/table/dist/src/index.js new file mode 100644 index 00000000..6271ec68 --- /dev/null +++ b/node_modules/table/dist/src/index.js @@ -0,0 +1,21 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getBorderCharacters = exports.createStream = exports.table = void 0; +const createStream_1 = require("./createStream"); +Object.defineProperty(exports, "createStream", { enumerable: true, get: function () { return createStream_1.createStream; } }); +const getBorderCharacters_1 = require("./getBorderCharacters"); +Object.defineProperty(exports, "getBorderCharacters", { enumerable: true, get: function () { return getBorderCharacters_1.getBorderCharacters; } }); +const table_1 = require("./table"); +Object.defineProperty(exports, "table", { enumerable: true, get: function () { return table_1.table; } }); +__exportStar(require("./types/api"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/index.js.map b/node_modules/table/dist/src/index.js.map new file mode 100644 index 00000000..93443068 --- /dev/null +++ b/node_modules/table/dist/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iDAEwB;AAUtB,6FAXA,2BAAY,OAWA;AATd,+DAE+B;AAQ7B,oGATA,yCAAmB,OASA;AAPrB,mCAEiB;AAGf,sFAJA,aAAK,OAIA;AAKP,8CAA4B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/injectHeaderConfig.d.ts b/node_modules/table/dist/src/injectHeaderConfig.d.ts new file mode 100644 index 00000000..8acf7071 --- /dev/null +++ b/node_modules/table/dist/src/injectHeaderConfig.d.ts @@ -0,0 +1,3 @@ +import type { SpanningCellConfig, TableUserConfig } from './types/api'; +import type { Row } from './types/internal'; +export declare const injectHeaderConfig: (rows: Row[], config: TableUserConfig) => [Row[], SpanningCellConfig[]]; diff --git a/node_modules/table/dist/src/injectHeaderConfig.js b/node_modules/table/dist/src/injectHeaderConfig.js new file mode 100644 index 00000000..2e82d125 --- /dev/null +++ b/node_modules/table/dist/src/injectHeaderConfig.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.injectHeaderConfig = void 0; +const injectHeaderConfig = (rows, config) => { + var _a; + let spanningCellConfig = (_a = config.spanningCells) !== null && _a !== void 0 ? _a : []; + const headerConfig = config.header; + const adjustedRows = [...rows]; + if (headerConfig) { + spanningCellConfig = spanningCellConfig.map(({ row, ...rest }) => { + return { ...rest, + row: row + 1 }; + }); + const { content, ...headerStyles } = headerConfig; + spanningCellConfig.unshift({ alignment: 'center', + col: 0, + colSpan: rows[0].length, + paddingLeft: 1, + paddingRight: 1, + row: 0, + wrapWord: false, + ...headerStyles }); + adjustedRows.unshift([content, ...Array.from({ length: rows[0].length - 1 }).fill('')]); + } + return [adjustedRows, + spanningCellConfig]; +}; +exports.injectHeaderConfig = injectHeaderConfig; +//# sourceMappingURL=injectHeaderConfig.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/injectHeaderConfig.js.map b/node_modules/table/dist/src/injectHeaderConfig.js.map new file mode 100644 index 00000000..29eead97 --- /dev/null +++ b/node_modules/table/dist/src/injectHeaderConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"injectHeaderConfig.js","sourceRoot":"","sources":["../../src/injectHeaderConfig.ts"],"names":[],"mappings":";;;AAQO,MAAM,kBAAkB,GAAG,CAAC,IAAW,EAAE,MAAuB,EAAiC,EAAE;;IACxG,IAAI,kBAAkB,GAAG,MAAA,MAAM,CAAC,aAAa,mCAAI,EAAE,CAAC;IACpD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC;IACnC,MAAM,YAAY,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IAE/B,IAAI,YAAY,EAAE;QAChB,kBAAkB,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC,EAAC,GAAG,EAAE,GAAG,IAAI,EAAC,EAAE,EAAE;YAC7D,OAAO,EAAC,GAAG,IAAI;gBACb,GAAG,EAAE,GAAG,GAAG,CAAC,EAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,MAAM,EAAC,OAAO,EAAE,GAAG,YAAY,EAAC,GAAG,YAAY,CAAC;QAEhD,kBAAkB,CAAC,OAAO,CAAC,EAAC,SAAS,EAAE,QAAQ;YAC7C,GAAG,EAAE,CAAC;YACN,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM;YACvB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;YACf,GAAG,EAAE,CAAC;YACN,QAAQ,EAAE,KAAK;YACf,GAAG,YAAY,EAAC,CAAC,CAAC;QAEpB,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,IAAI,CAAS,EAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KAC/F;IAED,OAAO,CAAC,YAAY;QAClB,kBAAkB,CAAC,CAAC;AACxB,CAAC,CAAC;AA3BW,QAAA,kBAAkB,sBA2B7B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/makeRangeConfig.d.ts b/node_modules/table/dist/src/makeRangeConfig.d.ts new file mode 100644 index 00000000..b2d2c336 --- /dev/null +++ b/node_modules/table/dist/src/makeRangeConfig.d.ts @@ -0,0 +1,3 @@ +import type { SpanningCellConfig } from './types/api'; +import type { ColumnConfig, RangeConfig } from './types/internal'; +export declare const makeRangeConfig: (spanningCellConfig: SpanningCellConfig, columnsConfig: ColumnConfig[]) => RangeConfig; diff --git a/node_modules/table/dist/src/makeRangeConfig.js b/node_modules/table/dist/src/makeRangeConfig.js new file mode 100644 index 00000000..2acd824c --- /dev/null +++ b/node_modules/table/dist/src/makeRangeConfig.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeRangeConfig = void 0; +const utils_1 = require("./utils"); +const makeRangeConfig = (spanningCellConfig, columnsConfig) => { + var _a; + const { topLeft, bottomRight } = (0, utils_1.calculateRangeCoordinate)(spanningCellConfig); + const cellConfig = { + ...columnsConfig[topLeft.col], + ...spanningCellConfig, + paddingRight: (_a = spanningCellConfig.paddingRight) !== null && _a !== void 0 ? _a : columnsConfig[bottomRight.col].paddingRight, + }; + return { ...cellConfig, + bottomRight, + topLeft }; +}; +exports.makeRangeConfig = makeRangeConfig; +//# sourceMappingURL=makeRangeConfig.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/makeRangeConfig.js.map b/node_modules/table/dist/src/makeRangeConfig.js.map new file mode 100644 index 00000000..c37642ee --- /dev/null +++ b/node_modules/table/dist/src/makeRangeConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"makeRangeConfig.js","sourceRoot":"","sources":["../../src/makeRangeConfig.ts"],"names":[],"mappings":";;;AAMA,mCAEiB;AAEV,MAAM,eAAe,GAAG,CAAC,kBAAsC,EAAE,aAA6B,EAAe,EAAE;;IACpH,MAAM,EAAC,OAAO,EAAE,WAAW,EAAC,GAAG,IAAA,gCAAwB,EAAC,kBAAkB,CAAC,CAAC;IAE5E,MAAM,UAAU,GAA6B;QAC3C,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC;QAC7B,GAAG,kBAAkB;QACrB,YAAY,EACV,MAAA,kBAAkB,CAAC,YAAY,mCAC/B,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,YAAY;KAC9C,CAAC;IAEF,OAAO,EAAC,GAAG,UAAU;QACnB,WAAW;QACX,OAAO,EAAC,CAAC;AACb,CAAC,CAAC;AAdW,QAAA,eAAe,mBAc1B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/makeStreamConfig.d.ts b/node_modules/table/dist/src/makeStreamConfig.d.ts new file mode 100644 index 00000000..cdd1f045 --- /dev/null +++ b/node_modules/table/dist/src/makeStreamConfig.d.ts @@ -0,0 +1,7 @@ +import type { StreamUserConfig } from './types/api'; +import type { StreamConfig } from './types/internal'; +/** + * Makes a new configuration object out of the userConfig object + * using default values for the missing configuration properties. + */ +export declare const makeStreamConfig: (config: StreamUserConfig) => StreamConfig; diff --git a/node_modules/table/dist/src/makeStreamConfig.js b/node_modules/table/dist/src/makeStreamConfig.js new file mode 100644 index 00000000..227b5795 --- /dev/null +++ b/node_modules/table/dist/src/makeStreamConfig.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeStreamConfig = void 0; +const utils_1 = require("./utils"); +const validateConfig_1 = require("./validateConfig"); +/** + * Creates a configuration for every column using default + * values for the missing configuration properties. + */ +const makeColumnsConfig = (columnCount, columns = {}, columnDefault) => { + return Array.from({ length: columnCount }).map((_, index) => { + return { + alignment: 'left', + paddingLeft: 1, + paddingRight: 1, + truncate: Number.POSITIVE_INFINITY, + verticalAlignment: 'top', + wrapWord: false, + ...columnDefault, + ...columns[index], + }; + }); +}; +/** + * Makes a new configuration object out of the userConfig object + * using default values for the missing configuration properties. + */ +const makeStreamConfig = (config) => { + (0, validateConfig_1.validateConfig)('streamConfig.json', config); + if (config.columnDefault.width === undefined) { + throw new Error('Must provide config.columnDefault.width when creating a stream.'); + } + return { + drawVerticalLine: () => { + return true; + }, + ...config, + border: (0, utils_1.makeBorderConfig)(config.border), + columns: makeColumnsConfig(config.columnCount, config.columns, config.columnDefault), + }; +}; +exports.makeStreamConfig = makeStreamConfig; +//# sourceMappingURL=makeStreamConfig.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/makeStreamConfig.js.map b/node_modules/table/dist/src/makeStreamConfig.js.map new file mode 100644 index 00000000..715a3fe0 --- /dev/null +++ b/node_modules/table/dist/src/makeStreamConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"makeStreamConfig.js","sourceRoot":"","sources":["../../src/makeStreamConfig.ts"],"names":[],"mappings":";;;AASA,mCAEiB;AACjB,qDAE0B;AAE1B;;;GAGG;AACH,MAAM,iBAAiB,GAAG,CAAC,WAAmB,EAC5C,UAAuC,EAAE,EACzC,aAAgD,EAAkB,EAAE;IACpE,OAAO,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,WAAW,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;QACxD,OAAO;YACL,SAAS,EAAE,MAAM;YACjB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC,iBAAiB;YAClC,iBAAiB,EAAE,KAAK;YACxB,QAAQ,EAAE,KAAK;YACf,GAAG,aAAa;YAChB,GAAG,OAAO,CAAC,KAAK,CAAC;SAClB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;GAGG;AACI,MAAM,gBAAgB,GAAG,CAAC,MAAwB,EAAgB,EAAE;IACzE,IAAA,+BAAc,EAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IAE5C,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,KAAK,SAAS,EAAE;QAC5C,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;KACpF;IAED,OAAO;QACL,gBAAgB,EAAE,GAAG,EAAE;YACrB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,GAAG,MAAM;QACT,MAAM,EAAE,IAAA,wBAAgB,EAAC,MAAM,CAAC,MAAM,CAAC;QACvC,OAAO,EAAE,iBAAiB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,aAAa,CAAC;KACrF,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,gBAAgB,oBAe3B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/makeTableConfig.d.ts b/node_modules/table/dist/src/makeTableConfig.d.ts new file mode 100644 index 00000000..599c018e --- /dev/null +++ b/node_modules/table/dist/src/makeTableConfig.d.ts @@ -0,0 +1,7 @@ +import type { SpanningCellConfig, TableUserConfig } from './types/api'; +import type { Row, TableConfig } from './types/internal'; +/** + * Makes a new configuration object out of the userConfig object + * using default values for the missing configuration properties. + */ +export declare const makeTableConfig: (rows: Row[], config?: TableUserConfig, injectedSpanningCellConfig?: SpanningCellConfig[] | undefined) => TableConfig; diff --git a/node_modules/table/dist/src/makeTableConfig.js b/node_modules/table/dist/src/makeTableConfig.js new file mode 100644 index 00000000..8b858aea --- /dev/null +++ b/node_modules/table/dist/src/makeTableConfig.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeTableConfig = void 0; +const calculateMaximumColumnWidths_1 = require("./calculateMaximumColumnWidths"); +const spanningCellManager_1 = require("./spanningCellManager"); +const utils_1 = require("./utils"); +const validateConfig_1 = require("./validateConfig"); +const validateSpanningCellConfig_1 = require("./validateSpanningCellConfig"); +/** + * Creates a configuration for every column using default + * values for the missing configuration properties. + */ +const makeColumnsConfig = (rows, columns, columnDefault, spanningCellConfigs) => { + const columnWidths = (0, calculateMaximumColumnWidths_1.calculateMaximumColumnWidths)(rows, spanningCellConfigs); + return rows[0].map((_, columnIndex) => { + return { + alignment: 'left', + paddingLeft: 1, + paddingRight: 1, + truncate: Number.POSITIVE_INFINITY, + verticalAlignment: 'top', + width: columnWidths[columnIndex], + wrapWord: false, + ...columnDefault, + ...columns === null || columns === void 0 ? void 0 : columns[columnIndex], + }; + }); +}; +/** + * Makes a new configuration object out of the userConfig object + * using default values for the missing configuration properties. + */ +const makeTableConfig = (rows, config = {}, injectedSpanningCellConfig) => { + var _a, _b, _c, _d, _e; + (0, validateConfig_1.validateConfig)('config.json', config); + (0, validateSpanningCellConfig_1.validateSpanningCellConfig)(rows, (_a = config.spanningCells) !== null && _a !== void 0 ? _a : []); + const spanningCellConfigs = (_b = injectedSpanningCellConfig !== null && injectedSpanningCellConfig !== void 0 ? injectedSpanningCellConfig : config.spanningCells) !== null && _b !== void 0 ? _b : []; + const columnsConfig = makeColumnsConfig(rows, config.columns, config.columnDefault, spanningCellConfigs); + const drawVerticalLine = (_c = config.drawVerticalLine) !== null && _c !== void 0 ? _c : (() => { + return true; + }); + const drawHorizontalLine = (_d = config.drawHorizontalLine) !== null && _d !== void 0 ? _d : (() => { + return true; + }); + return { + ...config, + border: (0, utils_1.makeBorderConfig)(config.border), + columns: columnsConfig, + drawHorizontalLine, + drawVerticalLine, + singleLine: (_e = config.singleLine) !== null && _e !== void 0 ? _e : false, + spanningCellManager: (0, spanningCellManager_1.createSpanningCellManager)({ + columnsConfig, + drawHorizontalLine, + drawVerticalLine, + rows, + spanningCellConfigs, + }), + }; +}; +exports.makeTableConfig = makeTableConfig; +//# sourceMappingURL=makeTableConfig.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/makeTableConfig.js.map b/node_modules/table/dist/src/makeTableConfig.js.map new file mode 100644 index 00000000..11617bf6 --- /dev/null +++ b/node_modules/table/dist/src/makeTableConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"makeTableConfig.js","sourceRoot":"","sources":["../../src/makeTableConfig.ts"],"names":[],"mappings":";;;AAAA,iFAEwC;AACxC,+DAE+B;AAS/B,mCAEiB;AACjB,qDAE0B;AAC1B,6EAEsC;AAEtC;;;GAGG;AACH,MAAM,iBAAiB,GAAG,CAAC,IAAW,EACpC,OAAqC,EACrC,aAAgC,EAChC,mBAA0C,EAAkB,EAAE;IAC9D,MAAM,YAAY,GAAG,IAAA,2DAA4B,EAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;IAE7E,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE;QACpC,OAAO;YACL,SAAS,EAAE,MAAM;YACjB,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC,iBAAiB;YAClC,iBAAiB,EAAE,KAAK;YACxB,KAAK,EAAE,YAAY,CAAC,WAAW,CAAC;YAChC,QAAQ,EAAE,KAAK;YACf,GAAG,aAAa;YAChB,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,WAAW,CAAC;SAC1B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;GAGG;AAEI,MAAM,eAAe,GAAG,CAAC,IAAW,EAAE,SAA0B,EAAE,EAAE,0BAAiD,EAAe,EAAE;;IAC3I,IAAA,+BAAc,EAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACtC,IAAA,uDAA0B,EAAC,IAAI,EAAE,MAAA,MAAM,CAAC,aAAa,mCAAI,EAAE,CAAC,CAAC;IAE7D,MAAM,mBAAmB,GAAG,MAAA,0BAA0B,aAA1B,0BAA0B,cAA1B,0BAA0B,GAAI,MAAM,CAAC,aAAa,mCAAI,EAAE,CAAC;IAErF,MAAM,aAAa,GAAG,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC;IAEzG,MAAM,gBAAgB,GAAG,MAAA,MAAM,CAAC,gBAAgB,mCAAI,CAAC,GAAG,EAAE;QACxD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IACH,MAAM,kBAAkB,GAAG,MAAA,MAAM,CAAC,kBAAkB,mCAAI,CAAC,GAAG,EAAE;QAC5D,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,MAAM;QACT,MAAM,EAAE,IAAA,wBAAgB,EAAC,MAAM,CAAC,MAAM,CAAC;QACvC,OAAO,EAAE,aAAa;QACtB,kBAAkB;QAClB,gBAAgB;QAChB,UAAU,EAAE,MAAA,MAAM,CAAC,UAAU,mCAAI,KAAK;QACtC,mBAAmB,EAAE,IAAA,+CAAyB,EAAC;YAC7C,aAAa;YACb,kBAAkB;YAClB,gBAAgB;YAChB,IAAI;YACJ,mBAAmB;SACpB,CAAC;KACH,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,eAAe,mBA8B1B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/mapDataUsingRowHeights.d.ts b/node_modules/table/dist/src/mapDataUsingRowHeights.d.ts new file mode 100644 index 00000000..1508e905 --- /dev/null +++ b/node_modules/table/dist/src/mapDataUsingRowHeights.d.ts @@ -0,0 +1,4 @@ +import type { VerticalAlignment } from './types/api'; +import type { BaseConfig, Row } from './types/internal'; +export declare const padCellVertically: (lines: string[], rowHeight: number, verticalAlignment: VerticalAlignment) => string[]; +export declare const mapDataUsingRowHeights: (unmappedRows: Row[], rowHeights: number[], config: BaseConfig) => Row[]; diff --git a/node_modules/table/dist/src/mapDataUsingRowHeights.js b/node_modules/table/dist/src/mapDataUsingRowHeights.js new file mode 100644 index 00000000..c13003dc --- /dev/null +++ b/node_modules/table/dist/src/mapDataUsingRowHeights.js @@ -0,0 +1,52 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mapDataUsingRowHeights = exports.padCellVertically = void 0; +const utils_1 = require("./utils"); +const wrapCell_1 = require("./wrapCell"); +const createEmptyStrings = (length) => { + return new Array(length).fill(''); +}; +const padCellVertically = (lines, rowHeight, verticalAlignment) => { + const availableLines = rowHeight - lines.length; + if (verticalAlignment === 'top') { + return [...lines, ...createEmptyStrings(availableLines)]; + } + if (verticalAlignment === 'bottom') { + return [...createEmptyStrings(availableLines), ...lines]; + } + return [ + ...createEmptyStrings(Math.floor(availableLines / 2)), + ...lines, + ...createEmptyStrings(Math.ceil(availableLines / 2)), + ]; +}; +exports.padCellVertically = padCellVertically; +const mapDataUsingRowHeights = (unmappedRows, rowHeights, config) => { + const nColumns = unmappedRows[0].length; + const mappedRows = unmappedRows.map((unmappedRow, unmappedRowIndex) => { + const outputRowHeight = rowHeights[unmappedRowIndex]; + const outputRow = Array.from({ length: outputRowHeight }, () => { + return new Array(nColumns).fill(''); + }); + unmappedRow.forEach((cell, cellIndex) => { + var _a; + const containingRange = (_a = config.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, + row: unmappedRowIndex }); + if (containingRange) { + containingRange.extractCellContent(unmappedRowIndex).forEach((cellLine, cellLineIndex) => { + outputRow[cellLineIndex][cellIndex] = cellLine; + }); + return; + } + const cellLines = (0, wrapCell_1.wrapCell)(cell, config.columns[cellIndex].width, config.columns[cellIndex].wrapWord); + const paddedCellLines = (0, exports.padCellVertically)(cellLines, outputRowHeight, config.columns[cellIndex].verticalAlignment); + paddedCellLines.forEach((cellLine, cellLineIndex) => { + outputRow[cellLineIndex][cellIndex] = cellLine; + }); + }); + return outputRow; + }); + return (0, utils_1.flatten)(mappedRows); +}; +exports.mapDataUsingRowHeights = mapDataUsingRowHeights; +//# sourceMappingURL=mapDataUsingRowHeights.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/mapDataUsingRowHeights.js.map b/node_modules/table/dist/src/mapDataUsingRowHeights.js.map new file mode 100644 index 00000000..7bbe0f86 --- /dev/null +++ b/node_modules/table/dist/src/mapDataUsingRowHeights.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapDataUsingRowHeights.js","sourceRoot":"","sources":["../../src/mapDataUsingRowHeights.ts"],"names":[],"mappings":";;;AAOA,mCAEiB;AACjB,yCAEoB;AAEpB,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC5C,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAAC,KAAe,EAAE,SAAiB,EAAE,iBAAoC,EAAY,EAAE;IACtH,MAAM,cAAc,GAAG,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC;IAEhD,IAAI,iBAAiB,KAAK,KAAK,EAAE;QAC/B,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC;KAC1D;IAED,IAAI,iBAAiB,KAAK,QAAQ,EAAE;QAClC,OAAO,CAAC,GAAG,kBAAkB,CAAC,cAAc,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC;KAC1D;IAED,OAAO;QACL,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;QACrD,GAAG,KAAK;QACR,GAAG,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;KACrD,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,iBAAiB,qBAgB5B;AAEK,MAAM,sBAAsB,GAAG,CAAC,YAAmB,EAAE,UAAoB,EAAE,MAAkB,EAAS,EAAE;IAC7G,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAExC,MAAM,UAAU,GAAG,YAAY,C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AAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,OAAO,IAAA,eAAO,EAAC,UAAU,CAAC,CAAC;AAC7B,CAAC,CAAC;AAhCW,QAAA,sBAAsB,0BAgCjC"} \ No newline at end of file diff --git a/node_modules/table/dist/src/padTableData.d.ts b/node_modules/table/dist/src/padTableData.d.ts new file mode 100644 index 00000000..6bb73366 --- /dev/null +++ b/node_modules/table/dist/src/padTableData.d.ts @@ -0,0 +1,3 @@ +import type { BaseConfig, Row } from './types/internal'; +export declare const padString: (input: string, paddingLeft: number, paddingRight: number) => string; +export declare const padTableData: (rows: Row[], config: BaseConfig) => Row[]; diff --git a/node_modules/table/dist/src/padTableData.js b/node_modules/table/dist/src/padTableData.js new file mode 100644 index 00000000..38580f82 --- /dev/null +++ b/node_modules/table/dist/src/padTableData.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.padTableData = exports.padString = void 0; +const padString = (input, paddingLeft, paddingRight) => { + return ' '.repeat(paddingLeft) + input + ' '.repeat(paddingRight); +}; +exports.padString = padString; +const padTableData = (rows, config) => { + return rows.map((cells, rowIndex) => { + return cells.map((cell, cellIndex) => { + var _a; + const containingRange = (_a = config.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, + row: rowIndex }, { mapped: true }); + if (containingRange) { + return cell; + } + const { paddingLeft, paddingRight } = config.columns[cellIndex]; + return (0, exports.padString)(cell, paddingLeft, paddingRight); + }); + }); +}; +exports.padTableData = padTableData; +//# sourceMappingURL=padTableData.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/padTableData.js.map b/node_modules/table/dist/src/padTableData.js.map new file mode 100644 index 00000000..2cf9c94c --- /dev/null +++ b/node_modules/table/dist/src/padTableData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"padTableData.js","sourceRoot":"","sources":["../../src/padTableData.ts"],"names":[],"mappings":";;;AAKO,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,WAAmB,EAAE,YAAoB,EAAU,EAAE;IAC5F,OAAO,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACpE,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEK,MAAM,YAAY,GAAG,CAAC,IAAW,EAAE,MAAkB,EAAS,EAAE;IACrE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;QAClC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE;;YACnC,MAAM,eAAe,GAAG,MAAA,MAAM,CAAC,mBAAmB,0CAAE,kBAAkB,CAAC,EAAC,GAAG,EAAE,SAAS;gBACpF,GAAG,EAAE,QAAQ,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;YAClC,IAAI,eAAe,EAAE;gBACnB,OAAO,IAAI,CAAC;aACb;YAED,MAAM,EAAC,WAAW,EAAE,YAAY,EAAC,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAE9D,OAAO,IAAA,iBAAS,EAAC,IAAI,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAdW,QAAA,YAAY,gBAcvB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/schemas/config.json b/node_modules/table/dist/src/schemas/config.json new file mode 100644 index 00000000..cccb5ac1 --- /dev/null +++ b/node_modules/table/dist/src/schemas/config.json @@ -0,0 +1,95 @@ +{ + "$id": "config.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "shared.json#/definitions/borders" + }, + "header": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "alignment": { + "$ref": "shared.json#/definitions/alignment" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "integer" + }, + "paddingLeft": { + "type": "integer" + }, + "paddingRight": { + "type": "integer" + } + }, + "required": ["content"], + "additionalProperties": false + }, + "columns": { + "$ref": "shared.json#/definitions/columns" + }, + "columnDefault": { + "$ref": "shared.json#/definitions/column" + }, + "drawVerticalLine": { + "typeof": "function" + }, + "drawHorizontalLine": { + "typeof": "function" + }, + "singleLine": { + "typeof": "boolean" + }, + "spanningCells": { + "type": "array", + "items": { + "type": "object", + "properties": { + "col": { + "type": "integer", + "minimum": 0 + }, + "row": { + "type": "integer", + "minimum": 0 + }, + "colSpan": { + "type": "integer", + "minimum": 1 + }, + "rowSpan": { + "type": "integer", + "minimum": 1 + }, + "alignment": { + "$ref": "shared.json#/definitions/alignment" + }, + "verticalAlignment": { + "$ref": "shared.json#/definitions/verticalAlignment" + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "integer" + }, + "paddingLeft": { + "type": "integer" + }, + "paddingRight": { + "type": "integer" + } + }, + "required": ["row", "col"], + "additionalProperties": false + } + } + }, + "additionalProperties": false +} diff --git a/node_modules/table/dist/src/schemas/shared.json b/node_modules/table/dist/src/schemas/shared.json new file mode 100644 index 00000000..52a2d3a6 --- /dev/null +++ b/node_modules/table/dist/src/schemas/shared.json @@ -0,0 +1,139 @@ +{ + "$id": "shared.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "columns": { + "oneOf": [ + { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/column" + } + }, + "additionalProperties": false + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/column" + } + } + ] + }, + "column": { + "type": "object", + "properties": { + "alignment": { + "$ref": "#/definitions/alignment" + }, + "verticalAlignment": { + "$ref": "#/definitions/verticalAlignment" + }, + "width": { + "type": "integer", + "minimum": 1 + }, + "wrapWord": { + "type": "boolean" + }, + "truncate": { + "type": "integer" + }, + "paddingLeft": { + "type": "integer" + }, + "paddingRight": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "borders": { + "type": "object", + "properties": { + "topBody": { + "$ref": "#/definitions/border" + }, + "topJoin": { + "$ref": "#/definitions/border" + }, + "topLeft": { + "$ref": "#/definitions/border" + }, + "topRight": { + "$ref": "#/definitions/border" + }, + "bottomBody": { + "$ref": "#/definitions/border" + }, + "bottomJoin": { + "$ref": "#/definitions/border" + }, + "bottomLeft": { + "$ref": "#/definitions/border" + }, + "bottomRight": { + "$ref": "#/definitions/border" + }, + "bodyLeft": { + "$ref": "#/definitions/border" + }, + "bodyRight": { + "$ref": "#/definitions/border" + }, + "bodyJoin": { + "$ref": "#/definitions/border" + }, + "headerJoin": { + "$ref": "#/definitions/border" + }, + "joinBody": { + "$ref": "#/definitions/border" + }, + "joinLeft": { + "$ref": "#/definitions/border" + }, + "joinRight": { + "$ref": "#/definitions/border" + }, + "joinJoin": { + "$ref": "#/definitions/border" + }, + "joinMiddleUp": { + "$ref": "#/definitions/border" + }, + "joinMiddleDown": { + "$ref": "#/definitions/border" + }, + "joinMiddleLeft": { + "$ref": "#/definitions/border" + }, + "joinMiddleRight": { + "$ref": "#/definitions/border" + } + }, + "additionalProperties": false + }, + "border": { + "type": "string" + }, + "alignment": { + "type": "string", + "enum": [ + "left", + "right", + "center", + "justify" + ] + }, + "verticalAlignment": { + "type": "string", + "enum": [ + "top", + "middle", + "bottom" + ] + } + } +} diff --git a/node_modules/table/dist/src/schemas/streamConfig.json b/node_modules/table/dist/src/schemas/streamConfig.json new file mode 100644 index 00000000..94d35140 --- /dev/null +++ b/node_modules/table/dist/src/schemas/streamConfig.json @@ -0,0 +1,25 @@ +{ + "$id": "streamConfig.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "border": { + "$ref": "shared.json#/definitions/borders" + }, + "columns": { + "$ref": "shared.json#/definitions/columns" + }, + "columnDefault": { + "$ref": "shared.json#/definitions/column" + }, + "columnCount": { + "type": "integer", + "minimum": 1 + }, + "drawVerticalLine": { + "typeof": "function" + } + }, + "required": ["columnDefault", "columnCount"], + "additionalProperties": false +} diff --git a/node_modules/table/dist/src/spanningCellManager.d.ts b/node_modules/table/dist/src/spanningCellManager.d.ts new file mode 100644 index 00000000..a865f6a0 --- /dev/null +++ b/node_modules/table/dist/src/spanningCellManager.d.ts @@ -0,0 +1,21 @@ +import type { DrawHorizontalLine, DrawVerticalLine, SpanningCellConfig } from './types/api'; +import type { CellCoordinates, ColumnConfig, ResolvedRangeConfig, Row } from './types/internal'; +export declare type SpanningCellManager = { + getContainingRange: (cell: CellCoordinates, options?: { + mapped: true; + }) => ResolvedRangeConfig | undefined; + inSameRange: (cell1: CellCoordinates, cell2: CellCoordinates) => boolean; + rowHeights: number[]; + setRowHeights: (rowHeights: number[]) => void; +}; +export declare type SpanningCellParameters = { + spanningCellConfigs: SpanningCellConfig[]; + rows: Row[]; + columnsConfig: ColumnConfig[]; + drawVerticalLine: DrawVerticalLine; + drawHorizontalLine: DrawHorizontalLine; +}; +export declare type SpanningCellContext = SpanningCellParameters & { + rowHeights: number[]; +}; +export declare const createSpanningCellManager: (parameters: SpanningCellParameters) => SpanningCellManager; diff --git a/node_modules/table/dist/src/spanningCellManager.js b/node_modules/table/dist/src/spanningCellManager.js new file mode 100644 index 00000000..d74345dd --- /dev/null +++ b/node_modules/table/dist/src/spanningCellManager.js @@ -0,0 +1,86 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSpanningCellManager = void 0; +const alignSpanningCell_1 = require("./alignSpanningCell"); +const calculateSpanningCellWidth_1 = require("./calculateSpanningCellWidth"); +const makeRangeConfig_1 = require("./makeRangeConfig"); +const utils_1 = require("./utils"); +const findRangeConfig = (cell, rangeConfigs) => { + return rangeConfigs.find((rangeCoordinate) => { + return (0, utils_1.isCellInRange)(cell, rangeCoordinate); + }); +}; +const getContainingRange = (rangeConfig, context) => { + const width = (0, calculateSpanningCellWidth_1.calculateSpanningCellWidth)(rangeConfig, context); + const wrappedContent = (0, alignSpanningCell_1.wrapRangeContent)(rangeConfig, width, context); + const alignedContent = (0, alignSpanningCell_1.alignVerticalRangeContent)(rangeConfig, wrappedContent, context); + const getCellContent = (rowIndex) => { + const { topLeft } = rangeConfig; + const { drawHorizontalLine, rowHeights } = context; + const totalWithinHorizontalBorderHeight = rowIndex - topLeft.row; + const totalHiddenHorizontalBorderHeight = (0, utils_1.sequence)(topLeft.row + 1, rowIndex).filter((index) => { + /* istanbul ignore next */ + return !(drawHorizontalLine === null || drawHorizontalLine === void 0 ? void 0 : drawHorizontalLine(index, rowHeights.length)); + }).length; + const offset = (0, utils_1.sumArray)(rowHeights.slice(topLeft.row, rowIndex)) + totalWithinHorizontalBorderHeight - totalHiddenHorizontalBorderHeight; + return alignedContent.slice(offset, offset + rowHeights[rowIndex]); + }; + const getBorderContent = (borderIndex) => { + const { topLeft } = rangeConfig; + const offset = (0, utils_1.sumArray)(context.rowHeights.slice(topLeft.row, borderIndex)) + (borderIndex - topLeft.row - 1); + return alignedContent[offset]; + }; + return { + ...rangeConfig, + extractBorderContent: getBorderContent, + extractCellContent: getCellContent, + height: wrappedContent.length, + width, + }; +}; +const inSameRange = (cell1, cell2, ranges) => { + const range1 = findRangeConfig(cell1, ranges); + const range2 = findRangeConfig(cell2, ranges); + if (range1 && range2) { + return (0, utils_1.areCellEqual)(range1.topLeft, range2.topLeft); + } + return false; +}; +const hashRange = (range) => { + const { row, col } = range.topLeft; + return `${row}/${col}`; +}; +const createSpanningCellManager = (parameters) => { + const { spanningCellConfigs, columnsConfig } = parameters; + const ranges = spanningCellConfigs.map((config) => { + return (0, makeRangeConfig_1.makeRangeConfig)(config, columnsConfig); + }); + const rangeCache = {}; + let rowHeights = []; + return { getContainingRange: (cell, options) => { + var _a; + const originalRow = (options === null || options === void 0 ? void 0 : options.mapped) ? (0, utils_1.findOriginalRowIndex)(rowHeights, cell.row) : cell.row; + const range = findRangeConfig({ ...cell, + row: originalRow }, ranges); + if (!range) { + return undefined; + } + if (rowHeights.length === 0) { + return getContainingRange(range, { ...parameters, + rowHeights }); + } + const hash = hashRange(range); + (_a = rangeCache[hash]) !== null && _a !== void 0 ? _a : (rangeCache[hash] = getContainingRange(range, { ...parameters, + rowHeights })); + return rangeCache[hash]; + }, + inSameRange: (cell1, cell2) => { + return inSameRange(cell1, cell2, ranges); + }, + rowHeights, + setRowHeights: (_rowHeights) => { + rowHeights = _rowHeights; + } }; +}; +exports.createSpanningCellManager = createSpanningCellManager; +//# sourceMappingURL=spanningCellManager.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/spanningCellManager.js.map b/node_modules/table/dist/src/spanningCellManager.js.map new file mode 100644 index 00000000..4c58a5da --- /dev/null +++ b/node_modules/table/dist/src/spanningCellManager.js.map @@ -0,0 +1 @@ +{"version":3,"file":"spanningCellManager.js","sourceRoot":"","sources":["../../src/spanningCellManager.ts"],"names":[],"mappings":";;;AAAA,2DAE6B;AAC7B,6EAEsC;AACtC,uDAE2B;AAa3B,mCAIiB;AAqBjB,MAAM,eAAe,GAAG,CAAC,IAAqB,EAAE,YAA2B,EAA2B,EAAE;IACtG,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;QAC3C,OAAO,IAAA,qBAAa,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,WAAwB,EAAE,OAA4B,EAAmC,EAAE;IACrH,MAAM,KAAK,GAAG,IAAA,uDAA0B,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAE/D,MAAM,cAAc,GAAG,IAAA,oCAAgB,EAAC,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAErE,MAAM,cAAc,GAAG,IAAA,6CAAyB,EAAC,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAEvF,MAAM,cAAc,GAAG,CAAC,QAAgB,EAAE,EAAE;QAC1C,MAAM,EAAC,OAAO,EAAC,GA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AI;gBACpC,GAAG,EAAE,WAAW,EAAC,EAAE,MAAM,CAAC,CAAC;YAC7B,IAAI,CAAC,KAAK,EAAE;gBACV,OAAO,SAAS,CAAC;aAClB;YAED,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC3B,OAAO,kBAAkB,CAAC,KAAK,EAAE,EAAC,GAAG,UAAU;oBAC7C,UAAU,EAAC,CAAC,CAAC;aAChB;YAED,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;YAC9B,MAAA,UAAU,CAAC,IAAI,qCAAf,UAAU,CAAC,IAAI,IAAM,kBAAkB,CAAC,KAAK,EAAE,EAAC,GAAG,UAAU;gBAC3D,UAAU,EAAC,CAAC,EAAC;YAEf,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QACD,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC5B,OAAO,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC;QACD,UAAU;QACV,aAAa,EAAE,CAAC,WAAqB,EAAE,EAAE;YACvC,UAAU,GAAG,WAAW,CAAC;QAC3B,CAAC,EAAC,CAAC;AACL,CAAC,CAAC;AArCW,QAAA,yBAAyB,6BAqCpC"} \ No newline at end of file diff --git a/node_modules/table/dist/src/stringifyTableData.d.ts b/node_modules/table/dist/src/stringifyTableData.d.ts new file mode 100644 index 00000000..5c1270be --- /dev/null +++ b/node_modules/table/dist/src/stringifyTableData.d.ts @@ -0,0 +1,2 @@ +import type { Row } from './types/internal'; +export declare const stringifyTableData: (rows: unknown[][]) => Row[]; diff --git a/node_modules/table/dist/src/stringifyTableData.js b/node_modules/table/dist/src/stringifyTableData.js new file mode 100644 index 00000000..177141ac --- /dev/null +++ b/node_modules/table/dist/src/stringifyTableData.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stringifyTableData = void 0; +const utils_1 = require("./utils"); +const stringifyTableData = (rows) => { + return rows.map((cells) => { + return cells.map((cell) => { + return (0, utils_1.normalizeString)(String(cell)); + }); + }); +}; +exports.stringifyTableData = stringifyTableData; +//# sourceMappingURL=stringifyTableData.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/stringifyTableData.js.map b/node_modules/table/dist/src/stringifyTableData.js.map new file mode 100644 index 00000000..84a4b125 --- /dev/null +++ b/node_modules/table/dist/src/stringifyTableData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"stringifyTableData.js","sourceRoot":"","sources":["../../src/stringifyTableData.ts"],"names":[],"mappings":";;;AAGA,mCAEiB;AAEV,MAAM,kBAAkB,GAAG,CAAC,IAAiB,EAAS,EAAE;IAC7D,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACxB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YACxB,OAAO,IAAA,uBAAe,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AANW,QAAA,kBAAkB,sBAM7B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/table.d.ts b/node_modules/table/dist/src/table.d.ts new file mode 100644 index 00000000..db1b3970 --- /dev/null +++ b/node_modules/table/dist/src/table.d.ts @@ -0,0 +1,2 @@ +import type { TableUserConfig } from './types/api'; +export declare const table: (data: unknown[][], userConfig?: TableUserConfig) => string; diff --git a/node_modules/table/dist/src/table.js b/node_modules/table/dist/src/table.js new file mode 100644 index 00000000..0a862272 --- /dev/null +++ b/node_modules/table/dist/src/table.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.table = void 0; +const alignTableData_1 = require("./alignTableData"); +const calculateOutputColumnWidths_1 = require("./calculateOutputColumnWidths"); +const calculateRowHeights_1 = require("./calculateRowHeights"); +const drawTable_1 = require("./drawTable"); +const injectHeaderConfig_1 = require("./injectHeaderConfig"); +const makeTableConfig_1 = require("./makeTableConfig"); +const mapDataUsingRowHeights_1 = require("./mapDataUsingRowHeights"); +const padTableData_1 = require("./padTableData"); +const stringifyTableData_1 = require("./stringifyTableData"); +const truncateTableData_1 = require("./truncateTableData"); +const utils_1 = require("./utils"); +const validateTableData_1 = require("./validateTableData"); +const table = (data, userConfig = {}) => { + (0, validateTableData_1.validateTableData)(data); + let rows = (0, stringifyTableData_1.stringifyTableData)(data); + const [injectedRows, injectedSpanningCellConfig] = (0, injectHeaderConfig_1.injectHeaderConfig)(rows, userConfig); + const config = (0, makeTableConfig_1.makeTableConfig)(injectedRows, userConfig, injectedSpanningCellConfig); + rows = (0, truncateTableData_1.truncateTableData)(injectedRows, (0, utils_1.extractTruncates)(config)); + const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config); + config.spanningCellManager.setRowHeights(rowHeights); + rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config); + rows = (0, alignTableData_1.alignTableData)(rows, config); + rows = (0, padTableData_1.padTableData)(rows, config); + const outputColumnWidths = (0, calculateOutputColumnWidths_1.calculateOutputColumnWidths)(config); + return (0, drawTable_1.drawTable)(rows, outputColumnWidths, rowHeights, config); +}; +exports.table = table; +//# sourceMappingURL=table.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/table.js.map b/node_modules/table/dist/src/table.js.map new file mode 100644 index 00000000..bb03676b --- /dev/null +++ b/node_modules/table/dist/src/table.js.map @@ -0,0 +1 @@ +{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/table.ts"],"names":[],"mappings":";;;AAAA,qDAE0B;AAC1B,+EAEuC;AACvC,+DAE+B;AAC/B,2CAEqB;AACrB,6DAE8B;AAC9B,uDAE2B;AAC3B,qEAEkC;AAClC,iDAEwB;AACxB,6DAE8B;AAC9B,2DAE6B;AAI7B,mCAEiB;AACjB,2DAE6B;AAEtB,MAAM,KAAK,GAAG,CAAC,IAAiB,EAAE,aAA8B,EAAE,EAAU,EAAE;IACnF,IAAA,qCAAiB,EAAC,IAAI,CAAC,CAAC;IAExB,IAAI,IAAI,GAAG,IAAA,uCAAkB,EAAC,IAAI,CAAC,CAAC;IAEpC,MAAM,CAAC,YAAY,EAAE,0BAA0B,CAAC,GAAG,IAAA,uCAAkB,EAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAExF,MAAM,MAAM,GAAG,IAAA,iCAAe,EAAC,YAAY,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC;IAErF,IAAI,GAAG,IAAA,qCAAiB,EAAC,YAAY,EAAE,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC,CAAC;IAEjE,MAAM,UAAU,GAAG,IAAA,yCAAmB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAErD,MAAM,CAAC,mBAAmB,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAErD,IAAI,GAAG,IAAA,+CAAsB,EAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACxD,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACpC,IAAI,GAAG,IAAA,2BAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAElC,MAAM,kBAAkB,GAAG,IAAA,yDAA2B,EAAC,MAAM,CAAC,CAAC;IAE/D,OAAO,IAAA,qBAAS,EAAC,IAAI,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;AACjE,CAAC,CAAC;AAtBW,QAAA,KAAK,SAsBhB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/truncateTableData.d.ts b/node_modules/table/dist/src/truncateTableData.d.ts new file mode 100644 index 00000000..e88e1ad5 --- /dev/null +++ b/node_modules/table/dist/src/truncateTableData.d.ts @@ -0,0 +1,6 @@ +import type { Row } from './types/internal'; +export declare const truncateString: (input: string, length: number) => string; +/** + * @todo Make it work with ASCII content. + */ +export declare const truncateTableData: (rows: Row[], truncates: number[]) => Row[]; diff --git a/node_modules/table/dist/src/truncateTableData.js b/node_modules/table/dist/src/truncateTableData.js new file mode 100644 index 00000000..1f7980fd --- /dev/null +++ b/node_modules/table/dist/src/truncateTableData.js @@ -0,0 +1,24 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.truncateTableData = exports.truncateString = void 0; +const lodash_truncate_1 = __importDefault(require("lodash.truncate")); +const truncateString = (input, length) => { + return (0, lodash_truncate_1.default)(input, { length, + omission: '…' }); +}; +exports.truncateString = truncateString; +/** + * @todo Make it work with ASCII content. + */ +const truncateTableData = (rows, truncates) => { + return rows.map((cells) => { + return cells.map((cell, cellIndex) => { + return (0, exports.truncateString)(cell, truncates[cellIndex]); + }); + }); +}; +exports.truncateTableData = truncateTableData; +//# sourceMappingURL=truncateTableData.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/truncateTableData.js.map b/node_modules/table/dist/src/truncateTableData.js.map new file mode 100644 index 00000000..921869f6 --- /dev/null +++ b/node_modules/table/dist/src/truncateTableData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"truncateTableData.js","sourceRoot":"","sources":["../../src/truncateTableData.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAuC;AAKhC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,MAAc,EAAU,EAAE;IACtE,OAAO,IAAA,yBAAQ,EAAC,KAAK,EAAE,EAAC,MAAM;QAC5B,QAAQ,EAAE,GAAG,EAAC,CAAC,CAAC;AACpB,CAAC,CAAC;AAHW,QAAA,cAAc,kBAGzB;AAEF;;GAEG;AACI,MAAM,iBAAiB,GAAG,CAAC,IAAW,EAAE,SAAmB,EAAS,EAAE;IAC3E,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACxB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE;YACnC,OAAO,IAAA,sBAAc,EAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/types/api.d.ts b/node_modules/table/dist/src/types/api.d.ts new file mode 100644 index 00000000..f76c51e0 --- /dev/null +++ b/node_modules/table/dist/src/types/api.d.ts @@ -0,0 +1,130 @@ +export declare type DrawLinePredicate = (index: number, size: number) => boolean; +export declare type DrawVerticalLine = DrawLinePredicate; +export declare type DrawHorizontalLine = DrawLinePredicate; +export declare type BorderUserConfig = { + readonly topLeft?: string; + readonly topRight?: string; + readonly topBody?: string; + readonly topJoin?: string; + readonly bottomLeft?: string; + readonly bottomRight?: string; + readonly bottomBody?: string; + readonly bottomJoin?: string; + readonly joinLeft?: string; + readonly joinRight?: string; + readonly joinBody?: string; + readonly joinJoin?: string; + readonly joinMiddleUp?: string; + readonly joinMiddleDown?: string; + readonly joinMiddleLeft?: string; + readonly joinMiddleRight?: string; + readonly headerJoin?: string; + readonly bodyRight?: string; + readonly bodyLeft?: string; + readonly bodyJoin?: string; +}; +export declare type BorderConfig = Required; +export declare type Alignment = 'center' | 'justify' | 'left' | 'right'; +export declare type VerticalAlignment = 'bottom' | 'middle' | 'top'; +export declare type CellUserConfig = { + /** + * Cell content horizontal alignment (default: left) + */ + readonly alignment?: Alignment; + /** + * Cell content vertical alignment (default: top) + */ + readonly verticalAlignment?: VerticalAlignment; + /** + * Number of characters are which the content will be truncated (default: Infinity) + */ + readonly truncate?: number; + /** + * Cell content padding width left (default: 1) + */ + readonly paddingLeft?: number; + /** + * Cell content padding width right (default: 1) + */ + readonly paddingRight?: number; + /** + * If true, the text is broken at the nearest space or one of the special characters: "\|/_.,;-" + */ + readonly wrapWord?: boolean; +}; +export declare type ColumnUserConfig = CellUserConfig & { + /** + * Column width (default: auto calculation based on the cell content) + */ + readonly width?: number; +}; +/** + * @deprecated Use spanning cell API instead + */ +export declare type HeaderUserConfig = Omit & { + readonly content: string; +}; +export declare type BaseUserConfig = { + /** + * Custom border + */ + readonly border?: BorderUserConfig; + /** + * Default values for all columns. Column specific settings overwrite the default values. + */ + readonly columnDefault?: ColumnUserConfig; + /** + * Column specific configuration. + */ + readonly columns?: Indexable; + /** + * Used to tell whether to draw a vertical line. + * This callback is called for each non-content line of the table. + * The default behavior is to always return true. + */ + readonly drawVerticalLine?: DrawVerticalLine; +}; +export declare type TableUserConfig = BaseUserConfig & { + /** + * The header configuration + */ + readonly header?: HeaderUserConfig; + /** + * Used to tell whether to draw a horizontal line. + * This callback is called for each non-content line of the table. + * The default behavior is to always return true. + */ + readonly drawHorizontalLine?: DrawHorizontalLine; + /** + * Horizontal lines inside the table are not drawn. + */ + readonly singleLine?: boolean; + readonly spanningCells?: SpanningCellConfig[]; +}; +export declare type SpanningCellConfig = CellUserConfig & { + readonly row: number; + readonly col: number; + readonly rowSpan?: number; + readonly colSpan?: number; +}; +export declare type StreamUserConfig = BaseUserConfig & { + /** + * The number of columns + */ + readonly columnCount: number; + /** + * Default values for all columns. Column specific settings overwrite the default values. + */ + readonly columnDefault: ColumnUserConfig & { + /** + * The default width for each column + */ + readonly width: number; + }; +}; +export declare type WritableStream = { + readonly write: (rows: string[]) => void; +}; +export declare type Indexable = { + readonly [index: number]: T; +}; diff --git a/node_modules/table/dist/src/types/api.js b/node_modules/table/dist/src/types/api.js new file mode 100644 index 00000000..57bf49a1 --- /dev/null +++ b/node_modules/table/dist/src/types/api.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=api.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/types/api.js.map b/node_modules/table/dist/src/types/api.js.map new file mode 100644 index 00000000..f396fdb6 --- /dev/null +++ b/node_modules/table/dist/src/types/api.js.map @@ -0,0 +1 @@ +{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/types/api.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/table/dist/src/types/internal.d.ts b/node_modules/table/dist/src/types/internal.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/node_modules/table/dist/src/types/internal.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/table/dist/src/types/internal.js b/node_modules/table/dist/src/types/internal.js new file mode 100644 index 00000000..f8a3d3e7 --- /dev/null +++ b/node_modules/table/dist/src/types/internal.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=internal.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/types/internal.js.map b/node_modules/table/dist/src/types/internal.js.map new file mode 100644 index 00000000..b612aad9 --- /dev/null +++ b/node_modules/table/dist/src/types/internal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/types/internal.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/table/dist/src/utils.d.ts b/node_modules/table/dist/src/utils.d.ts new file mode 100644 index 00000000..a165ace5 --- /dev/null +++ b/node_modules/table/dist/src/utils.d.ts @@ -0,0 +1,10 @@ +import type { SpanningCellConfig } from './types/api'; +import type { BaseConfig, CellCoordinates, RangeCoordinate } from './types/internal'; +export declare const sequence: (start: number, end: number) => number[]; +export declare const sumArray: (array: number[]) => number; +export declare const extractTruncates: (config: BaseConfig) => number[]; +export declare const flatten: (array: T[][]) => T[]; +export declare const findOriginalRowIndex: (mappedRowHeights: number[], mappedRowIndex: number) => number; +export declare const calculateRangeCoordinate: (spanningCellConfig: SpanningCellConfig) => RangeCoordinate; +export declare const areCellEqual: (cell1: CellCoordinates, cell2: CellCoordinates) => boolean; +export declare const isCellInRange: (cell: CellCoordinates, { topLeft, bottomRight }: RangeCoordinate) => boolean; diff --git a/node_modules/table/dist/src/utils.js b/node_modules/table/dist/src/utils.js new file mode 100644 index 00000000..f2f25b03 --- /dev/null +++ b/node_modules/table/dist/src/utils.js @@ -0,0 +1,143 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isCellInRange = exports.areCellEqual = exports.calculateRangeCoordinate = exports.findOriginalRowIndex = exports.flatten = exports.extractTruncates = exports.sumArray = exports.sequence = exports.distributeUnevenly = exports.countSpaceSequence = exports.groupBySizes = exports.makeBorderConfig = exports.splitAnsi = exports.normalizeString = void 0; +const slice_ansi_1 = __importDefault(require("slice-ansi")); +const string_width_1 = __importDefault(require("string-width")); +const strip_ansi_1 = __importDefault(require("strip-ansi")); +const getBorderCharacters_1 = require("./getBorderCharacters"); +/** + * Converts Windows-style newline to Unix-style + * + * @internal + */ +const normalizeString = (input) => { + return input.replace(/\r\n/g, '\n'); +}; +exports.normalizeString = normalizeString; +/** + * Splits ansi string by newlines + * + * @internal + */ +const splitAnsi = (input) => { + const lengths = (0, strip_ansi_1.default)(input).split('\n').map(string_width_1.default); + const result = []; + let startIndex = 0; + lengths.forEach((length) => { + result.push(length === 0 ? '' : (0, slice_ansi_1.default)(input, startIndex, startIndex + length)); + // Plus 1 for the newline character itself + startIndex += length + 1; + }); + return result; +}; +exports.splitAnsi = splitAnsi; +/** + * Merges user provided border characters with the default border ("honeywell") characters. + * + * @internal + */ +const makeBorderConfig = (border) => { + return { + ...(0, getBorderCharacters_1.getBorderCharacters)('honeywell'), + ...border, + }; +}; +exports.makeBorderConfig = makeBorderConfig; +/** + * Groups the array into sub-arrays by sizes. + * + * @internal + * @example + * groupBySizes(['a', 'b', 'c', 'd', 'e'], [2, 1, 2]) = [ ['a', 'b'], ['c'], ['d', 'e'] ] + */ +const groupBySizes = (array, sizes) => { + let startIndex = 0; + return sizes.map((size) => { + const group = array.slice(startIndex, startIndex + size); + startIndex += size; + return group; + }); +}; +exports.groupBySizes = groupBySizes; +/** + * Counts the number of continuous spaces in a string + * + * @internal + * @example + * countGroupSpaces('a bc de f') = 3 + */ +const countSpaceSequence = (input) => { + var _a, _b; + return (_b = (_a = input.match(/\s+/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0; +}; +exports.countSpaceSequence = countSpaceSequence; +/** + * Creates the non-increasing number array given sum and length + * whose the difference between maximum and minimum is not greater than 1 + * + * @internal + * @example + * distributeUnevenly(6, 3) = [2, 2, 2] + * distributeUnevenly(8, 3) = [3, 3, 2] + */ +const distributeUnevenly = (sum, length) => { + const result = Array.from({ length }).fill(Math.floor(sum / length)); + return result.map((element, index) => { + return element + (index < sum % length ? 1 : 0); + }); +}; +exports.distributeUnevenly = distributeUnevenly; +const sequence = (start, end) => { + return Array.from({ length: end - start + 1 }, (_, index) => { + return index + start; + }); +}; +exports.sequence = sequence; +const sumArray = (array) => { + return array.reduce((accumulator, element) => { + return accumulator + element; + }, 0); +}; +exports.sumArray = sumArray; +const extractTruncates = (config) => { + return config.columns.map(({ truncate }) => { + return truncate; + }); +}; +exports.extractTruncates = extractTruncates; +const flatten = (array) => { + return [].concat(...array); +}; +exports.flatten = flatten; +const findOriginalRowIndex = (mappedRowHeights, mappedRowIndex) => { + const rowIndexMapping = (0, exports.flatten)(mappedRowHeights.map((height, index) => { + return Array.from({ length: height }, () => { + return index; + }); + })); + return rowIndexMapping[mappedRowIndex]; +}; +exports.findOriginalRowIndex = findOriginalRowIndex; +const calculateRangeCoordinate = (spanningCellConfig) => { + const { row, col, colSpan = 1, rowSpan = 1 } = spanningCellConfig; + return { bottomRight: { col: col + colSpan - 1, + row: row + rowSpan - 1 }, + topLeft: { col, + row } }; +}; +exports.calculateRangeCoordinate = calculateRangeCoordinate; +const areCellEqual = (cell1, cell2) => { + return cell1.row === cell2.row && cell1.col === cell2.col; +}; +exports.areCellEqual = areCellEqual; +const isCellInRange = (cell, { topLeft, bottomRight }) => { + return (topLeft.row <= cell.row && + cell.row <= bottomRight.row && + topLeft.col <= cell.col && + cell.col <= bottomRight.col); +}; +exports.isCellInRange = isCellInRange; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/utils.js.map b/node_modules/table/dist/src/utils.js.map new file mode 100644 index 00000000..dee11735 --- /dev/null +++ b/node_modules/table/dist/src/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,gEAAuC;AACvC,4DAAmC;AACnC,+DAE+B;AAY/B;;;;GAIG;AACI,MAAM,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE;IACvD,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEF;;;;GAIG;AACI,MAAM,SAAS,GAAG,CAAC,KAAa,EAAY,EAAE;IACnD,MAAM,OAAO,GAAG,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,sBAAW,CAAC,CAAC;IAE9D,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACzB,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAA,oBAAK,EAAC,KAAK,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC;QAE/E,0CAA0C;QAC1C,UAAU,IAAI,MAAM,GAAG,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAdW,QAAA,SAAS,aAcpB;AAEF;;;;GAIG;AACI,MAAM,gBAAgB,GAAG,CAAC,MAAoC,EAAgB,EAAE;IACrF,OAAO;Q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IAEJ,OAAO,eAAe,CAAC,cAAc,CAAC,CAAC;AACzC,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ/B;AAEK,MAAM,wBAAwB,GAAG,CAAC,kBAAsC,EAAmB,EAAE;IAClG,MAAM,EAAC,GAAG,EAAE,GAAG,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAC,GAAG,kBAAkB,CAAC;IAEhE,OAAO,EAAC,WAAW,EAAE,EAAC,GAAG,EAAE,GAAG,GAAG,OAAO,GAAG,CAAC;YAC1C,GAAG,EAAE,GAAG,GAAG,OAAO,GAAG,CAAC,EAAC;QACzB,OAAO,EAAE,EAAC,GAAG;YACX,GAAG,EAAC,EAAC,CAAC;AACV,CAAC,CAAC;AAPW,QAAA,wBAAwB,4BAOnC;AAEK,MAAM,YAAY,GAAG,CAAC,KAAsB,EAAE,KAAsB,EAAW,EAAE;IACtF,OAAO,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEK,MAAM,aAAa,GAAG,CAAC,IAAqB,EAAE,EAAC,OAAO,EAAE,WAAW,EAAkB,EAAW,EAAE;IACvG,OAAO,CACL,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG;QACvB,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG;QAC3B,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG;QACvB,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC,GAAG,CAC5B,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/validateConfig.d.ts b/node_modules/table/dist/src/validateConfig.d.ts new file mode 100644 index 00000000..e050cad8 --- /dev/null +++ b/node_modules/table/dist/src/validateConfig.d.ts @@ -0,0 +1,2 @@ +import type { TableUserConfig } from './types/api'; +export declare const validateConfig: (schemaId: 'config.json' | 'streamConfig.json', config: TableUserConfig) => void; diff --git a/node_modules/table/dist/src/validateConfig.js b/node_modules/table/dist/src/validateConfig.js new file mode 100644 index 00000000..2df152ea --- /dev/null +++ b/node_modules/table/dist/src/validateConfig.js @@ -0,0 +1,27 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.validateConfig = void 0; +const validators_1 = __importDefault(require("./generated/validators")); +const validateConfig = (schemaId, config) => { + const validate = validators_1.default[schemaId]; + if (!validate(config) && validate.errors) { + // eslint-disable-next-line promise/prefer-await-to-callbacks + const errors = validate.errors.map((error) => { + return { + message: error.message, + params: error.params, + schemaPath: error.schemaPath, + }; + }); + /* eslint-disable no-console */ + console.log('config', config); + console.log('errors', errors); + /* eslint-enable no-console */ + throw new Error('Invalid config.'); + } +}; +exports.validateConfig = validateConfig; +//# sourceMappingURL=validateConfig.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/validateConfig.js.map b/node_modules/table/dist/src/validateConfig.js.map new file mode 100644 index 00000000..db240b39 --- /dev/null +++ b/node_modules/table/dist/src/validateConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"validateConfig.js","sourceRoot":"","sources":["../../src/validateConfig.ts"],"names":[],"mappings":";;;;;;AAIA,wEAAgD;AAKzC,MAAM,cAAc,GAAG,CAAC,QAA6C,EAAE,MAAuB,EAAQ,EAAE;IAC7G,MAAM,QAAQ,GAAG,oBAAU,CAAC,QAAQ,CAAqB,CAAC;IAC1D,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,EAAE;QACxC,6DAA6D;QAC7D,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAkB,EAAE,EAAE;YACxD,OAAO;gBACL,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,UAAU,EAAE,KAAK,CAAC,UAAU;aAC7B,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,+BAA+B;QAC/B,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9B,8BAA8B;QAE9B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACpC;AACH,CAAC,CAAC;AAnBW,QAAA,cAAc,kBAmBzB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/validateSpanningCellConfig.d.ts b/node_modules/table/dist/src/validateSpanningCellConfig.d.ts new file mode 100644 index 00000000..d04bd342 --- /dev/null +++ b/node_modules/table/dist/src/validateSpanningCellConfig.d.ts @@ -0,0 +1,3 @@ +import type { SpanningCellConfig } from './types/api'; +import type { Row } from './types/internal'; +export declare const validateSpanningCellConfig: (rows: Row[], configs: SpanningCellConfig[]) => void; diff --git a/node_modules/table/dist/src/validateSpanningCellConfig.js b/node_modules/table/dist/src/validateSpanningCellConfig.js new file mode 100644 index 00000000..e2859ad2 --- /dev/null +++ b/node_modules/table/dist/src/validateSpanningCellConfig.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.validateSpanningCellConfig = void 0; +const utils_1 = require("./utils"); +const inRange = (start, end, value) => { + return start <= value && value <= end; +}; +const validateSpanningCellConfig = (rows, configs) => { + const [nRow, nCol] = [rows.length, rows[0].length]; + configs.forEach((config, configIndex) => { + const { colSpan, rowSpan } = config; + if (colSpan === undefined && rowSpan === undefined) { + throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${configIndex}]`); + } + if (colSpan !== undefined && colSpan < 1) { + throw new Error(`Expect colSpan is not equal zero, instead got: ${colSpan} in config.spanningCells[${configIndex}]`); + } + if (rowSpan !== undefined && rowSpan < 1) { + throw new Error(`Expect rowSpan is not equal zero, instead got: ${rowSpan} in config.spanningCells[${configIndex}]`); + } + }); + const rangeCoordinates = configs.map(utils_1.calculateRangeCoordinate); + rangeCoordinates.forEach(({ topLeft, bottomRight }, rangeIndex) => { + if (!inRange(0, nCol - 1, topLeft.col) || + !inRange(0, nRow - 1, topLeft.row) || + !inRange(0, nCol - 1, bottomRight.col) || + !inRange(0, nRow - 1, bottomRight.row)) { + throw new Error(`Some cells in config.spanningCells[${rangeIndex}] are out of the table`); + } + }); + const configOccupy = Array.from({ length: nRow }, () => { + return Array.from({ length: nCol }); + }); + rangeCoordinates.forEach(({ topLeft, bottomRight }, rangeIndex) => { + (0, utils_1.sequence)(topLeft.row, bottomRight.row).forEach((row) => { + (0, utils_1.sequence)(topLeft.col, bottomRight.col).forEach((col) => { + if (configOccupy[row][col] !== undefined) { + throw new Error(`Spanning cells in config.spanningCells[${configOccupy[row][col]}] and config.spanningCells[${rangeIndex}] are overlap each other`); + } + configOccupy[row][col] = rangeIndex; + }); + }); + }); +}; +exports.validateSpanningCellConfig = validateSpanningCellConfig; +//# sourceMappingURL=validateSpanningCellConfig.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/validateSpanningCellConfig.js.map b/node_modules/table/dist/src/validateSpanningCellConfig.js.map new file mode 100644 index 00000000..d5097be4 --- /dev/null +++ b/node_modules/table/dist/src/validateSpanningCellConfig.js.map @@ -0,0 +1 @@ +{"version":3,"file":"validateSpanningCellConfig.js","sourceRoot":"","sources":["../../src/validateSpanningCellConfig.ts"],"names":[],"mappings":";;;AAMA,mCAGiB;AAEjB,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,KAAa,EAAE,EAAE;IAC5D,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,CAAC;AACxC,CAAC,CAAC;AAEK,MAAM,0BAA0B,GAAG,CAAC,IAAW,EAAE,OAA6B,EAAQ,EAAE;IAC7F,MAAM,CAAC,IAAI,EAAE,IAAI,CA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SAC3F;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,IAAI,EAAC,EAAE,GAAG,EAAE;QACnD,OAAO,KAAK,CAAC,IAAI,CAAsB,EAAC,MAAM,EAAE,IAAI,EAAC,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,gBAAgB,CAAC,OAAO,CAAC,CAAC,EAAC,OAAO,EAAE,WAAW,EAAC,EAAE,UAAU,EAAE,EAAE;QAC9D,IAAA,gBAAQ,EAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACrD,IAAA,gBAAQ,EAAC,OAAO,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACrD,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;oBACxC,MAAM,IAAI,KAAK,CAAC,0CAA0C,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,8BAA8B,UAAU,0BAA0B,CAAC,CAAC;iBACrJ;gBACD,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC;YACtC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAzCW,QAAA,0BAA0B,8BAyCrC"} \ No newline at end of file diff --git a/node_modules/table/dist/src/validateTableData.d.ts b/node_modules/table/dist/src/validateTableData.d.ts new file mode 100644 index 00000000..84dac05a --- /dev/null +++ b/node_modules/table/dist/src/validateTableData.d.ts @@ -0,0 +1 @@ +export declare const validateTableData: (rows: unknown[][]) => void; diff --git a/node_modules/table/dist/src/validateTableData.js b/node_modules/table/dist/src/validateTableData.js new file mode 100644 index 00000000..a85e8075 --- /dev/null +++ b/node_modules/table/dist/src/validateTableData.js @@ -0,0 +1,32 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.validateTableData = void 0; +const utils_1 = require("./utils"); +const validateTableData = (rows) => { + if (!Array.isArray(rows)) { + throw new TypeError('Table data must be an array.'); + } + if (rows.length === 0) { + throw new Error('Table must define at least one row.'); + } + if (rows[0].length === 0) { + throw new Error('Table must define at least one column.'); + } + const columnNumber = rows[0].length; + for (const row of rows) { + if (!Array.isArray(row)) { + throw new TypeError('Table row data must be an array.'); + } + if (row.length !== columnNumber) { + throw new Error('Table must have a consistent number of cells.'); + } + for (const cell of row) { + // eslint-disable-next-line no-control-regex + if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0, utils_1.normalizeString)(String(cell)))) { + throw new Error('Table data must not contain control characters.'); + } + } + } +}; +exports.validateTableData = validateTableData; +//# sourceMappingURL=validateTableData.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/validateTableData.js.map b/node_modules/table/dist/src/validateTableData.js.map new file mode 100644 index 00000000..568fb10b --- /dev/null +++ b/node_modules/table/dist/src/validateTableData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"validateTableData.js","sourceRoot":"","sources":["../../src/validateTableData.ts"],"names":[],"mappings":";;;AAAA,mCAEiB;AAEV,MAAM,iBAAiB,GAAG,CAAC,IAAiB,EAAQ,EAAE;IAC3D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACxB,MAAM,IAAI,SAAS,CAAC,8BAA8B,CAAC,CAAC;KACrD;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IAED,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KAC3D;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAEpC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACvB,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;SACzD;QAED,IAAI,GAAG,CAAC,MAAM,KAAK,YAAY,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;SAClE;QAED,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE;YACtB,4CAA4C;YAC5C,IAAI,0CAA0C,CAAC,IAAI,CAAC,IAAA,uBAAe,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;gBAClF,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;aACpE;SACF;KACF;AACH,CAAC,CAAC;AA/BW,QAAA,iBAAiB,qBA+B5B"} \ No newline at end of file diff --git a/node_modules/table/dist/src/wrapCell.d.ts b/node_modules/table/dist/src/wrapCell.d.ts new file mode 100644 index 00000000..52d7299b --- /dev/null +++ b/node_modules/table/dist/src/wrapCell.d.ts @@ -0,0 +1,8 @@ +/** + * Wrap a single cell value into a list of lines + * + * Always wraps on newlines, for the remainder uses either word or string wrapping + * depending on user configuration. + * + */ +export declare const wrapCell: (cellValue: string, cellWidth: number, useWrapWord: boolean) => string[]; diff --git a/node_modules/table/dist/src/wrapCell.js b/node_modules/table/dist/src/wrapCell.js new file mode 100644 index 00000000..b2ce8de0 --- /dev/null +++ b/node_modules/table/dist/src/wrapCell.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.wrapCell = void 0; +const utils_1 = require("./utils"); +const wrapString_1 = require("./wrapString"); +const wrapWord_1 = require("./wrapWord"); +/** + * Wrap a single cell value into a list of lines + * + * Always wraps on newlines, for the remainder uses either word or string wrapping + * depending on user configuration. + * + */ +const wrapCell = (cellValue, cellWidth, useWrapWord) => { + // First split on literal newlines + const cellLines = (0, utils_1.splitAnsi)(cellValue); + // Then iterate over the list and word-wrap every remaining line if necessary. + for (let lineNr = 0; lineNr < cellLines.length;) { + let lineChunks; + if (useWrapWord) { + lineChunks = (0, wrapWord_1.wrapWord)(cellLines[lineNr], cellWidth); + } + else { + lineChunks = (0, wrapString_1.wrapString)(cellLines[lineNr], cellWidth); + } + // Replace our original array element with whatever the wrapping returned + cellLines.splice(lineNr, 1, ...lineChunks); + lineNr += lineChunks.length; + } + return cellLines; +}; +exports.wrapCell = wrapCell; +//# sourceMappingURL=wrapCell.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/wrapCell.js.map b/node_modules/table/dist/src/wrapCell.js.map new file mode 100644 index 00000000..9ce0736e --- /dev/null +++ b/node_modules/table/dist/src/wrapCell.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wrapCell.js","sourceRoot":"","sources":["../../src/wrapCell.ts"],"names":[],"mappings":";;;AAAA,mCAEiB;AACjB,6CAEsB;AACtB,yCAEoB;AAEpB;;;;;;GAMG;AACI,MAAM,QAAQ,GAAG,CAAC,SAAiB,EAAE,SAAiB,EAAE,WAAoB,EAAY,EAAE;IAC/F,kCAAkC;IAClC,MAAM,SAAS,GAAG,IAAA,iBAAS,EAAC,SAAS,CAAC,CAAC;IAEvC,8EAA8E;IAC9E,KAAK,IAAI,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG;QAC/C,IAAI,UAAU,CAAC;QAEf,IAAI,WAAW,EAAE;YACf,UAAU,GAAG,IAAA,mBAAQ,EAAC,SAAS,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;SACrD;aAAM;YACL,UAAU,GAAG,IAAA,uBAAU,EAAC,SAAS,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC;SACvD;QAED,yEAAyE;QACzE,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC;QAC3C,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;KAC7B;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AApBW,QAAA,QAAQ,YAoBnB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/wrapString.d.ts b/node_modules/table/dist/src/wrapString.d.ts new file mode 100644 index 00000000..849e1747 --- /dev/null +++ b/node_modules/table/dist/src/wrapString.d.ts @@ -0,0 +1,9 @@ +/** + * Creates an array of strings split into groups the length of size. + * This function works with strings that contain ASCII characters. + * + * wrapText is different from would-be "chunk" implementation + * in that whitespace characters that occur on a chunk size limit are trimmed. + * + */ +export declare const wrapString: (subject: string, size: number) => string[]; diff --git a/node_modules/table/dist/src/wrapString.js b/node_modules/table/dist/src/wrapString.js new file mode 100644 index 00000000..b09bd173 --- /dev/null +++ b/node_modules/table/dist/src/wrapString.js @@ -0,0 +1,27 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.wrapString = void 0; +const slice_ansi_1 = __importDefault(require("slice-ansi")); +const string_width_1 = __importDefault(require("string-width")); +/** + * Creates an array of strings split into groups the length of size. + * This function works with strings that contain ASCII characters. + * + * wrapText is different from would-be "chunk" implementation + * in that whitespace characters that occur on a chunk size limit are trimmed. + * + */ +const wrapString = (subject, size) => { + let subjectSlice = subject; + const chunks = []; + do { + chunks.push((0, slice_ansi_1.default)(subjectSlice, 0, size)); + subjectSlice = (0, slice_ansi_1.default)(subjectSlice, size).trim(); + } while ((0, string_width_1.default)(subjectSlice)); + return chunks; +}; +exports.wrapString = wrapString; +//# sourceMappingURL=wrapString.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/wrapString.js.map b/node_modules/table/dist/src/wrapString.js.map new file mode 100644 index 00000000..c1c2a5bd --- /dev/null +++ b/node_modules/table/dist/src/wrapString.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wrapString.js","sourceRoot":"","sources":["../../src/wrapString.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,gEAAuC;AAEvC;;;;;;;GAOG;AACI,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,IAAY,EAAY,EAAE;IACpE,IAAI,YAAY,GAAG,OAAO,CAAC;IAE3B,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,GAAG;QACD,MAAM,CAAC,IAAI,CAAC,IAAA,oBAAK,EAAC,YAAY,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;QAE1C,YAAY,GAAG,IAAA,oBAAK,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;KACjD,QAAQ,IAAA,sBAAW,EAAC,YAAY,CAAC,EAAE;IAEpC,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAZW,QAAA,UAAU,cAYrB"} \ No newline at end of file diff --git a/node_modules/table/dist/src/wrapWord.d.ts b/node_modules/table/dist/src/wrapWord.d.ts new file mode 100644 index 00000000..083da4d4 --- /dev/null +++ b/node_modules/table/dist/src/wrapWord.d.ts @@ -0,0 +1 @@ +export declare const wrapWord: (input: string, size: number) => string[]; diff --git a/node_modules/table/dist/src/wrapWord.js b/node_modules/table/dist/src/wrapWord.js new file mode 100644 index 00000000..7571aa6e --- /dev/null +++ b/node_modules/table/dist/src/wrapWord.js @@ -0,0 +1,42 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.wrapWord = void 0; +const slice_ansi_1 = __importDefault(require("slice-ansi")); +const strip_ansi_1 = __importDefault(require("strip-ansi")); +const calculateStringLengths = (input, size) => { + let subject = (0, strip_ansi_1.default)(input); + const chunks = []; + // https://regex101.com/r/gY5kZ1/1 + const re = new RegExp('(^.{1,' + String(Math.max(size, 1)) + '}(\\s+|$))|(^.{1,' + String(Math.max(size - 1, 1)) + '}(\\\\|/|_|\\.|,|;|-))'); + do { + let chunk; + const match = re.exec(subject); + if (match) { + chunk = match[0]; + subject = subject.slice(chunk.length); + const trimmedLength = chunk.trim().length; + const offset = chunk.length - trimmedLength; + chunks.push([trimmedLength, offset]); + } + else { + chunk = subject.slice(0, size); + subject = subject.slice(size); + chunks.push([chunk.length, 0]); + } + } while (subject.length); + return chunks; +}; +const wrapWord = (input, size) => { + const result = []; + let startIndex = 0; + calculateStringLengths(input, size).forEach(([length, offset]) => { + result.push((0, slice_ansi_1.default)(input, startIndex, startIndex + length)); + startIndex += length + offset; + }); + return result; +}; +exports.wrapWord = wrapWord; +//# sourceMappingURL=wrapWord.js.map \ No newline at end of file diff --git a/node_modules/table/dist/src/wrapWord.js.map b/node_modules/table/dist/src/wrapWord.js.map new file mode 100644 index 00000000..fc61519d --- /dev/null +++ b/node_modules/table/dist/src/wrapWord.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wrapWord.js","sourceRoot":"","sources":["../../src/wrapWord.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAC/B,4DAAmC;AAEnC,MAAM,sBAAsB,GAAG,CAAC,KAAa,EAAE,IAAY,EAA0C,EAAE;IACrG,IAAI,OAAO,GAAG,IAAA,oBAAS,EAAC,KAAK,CAAC,CAAC;IAE/B,MAAM,MAAM,GAA4B,EAAE,CAAC;IAE3C,kCAAkC;IAClC,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC;IAE7I,GAAG;QACD,IAAI,KAAa,CAAC;QAElB,MAAM,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE/B,IAAI,KAAK,EAAE;YACT,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YAEjB,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAEtC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC;YAC1C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,aAAa,CAAC;YAE5C,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;SACtC;aAAM;YACL,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;YAC/B,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAE9B,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;SAChC;KACF,QAAQ,OAAO,CAAC,MAAM,EAAE;IAEzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEK,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,IAAY,EAAY,EAAE;IAChE,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE;QAC/D,MAAM,CAAC,IAAI,CAAC,IAAA,oBAAK,EAAC,KAAK,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC;QAE3D,UAAU,IAAI,MAAM,GAAG,MAAM,CAAC;IAChC,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAXW,QAAA,QAAQ,YAWnB"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/re2.d.ts b/node_modules/table/node_modules/ajv/dist/runtime/re2.d.ts new file mode 100644 index 00000000..c34a98f2 --- /dev/null +++ b/node_modules/table/node_modules/ajv/dist/runtime/re2.d.ts @@ -0,0 +1,6 @@ +import * as re2 from "re2"; +type Re2 = typeof re2 & { + code: string; +}; +declare const _default: Re2; +export default _default; diff --git a/node_modules/table/node_modules/ajv/dist/runtime/re2.js b/node_modules/table/node_modules/ajv/dist/runtime/re2.js new file mode 100644 index 00000000..4b1ee253 --- /dev/null +++ b/node_modules/table/node_modules/ajv/dist/runtime/re2.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const re2 = require("re2"); +re2.code = 'require("ajv/dist/runtime/re2").default'; +exports.default = re2; +//# sourceMappingURL=re2.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/re2.js.map b/node_modules/table/node_modules/ajv/dist/runtime/re2.js.map new file mode 100644 index 00000000..bb938a2c --- /dev/null +++ b/node_modules/table/node_modules/ajv/dist/runtime/re2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"re2.js","sourceRoot":"","sources":["../../lib/runtime/re2.ts"],"names":[],"mappings":";;AAAA,2BAA0B;AAGxB,GAAW,CAAC,IAAI,GAAG,yCAAyC,CAAA;AAE9D,kBAAe,GAAU,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/uri.d.ts b/node_modules/table/node_modules/ajv/dist/runtime/uri.d.ts new file mode 100644 index 00000000..4690868f --- /dev/null +++ b/node_modules/table/node_modules/ajv/dist/runtime/uri.d.ts @@ -0,0 +1,6 @@ +import * as uri from "uri-js"; +type URI = typeof uri & { + code: string; +}; +declare const _default: URI; +export default _default; diff --git a/node_modules/table/node_modules/ajv/dist/runtime/uri.js b/node_modules/table/node_modules/ajv/dist/runtime/uri.js new file mode 100644 index 00000000..fbd38151 --- /dev/null +++ b/node_modules/table/node_modules/ajv/dist/runtime/uri.js @@ -0,0 +1,6 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const uri = require("uri-js"); +uri.code = 'require("ajv/dist/runtime/uri").default'; +exports.default = uri; +//# sourceMappingURL=uri.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/uri.js.map b/node_modules/table/node_modules/ajv/dist/runtime/uri.js.map new file mode 100644 index 00000000..701bed95 --- /dev/null +++ b/node_modules/table/node_modules/ajv/dist/runtime/uri.js.map @@ -0,0 +1 @@ +{"version":3,"file":"uri.js","sourceRoot":"","sources":["../../lib/runtime/uri.ts"],"names":[],"mappings":";;AAAA,8BAA6B;AAG3B,GAAW,CAAC,IAAI,GAAG,yCAAyC,CAAA;AAE9D,kBAAe,GAAU,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/lib/runtime/re2.ts b/node_modules/table/node_modules/ajv/lib/runtime/re2.ts new file mode 100644 index 00000000..0c769bc7 --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/runtime/re2.ts @@ -0,0 +1,6 @@ +import * as re2 from "re2" + +type Re2 = typeof re2 & {code: string} +;(re2 as Re2).code = 'require("ajv/dist/runtime/re2").default' + +export default re2 as Re2 diff --git a/node_modules/table/node_modules/ajv/lib/runtime/uri.ts b/node_modules/table/node_modules/ajv/lib/runtime/uri.ts new file mode 100644 index 00000000..7dd35f9d --- /dev/null +++ b/node_modules/table/node_modules/ajv/lib/runtime/uri.ts @@ -0,0 +1,6 @@ +import * as uri from "uri-js" + +type URI = typeof uri & {code: string} +;(uri as URI).code = 'require("ajv/dist/runtime/uri").default' + +export default uri as URI