From a0579f91bbdf0de62b59df381d97a008bb98df57 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 30 Oct 2023 16:45:38 +0800 Subject: update/upgrade --- node_modules/.bin/jiti | 1 + node_modules/.bin/js-yaml | 1 + node_modules/.yarn-integrity | 50 +- node_modules/argparse/CHANGELOG.md | 216 ++ node_modules/argparse/LICENSE | 254 ++ node_modules/argparse/README.md | 84 + node_modules/argparse/argparse.js | 3707 +++++++++++++++++++ node_modules/argparse/lib/sub.js | 67 + node_modules/argparse/lib/textwrap.js | 440 +++ node_modules/argparse/package.json | 31 + node_modules/callsites/index.d.ts | 96 + node_modules/callsites/index.js | 13 + node_modules/callsites/license | 9 + node_modules/callsites/package.json | 39 + node_modules/callsites/readme.md | 48 + node_modules/cosmiconfig/LICENSE | 22 + node_modules/cosmiconfig/README.md | 685 ++++ node_modules/cosmiconfig/dist/Explorer.d.ts | 2 + node_modules/cosmiconfig/dist/Explorer.d.ts.map | 1 + node_modules/cosmiconfig/dist/Explorer.js | 103 + node_modules/cosmiconfig/dist/Explorer.js.map | 1 + node_modules/cosmiconfig/dist/ExplorerBase.d.ts | 2 + .../cosmiconfig/dist/ExplorerBase.d.ts.map | 1 + node_modules/cosmiconfig/dist/ExplorerBase.js | 82 + node_modules/cosmiconfig/dist/ExplorerBase.js.map | 1 + node_modules/cosmiconfig/dist/ExplorerSync.d.ts | 2 + .../cosmiconfig/dist/ExplorerSync.d.ts.map | 1 + node_modules/cosmiconfig/dist/ExplorerSync.js | 116 + node_modules/cosmiconfig/dist/ExplorerSync.js.map | 1 + node_modules/cosmiconfig/dist/index.d.ts | 25 + node_modules/cosmiconfig/dist/index.d.ts.map | 1 + node_modules/cosmiconfig/dist/index.js | 195 + node_modules/cosmiconfig/dist/index.js.map | 1 + node_modules/cosmiconfig/dist/loaders.d.ts | 8 + node_modules/cosmiconfig/dist/loaders.d.ts.map | 1 + node_modules/cosmiconfig/dist/loaders.js | 133 + node_modules/cosmiconfig/dist/loaders.js.map | 1 + node_modules/cosmiconfig/dist/types.d.ts | 91 + node_modules/cosmiconfig/dist/types.d.ts.map | 1 + node_modules/cosmiconfig/dist/types.js | 3 + node_modules/cosmiconfig/dist/types.js.map | 1 + node_modules/cosmiconfig/dist/util.d.ts | 2 + node_modules/cosmiconfig/dist/util.d.ts.map | 1 + node_modules/cosmiconfig/dist/util.js | 49 + node_modules/cosmiconfig/dist/util.js.map | 1 + node_modules/cosmiconfig/node_modules/.bin/js-yaml | 1 + node_modules/cosmiconfig/package.json | 105 + node_modules/css-mediaquery/.npmignore | 6 + node_modules/css-mediaquery/HISTORY.md | 22 + node_modules/css-mediaquery/LICENSE | 27 + node_modules/css-mediaquery/README.md | 94 + node_modules/css-mediaquery/index.js | 157 + node_modules/css-mediaquery/package.json | 36 + node_modules/error-ex/LICENSE | 21 + node_modules/error-ex/README.md | 144 + node_modules/error-ex/index.js | 141 + node_modules/error-ex/package.json | 46 + node_modules/import-fresh/index.d.ts | 30 + node_modules/import-fresh/index.js | 33 + node_modules/import-fresh/license | 9 + node_modules/import-fresh/package.json | 43 + node_modules/import-fresh/readme.md | 48 + node_modules/is-arrayish/.editorconfig | 18 + node_modules/is-arrayish/.istanbul.yml | 4 + node_modules/is-arrayish/.npmignore | 5 + node_modules/is-arrayish/.travis.yml | 17 + node_modules/is-arrayish/LICENSE | 21 + node_modules/is-arrayish/README.md | 16 + node_modules/is-arrayish/index.js | 10 + node_modules/is-arrayish/package.json | 34 + node_modules/jiti/LICENSE | 21 + node_modules/jiti/README.md | 161 + node_modules/jiti/bin/jiti.js | 16 + node_modules/jiti/dist/babel.d.ts | 2 + node_modules/jiti/dist/babel.js | 1885 ++++++++++ node_modules/jiti/dist/jiti.d.ts | 19 + node_modules/jiti/dist/jiti.js | 1 + .../babel-plugin-transform-import-meta.d.ts | 4 + .../jiti/dist/plugins/import-meta-env.d.ts | 5 + node_modules/jiti/dist/types.d.ts | 31 + node_modules/jiti/dist/utils.d.ts | 8 + node_modules/jiti/lib/index.js | 15 + node_modules/jiti/package.json | 81 + node_modules/jiti/register.js | 3 + node_modules/js-yaml/CHANGELOG.md | 616 ++++ node_modules/js-yaml/LICENSE | 21 + node_modules/js-yaml/README.md | 246 ++ node_modules/js-yaml/bin/js-yaml.js | 126 + node_modules/js-yaml/dist/js-yaml.js | 3874 ++++++++++++++++++++ node_modules/js-yaml/dist/js-yaml.min.js | 2 + node_modules/js-yaml/dist/js-yaml.mjs | 3851 +++++++++++++++++++ node_modules/js-yaml/index.js | 47 + node_modules/js-yaml/lib/common.js | 59 + node_modules/js-yaml/lib/dumper.js | 965 +++++ node_modules/js-yaml/lib/exception.js | 55 + node_modules/js-yaml/lib/loader.js | 1727 +++++++++ node_modules/js-yaml/lib/schema.js | 121 + node_modules/js-yaml/lib/schema/core.js | 11 + node_modules/js-yaml/lib/schema/default.js | 22 + node_modules/js-yaml/lib/schema/failsafe.js | 17 + node_modules/js-yaml/lib/schema/json.js | 19 + node_modules/js-yaml/lib/snippet.js | 101 + node_modules/js-yaml/lib/type.js | 66 + node_modules/js-yaml/lib/type/binary.js | 125 + node_modules/js-yaml/lib/type/bool.js | 35 + node_modules/js-yaml/lib/type/float.js | 97 + node_modules/js-yaml/lib/type/int.js | 156 + node_modules/js-yaml/lib/type/map.js | 8 + node_modules/js-yaml/lib/type/merge.js | 12 + node_modules/js-yaml/lib/type/null.js | 35 + node_modules/js-yaml/lib/type/omap.js | 44 + node_modules/js-yaml/lib/type/pairs.js | 53 + node_modules/js-yaml/lib/type/seq.js | 8 + node_modules/js-yaml/lib/type/set.js | 29 + node_modules/js-yaml/lib/type/str.js | 8 + node_modules/js-yaml/lib/type/timestamp.js | 88 + node_modules/js-yaml/package.json | 66 + .../json-parse-even-better-errors/CHANGELOG.md | 50 + .../json-parse-even-better-errors/LICENSE.md | 25 + .../json-parse-even-better-errors/README.md | 96 + .../json-parse-even-better-errors/index.js | 121 + .../json-parse-even-better-errors/package.json | 33 + node_modules/lines-and-columns/LICENSE | 21 + node_modules/lines-and-columns/README.md | 33 + node_modules/lines-and-columns/build/index.d.ts | 13 + node_modules/lines-and-columns/build/index.js | 62 + node_modules/lines-and-columns/package.json | 49 + node_modules/object-assign/index.js | 90 + node_modules/object-assign/license | 21 + node_modules/object-assign/package.json | 42 + node_modules/object-assign/readme.md | 61 + node_modules/oldie/.editorconfig | 14 + node_modules/oldie/.eslintrc | 122 + node_modules/oldie/.npmignore | 2 + node_modules/oldie/.travis.yml | 5 + node_modules/oldie/CHANGELOG.md | 21 + node_modules/oldie/CONTRIBUTING.md | 60 + node_modules/oldie/LICENSE.md | 15 + node_modules/oldie/README.md | 319 ++ node_modules/oldie/index.js | 71 + .../oldie/node_modules/ansi-styles/index.js | 65 + .../oldie/node_modules/ansi-styles/license | 21 + .../oldie/node_modules/ansi-styles/package.json | 50 + .../oldie/node_modules/ansi-styles/readme.md | 86 + .../oldie/node_modules/browserslist/CHANGELOG.md | 135 + .../oldie/node_modules/browserslist/LICENSE | 20 + .../oldie/node_modules/browserslist/README.md | 331 ++ .../oldie/node_modules/browserslist/cli.js | 95 + .../oldie/node_modules/browserslist/index.js | 648 ++++ .../oldie/node_modules/browserslist/package.json | 54 + node_modules/oldie/node_modules/chalk/index.js | 116 + node_modules/oldie/node_modules/chalk/license | 21 + .../chalk/node_modules/supports-color/index.js | 50 + .../chalk/node_modules/supports-color/license | 21 + .../chalk/node_modules/supports-color/package.json | 49 + .../chalk/node_modules/supports-color/readme.md | 36 + node_modules/oldie/node_modules/chalk/package.json | 70 + node_modules/oldie/node_modules/chalk/readme.md | 213 ++ node_modules/oldie/node_modules/has-flag/index.js | 10 + node_modules/oldie/node_modules/has-flag/license | 21 + .../oldie/node_modules/has-flag/package.json | 48 + node_modules/oldie/node_modules/has-flag/readme.md | 64 + .../oldie/node_modules/pixrem/.editorconfig | 13 + .../oldie/node_modules/pixrem/.gitattributes | 1 + node_modules/oldie/node_modules/pixrem/.jshintrc | 21 + node_modules/oldie/node_modules/pixrem/.npmignore | 2 + node_modules/oldie/node_modules/pixrem/.travis.yml | 4 + .../oldie/node_modules/pixrem/CHANGELOG.md | 77 + node_modules/oldie/node_modules/pixrem/LICENSE | 22 + node_modules/oldie/node_modules/pixrem/README.md | 89 + .../oldie/node_modules/pixrem/lib/pixrem.js | 160 + .../pixrem/node_modules/.bin/browserslist | 1 + .../oldie/node_modules/pixrem/package.json | 42 + .../oldie/node_modules/pixrem/test/test.js | 285 ++ .../node_modules/postcss-pseudoelements/.npmignore | 2 + .../postcss-pseudoelements/ChangeLog.md | 16 + .../node_modules/postcss-pseudoelements/README.md | 17 + .../node_modules/postcss-pseudoelements/index.js | 22 + .../postcss-pseudoelements/package.json | 33 + .../postcss-pseudoelements/test/expected.css | 48 + .../postcss-pseudoelements/test/input.css | 48 + .../postcss-pseudoelements/test/test.js | 17 + .../oldie/node_modules/postcss/CHANGELOG.md | 460 +++ node_modules/oldie/node_modules/postcss/LICENSE | 20 + node_modules/oldie/node_modules/postcss/README.md | 379 ++ .../node_modules/postcss/docs/guidelines/plugin.md | 195 + .../node_modules/postcss/docs/guidelines/runner.md | 143 + .../oldie/node_modules/postcss/docs/source-maps.md | 72 + .../oldie/node_modules/postcss/docs/syntax.md | 231 ++ .../oldie/node_modules/postcss/lib/at-rule.js | 159 + .../oldie/node_modules/postcss/lib/comment.js | 89 + .../oldie/node_modules/postcss/lib/container.js | 935 +++++ .../node_modules/postcss/lib/css-syntax-error.js | 272 ++ .../oldie/node_modules/postcss/lib/declaration.js | 130 + .../oldie/node_modules/postcss/lib/input.js | 198 + .../oldie/node_modules/postcss/lib/lazy-result.js | 432 +++ .../oldie/node_modules/postcss/lib/list.js | 95 + .../node_modules/postcss/lib/map-generator.js | 312 ++ .../oldie/node_modules/postcss/lib/node.js | 672 ++++ .../oldie/node_modules/postcss/lib/parse.js | 43 + .../oldie/node_modules/postcss/lib/parser.js | 514 +++ .../oldie/node_modules/postcss/lib/postcss.d.ts | 1305 +++++++ .../oldie/node_modules/postcss/lib/postcss.js | 292 ++ .../oldie/node_modules/postcss/lib/previous-map.js | 162 + .../oldie/node_modules/postcss/lib/processor.js | 240 ++ .../oldie/node_modules/postcss/lib/result.js | 206 ++ .../oldie/node_modules/postcss/lib/root.js | 143 + .../oldie/node_modules/postcss/lib/rule.js | 136 + .../oldie/node_modules/postcss/lib/stringifier.js | 335 ++ .../oldie/node_modules/postcss/lib/stringify.js | 17 + .../node_modules/postcss/lib/terminal-highlight.js | 76 + .../oldie/node_modules/postcss/lib/tokenize.js | 273 ++ .../oldie/node_modules/postcss/lib/vendor.js | 52 + .../oldie/node_modules/postcss/lib/warn-once.js | 14 + .../oldie/node_modules/postcss/lib/warning.js | 122 + .../oldie/node_modules/postcss/package.json | 76 + .../oldie/node_modules/strip-ansi/index.js | 6 + node_modules/oldie/node_modules/strip-ansi/license | 21 + .../oldie/node_modules/strip-ansi/package.json | 57 + .../oldie/node_modules/strip-ansi/readme.md | 33 + .../oldie/node_modules/supports-color/browser.js | 2 + .../oldie/node_modules/supports-color/index.js | 84 + .../oldie/node_modules/supports-color/license | 21 + .../oldie/node_modules/supports-color/package.json | 66 + .../oldie/node_modules/supports-color/readme.md | 60 + node_modules/oldie/package.json | 61 + node_modules/oldie/test/fixtures/basic.css | 25 + node_modules/oldie/test/fixtures/basic.expect.css | 17 + node_modules/oldie/test/test.js | 52 + node_modules/parent-module/index.js | 37 + node_modules/parent-module/license | 9 + node_modules/parent-module/package.json | 46 + node_modules/parent-module/readme.md | 67 + node_modules/parse-json/index.js | 54 + node_modules/parse-json/license | 9 + node_modules/parse-json/package.json | 45 + node_modules/parse-json/readme.md | 119 + node_modules/postcss-calc/CHANGELOG.md | 13 - node_modules/postcss-calc/README.md | 4 +- node_modules/postcss-calc/dist/index.js | 34 - node_modules/postcss-calc/dist/lib/transform.js | 67 - node_modules/postcss-calc/index.js | 62 + .../postcss-calc/node_modules/ansi-styles/index.js | 65 + .../postcss-calc/node_modules/ansi-styles/license | 21 + .../node_modules/ansi-styles/package.json | 50 + .../node_modules/ansi-styles/readme.md | 86 + .../postcss-calc/node_modules/chalk/index.js | 116 + .../postcss-calc/node_modules/chalk/license | 21 + .../chalk/node_modules/supports-color/index.js | 50 + .../chalk/node_modules/supports-color/license | 21 + .../chalk/node_modules/supports-color/package.json | 49 + .../chalk/node_modules/supports-color/readme.md | 36 + .../postcss-calc/node_modules/chalk/package.json | 70 + .../postcss-calc/node_modules/chalk/readme.md | 213 ++ .../postcss-calc/node_modules/has-flag/index.js | 10 + .../postcss-calc/node_modules/has-flag/license | 21 + .../node_modules/has-flag/package.json | 48 + .../postcss-calc/node_modules/has-flag/readme.md | 64 + .../postcss-calc/node_modules/picocolors/LICENSE | 15 - .../postcss-calc/node_modules/picocolors/README.md | 23 - .../node_modules/picocolors/package.json | 25 - .../node_modules/picocolors/picocolors.browser.js | 4 - .../node_modules/picocolors/picocolors.d.ts | 5 - .../node_modules/picocolors/picocolors.js | 60 - .../postcss-calc/node_modules/picocolors/types.ts | 30 - .../node_modules/postcss-selector-parser/API.md | 624 ---- .../postcss-selector-parser/CHANGELOG.md | 157 - .../postcss-selector-parser/LICENSE-MIT | 22 - .../node_modules/postcss-selector-parser/README.md | 46 - .../postcss-selector-parser/dist/index.js | 114 - .../postcss-selector-parser/dist/parser.js | 643 ---- .../postcss-selector-parser/dist/processor.js | 49 - .../dist/selectors/attribute.js | 54 - .../dist/selectors/className.js | 39 - .../dist/selectors/combinator.js | 35 - .../dist/selectors/comment.js | 35 - .../dist/selectors/container.js | 338 -- .../postcss-selector-parser/dist/selectors/id.js | 39 - .../dist/selectors/namespace.js | 45 - .../dist/selectors/nesting.js | 36 - .../postcss-selector-parser/dist/selectors/node.js | 102 - .../dist/selectors/pseudo.js | 40 - .../postcss-selector-parser/dist/selectors/root.js | 43 - .../dist/selectors/selector.js | 35 - .../dist/selectors/string.js | 35 - .../postcss-selector-parser/dist/selectors/tag.js | 35 - .../dist/selectors/types.js | 15 - .../dist/selectors/universal.js | 36 - .../postcss-selector-parser/dist/sortAscending.js | 10 - .../postcss-selector-parser/dist/tokenize.js | 231 -- .../postcss-selector-parser/package.json | 64 - .../node_modules/postcss-value-parser/LICENSE | 22 - .../node_modules/postcss-value-parser/README.md | 253 -- .../node_modules/postcss-value-parser/lib/index.js | 28 - .../node_modules/postcss-value-parser/lib/parse.js | 251 -- .../postcss-value-parser/lib/stringify.js | 48 - .../node_modules/postcss-value-parser/lib/unit.js | 49 - .../node_modules/postcss-value-parser/lib/walk.js | 22 - .../node_modules/postcss-value-parser/package.json | 58 - .../postcss-calc/node_modules/postcss/CHANGELOG.md | 460 +++ .../postcss-calc/node_modules/postcss/README.md | 376 +- .../node_modules/postcss/docs/guidelines/plugin.md | 195 + .../node_modules/postcss/docs/guidelines/runner.md | 143 + .../node_modules/postcss/docs/source-maps.md | 72 + .../node_modules/postcss/docs/syntax.md | 231 ++ .../node_modules/postcss/lib/at-rule.js | 232 +- .../node_modules/postcss/lib/comment.js | 114 +- .../node_modules/postcss/lib/container.js | 1531 ++++---- .../node_modules/postcss/lib/css-syntax-error.js | 456 ++- .../node_modules/postcss/lib/declaration.js | 194 +- .../postcss-calc/node_modules/postcss/lib/input.js | 324 +- .../node_modules/postcss/lib/lazy-result.js | 735 ++-- .../postcss-calc/node_modules/postcss/lib/list.js | 150 +- .../node_modules/postcss/lib/map-generator.js | 565 ++- .../postcss-calc/node_modules/postcss/lib/node.js | 1176 +++--- .../postcss-calc/node_modules/postcss/lib/parse.js | 59 +- .../node_modules/postcss/lib/parser.js | 949 +++-- .../node_modules/postcss/lib/postcss.d.ts | 2508 ++++++------- .../node_modules/postcss/lib/postcss.js | 217 +- .../node_modules/postcss/lib/previous-map.js | 266 +- .../node_modules/postcss/lib/processor.js | 242 +- .../node_modules/postcss/lib/result.js | 195 +- .../postcss-calc/node_modules/postcss/lib/root.js | 211 +- .../postcss-calc/node_modules/postcss/lib/rule.js | 194 +- .../node_modules/postcss/lib/stringifier.js | 597 ++- .../node_modules/postcss/lib/stringify.js | 19 +- .../node_modules/postcss/lib/terminal-highlight.js | 120 +- .../node_modules/postcss/lib/tokenize.js | 518 ++- .../node_modules/postcss/lib/vendor.js | 63 +- .../node_modules/postcss/lib/warn-once.js | 15 +- .../node_modules/postcss/lib/warning.js | 93 +- .../postcss-calc/node_modules/postcss/package.json | 59 +- .../node_modules/reduce-css-calc/CHANGELOG.md | 167 - .../node_modules/reduce-css-calc/LICENSE | 20 - .../node_modules/reduce-css-calc/README.md | 76 - .../node_modules/reduce-css-calc/dist/index.js | 51 - .../reduce-css-calc/dist/lib/convert.js | 38 - .../reduce-css-calc/dist/lib/reducer.js | 258 -- .../reduce-css-calc/dist/lib/stringifier.js | 78 - .../node_modules/reduce-css-calc/dist/parser.js | 3858 ------------------- .../node_modules/reduce-css-calc/package.json | 49 - .../node_modules/source-map/CHANGELOG.md | 301 -- .../postcss-calc/node_modules/source-map/LICENSE | 28 - .../postcss-calc/node_modules/source-map/README.md | 742 ---- .../source-map/dist/source-map.debug.js | 3234 ---------------- .../node_modules/source-map/dist/source-map.js | 3233 ---------------- .../node_modules/source-map/dist/source-map.min.js | 2 - .../source-map/dist/source-map.min.js.map | 1 - .../node_modules/source-map/lib/array-set.js | 121 - .../node_modules/source-map/lib/base64-vlq.js | 140 - .../node_modules/source-map/lib/base64.js | 67 - .../node_modules/source-map/lib/binary-search.js | 111 - .../node_modules/source-map/lib/mapping-list.js | 79 - .../node_modules/source-map/lib/quick-sort.js | 114 - .../source-map/lib/source-map-consumer.js | 1145 ------ .../source-map/lib/source-map-generator.js | 425 --- .../node_modules/source-map/lib/source-node.js | 413 --- .../node_modules/source-map/lib/util.js | 488 --- .../node_modules/source-map/package.json | 73 - .../node_modules/source-map/source-map.d.ts | 98 - .../node_modules/source-map/source-map.js | 8 - .../postcss-calc/node_modules/strip-ansi/index.js | 6 + .../postcss-calc/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 57 + .../postcss-calc/node_modules/strip-ansi/readme.md | 33 + .../node_modules/supports-color/browser.js | 2 + .../node_modules/supports-color/index.js | 84 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 66 + .../node_modules/supports-color/readme.md | 60 + node_modules/postcss-calc/package.json | 51 +- .../postcss-fixes/node_modules/picocolors/LICENSE | 15 + .../node_modules/picocolors/README.md | 23 + .../node_modules/picocolors/package.json | 25 + .../node_modules/picocolors/picocolors.browser.js | 4 + .../node_modules/picocolors/picocolors.d.ts | 5 + .../node_modules/picocolors/picocolors.js | 60 + .../postcss-fixes/node_modules/picocolors/types.ts | 30 + .../node_modules/postcss-calc/CHANGELOG.md | 76 + .../node_modules/postcss-calc/LICENSE | 20 + .../node_modules/postcss-calc/README.md | 171 + .../node_modules/postcss-calc/dist/index.js | 34 + .../postcss-calc/dist/lib/transform.js | 67 + .../postcss-calc/node_modules/postcss/LICENSE | 20 + .../postcss-calc/node_modules/postcss/README.md | 43 + .../node_modules/postcss/lib/at-rule.js | 127 + .../node_modules/postcss/lib/comment.js | 55 + .../node_modules/postcss/lib/container.js | 774 ++++ .../node_modules/postcss/lib/css-syntax-error.js | 296 ++ .../node_modules/postcss/lib/declaration.js | 96 + .../postcss-calc/node_modules/postcss/lib/input.js | 214 ++ .../node_modules/postcss/lib/lazy-result.js | 437 +++ .../postcss-calc/node_modules/postcss/lib/list.js | 93 + .../node_modules/postcss/lib/map-generator.js | 347 ++ .../postcss-calc/node_modules/postcss/lib/node.js | 606 +++ .../postcss-calc/node_modules/postcss/lib/parse.js | 40 + .../node_modules/postcss/lib/parser.js | 609 +++ .../node_modules/postcss/lib/postcss.d.ts | 1283 +++++++ .../node_modules/postcss/lib/postcss.js | 285 ++ .../node_modules/postcss/lib/previous-map.js | 172 + .../node_modules/postcss/lib/processor.js | 264 ++ .../node_modules/postcss/lib/result.js | 213 ++ .../postcss-calc/node_modules/postcss/lib/root.js | 122 + .../postcss-calc/node_modules/postcss/lib/rule.js | 116 + .../node_modules/postcss/lib/stringifier.js | 362 ++ .../node_modules/postcss/lib/stringify.js | 18 + .../node_modules/postcss/lib/terminal-highlight.js | 84 + .../node_modules/postcss/lib/tokenize.js | 295 ++ .../node_modules/postcss/lib/vendor.js | 53 + .../node_modules/postcss/lib/warn-once.js | 17 + .../node_modules/postcss/lib/warning.js | 131 + .../postcss-calc/node_modules/postcss/package.json | 37 + .../node_modules/reduce-css-calc/CHANGELOG.md | 167 + .../node_modules/reduce-css-calc/LICENSE | 20 + .../node_modules/reduce-css-calc/README.md | 76 + .../node_modules/reduce-css-calc/dist/index.js | 51 + .../reduce-css-calc/dist/lib/convert.js | 38 + .../reduce-css-calc/dist/lib/reducer.js | 258 ++ .../reduce-css-calc/dist/lib/stringifier.js | 78 + .../node_modules/reduce-css-calc/dist/parser.js | 3858 +++++++++++++++++++ .../node_modules/reduce-css-calc/package.json | 49 + .../node_modules/postcss-calc/package.json | 54 + .../node_modules/postcss-selector-parser/API.md | 624 ++++ .../postcss-selector-parser/CHANGELOG.md | 157 + .../postcss-selector-parser/LICENSE-MIT | 22 + .../node_modules/postcss-selector-parser/README.md | 46 + .../postcss-selector-parser/dist/index.js | 114 + .../postcss-selector-parser/dist/parser.js | 643 ++++ .../postcss-selector-parser/dist/processor.js | 49 + .../dist/selectors/attribute.js | 54 + .../dist/selectors/className.js | 39 + .../dist/selectors/combinator.js | 35 + .../dist/selectors/comment.js | 35 + .../dist/selectors/container.js | 338 ++ .../postcss-selector-parser/dist/selectors/id.js | 39 + .../dist/selectors/namespace.js | 45 + .../dist/selectors/nesting.js | 36 + .../postcss-selector-parser/dist/selectors/node.js | 102 + .../dist/selectors/pseudo.js | 40 + .../postcss-selector-parser/dist/selectors/root.js | 43 + .../dist/selectors/selector.js | 35 + .../dist/selectors/string.js | 35 + .../postcss-selector-parser/dist/selectors/tag.js | 35 + .../dist/selectors/types.js | 15 + .../dist/selectors/universal.js | 36 + .../postcss-selector-parser/dist/sortAscending.js | 10 + .../postcss-selector-parser/dist/tokenize.js | 231 ++ .../postcss-selector-parser/package.json | 64 + .../node_modules/postcss-value-parser/LICENSE | 22 + .../node_modules/postcss-value-parser/README.md | 253 ++ .../node_modules/postcss-value-parser/lib/index.js | 28 + .../node_modules/postcss-value-parser/lib/parse.js | 251 ++ .../postcss-value-parser/lib/stringify.js | 48 + .../node_modules/postcss-value-parser/lib/unit.js | 49 + .../node_modules/postcss-value-parser/lib/walk.js | 22 + .../node_modules/postcss-value-parser/package.json | 58 + node_modules/postcss-import/LICENSE | 20 + node_modules/postcss-import/README.md | 244 ++ node_modules/postcss-import/index.js | 420 +++ .../postcss-import/lib/assign-layer-names.js | 17 + node_modules/postcss-import/lib/data-url.js | 17 + node_modules/postcss-import/lib/join-layer.js | 9 + node_modules/postcss-import/lib/join-media.js | 28 + node_modules/postcss-import/lib/load-content.js | 12 + .../postcss-import/lib/parse-statements.js | 172 + node_modules/postcss-import/lib/process-content.js | 59 + node_modules/postcss-import/lib/resolve-id.js | 42 + .../postcss-import/node_modules/.bin/resolve | 1 + node_modules/postcss-import/package.json | 65 + node_modules/postcss-loader/CHANGELOG.md | 563 +++ node_modules/postcss-loader/LICENSE | 20 + node_modules/postcss-loader/README.md | 1175 ++++++ node_modules/postcss-loader/dist/cjs.js | 3 + node_modules/postcss-loader/dist/config.d.ts | 16 + node_modules/postcss-loader/dist/index.js | 168 + node_modules/postcss-loader/dist/options.json | 58 + node_modules/postcss-loader/dist/utils.js | 458 +++ node_modules/postcss-loader/node_modules/.bin/jiti | 1 + .../postcss-loader/node_modules/.bin/semver | 1 + .../postcss-loader/node_modules/lru-cache/LICENSE | 15 + .../node_modules/lru-cache/README.md | 166 + .../postcss-loader/node_modules/lru-cache/index.js | 334 ++ .../node_modules/lru-cache/package.json | 34 + .../postcss-loader/node_modules/semver/LICENSE | 15 + .../postcss-loader/node_modules/semver/README.md | 637 ++++ .../node_modules/semver/bin/semver.js | 197 + .../node_modules/semver/classes/comparator.js | 141 + .../node_modules/semver/classes/index.js | 5 + .../node_modules/semver/classes/range.js | 539 +++ .../node_modules/semver/classes/semver.js | 302 ++ .../node_modules/semver/functions/clean.js | 6 + .../node_modules/semver/functions/cmp.js | 52 + .../node_modules/semver/functions/coerce.js | 52 + .../node_modules/semver/functions/compare-build.js | 7 + .../node_modules/semver/functions/compare-loose.js | 3 + .../node_modules/semver/functions/compare.js | 5 + .../node_modules/semver/functions/diff.js | 65 + .../node_modules/semver/functions/eq.js | 3 + .../node_modules/semver/functions/gt.js | 3 + .../node_modules/semver/functions/gte.js | 3 + .../node_modules/semver/functions/inc.js | 19 + .../node_modules/semver/functions/lt.js | 3 + .../node_modules/semver/functions/lte.js | 3 + .../node_modules/semver/functions/major.js | 3 + .../node_modules/semver/functions/minor.js | 3 + .../node_modules/semver/functions/neq.js | 3 + .../node_modules/semver/functions/parse.js | 16 + .../node_modules/semver/functions/patch.js | 3 + .../node_modules/semver/functions/prerelease.js | 6 + .../node_modules/semver/functions/rcompare.js | 3 + .../node_modules/semver/functions/rsort.js | 3 + .../node_modules/semver/functions/satisfies.js | 10 + .../node_modules/semver/functions/sort.js | 3 + .../node_modules/semver/functions/valid.js | 6 + .../postcss-loader/node_modules/semver/index.js | 89 + .../node_modules/semver/internal/constants.js | 35 + .../node_modules/semver/internal/debug.js | 9 + .../node_modules/semver/internal/identifiers.js | 23 + .../node_modules/semver/internal/parse-options.js | 15 + .../node_modules/semver/internal/re.js | 212 ++ .../node_modules/semver/package.json | 87 + .../postcss-loader/node_modules/semver/preload.js | 2 + .../postcss-loader/node_modules/semver/range.bnf | 16 + .../node_modules/semver/ranges/gtr.js | 4 + .../node_modules/semver/ranges/intersects.js | 7 + .../node_modules/semver/ranges/ltr.js | 4 + .../node_modules/semver/ranges/max-satisfying.js | 25 + .../node_modules/semver/ranges/min-satisfying.js | 24 + .../node_modules/semver/ranges/min-version.js | 61 + .../node_modules/semver/ranges/outside.js | 80 + .../node_modules/semver/ranges/simplify.js | 47 + .../node_modules/semver/ranges/subset.js | 247 ++ .../node_modules/semver/ranges/to-comparators.js | 8 + .../node_modules/semver/ranges/valid.js | 11 + .../postcss-loader/node_modules/yallist/LICENSE | 15 + .../postcss-loader/node_modules/yallist/README.md | 204 ++ .../node_modules/yallist/iterator.js | 8 + .../node_modules/yallist/package.json | 29 + .../postcss-loader/node_modules/yallist/yallist.js | 426 +++ node_modules/postcss-loader/package.json | 100 + node_modules/postcss-message-helpers/CHANGELOG.md | 17 + node_modules/postcss-message-helpers/LICENSE | 20 + node_modules/postcss-message-helpers/README.md | 80 + node_modules/postcss-message-helpers/index.js | 81 + node_modules/postcss-message-helpers/package.json | 34 + node_modules/postcss-nested/LICENSE | 20 + node_modules/postcss-nested/README.md | 86 + node_modules/postcss-nested/index.d.ts | 41 + node_modules/postcss-nested/index.js | 361 ++ node_modules/postcss-nested/package.json | 28 + node_modules/postcss-unmq/.editorconfig | 14 + node_modules/postcss-unmq/.eslintrc | 122 + node_modules/postcss-unmq/.npmignore | 2 + node_modules/postcss-unmq/.travis.yml | 5 + node_modules/postcss-unmq/CHANGELOG.md | 11 + node_modules/postcss-unmq/CONTRIBUTING.md | 60 + node_modules/postcss-unmq/LICENSE.md | 15 + node_modules/postcss-unmq/README.md | 140 + node_modules/postcss-unmq/index.js | 41 + .../postcss-unmq/node_modules/ansi-styles/index.js | 65 + .../postcss-unmq/node_modules/ansi-styles/license | 21 + .../node_modules/ansi-styles/package.json | 50 + .../node_modules/ansi-styles/readme.md | 86 + .../postcss-unmq/node_modules/chalk/index.js | 116 + .../postcss-unmq/node_modules/chalk/license | 21 + .../chalk/node_modules/supports-color/index.js | 50 + .../chalk/node_modules/supports-color/license | 21 + .../chalk/node_modules/supports-color/package.json | 49 + .../chalk/node_modules/supports-color/readme.md | 36 + .../postcss-unmq/node_modules/chalk/package.json | 70 + .../postcss-unmq/node_modules/chalk/readme.md | 213 ++ .../postcss-unmq/node_modules/has-flag/index.js | 10 + .../postcss-unmq/node_modules/has-flag/license | 21 + .../node_modules/has-flag/package.json | 48 + .../postcss-unmq/node_modules/has-flag/readme.md | 64 + .../postcss-unmq/node_modules/postcss/CHANGELOG.md | 460 +++ .../postcss-unmq/node_modules/postcss/LICENSE | 20 + .../postcss-unmq/node_modules/postcss/README.md | 379 ++ .../node_modules/postcss/docs/guidelines/plugin.md | 195 + .../node_modules/postcss/docs/guidelines/runner.md | 143 + .../node_modules/postcss/docs/source-maps.md | 72 + .../node_modules/postcss/docs/syntax.md | 231 ++ .../node_modules/postcss/lib/at-rule.js | 159 + .../node_modules/postcss/lib/comment.js | 89 + .../node_modules/postcss/lib/container.js | 935 +++++ .../node_modules/postcss/lib/css-syntax-error.js | 272 ++ .../node_modules/postcss/lib/declaration.js | 130 + .../postcss-unmq/node_modules/postcss/lib/input.js | 198 + .../node_modules/postcss/lib/lazy-result.js | 432 +++ .../postcss-unmq/node_modules/postcss/lib/list.js | 95 + .../node_modules/postcss/lib/map-generator.js | 312 ++ .../postcss-unmq/node_modules/postcss/lib/node.js | 672 ++++ .../postcss-unmq/node_modules/postcss/lib/parse.js | 43 + .../node_modules/postcss/lib/parser.js | 514 +++ .../node_modules/postcss/lib/postcss.d.ts | 1305 +++++++ .../node_modules/postcss/lib/postcss.js | 292 ++ .../node_modules/postcss/lib/previous-map.js | 162 + .../node_modules/postcss/lib/processor.js | 240 ++ .../node_modules/postcss/lib/result.js | 206 ++ .../postcss-unmq/node_modules/postcss/lib/root.js | 143 + .../postcss-unmq/node_modules/postcss/lib/rule.js | 136 + .../node_modules/postcss/lib/stringifier.js | 335 ++ .../node_modules/postcss/lib/stringify.js | 17 + .../node_modules/postcss/lib/terminal-highlight.js | 76 + .../node_modules/postcss/lib/tokenize.js | 273 ++ .../node_modules/postcss/lib/vendor.js | 52 + .../node_modules/postcss/lib/warn-once.js | 14 + .../node_modules/postcss/lib/warning.js | 122 + .../postcss-unmq/node_modules/postcss/package.json | 76 + .../postcss-unmq/node_modules/strip-ansi/index.js | 6 + .../postcss-unmq/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 57 + .../postcss-unmq/node_modules/strip-ansi/readme.md | 33 + .../node_modules/supports-color/browser.js | 2 + .../node_modules/supports-color/index.js | 84 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 66 + .../node_modules/supports-color/readme.md | 60 + node_modules/postcss-unmq/package.json | 45 + .../postcss-unmq/test/fixtures/basic.actual.css | 14 + node_modules/postcss-unmq/test/fixtures/basic.css | 35 + .../postcss-unmq/test/fixtures/basic.expect.css | 14 + .../test/fixtures/basic.width.actual.css | 14 + .../test/fixtures/basic.width.expect.css | 14 + node_modules/postcss-unmq/test/index.js | 70 + node_modules/postcss-unnot/.editorconfig | 14 + node_modules/postcss-unnot/.eslintrc | 122 + node_modules/postcss-unnot/.npmignore | 2 + node_modules/postcss-unnot/.travis.yml | 5 + node_modules/postcss-unnot/CHANGELOG.md | 13 + node_modules/postcss-unnot/CONTRIBUTING.md | 60 + node_modules/postcss-unnot/LICENSE.md | 15 + node_modules/postcss-unnot/README.md | 167 + node_modules/postcss-unnot/index.js | 34 + .../node_modules/ansi-styles/index.js | 65 + .../postcss-unnot/node_modules/ansi-styles/license | 21 + .../node_modules/ansi-styles/package.json | 50 + .../node_modules/ansi-styles/readme.md | 86 + .../postcss-unnot/node_modules/chalk/index.js | 116 + .../postcss-unnot/node_modules/chalk/license | 21 + .../chalk/node_modules/supports-color/index.js | 50 + .../chalk/node_modules/supports-color/license | 21 + .../chalk/node_modules/supports-color/package.json | 49 + .../chalk/node_modules/supports-color/readme.md | 36 + .../postcss-unnot/node_modules/chalk/package.json | 70 + .../postcss-unnot/node_modules/chalk/readme.md | 213 ++ .../postcss-unnot/node_modules/has-flag/index.js | 10 + .../postcss-unnot/node_modules/has-flag/license | 21 + .../node_modules/has-flag/package.json | 48 + .../postcss-unnot/node_modules/has-flag/readme.md | 64 + .../node_modules/postcss-selector-parser/API.md | 536 +++ .../postcss-selector-parser/CHANGELOG.md | 107 + .../postcss-selector-parser/LICENSE-MIT | 22 + .../node_modules/postcss-selector-parser/README.md | 38 + .../postcss-selector-parser/dist/index.js | 104 + .../postcss-selector-parser/dist/parser.js | 555 +++ .../postcss-selector-parser/dist/processor.js | 46 + .../dist/selectors/attribute.js | 52 + .../dist/selectors/className.js | 37 + .../dist/selectors/combinator.js | 33 + .../dist/selectors/comment.js | 33 + .../dist/selectors/container.js | 322 ++ .../postcss-selector-parser/dist/selectors/id.js | 37 + .../dist/selectors/namespace.js | 45 + .../postcss-selector-parser/dist/selectors/node.js | 95 + .../dist/selectors/pseudo.js | 38 + .../postcss-selector-parser/dist/selectors/root.js | 41 + .../dist/selectors/selector.js | 33 + .../dist/selectors/string.js | 33 + .../postcss-selector-parser/dist/selectors/tag.js | 33 + .../dist/selectors/universal.js | 34 + .../postcss-selector-parser/dist/sortAscending.js | 10 + .../postcss-selector-parser/dist/tokenize.js | 226 ++ .../postcss-selector-parser/package.json | 56 + .../node_modules/postcss/CHANGELOG.md | 460 +++ .../postcss-unnot/node_modules/postcss/LICENSE | 20 + .../postcss-unnot/node_modules/postcss/README.md | 379 ++ .../node_modules/postcss/docs/guidelines/plugin.md | 195 + .../node_modules/postcss/docs/guidelines/runner.md | 143 + .../node_modules/postcss/docs/source-maps.md | 72 + .../node_modules/postcss/docs/syntax.md | 231 ++ .../node_modules/postcss/lib/at-rule.js | 159 + .../node_modules/postcss/lib/comment.js | 89 + .../node_modules/postcss/lib/container.js | 935 +++++ .../node_modules/postcss/lib/css-syntax-error.js | 272 ++ .../node_modules/postcss/lib/declaration.js | 130 + .../node_modules/postcss/lib/input.js | 198 + .../node_modules/postcss/lib/lazy-result.js | 432 +++ .../postcss-unnot/node_modules/postcss/lib/list.js | 95 + .../node_modules/postcss/lib/map-generator.js | 312 ++ .../postcss-unnot/node_modules/postcss/lib/node.js | 672 ++++ .../node_modules/postcss/lib/parse.js | 43 + .../node_modules/postcss/lib/parser.js | 514 +++ .../node_modules/postcss/lib/postcss.d.ts | 1305 +++++++ .../node_modules/postcss/lib/postcss.js | 292 ++ .../node_modules/postcss/lib/previous-map.js | 162 + .../node_modules/postcss/lib/processor.js | 240 ++ .../node_modules/postcss/lib/result.js | 206 ++ .../postcss-unnot/node_modules/postcss/lib/root.js | 143 + .../postcss-unnot/node_modules/postcss/lib/rule.js | 136 + .../node_modules/postcss/lib/stringifier.js | 335 ++ .../node_modules/postcss/lib/stringify.js | 17 + .../node_modules/postcss/lib/terminal-highlight.js | 76 + .../node_modules/postcss/lib/tokenize.js | 273 ++ .../node_modules/postcss/lib/vendor.js | 52 + .../node_modules/postcss/lib/warn-once.js | 14 + .../node_modules/postcss/lib/warning.js | 122 + .../node_modules/postcss/package.json | 76 + .../postcss-unnot/node_modules/strip-ansi/index.js | 6 + .../postcss-unnot/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 57 + .../node_modules/strip-ansi/readme.md | 33 + .../node_modules/supports-color/browser.js | 2 + .../node_modules/supports-color/index.js | 84 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 66 + .../node_modules/supports-color/readme.md | 60 + node_modules/postcss-unnot/package.json | 43 + .../postcss-unnot/test/fixtures/basic.actual.css | 3 + node_modules/postcss-unnot/test/fixtures/basic.css | 3 + .../postcss-unnot/test/fixtures/basic.expect.css | 3 + .../test/fixtures/basic.move.actual.css | 6 + .../test/fixtures/basic.move.expect.css | 6 + .../test/fixtures/basic.pseudo.actual.css | 3 + .../test/fixtures/basic.pseudo.expect.css | 3 + .../test/fixtures/basic.warn.expect.css | 3 + node_modules/postcss-unnot/test/index.js | 76 + node_modules/postcss-unnth/.editorconfig | 14 + node_modules/postcss-unnth/.eslintrc | 122 + node_modules/postcss-unnth/.npmignore | 2 + node_modules/postcss-unnth/.travis.yml | 5 + node_modules/postcss-unnth/CHANGELOG.md | 11 + node_modules/postcss-unnth/CONTRIBUTING.md | 60 + node_modules/postcss-unnth/LICENSE.md | 15 + node_modules/postcss-unnth/README.md | 107 + node_modules/postcss-unnth/index.js | 72 + .../node_modules/ansi-styles/index.js | 65 + .../postcss-unnth/node_modules/ansi-styles/license | 21 + .../node_modules/ansi-styles/package.json | 50 + .../node_modules/ansi-styles/readme.md | 86 + .../postcss-unnth/node_modules/chalk/index.js | 116 + .../postcss-unnth/node_modules/chalk/license | 21 + .../chalk/node_modules/supports-color/index.js | 50 + .../chalk/node_modules/supports-color/license | 21 + .../chalk/node_modules/supports-color/package.json | 49 + .../chalk/node_modules/supports-color/readme.md | 36 + .../postcss-unnth/node_modules/chalk/package.json | 70 + .../postcss-unnth/node_modules/chalk/readme.md | 213 ++ .../postcss-unnth/node_modules/has-flag/index.js | 10 + .../postcss-unnth/node_modules/has-flag/license | 21 + .../node_modules/has-flag/package.json | 48 + .../postcss-unnth/node_modules/has-flag/readme.md | 64 + .../node_modules/postcss-selector-parser/API.md | 536 +++ .../postcss-selector-parser/CHANGELOG.md | 107 + .../postcss-selector-parser/LICENSE-MIT | 22 + .../node_modules/postcss-selector-parser/README.md | 38 + .../postcss-selector-parser/dist/index.js | 104 + .../postcss-selector-parser/dist/parser.js | 555 +++ .../postcss-selector-parser/dist/processor.js | 46 + .../dist/selectors/attribute.js | 52 + .../dist/selectors/className.js | 37 + .../dist/selectors/combinator.js | 33 + .../dist/selectors/comment.js | 33 + .../dist/selectors/container.js | 322 ++ .../postcss-selector-parser/dist/selectors/id.js | 37 + .../dist/selectors/namespace.js | 45 + .../postcss-selector-parser/dist/selectors/node.js | 95 + .../dist/selectors/pseudo.js | 38 + .../postcss-selector-parser/dist/selectors/root.js | 41 + .../dist/selectors/selector.js | 33 + .../dist/selectors/string.js | 33 + .../postcss-selector-parser/dist/selectors/tag.js | 33 + .../dist/selectors/universal.js | 34 + .../postcss-selector-parser/dist/sortAscending.js | 10 + .../postcss-selector-parser/dist/tokenize.js | 226 ++ .../postcss-selector-parser/package.json | 56 + .../node_modules/postcss/CHANGELOG.md | 460 +++ .../postcss-unnth/node_modules/postcss/LICENSE | 20 + .../postcss-unnth/node_modules/postcss/README.md | 379 ++ .../node_modules/postcss/docs/guidelines/plugin.md | 195 + .../node_modules/postcss/docs/guidelines/runner.md | 143 + .../node_modules/postcss/docs/source-maps.md | 72 + .../node_modules/postcss/docs/syntax.md | 231 ++ .../node_modules/postcss/lib/at-rule.js | 159 + .../node_modules/postcss/lib/comment.js | 89 + .../node_modules/postcss/lib/container.js | 935 +++++ .../node_modules/postcss/lib/css-syntax-error.js | 272 ++ .../node_modules/postcss/lib/declaration.js | 130 + .../node_modules/postcss/lib/input.js | 198 + .../node_modules/postcss/lib/lazy-result.js | 432 +++ .../postcss-unnth/node_modules/postcss/lib/list.js | 95 + .../node_modules/postcss/lib/map-generator.js | 312 ++ .../postcss-unnth/node_modules/postcss/lib/node.js | 672 ++++ .../node_modules/postcss/lib/parse.js | 43 + .../node_modules/postcss/lib/parser.js | 514 +++ .../node_modules/postcss/lib/postcss.d.ts | 1305 +++++++ .../node_modules/postcss/lib/postcss.js | 292 ++ .../node_modules/postcss/lib/previous-map.js | 162 + .../node_modules/postcss/lib/processor.js | 240 ++ .../node_modules/postcss/lib/result.js | 206 ++ .../postcss-unnth/node_modules/postcss/lib/root.js | 143 + .../postcss-unnth/node_modules/postcss/lib/rule.js | 136 + .../node_modules/postcss/lib/stringifier.js | 335 ++ .../node_modules/postcss/lib/stringify.js | 17 + .../node_modules/postcss/lib/terminal-highlight.js | 76 + .../node_modules/postcss/lib/tokenize.js | 273 ++ .../node_modules/postcss/lib/vendor.js | 52 + .../node_modules/postcss/lib/warn-once.js | 14 + .../node_modules/postcss/lib/warning.js | 122 + .../node_modules/postcss/package.json | 76 + .../postcss-unnth/node_modules/strip-ansi/index.js | 6 + .../postcss-unnth/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 57 + .../node_modules/strip-ansi/readme.md | 33 + .../node_modules/supports-color/browser.js | 2 + .../node_modules/supports-color/index.js | 84 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 66 + .../node_modules/supports-color/readme.md | 60 + node_modules/postcss-unnth/package.json | 45 + .../postcss-unnth/test/fixtures/basic.actual.css | 27 + node_modules/postcss-unnth/test/fixtures/basic.css | 27 + .../postcss-unnth/test/fixtures/basic.expect.css | 27 + node_modules/postcss-unnth/test/index.js | 64 + node_modules/postcss-unrgba/.editorconfig | 14 + node_modules/postcss-unrgba/.eslintrc | 122 + node_modules/postcss-unrgba/.npmignore | 2 + node_modules/postcss-unrgba/.travis.yml | 5 + node_modules/postcss-unrgba/CHANGELOG.md | 13 + node_modules/postcss-unrgba/CONTRIBUTING.md | 60 + node_modules/postcss-unrgba/LICENSE.md | 15 + node_modules/postcss-unrgba/README.md | 198 + node_modules/postcss-unrgba/index.js | 59 + .../node_modules/ansi-styles/index.js | 65 + .../node_modules/ansi-styles/license | 21 + .../node_modules/ansi-styles/package.json | 50 + .../node_modules/ansi-styles/readme.md | 86 + .../postcss-unrgba/node_modules/chalk/index.js | 116 + .../postcss-unrgba/node_modules/chalk/license | 21 + .../chalk/node_modules/supports-color/index.js | 50 + .../chalk/node_modules/supports-color/license | 21 + .../chalk/node_modules/supports-color/package.json | 49 + .../chalk/node_modules/supports-color/readme.md | 36 + .../postcss-unrgba/node_modules/chalk/package.json | 70 + .../postcss-unrgba/node_modules/chalk/readme.md | 213 ++ .../postcss-unrgba/node_modules/has-flag/index.js | 10 + .../postcss-unrgba/node_modules/has-flag/license | 21 + .../node_modules/has-flag/package.json | 48 + .../postcss-unrgba/node_modules/has-flag/readme.md | 64 + .../node_modules/postcss-value-parser/LICENSE | 22 + .../node_modules/postcss-value-parser/README.md | 253 ++ .../node_modules/postcss-value-parser/lib/index.js | 28 + .../node_modules/postcss-value-parser/lib/parse.js | 251 ++ .../postcss-value-parser/lib/stringify.js | 48 + .../node_modules/postcss-value-parser/lib/unit.js | 49 + .../node_modules/postcss-value-parser/lib/walk.js | 22 + .../node_modules/postcss-value-parser/package.json | 58 + .../node_modules/postcss/CHANGELOG.md | 460 +++ .../postcss-unrgba/node_modules/postcss/LICENSE | 20 + .../postcss-unrgba/node_modules/postcss/README.md | 379 ++ .../node_modules/postcss/docs/guidelines/plugin.md | 195 + .../node_modules/postcss/docs/guidelines/runner.md | 143 + .../node_modules/postcss/docs/source-maps.md | 72 + .../node_modules/postcss/docs/syntax.md | 231 ++ .../node_modules/postcss/lib/at-rule.js | 159 + .../node_modules/postcss/lib/comment.js | 89 + .../node_modules/postcss/lib/container.js | 935 +++++ .../node_modules/postcss/lib/css-syntax-error.js | 272 ++ .../node_modules/postcss/lib/declaration.js | 130 + .../node_modules/postcss/lib/input.js | 198 + .../node_modules/postcss/lib/lazy-result.js | 432 +++ .../node_modules/postcss/lib/list.js | 95 + .../node_modules/postcss/lib/map-generator.js | 312 ++ .../node_modules/postcss/lib/node.js | 672 ++++ .../node_modules/postcss/lib/parse.js | 43 + .../node_modules/postcss/lib/parser.js | 514 +++ .../node_modules/postcss/lib/postcss.d.ts | 1305 +++++++ .../node_modules/postcss/lib/postcss.js | 292 ++ .../node_modules/postcss/lib/previous-map.js | 162 + .../node_modules/postcss/lib/processor.js | 240 ++ .../node_modules/postcss/lib/result.js | 206 ++ .../node_modules/postcss/lib/root.js | 143 + .../node_modules/postcss/lib/rule.js | 136 + .../node_modules/postcss/lib/stringifier.js | 335 ++ .../node_modules/postcss/lib/stringify.js | 17 + .../node_modules/postcss/lib/terminal-highlight.js | 76 + .../node_modules/postcss/lib/tokenize.js | 273 ++ .../node_modules/postcss/lib/vendor.js | 52 + .../node_modules/postcss/lib/warn-once.js | 14 + .../node_modules/postcss/lib/warning.js | 122 + .../node_modules/postcss/package.json | 76 + .../node_modules/strip-ansi/index.js | 6 + .../postcss-unrgba/node_modules/strip-ansi/license | 21 + .../node_modules/strip-ansi/package.json | 57 + .../node_modules/strip-ansi/readme.md | 33 + .../node_modules/supports-color/browser.js | 2 + .../node_modules/supports-color/index.js | 84 + .../node_modules/supports-color/license | 21 + .../node_modules/supports-color/package.json | 66 + .../node_modules/supports-color/readme.md | 60 + node_modules/postcss-unrgba/package.json | 50 + .../postcss-unrgba/test/fixtures/basic.actual.css | 50 + .../test/fixtures/basic.clone.actual.css | 63 + .../test/fixtures/basic.clone.expect.css | 63 + .../postcss-unrgba/test/fixtures/basic.css | 50 + .../postcss-unrgba/test/fixtures/basic.expect.css | 50 + .../test/fixtures/basic.filter.actual.css | 53 + .../test/fixtures/basic.filter.expect.css | 53 + .../fixtures/basic.filter.properties.actual.css | 51 + .../fixtures/basic.filter.properties.expect.css | 51 + .../test/fixtures/basic.properties.actual.css | 50 + .../test/fixtures/basic.properties.expect.css | 50 + .../test/fixtures/basic.replace.actual.css | 50 + .../test/fixtures/basic.replace.expect.css | 50 + .../test/fixtures/basic.warn.actual.css | 50 + .../test/fixtures/basic.warn.expect.css | 50 + node_modules/postcss-unrgba/test/index.js | 89 + node_modules/resolve-from/index.js | 47 + node_modules/resolve-from/license | 9 + node_modules/resolve-from/package.json | 34 + node_modules/resolve-from/readme.md | 72 + 921 files changed, 120051 insertions(+), 25233 deletions(-) create mode 120000 node_modules/.bin/jiti create mode 120000 node_modules/.bin/js-yaml create mode 100644 node_modules/argparse/CHANGELOG.md create mode 100644 node_modules/argparse/LICENSE create mode 100644 node_modules/argparse/README.md create mode 100644 node_modules/argparse/argparse.js create mode 100644 node_modules/argparse/lib/sub.js create mode 100644 node_modules/argparse/lib/textwrap.js create mode 100644 node_modules/argparse/package.json create mode 100644 node_modules/callsites/index.d.ts create mode 100644 node_modules/callsites/index.js create mode 100644 node_modules/callsites/license create mode 100644 node_modules/callsites/package.json create mode 100644 node_modules/callsites/readme.md create mode 100644 node_modules/cosmiconfig/LICENSE create mode 100644 node_modules/cosmiconfig/README.md create mode 100644 node_modules/cosmiconfig/dist/Explorer.d.ts create mode 100644 node_modules/cosmiconfig/dist/Explorer.d.ts.map create mode 100644 node_modules/cosmiconfig/dist/Explorer.js create mode 100644 node_modules/cosmiconfig/dist/Explorer.js.map create mode 100644 node_modules/cosmiconfig/dist/ExplorerBase.d.ts create mode 100644 node_modules/cosmiconfig/dist/ExplorerBase.d.ts.map create mode 100644 node_modules/cosmiconfig/dist/ExplorerBase.js create mode 100644 node_modules/cosmiconfig/dist/ExplorerBase.js.map create mode 100644 node_modules/cosmiconfig/dist/ExplorerSync.d.ts create mode 100644 node_modules/cosmiconfig/dist/ExplorerSync.d.ts.map create mode 100644 node_modules/cosmiconfig/dist/ExplorerSync.js create mode 100644 node_modules/cosmiconfig/dist/ExplorerSync.js.map create mode 100644 node_modules/cosmiconfig/dist/index.d.ts create mode 100644 node_modules/cosmiconfig/dist/index.d.ts.map create mode 100644 node_modules/cosmiconfig/dist/index.js create mode 100644 node_modules/cosmiconfig/dist/index.js.map create mode 100644 node_modules/cosmiconfig/dist/loaders.d.ts create mode 100644 node_modules/cosmiconfig/dist/loaders.d.ts.map create mode 100644 node_modules/cosmiconfig/dist/loaders.js create mode 100644 node_modules/cosmiconfig/dist/loaders.js.map create mode 100644 node_modules/cosmiconfig/dist/types.d.ts create mode 100644 node_modules/cosmiconfig/dist/types.d.ts.map create mode 100644 node_modules/cosmiconfig/dist/types.js create mode 100644 node_modules/cosmiconfig/dist/types.js.map create mode 100644 node_modules/cosmiconfig/dist/util.d.ts create mode 100644 node_modules/cosmiconfig/dist/util.d.ts.map create mode 100644 node_modules/cosmiconfig/dist/util.js create mode 100644 node_modules/cosmiconfig/dist/util.js.map create mode 120000 node_modules/cosmiconfig/node_modules/.bin/js-yaml create mode 100644 node_modules/cosmiconfig/package.json create mode 100644 node_modules/css-mediaquery/.npmignore create mode 100644 node_modules/css-mediaquery/HISTORY.md create mode 100644 node_modules/css-mediaquery/LICENSE create mode 100644 node_modules/css-mediaquery/README.md create mode 100644 node_modules/css-mediaquery/index.js create mode 100644 node_modules/css-mediaquery/package.json create mode 100644 node_modules/error-ex/LICENSE create mode 100644 node_modules/error-ex/README.md create mode 100644 node_modules/error-ex/index.js create mode 100644 node_modules/error-ex/package.json create mode 100644 node_modules/import-fresh/index.d.ts create mode 100644 node_modules/import-fresh/index.js create mode 100644 node_modules/import-fresh/license create mode 100644 node_modules/import-fresh/package.json create mode 100644 node_modules/import-fresh/readme.md create mode 100644 node_modules/is-arrayish/.editorconfig create mode 100644 node_modules/is-arrayish/.istanbul.yml create mode 100644 node_modules/is-arrayish/.npmignore create mode 100644 node_modules/is-arrayish/.travis.yml create mode 100644 node_modules/is-arrayish/LICENSE create mode 100644 node_modules/is-arrayish/README.md create mode 100644 node_modules/is-arrayish/index.js create mode 100644 node_modules/is-arrayish/package.json create mode 100644 node_modules/jiti/LICENSE create mode 100644 node_modules/jiti/README.md create mode 100755 node_modules/jiti/bin/jiti.js create mode 100644 node_modules/jiti/dist/babel.d.ts create mode 100644 node_modules/jiti/dist/babel.js create mode 100644 node_modules/jiti/dist/jiti.d.ts create mode 100644 node_modules/jiti/dist/jiti.js create mode 100644 node_modules/jiti/dist/plugins/babel-plugin-transform-import-meta.d.ts create mode 100644 node_modules/jiti/dist/plugins/import-meta-env.d.ts create mode 100644 node_modules/jiti/dist/types.d.ts create mode 100644 node_modules/jiti/dist/utils.d.ts create mode 100644 node_modules/jiti/lib/index.js create mode 100644 node_modules/jiti/package.json create mode 100644 node_modules/jiti/register.js create mode 100644 node_modules/js-yaml/CHANGELOG.md create mode 100644 node_modules/js-yaml/LICENSE create mode 100644 node_modules/js-yaml/README.md create mode 100755 node_modules/js-yaml/bin/js-yaml.js create mode 100644 node_modules/js-yaml/dist/js-yaml.js create mode 100644 node_modules/js-yaml/dist/js-yaml.min.js create mode 100644 node_modules/js-yaml/dist/js-yaml.mjs create mode 100644 node_modules/js-yaml/index.js create mode 100644 node_modules/js-yaml/lib/common.js create mode 100644 node_modules/js-yaml/lib/dumper.js create mode 100644 node_modules/js-yaml/lib/exception.js create mode 100644 node_modules/js-yaml/lib/loader.js create mode 100644 node_modules/js-yaml/lib/schema.js create mode 100644 node_modules/js-yaml/lib/schema/core.js create mode 100644 node_modules/js-yaml/lib/schema/default.js create mode 100644 node_modules/js-yaml/lib/schema/failsafe.js create mode 100644 node_modules/js-yaml/lib/schema/json.js create mode 100644 node_modules/js-yaml/lib/snippet.js create mode 100644 node_modules/js-yaml/lib/type.js create mode 100644 node_modules/js-yaml/lib/type/binary.js create mode 100644 node_modules/js-yaml/lib/type/bool.js create mode 100644 node_modules/js-yaml/lib/type/float.js create mode 100644 node_modules/js-yaml/lib/type/int.js create mode 100644 node_modules/js-yaml/lib/type/map.js create mode 100644 node_modules/js-yaml/lib/type/merge.js create mode 100644 node_modules/js-yaml/lib/type/null.js create mode 100644 node_modules/js-yaml/lib/type/omap.js create mode 100644 node_modules/js-yaml/lib/type/pairs.js create mode 100644 node_modules/js-yaml/lib/type/seq.js create mode 100644 node_modules/js-yaml/lib/type/set.js create mode 100644 node_modules/js-yaml/lib/type/str.js create mode 100644 node_modules/js-yaml/lib/type/timestamp.js create mode 100644 node_modules/js-yaml/package.json create mode 100644 node_modules/json-parse-even-better-errors/CHANGELOG.md create mode 100644 node_modules/json-parse-even-better-errors/LICENSE.md create mode 100644 node_modules/json-parse-even-better-errors/README.md create mode 100644 node_modules/json-parse-even-better-errors/index.js create mode 100644 node_modules/json-parse-even-better-errors/package.json create mode 100644 node_modules/lines-and-columns/LICENSE create mode 100644 node_modules/lines-and-columns/README.md create mode 100644 node_modules/lines-and-columns/build/index.d.ts create mode 100644 node_modules/lines-and-columns/build/index.js create mode 100644 node_modules/lines-and-columns/package.json create mode 100644 node_modules/object-assign/index.js create mode 100644 node_modules/object-assign/license create mode 100644 node_modules/object-assign/package.json create mode 100644 node_modules/object-assign/readme.md create mode 100644 node_modules/oldie/.editorconfig create mode 100644 node_modules/oldie/.eslintrc create mode 100644 node_modules/oldie/.npmignore create mode 100644 node_modules/oldie/.travis.yml create mode 100644 node_modules/oldie/CHANGELOG.md create mode 100644 node_modules/oldie/CONTRIBUTING.md create mode 100644 node_modules/oldie/LICENSE.md create mode 100644 node_modules/oldie/README.md create mode 100644 node_modules/oldie/index.js create mode 100644 node_modules/oldie/node_modules/ansi-styles/index.js create mode 100644 node_modules/oldie/node_modules/ansi-styles/license create mode 100644 node_modules/oldie/node_modules/ansi-styles/package.json create mode 100644 node_modules/oldie/node_modules/ansi-styles/readme.md create mode 100644 node_modules/oldie/node_modules/browserslist/CHANGELOG.md create mode 100644 node_modules/oldie/node_modules/browserslist/LICENSE create mode 100644 node_modules/oldie/node_modules/browserslist/README.md create mode 100755 node_modules/oldie/node_modules/browserslist/cli.js create mode 100644 node_modules/oldie/node_modules/browserslist/index.js create mode 100644 node_modules/oldie/node_modules/browserslist/package.json create mode 100644 node_modules/oldie/node_modules/chalk/index.js create mode 100644 node_modules/oldie/node_modules/chalk/license create mode 100644 node_modules/oldie/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/oldie/node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/oldie/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/oldie/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/oldie/node_modules/chalk/package.json create mode 100644 node_modules/oldie/node_modules/chalk/readme.md create mode 100644 node_modules/oldie/node_modules/has-flag/index.js create mode 100644 node_modules/oldie/node_modules/has-flag/license create mode 100644 node_modules/oldie/node_modules/has-flag/package.json create mode 100644 node_modules/oldie/node_modules/has-flag/readme.md create mode 100644 node_modules/oldie/node_modules/pixrem/.editorconfig create mode 100644 node_modules/oldie/node_modules/pixrem/.gitattributes create mode 100644 node_modules/oldie/node_modules/pixrem/.jshintrc create mode 100644 node_modules/oldie/node_modules/pixrem/.npmignore create mode 100644 node_modules/oldie/node_modules/pixrem/.travis.yml create mode 100644 node_modules/oldie/node_modules/pixrem/CHANGELOG.md create mode 100644 node_modules/oldie/node_modules/pixrem/LICENSE create mode 100644 node_modules/oldie/node_modules/pixrem/README.md create mode 100644 node_modules/oldie/node_modules/pixrem/lib/pixrem.js create mode 120000 node_modules/oldie/node_modules/pixrem/node_modules/.bin/browserslist create mode 100644 node_modules/oldie/node_modules/pixrem/package.json create mode 100644 node_modules/oldie/node_modules/pixrem/test/test.js create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/.npmignore create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/ChangeLog.md create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/README.md create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/index.js create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/package.json create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/test/expected.css create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/test/input.css create mode 100644 node_modules/oldie/node_modules/postcss-pseudoelements/test/test.js create mode 100644 node_modules/oldie/node_modules/postcss/CHANGELOG.md create mode 100644 node_modules/oldie/node_modules/postcss/LICENSE create mode 100644 node_modules/oldie/node_modules/postcss/README.md create mode 100644 node_modules/oldie/node_modules/postcss/docs/guidelines/plugin.md create mode 100644 node_modules/oldie/node_modules/postcss/docs/guidelines/runner.md create mode 100644 node_modules/oldie/node_modules/postcss/docs/source-maps.md create mode 100644 node_modules/oldie/node_modules/postcss/docs/syntax.md create mode 100644 node_modules/oldie/node_modules/postcss/lib/at-rule.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/comment.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/container.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/css-syntax-error.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/declaration.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/input.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/lazy-result.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/list.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/map-generator.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/node.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/parse.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/parser.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/postcss.d.ts create mode 100644 node_modules/oldie/node_modules/postcss/lib/postcss.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/previous-map.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/processor.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/result.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/root.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/rule.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/stringifier.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/stringify.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/terminal-highlight.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/tokenize.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/vendor.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/warn-once.js create mode 100644 node_modules/oldie/node_modules/postcss/lib/warning.js create mode 100644 node_modules/oldie/node_modules/postcss/package.json create mode 100644 node_modules/oldie/node_modules/strip-ansi/index.js create mode 100644 node_modules/oldie/node_modules/strip-ansi/license create mode 100644 node_modules/oldie/node_modules/strip-ansi/package.json create mode 100644 node_modules/oldie/node_modules/strip-ansi/readme.md create mode 100644 node_modules/oldie/node_modules/supports-color/browser.js create mode 100644 node_modules/oldie/node_modules/supports-color/index.js create mode 100644 node_modules/oldie/node_modules/supports-color/license create mode 100644 node_modules/oldie/node_modules/supports-color/package.json create mode 100644 node_modules/oldie/node_modules/supports-color/readme.md create mode 100644 node_modules/oldie/package.json create mode 100644 node_modules/oldie/test/fixtures/basic.css create mode 100644 node_modules/oldie/test/fixtures/basic.expect.css create mode 100644 node_modules/oldie/test/test.js create mode 100644 node_modules/parent-module/index.js create mode 100644 node_modules/parent-module/license create mode 100644 node_modules/parent-module/package.json create mode 100644 node_modules/parent-module/readme.md create mode 100644 node_modules/parse-json/index.js create mode 100644 node_modules/parse-json/license create mode 100644 node_modules/parse-json/package.json create mode 100644 node_modules/parse-json/readme.md delete mode 100644 node_modules/postcss-calc/dist/index.js delete mode 100644 node_modules/postcss-calc/dist/lib/transform.js create mode 100755 node_modules/postcss-calc/index.js create mode 100644 node_modules/postcss-calc/node_modules/ansi-styles/index.js create mode 100644 node_modules/postcss-calc/node_modules/ansi-styles/license create mode 100644 node_modules/postcss-calc/node_modules/ansi-styles/package.json create mode 100644 node_modules/postcss-calc/node_modules/ansi-styles/readme.md create mode 100644 node_modules/postcss-calc/node_modules/chalk/index.js create mode 100644 node_modules/postcss-calc/node_modules/chalk/license create mode 100644 node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-calc/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-calc/node_modules/chalk/package.json create mode 100644 node_modules/postcss-calc/node_modules/chalk/readme.md create mode 100644 node_modules/postcss-calc/node_modules/has-flag/index.js create mode 100644 node_modules/postcss-calc/node_modules/has-flag/license create mode 100644 node_modules/postcss-calc/node_modules/has-flag/package.json create mode 100644 node_modules/postcss-calc/node_modules/has-flag/readme.md delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/LICENSE delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/README.md delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/package.json delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/picocolors.browser.js delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/picocolors.d.ts delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/picocolors.js delete mode 100644 node_modules/postcss-calc/node_modules/picocolors/types.ts delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/API.md delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/CHANGELOG.md delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/LICENSE-MIT delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/README.md delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/index.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/parser.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/processor.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/attribute.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/className.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/combinator.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/comment.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/container.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/id.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/namespace.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/nesting.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/node.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/pseudo.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/root.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/selector.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/string.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/tag.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/types.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/selectors/universal.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/sortAscending.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/dist/tokenize.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-selector-parser/package.json delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/LICENSE delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/README.md delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/index.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/parse.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/stringify.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/unit.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/lib/walk.js delete mode 100644 node_modules/postcss-calc/node_modules/postcss-value-parser/package.json create mode 100644 node_modules/postcss-calc/node_modules/postcss/CHANGELOG.md create mode 100644 node_modules/postcss-calc/node_modules/postcss/docs/guidelines/plugin.md create mode 100644 node_modules/postcss-calc/node_modules/postcss/docs/guidelines/runner.md create mode 100644 node_modules/postcss-calc/node_modules/postcss/docs/source-maps.md create mode 100644 node_modules/postcss-calc/node_modules/postcss/docs/syntax.md delete mode 100755 node_modules/postcss-calc/node_modules/reduce-css-calc/CHANGELOG.md delete mode 100755 node_modules/postcss-calc/node_modules/reduce-css-calc/LICENSE delete mode 100755 node_modules/postcss-calc/node_modules/reduce-css-calc/README.md delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/index.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/convert.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/reducer.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/stringifier.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/dist/parser.js delete mode 100644 node_modules/postcss-calc/node_modules/reduce-css-calc/package.json delete mode 100644 node_modules/postcss-calc/node_modules/source-map/CHANGELOG.md delete mode 100644 node_modules/postcss-calc/node_modules/source-map/LICENSE delete mode 100644 node_modules/postcss-calc/node_modules/source-map/README.md delete mode 100644 node_modules/postcss-calc/node_modules/source-map/dist/source-map.debug.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/dist/source-map.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/dist/source-map.min.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/dist/source-map.min.js.map delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/array-set.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/base64-vlq.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/base64.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/binary-search.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/mapping-list.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/quick-sort.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/source-map-consumer.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/source-map-generator.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/source-node.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/lib/util.js delete mode 100644 node_modules/postcss-calc/node_modules/source-map/package.json delete mode 100644 node_modules/postcss-calc/node_modules/source-map/source-map.d.ts delete mode 100644 node_modules/postcss-calc/node_modules/source-map/source-map.js create mode 100644 node_modules/postcss-calc/node_modules/strip-ansi/index.js create mode 100644 node_modules/postcss-calc/node_modules/strip-ansi/license create mode 100644 node_modules/postcss-calc/node_modules/strip-ansi/package.json create mode 100644 node_modules/postcss-calc/node_modules/strip-ansi/readme.md create mode 100644 node_modules/postcss-calc/node_modules/supports-color/browser.js create mode 100644 node_modules/postcss-calc/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-calc/node_modules/supports-color/license create mode 100644 node_modules/postcss-calc/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-calc/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-fixes/node_modules/picocolors/LICENSE create mode 100644 node_modules/postcss-fixes/node_modules/picocolors/README.md create mode 100644 node_modules/postcss-fixes/node_modules/picocolors/package.json create mode 100644 node_modules/postcss-fixes/node_modules/picocolors/picocolors.browser.js create mode 100644 node_modules/postcss-fixes/node_modules/picocolors/picocolors.d.ts create mode 100644 node_modules/postcss-fixes/node_modules/picocolors/picocolors.js create mode 100644 node_modules/postcss-fixes/node_modules/picocolors/types.ts create mode 100755 node_modules/postcss-fixes/node_modules/postcss-calc/CHANGELOG.md create mode 100755 node_modules/postcss-fixes/node_modules/postcss-calc/LICENSE create mode 100755 node_modules/postcss-fixes/node_modules/postcss-calc/README.md create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/dist/index.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/dist/lib/transform.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/LICENSE create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/README.md create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/at-rule.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/comment.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/container.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/css-syntax-error.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/declaration.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/input.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/lazy-result.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/list.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/map-generator.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/node.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/parse.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/parser.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/postcss.d.ts create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/postcss.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/previous-map.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/processor.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/result.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/root.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/rule.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/stringifier.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/stringify.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/terminal-highlight.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/tokenize.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/vendor.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/warn-once.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/lib/warning.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/postcss/package.json create mode 100755 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/CHANGELOG.md create mode 100755 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/LICENSE create mode 100755 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/README.md create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/dist/index.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/convert.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/reducer.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/dist/lib/stringifier.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/dist/parser.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/node_modules/reduce-css-calc/package.json create mode 100644 node_modules/postcss-fixes/node_modules/postcss-calc/package.json create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/API.md create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/CHANGELOG.md create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/LICENSE-MIT create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/README.md create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/index.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/parser.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/processor.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/attribute.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/className.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/combinator.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/comment.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/container.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/id.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/namespace.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/nesting.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/node.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/pseudo.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/root.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/selector.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/string.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/tag.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/types.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/selectors/universal.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/sortAscending.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/dist/tokenize.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-selector-parser/package.json create mode 100644 node_modules/postcss-fixes/node_modules/postcss-value-parser/LICENSE create mode 100644 node_modules/postcss-fixes/node_modules/postcss-value-parser/README.md create mode 100644 node_modules/postcss-fixes/node_modules/postcss-value-parser/lib/index.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-value-parser/lib/parse.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-value-parser/lib/stringify.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-value-parser/lib/unit.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-value-parser/lib/walk.js create mode 100644 node_modules/postcss-fixes/node_modules/postcss-value-parser/package.json create mode 100755 node_modules/postcss-import/LICENSE create mode 100644 node_modules/postcss-import/README.md create mode 100755 node_modules/postcss-import/index.js create mode 100644 node_modules/postcss-import/lib/assign-layer-names.js create mode 100644 node_modules/postcss-import/lib/data-url.js create mode 100644 node_modules/postcss-import/lib/join-layer.js create mode 100644 node_modules/postcss-import/lib/join-media.js create mode 100644 node_modules/postcss-import/lib/load-content.js create mode 100644 node_modules/postcss-import/lib/parse-statements.js create mode 100644 node_modules/postcss-import/lib/process-content.js create mode 100644 node_modules/postcss-import/lib/resolve-id.js create mode 120000 node_modules/postcss-import/node_modules/.bin/resolve create mode 100644 node_modules/postcss-import/package.json create mode 100644 node_modules/postcss-loader/CHANGELOG.md create mode 100644 node_modules/postcss-loader/LICENSE create mode 100644 node_modules/postcss-loader/README.md create mode 100644 node_modules/postcss-loader/dist/cjs.js create mode 100644 node_modules/postcss-loader/dist/config.d.ts create mode 100644 node_modules/postcss-loader/dist/index.js create mode 100644 node_modules/postcss-loader/dist/options.json create mode 100644 node_modules/postcss-loader/dist/utils.js create mode 120000 node_modules/postcss-loader/node_modules/.bin/jiti create mode 120000 node_modules/postcss-loader/node_modules/.bin/semver create mode 100644 node_modules/postcss-loader/node_modules/lru-cache/LICENSE create mode 100644 node_modules/postcss-loader/node_modules/lru-cache/README.md create mode 100644 node_modules/postcss-loader/node_modules/lru-cache/index.js create mode 100644 node_modules/postcss-loader/node_modules/lru-cache/package.json create mode 100644 node_modules/postcss-loader/node_modules/semver/LICENSE create mode 100644 node_modules/postcss-loader/node_modules/semver/README.md create mode 100755 node_modules/postcss-loader/node_modules/semver/bin/semver.js create mode 100644 node_modules/postcss-loader/node_modules/semver/classes/comparator.js create mode 100644 node_modules/postcss-loader/node_modules/semver/classes/index.js create mode 100644 node_modules/postcss-loader/node_modules/semver/classes/range.js create mode 100644 node_modules/postcss-loader/node_modules/semver/classes/semver.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/clean.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/cmp.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/coerce.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/compare-build.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/compare-loose.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/compare.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/diff.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/eq.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/gt.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/gte.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/inc.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/lt.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/lte.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/major.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/minor.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/neq.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/parse.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/patch.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/prerelease.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/rcompare.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/rsort.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/satisfies.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/sort.js create mode 100644 node_modules/postcss-loader/node_modules/semver/functions/valid.js create mode 100644 node_modules/postcss-loader/node_modules/semver/index.js create mode 100644 node_modules/postcss-loader/node_modules/semver/internal/constants.js create mode 100644 node_modules/postcss-loader/node_modules/semver/internal/debug.js create mode 100644 node_modules/postcss-loader/node_modules/semver/internal/identifiers.js create mode 100644 node_modules/postcss-loader/node_modules/semver/internal/parse-options.js create mode 100644 node_modules/postcss-loader/node_modules/semver/internal/re.js create mode 100644 node_modules/postcss-loader/node_modules/semver/package.json create mode 100644 node_modules/postcss-loader/node_modules/semver/preload.js create mode 100644 node_modules/postcss-loader/node_modules/semver/range.bnf create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/gtr.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/intersects.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/ltr.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/max-satisfying.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/min-satisfying.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/min-version.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/outside.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/simplify.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/subset.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/to-comparators.js create mode 100644 node_modules/postcss-loader/node_modules/semver/ranges/valid.js create mode 100644 node_modules/postcss-loader/node_modules/yallist/LICENSE create mode 100644 node_modules/postcss-loader/node_modules/yallist/README.md create mode 100644 node_modules/postcss-loader/node_modules/yallist/iterator.js create mode 100644 node_modules/postcss-loader/node_modules/yallist/package.json create mode 100644 node_modules/postcss-loader/node_modules/yallist/yallist.js create mode 100644 node_modules/postcss-loader/package.json create mode 100755 node_modules/postcss-message-helpers/CHANGELOG.md create mode 100755 node_modules/postcss-message-helpers/LICENSE create mode 100755 node_modules/postcss-message-helpers/README.md create mode 100755 node_modules/postcss-message-helpers/index.js create mode 100644 node_modules/postcss-message-helpers/package.json create mode 100644 node_modules/postcss-nested/LICENSE create mode 100644 node_modules/postcss-nested/README.md create mode 100644 node_modules/postcss-nested/index.d.ts create mode 100644 node_modules/postcss-nested/index.js create mode 100644 node_modules/postcss-nested/package.json create mode 100644 node_modules/postcss-unmq/.editorconfig create mode 100644 node_modules/postcss-unmq/.eslintrc create mode 100644 node_modules/postcss-unmq/.npmignore create mode 100644 node_modules/postcss-unmq/.travis.yml create mode 100644 node_modules/postcss-unmq/CHANGELOG.md create mode 100644 node_modules/postcss-unmq/CONTRIBUTING.md create mode 100644 node_modules/postcss-unmq/LICENSE.md create mode 100644 node_modules/postcss-unmq/README.md create mode 100644 node_modules/postcss-unmq/index.js create mode 100644 node_modules/postcss-unmq/node_modules/ansi-styles/index.js create mode 100644 node_modules/postcss-unmq/node_modules/ansi-styles/license create mode 100644 node_modules/postcss-unmq/node_modules/ansi-styles/package.json create mode 100644 node_modules/postcss-unmq/node_modules/ansi-styles/readme.md create mode 100644 node_modules/postcss-unmq/node_modules/chalk/index.js create mode 100644 node_modules/postcss-unmq/node_modules/chalk/license create mode 100644 node_modules/postcss-unmq/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-unmq/node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/postcss-unmq/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-unmq/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-unmq/node_modules/chalk/package.json create mode 100644 node_modules/postcss-unmq/node_modules/chalk/readme.md create mode 100644 node_modules/postcss-unmq/node_modules/has-flag/index.js create mode 100644 node_modules/postcss-unmq/node_modules/has-flag/license create mode 100644 node_modules/postcss-unmq/node_modules/has-flag/package.json create mode 100644 node_modules/postcss-unmq/node_modules/has-flag/readme.md create mode 100644 node_modules/postcss-unmq/node_modules/postcss/CHANGELOG.md create mode 100644 node_modules/postcss-unmq/node_modules/postcss/LICENSE create mode 100644 node_modules/postcss-unmq/node_modules/postcss/README.md create mode 100644 node_modules/postcss-unmq/node_modules/postcss/docs/guidelines/plugin.md create mode 100644 node_modules/postcss-unmq/node_modules/postcss/docs/guidelines/runner.md create mode 100644 node_modules/postcss-unmq/node_modules/postcss/docs/source-maps.md create mode 100644 node_modules/postcss-unmq/node_modules/postcss/docs/syntax.md create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/at-rule.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/comment.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/container.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/css-syntax-error.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/declaration.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/input.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/lazy-result.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/list.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/map-generator.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/node.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/parse.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/parser.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/postcss.d.ts create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/postcss.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/previous-map.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/processor.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/result.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/root.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/rule.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/stringifier.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/stringify.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/terminal-highlight.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/tokenize.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/vendor.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/warn-once.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/lib/warning.js create mode 100644 node_modules/postcss-unmq/node_modules/postcss/package.json create mode 100644 node_modules/postcss-unmq/node_modules/strip-ansi/index.js create mode 100644 node_modules/postcss-unmq/node_modules/strip-ansi/license create mode 100644 node_modules/postcss-unmq/node_modules/strip-ansi/package.json create mode 100644 node_modules/postcss-unmq/node_modules/strip-ansi/readme.md create mode 100644 node_modules/postcss-unmq/node_modules/supports-color/browser.js create mode 100644 node_modules/postcss-unmq/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-unmq/node_modules/supports-color/license create mode 100644 node_modules/postcss-unmq/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-unmq/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-unmq/package.json create mode 100644 node_modules/postcss-unmq/test/fixtures/basic.actual.css create mode 100644 node_modules/postcss-unmq/test/fixtures/basic.css create mode 100644 node_modules/postcss-unmq/test/fixtures/basic.expect.css create mode 100644 node_modules/postcss-unmq/test/fixtures/basic.width.actual.css create mode 100644 node_modules/postcss-unmq/test/fixtures/basic.width.expect.css create mode 100644 node_modules/postcss-unmq/test/index.js create mode 100644 node_modules/postcss-unnot/.editorconfig create mode 100644 node_modules/postcss-unnot/.eslintrc create mode 100644 node_modules/postcss-unnot/.npmignore create mode 100644 node_modules/postcss-unnot/.travis.yml create mode 100644 node_modules/postcss-unnot/CHANGELOG.md create mode 100644 node_modules/postcss-unnot/CONTRIBUTING.md create mode 100644 node_modules/postcss-unnot/LICENSE.md create mode 100644 node_modules/postcss-unnot/README.md create mode 100644 node_modules/postcss-unnot/index.js create mode 100644 node_modules/postcss-unnot/node_modules/ansi-styles/index.js create mode 100644 node_modules/postcss-unnot/node_modules/ansi-styles/license create mode 100644 node_modules/postcss-unnot/node_modules/ansi-styles/package.json create mode 100644 node_modules/postcss-unnot/node_modules/ansi-styles/readme.md create mode 100644 node_modules/postcss-unnot/node_modules/chalk/index.js create mode 100644 node_modules/postcss-unnot/node_modules/chalk/license create mode 100644 node_modules/postcss-unnot/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-unnot/node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/postcss-unnot/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-unnot/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-unnot/node_modules/chalk/package.json create mode 100644 node_modules/postcss-unnot/node_modules/chalk/readme.md create mode 100644 node_modules/postcss-unnot/node_modules/has-flag/index.js create mode 100644 node_modules/postcss-unnot/node_modules/has-flag/license create mode 100644 node_modules/postcss-unnot/node_modules/has-flag/package.json create mode 100644 node_modules/postcss-unnot/node_modules/has-flag/readme.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/API.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/CHANGELOG.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/LICENSE-MIT create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/README.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/index.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/parser.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/processor.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/attribute.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/className.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/combinator.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/comment.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/container.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/id.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/namespace.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/node.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/pseudo.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/root.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/selector.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/string.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/tag.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/selectors/universal.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/sortAscending.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/dist/tokenize.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss-selector-parser/package.json create mode 100644 node_modules/postcss-unnot/node_modules/postcss/CHANGELOG.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss/LICENSE create mode 100644 node_modules/postcss-unnot/node_modules/postcss/README.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss/docs/guidelines/plugin.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss/docs/guidelines/runner.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss/docs/source-maps.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss/docs/syntax.md create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/at-rule.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/comment.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/container.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/css-syntax-error.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/declaration.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/input.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/lazy-result.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/list.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/map-generator.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/node.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/parse.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/parser.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/postcss.d.ts create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/postcss.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/previous-map.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/processor.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/result.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/root.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/rule.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/stringifier.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/stringify.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/terminal-highlight.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/tokenize.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/vendor.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/warn-once.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/lib/warning.js create mode 100644 node_modules/postcss-unnot/node_modules/postcss/package.json create mode 100644 node_modules/postcss-unnot/node_modules/strip-ansi/index.js create mode 100644 node_modules/postcss-unnot/node_modules/strip-ansi/license create mode 100644 node_modules/postcss-unnot/node_modules/strip-ansi/package.json create mode 100644 node_modules/postcss-unnot/node_modules/strip-ansi/readme.md create mode 100644 node_modules/postcss-unnot/node_modules/supports-color/browser.js create mode 100644 node_modules/postcss-unnot/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-unnot/node_modules/supports-color/license create mode 100644 node_modules/postcss-unnot/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-unnot/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-unnot/package.json create mode 100644 node_modules/postcss-unnot/test/fixtures/basic.actual.css create mode 100644 node_modules/postcss-unnot/test/fixtures/basic.css create mode 100644 node_modules/postcss-unnot/test/fixtures/basic.expect.css create mode 100644 node_modules/postcss-unnot/test/fixtures/basic.move.actual.css create mode 100644 node_modules/postcss-unnot/test/fixtures/basic.move.expect.css create mode 100644 node_modules/postcss-unnot/test/fixtures/basic.pseudo.actual.css create mode 100644 node_modules/postcss-unnot/test/fixtures/basic.pseudo.expect.css create mode 100644 node_modules/postcss-unnot/test/fixtures/basic.warn.expect.css create mode 100644 node_modules/postcss-unnot/test/index.js create mode 100644 node_modules/postcss-unnth/.editorconfig create mode 100644 node_modules/postcss-unnth/.eslintrc create mode 100644 node_modules/postcss-unnth/.npmignore create mode 100644 node_modules/postcss-unnth/.travis.yml create mode 100644 node_modules/postcss-unnth/CHANGELOG.md create mode 100644 node_modules/postcss-unnth/CONTRIBUTING.md create mode 100644 node_modules/postcss-unnth/LICENSE.md create mode 100644 node_modules/postcss-unnth/README.md create mode 100644 node_modules/postcss-unnth/index.js create mode 100644 node_modules/postcss-unnth/node_modules/ansi-styles/index.js create mode 100644 node_modules/postcss-unnth/node_modules/ansi-styles/license create mode 100644 node_modules/postcss-unnth/node_modules/ansi-styles/package.json create mode 100644 node_modules/postcss-unnth/node_modules/ansi-styles/readme.md create mode 100644 node_modules/postcss-unnth/node_modules/chalk/index.js create mode 100644 node_modules/postcss-unnth/node_modules/chalk/license create mode 100644 node_modules/postcss-unnth/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-unnth/node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/postcss-unnth/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-unnth/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-unnth/node_modules/chalk/package.json create mode 100644 node_modules/postcss-unnth/node_modules/chalk/readme.md create mode 100644 node_modules/postcss-unnth/node_modules/has-flag/index.js create mode 100644 node_modules/postcss-unnth/node_modules/has-flag/license create mode 100644 node_modules/postcss-unnth/node_modules/has-flag/package.json create mode 100644 node_modules/postcss-unnth/node_modules/has-flag/readme.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/API.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/CHANGELOG.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/LICENSE-MIT create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/README.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/index.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/parser.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/processor.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/attribute.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/className.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/combinator.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/comment.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/container.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/id.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/namespace.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/node.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/pseudo.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/root.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/selector.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/string.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/tag.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/selectors/universal.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/sortAscending.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/dist/tokenize.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss-selector-parser/package.json create mode 100644 node_modules/postcss-unnth/node_modules/postcss/CHANGELOG.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss/LICENSE create mode 100644 node_modules/postcss-unnth/node_modules/postcss/README.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss/docs/guidelines/plugin.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss/docs/guidelines/runner.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss/docs/source-maps.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss/docs/syntax.md create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/at-rule.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/comment.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/container.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/css-syntax-error.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/declaration.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/input.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/lazy-result.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/list.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/map-generator.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/node.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/parse.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/parser.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/postcss.d.ts create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/postcss.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/previous-map.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/processor.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/result.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/root.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/rule.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/stringifier.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/stringify.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/terminal-highlight.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/tokenize.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/vendor.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/warn-once.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/lib/warning.js create mode 100644 node_modules/postcss-unnth/node_modules/postcss/package.json create mode 100644 node_modules/postcss-unnth/node_modules/strip-ansi/index.js create mode 100644 node_modules/postcss-unnth/node_modules/strip-ansi/license create mode 100644 node_modules/postcss-unnth/node_modules/strip-ansi/package.json create mode 100644 node_modules/postcss-unnth/node_modules/strip-ansi/readme.md create mode 100644 node_modules/postcss-unnth/node_modules/supports-color/browser.js create mode 100644 node_modules/postcss-unnth/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-unnth/node_modules/supports-color/license create mode 100644 node_modules/postcss-unnth/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-unnth/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-unnth/package.json create mode 100644 node_modules/postcss-unnth/test/fixtures/basic.actual.css create mode 100644 node_modules/postcss-unnth/test/fixtures/basic.css create mode 100644 node_modules/postcss-unnth/test/fixtures/basic.expect.css create mode 100644 node_modules/postcss-unnth/test/index.js create mode 100644 node_modules/postcss-unrgba/.editorconfig create mode 100644 node_modules/postcss-unrgba/.eslintrc create mode 100644 node_modules/postcss-unrgba/.npmignore create mode 100644 node_modules/postcss-unrgba/.travis.yml create mode 100644 node_modules/postcss-unrgba/CHANGELOG.md create mode 100644 node_modules/postcss-unrgba/CONTRIBUTING.md create mode 100644 node_modules/postcss-unrgba/LICENSE.md create mode 100644 node_modules/postcss-unrgba/README.md create mode 100644 node_modules/postcss-unrgba/index.js create mode 100644 node_modules/postcss-unrgba/node_modules/ansi-styles/index.js create mode 100644 node_modules/postcss-unrgba/node_modules/ansi-styles/license create mode 100644 node_modules/postcss-unrgba/node_modules/ansi-styles/package.json create mode 100644 node_modules/postcss-unrgba/node_modules/ansi-styles/readme.md create mode 100644 node_modules/postcss-unrgba/node_modules/chalk/index.js create mode 100644 node_modules/postcss-unrgba/node_modules/chalk/license create mode 100644 node_modules/postcss-unrgba/node_modules/chalk/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-unrgba/node_modules/chalk/node_modules/supports-color/license create mode 100644 node_modules/postcss-unrgba/node_modules/chalk/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-unrgba/node_modules/chalk/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-unrgba/node_modules/chalk/package.json create mode 100644 node_modules/postcss-unrgba/node_modules/chalk/readme.md create mode 100644 node_modules/postcss-unrgba/node_modules/has-flag/index.js create mode 100644 node_modules/postcss-unrgba/node_modules/has-flag/license create mode 100644 node_modules/postcss-unrgba/node_modules/has-flag/package.json create mode 100644 node_modules/postcss-unrgba/node_modules/has-flag/readme.md create mode 100644 node_modules/postcss-unrgba/node_modules/postcss-value-parser/LICENSE create mode 100644 node_modules/postcss-unrgba/node_modules/postcss-value-parser/README.md create mode 100644 node_modules/postcss-unrgba/node_modules/postcss-value-parser/lib/index.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss-value-parser/lib/parse.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss-value-parser/lib/stringify.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss-value-parser/lib/unit.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss-value-parser/lib/walk.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss-value-parser/package.json create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/CHANGELOG.md create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/LICENSE create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/README.md create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/docs/guidelines/plugin.md create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/docs/guidelines/runner.md create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/docs/source-maps.md create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/docs/syntax.md create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/at-rule.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/comment.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/container.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/css-syntax-error.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/declaration.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/input.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/lazy-result.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/list.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/map-generator.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/node.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/parse.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/parser.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/postcss.d.ts create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/postcss.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/previous-map.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/processor.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/result.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/root.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/rule.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/stringifier.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/stringify.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/terminal-highlight.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/tokenize.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/vendor.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/warn-once.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/lib/warning.js create mode 100644 node_modules/postcss-unrgba/node_modules/postcss/package.json create mode 100644 node_modules/postcss-unrgba/node_modules/strip-ansi/index.js create mode 100644 node_modules/postcss-unrgba/node_modules/strip-ansi/license create mode 100644 node_modules/postcss-unrgba/node_modules/strip-ansi/package.json create mode 100644 node_modules/postcss-unrgba/node_modules/strip-ansi/readme.md create mode 100644 node_modules/postcss-unrgba/node_modules/supports-color/browser.js create mode 100644 node_modules/postcss-unrgba/node_modules/supports-color/index.js create mode 100644 node_modules/postcss-unrgba/node_modules/supports-color/license create mode 100644 node_modules/postcss-unrgba/node_modules/supports-color/package.json create mode 100644 node_modules/postcss-unrgba/node_modules/supports-color/readme.md create mode 100644 node_modules/postcss-unrgba/package.json create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.actual.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.clone.actual.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.clone.expect.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.expect.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.filter.actual.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.filter.expect.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.filter.properties.actual.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.filter.properties.expect.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.properties.actual.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.properties.expect.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.replace.actual.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.replace.expect.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.warn.actual.css create mode 100644 node_modules/postcss-unrgba/test/fixtures/basic.warn.expect.css create mode 100644 node_modules/postcss-unrgba/test/index.js create mode 100644 node_modules/resolve-from/index.js create mode 100644 node_modules/resolve-from/license create mode 100644 node_modules/resolve-from/package.json create mode 100644 node_modules/resolve-from/readme.md diff --git a/node_modules/.bin/jiti b/node_modules/.bin/jiti new file mode 120000 index 00000000..031ee3fd --- /dev/null +++ b/node_modules/.bin/jiti @@ -0,0 +1 @@ +../jiti/bin/jiti.js \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml new file mode 120000 index 00000000..9dbd010d --- /dev/null +++ b/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity index cf5ca76d..4f4410ba 100644 --- a/node_modules/.yarn-integrity +++ b/node_modules/.yarn-integrity @@ -1,5 +1,5 @@ { - "systemParams": "darwin-arm64-115", + "systemParams": "darwin-arm64-120", "modulesFolders": [ "node_modules" ], @@ -15,10 +15,14 @@ "doiuse@^6.0.2", "g@^2.0.1", "install@^0.13.0", + "oldie@^1.3.0", "pixrem@^5.0.0", "postcss-cli@^10.1.0", "postcss-color-rgba-fallback@^4.0.0", "postcss-fixes@^3.0.0", + "postcss-import@^15.1.0", + "postcss-loader@^7.3.3", + "postcss-nested@^6.0.1", "postcss-opacity@^5.0.0", "postcss-preset-env@^9.2.0", "postcss-pseudoelements@^5.0.0", @@ -30,6 +34,7 @@ "lockfileEntries": { "@ampproject/remapping@^2.2.0": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", "@babel/cli@^7.23.0": "https://registry.npmjs.org/@babel/cli/-/cli-7.23.0.tgz", + "@babel/code-frame@^7.0.0": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", "@babel/code-frame@^7.22.13": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", "@babel/compat-data@^7.22.6": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", "@babel/compat-data@^7.22.9": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", @@ -220,6 +225,7 @@ "ansi-styles@^3.2.1": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "ansi-styles@^4.0.0": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "anymatch@~3.1.2": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "argparse@^2.0.1": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "array-differ@^3.0.0": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", "array-union@^2.1.0": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "arrify@^2.0.1": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", @@ -228,7 +234,7 @@ "babel-plugin-polyfill-corejs2@^0.4.6": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz", "babel-plugin-polyfill-corejs3@^0.8.5": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.5.tgz", "babel-plugin-polyfill-regenerator@^0.5.3": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz", - "babel-plugin-uglify@^1.0.2": "https://registry.yarnpkg.com/babel-plugin-uglify/-/babel-plugin-uglify-1.0.2.tgz#d7bcdab132afbadb0bf3479a5666eb8de082610f", + "babel-plugin-uglify@^1.0.2": "https://registry.npmjs.org/babel-plugin-uglify/-/babel-plugin-uglify-1.0.2.tgz", "balanced-match@^0.4.2": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", "balanced-match@^1.0.0": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "binary-extensions@^2.0.0": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -246,6 +252,7 @@ "browserslist@^4.21.9": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", "browserslist@^4.22.1": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", "browserslist@^4.3.6": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "callsites@^3.0.0": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "camelcase@^1.0.2": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", "caniuse-api@^3.0.0": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", "caniuse-db@^1.0.30000639": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001549.tgz", @@ -276,9 +283,11 @@ "core-js-compat@^3.31.0": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.0.tgz", "core-js-compat@^3.32.2": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.0.tgz", "core-util-is@~1.0.0": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "cosmiconfig@^8.2.0": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", "css-blank-pseudo@^6.0.0": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-6.0.0.tgz", "css-declaration-sorter@^6.3.1": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz", "css-has-pseudo@^6.0.0": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-6.0.0.tgz", + "css-mediaquery@^0.1.2": "https://registry.yarnpkg.com/css-mediaquery/-/css-mediaquery-0.1.2.tgz#6a2c37344928618631c54bd33cedd301da18bea0", "css-prefers-color-scheme@^9.0.0": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-9.0.0.tgz", "css-select@^5.1.0": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", "css-tokenize@^1.0.1": "https://registry.npmjs.org/css-tokenize/-/css-tokenize-1.0.1.tgz", @@ -310,6 +319,7 @@ "emoji-regex@^8.0.0": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "end-of-stream@^1.4.1": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "entities@^4.2.0": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "error-ex@^1.3.1": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "escalade@^3.1.1": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "escape-string-regexp@^1.0.2": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "escape-string-regexp@^1.0.5": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -340,13 +350,15 @@ "has-flag@^3.0.0": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "has@^1.0.3": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", "ignore@^5.2.4": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "import-fresh@^3.3.0": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "indexes-of@^1.0.1": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", "inflight@^1.0.4": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "inherits@2": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "inherits@^2.0.1": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "inherits@^2.0.3": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "inherits@~2.0.1": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "install@^0.13.0": "https://registry.yarnpkg.com/install/-/install-0.13.0.tgz#6af6e9da9dd0987de2ab420f78e60d9c17260776", + "install@^0.13.0": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", + "is-arrayish@^0.2.1": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "is-binary-path@~2.1.0": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "is-buffer@^1.1.5": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "is-core-module@^2.13.0": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", @@ -356,10 +368,13 @@ "is-glob@~4.0.1": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "is-number@^7.0.0": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "isarray@0.0.1": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "jiti@^1.18.2": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz", "js-base64@^2.1.9": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", "js-tokens@^4.0.0": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "js-yaml@^4.1.0": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "jsesc@^2.5.1": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "jsesc@~0.5.0": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "json-parse-even-better-errors@^2.3.0": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "json5@^2.2.3": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "jsonfile@^6.0.1": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "kind-of@^3.0.2": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -368,6 +383,7 @@ "ldjson-stream@^1.2.1": "https://registry.npmjs.org/ldjson-stream/-/ldjson-stream-1.2.1.tgz", "lilconfig@^2.0.5": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", "lilconfig@^2.1.0": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "lines-and-columns@^1.1.6": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "lodash.debounce@^4.0.8": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "lodash.memoize@^4.1.2": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "lodash.uniq@^4.5.0": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -376,6 +392,7 @@ "log-symbols@^2.0.0": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", "longest@^1.0.1": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "lru-cache@^5.1.1": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "lru-cache@^6.0.0": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "make-dir@^2.1.0": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "math-expression-evaluator@^1.2.14": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.4.0.tgz", "mdn-data@2.0.28": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", @@ -396,8 +413,12 @@ "normalize-range@^0.1.2": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", "nth-check@^2.0.1": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", "num2fraction@^1.2.2": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "object-assign@^4.0.1": "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863", + "oldie@^1.3.0": "https://registry.yarnpkg.com/oldie/-/oldie-1.3.0.tgz#d84ae43b25307771c0c68823445abb7ad932c974", "once@^1.3.0": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "once@^1.4.0": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "parent-module@^1.0.0": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "parse-json@^5.2.0": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "path-is-absolute@^1.0.0": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "path-parse@^1.0.7": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "path-type@^4.0.0": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -408,11 +429,13 @@ "picomatch@^2.3.1": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "pify@^2.3.0": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "pify@^4.0.1": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "pixrem@^3.0.0": "https://registry.npmjs.org/pixrem/-/pixrem-3.0.2.tgz", "pixrem@^3.0.2": "https://registry.npmjs.org/pixrem/-/pixrem-3.0.2.tgz", "pixrem@^4.0.1": "https://registry.npmjs.org/pixrem/-/pixrem-4.0.1.tgz", "pixrem@^5.0.0": "https://registry.npmjs.org/pixrem/-/pixrem-5.0.0.tgz", "postcss-alias@^2.0.0": "https://registry.npmjs.org/postcss-alias/-/postcss-alias-2.0.0.tgz", "postcss-attribute-case-insensitive@^6.0.2": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-6.0.2.tgz", + "postcss-calc@^5.0.0": "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e", "postcss-calc@^6.0.2": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-6.0.2.tgz", "postcss-calc@^9.0.0": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-9.0.1.tgz", "postcss-clamp@^4.1.0": "https://registry.npmjs.org/postcss-clamp/-/postcss-clamp-4.1.0.tgz", @@ -444,16 +467,20 @@ "postcss-gap-properties@^5.0.0": "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-5.0.0.tgz", "postcss-hexrgba@^1.0.0": "https://registry.npmjs.org/postcss-hexrgba/-/postcss-hexrgba-1.0.2.tgz", "postcss-image-set-function@^6.0.1": "https://registry.npmjs.org/postcss-image-set-function/-/postcss-image-set-function-6.0.1.tgz", + "postcss-import@^15.1.0": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", "postcss-input-style@^1.0.0": "https://registry.npmjs.org/postcss-input-style/-/postcss-input-style-1.0.0.tgz", "postcss-lab-function@^6.0.7": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-6.0.7.tgz", "postcss-load-config@^4.0.0": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", + "postcss-loader@^7.3.3": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.3.tgz", "postcss-logical@^7.0.0": "https://registry.npmjs.org/postcss-logical/-/postcss-logical-7.0.0.tgz", "postcss-merge-longhand@^6.0.0": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.0.tgz", "postcss-merge-rules@^6.0.1": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-6.0.1.tgz", + "postcss-message-helpers@^2.0.0": "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e", "postcss-minify-font-values@^6.0.0": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-6.0.0.tgz", "postcss-minify-gradients@^6.0.0": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-6.0.0.tgz", "postcss-minify-params@^6.0.0": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-6.0.0.tgz", "postcss-minify-selectors@^6.0.0": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-6.0.0.tgz", + "postcss-nested@^6.0.1": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", "postcss-nesting@^12.0.1": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-12.0.1.tgz", "postcss-normalize-charset@^6.0.0": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.0.tgz", "postcss-normalize-display-values@^6.0.0": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-6.0.0.tgz", @@ -475,7 +502,7 @@ "postcss-preset-env@^9.2.0": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-9.2.0.tgz", "postcss-pseudo-class-any-link@^9.0.0": "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-9.0.0.tgz", "postcss-pseudoelements@^3.0.0": "https://registry.npmjs.org/postcss-pseudoelements/-/postcss-pseudoelements-3.0.0.tgz", - "postcss-pseudoelements@^5.0.0": "https://registry.npmjs.org/postcss-pseudoelements/-/postcss-pseudoelements-5.0.0.tgz", + "postcss-pseudoelements@^5.0.0": "https://registry.yarnpkg.com/postcss-pseudoelements/-/postcss-pseudoelements-5.0.0.tgz#eef194e8d524645ca520a949e95e518e812402cb", "postcss-quantity-queries@^0.5.0": "https://registry.npmjs.org/postcss-quantity-queries/-/postcss-quantity-queries-0.5.0.tgz", "postcss-reduce-initial@^6.0.0": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-6.0.0.tgz", "postcss-reduce-transforms@^6.0.0": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-6.0.0.tgz", @@ -493,10 +520,18 @@ "postcss-selector-parser@^6.0.5": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", "postcss-svgo@^6.0.0": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-6.0.0.tgz", "postcss-unique-selectors@^6.0.0": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-6.0.0.tgz", + "postcss-unmq@^1.0.0": "https://registry.yarnpkg.com/postcss-unmq/-/postcss-unmq-1.0.2.tgz#5101616ba7214b2f535e3abf628d82454be52885", + "postcss-unnot@^1.0.1": "https://registry.yarnpkg.com/postcss-unnot/-/postcss-unnot-1.0.2.tgz#44e91c1ac2d89d5dbb6eaa626686bbaf56b5590a", + "postcss-unnth@^1.0.1": "https://registry.yarnpkg.com/postcss-unnth/-/postcss-unnth-1.0.2.tgz#a0c0b2ad6917c629d720063da70b3d4106660ad8", + "postcss-unopacity@^1.0.0": "https://registry.npmjs.org/postcss-unopacity/-/postcss-unopacity-1.0.1.tgz", "postcss-unopacity@^1.0.1": "https://registry.npmjs.org/postcss-unopacity/-/postcss-unopacity-1.0.1.tgz", + "postcss-unrgba@^1.1.0": "https://registry.yarnpkg.com/postcss-unrgba/-/postcss-unrgba-1.1.1.tgz#62ef1627bd4c142c118bb6c02c536729f6d843bb", + "postcss-unroot@^1.0.0": "https://registry.npmjs.org/postcss-unroot/-/postcss-unroot-1.0.2.tgz", "postcss-unroot@^1.0.2": "https://registry.npmjs.org/postcss-unroot/-/postcss-unroot-1.0.2.tgz", + "postcss-value-parser@^3.1.1": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", "postcss-value-parser@^3.2.3": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", "postcss-value-parser@^3.3.0": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "postcss-value-parser@^4.0.0": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "postcss-value-parser@^4.0.2": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "postcss-value-parser@^4.2.0": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "postcss-vmin@^3.0.0": "https://registry.npmjs.org/postcss-vmin/-/postcss-vmin-3.0.0.tgz", @@ -504,7 +539,9 @@ "postcss-will-change@^4.0.1": "https://registry.npmjs.org/postcss-will-change/-/postcss-will-change-4.0.1.tgz", "postcss@^5.0.0": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", "postcss@^5.0.10": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "postcss@^5.0.2": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", "postcss@^5.0.4": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "postcss@^5.0.9": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", "postcss@^6.0.0": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", "postcss@^6.0.1": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", "postcss@^6.0.14": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", @@ -526,6 +563,7 @@ "readable-stream@^1.0.33": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "readable-stream@^3.1.1": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "readdirp@~3.6.0": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "reduce-css-calc@^1.2.6": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", "reduce-css-calc@^1.2.7": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", "reduce-css-calc@^2.0.0": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.8.tgz", "reduce-css-calc@^2.1.5": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-2.1.8.tgz", @@ -538,6 +576,8 @@ "regjsparser@^0.9.1": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", "repeat-string@^1.5.2": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "require-directory@^2.1.1": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "resolve-from@^4.0.0": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "resolve@^1.1.7": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "resolve@^1.14.2": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "reusify@^1.0.4": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "rgb-hex@^2.1.0": "https://registry.npmjs.org/rgb-hex/-/rgb-hex-2.1.0.tgz", @@ -548,6 +588,7 @@ "safe-buffer@~5.2.0": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "semver@^5.6.0": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "semver@^6.3.1": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "semver@^7.3.8": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "slash@^2.0.0": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", "slash@^4.0.0": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", "slash@^5.0.0": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", @@ -599,6 +640,7 @@ "xtend@>=4.0.0 <4.1.0-0": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "y18n@^5.0.5": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "yallist@^3.0.2": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "yallist@^4.0.0": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "yaml@^2.1.1": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz", "yargs-parser@^21.1.1": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "yargs@^17.0.0": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/node_modules/argparse/CHANGELOG.md b/node_modules/argparse/CHANGELOG.md new file mode 100644 index 00000000..dc39ed69 --- /dev/null +++ b/node_modules/argparse/CHANGELOG.md @@ -0,0 +1,216 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [2.0.1] - 2020-08-29 +### Fixed +- Fix issue with `process.argv` when used with interpreters (`coffee`, `ts-node`, etc.), #150. + + +## [2.0.0] - 2020-08-14 +### Changed +- Full rewrite. Now port from python 3.9.0 & more precise following. + See [doc](./doc) for difference and migration info. +- node.js 10+ required +- Removed most of local docs in favour of original ones. + + +## [1.0.10] - 2018-02-15 +### Fixed +- Use .concat instead of + for arrays, #122. + + +## [1.0.9] - 2016-09-29 +### Changed +- Rerelease after 1.0.8 - deps cleanup. + + +## [1.0.8] - 2016-09-29 +### Changed +- Maintenance (deps bump, fix node 6.5+ tests, coverage report). + + +## [1.0.7] - 2016-03-17 +### Changed +- Teach `addArgument` to accept string arg names. #97, @tomxtobin. + + +## [1.0.6] - 2016-02-06 +### Changed +- Maintenance: moved to eslint & updated CS. + + +## [1.0.5] - 2016-02-05 +### Changed +- Removed lodash dependency to significantly reduce install size. + Thanks to @mourner. + + +## [1.0.4] - 2016-01-17 +### Changed +- Maintenance: lodash update to 4.0.0. + + +## [1.0.3] - 2015-10-27 +### Fixed +- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. + + +## [1.0.2] - 2015-03-22 +### Changed +- Relaxed lodash version dependency. + + +## [1.0.1] - 2015-02-20 +### Changed +- Changed dependencies to be compatible with ancient nodejs. + + +## [1.0.0] - 2015-02-19 +### Changed +- Maintenance release. +- Replaced `underscore` with `lodash`. +- Bumped version to 1.0.0 to better reflect semver meaning. +- HISTORY.md -> CHANGELOG.md + + +## [0.1.16] - 2013-12-01 +### Changed +- Maintenance release. Updated dependencies and docs. + + +## [0.1.15] - 2013-05-13 +### Fixed +- Fixed #55, @trebor89 + + +## [0.1.14] - 2013-05-12 +### Fixed +- Fixed #62, @maxtaco + + +## [0.1.13] - 2013-04-08 +### Changed +- Added `.npmignore` to reduce package size + + +## [0.1.12] - 2013-02-10 +### Fixed +- Fixed conflictHandler (#46), @hpaulj + + +## [0.1.11] - 2013-02-07 +### Added +- Added 70+ tests (ported from python), @hpaulj +- Added conflictHandler, @applepicke +- Added fromfilePrefixChar, @hpaulj + +### Fixed +- Multiple bugfixes, @hpaulj + + +## [0.1.10] - 2012-12-30 +### Added +- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) + support, thanks to @hpaulj + +### Fixed +- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj + + +## [0.1.9] - 2012-12-27 +### Fixed +- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj +- Fixed default value behavior with `*` positionals, thanks to @hpaulj +- Improve `getDefault()` behavior, thanks to @hpaulj +- Improve negative argument parsing, thanks to @hpaulj + + +## [0.1.8] - 2012-12-01 +### Fixed +- Fixed parser parents (issue #19), thanks to @hpaulj +- Fixed negative argument parse (issue #20), thanks to @hpaulj + + +## [0.1.7] - 2012-10-14 +### Fixed +- Fixed 'choices' argument parse (issue #16) +- Fixed stderr output (issue #15) + + +## [0.1.6] - 2012-09-09 +### Fixed +- Fixed check for conflict of options (thanks to @tomxtobin) + + +## [0.1.5] - 2012-09-03 +### Fixed +- Fix parser #setDefaults method (thanks to @tomxtobin) + + +## [0.1.4] - 2012-07-30 +### Fixed +- Fixed pseudo-argument support (thanks to @CGamesPlay) +- Fixed addHelp default (should be true), if not set (thanks to @benblank) + + +## [0.1.3] - 2012-06-27 +### Fixed +- Fixed formatter api name: Formatter -> HelpFormatter + + +## [0.1.2] - 2012-05-29 +### Fixed +- Removed excess whitespace in help +- Fixed error reporting, when parcer with subcommands + called with empty arguments + +### Added +- Added basic tests + + +## [0.1.1] - 2012-05-23 +### Fixed +- Fixed line wrapping in help formatter +- Added better error reporting on invalid arguments + + +## [0.1.0] - 2012-05-16 +### Added +- First release. + + +[2.0.1]: https://github.com/nodeca/argparse/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/nodeca/argparse/compare/1.0.10...2.0.0 +[1.0.10]: https://github.com/nodeca/argparse/compare/1.0.9...1.0.10 +[1.0.9]: https://github.com/nodeca/argparse/compare/1.0.8...1.0.9 +[1.0.8]: https://github.com/nodeca/argparse/compare/1.0.7...1.0.8 +[1.0.7]: https://github.com/nodeca/argparse/compare/1.0.6...1.0.7 +[1.0.6]: https://github.com/nodeca/argparse/compare/1.0.5...1.0.6 +[1.0.5]: https://github.com/nodeca/argparse/compare/1.0.4...1.0.5 +[1.0.4]: https://github.com/nodeca/argparse/compare/1.0.3...1.0.4 +[1.0.3]: https://github.com/nodeca/argparse/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/nodeca/argparse/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/nodeca/argparse/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/nodeca/argparse/compare/0.1.16...1.0.0 +[0.1.16]: https://github.com/nodeca/argparse/compare/0.1.15...0.1.16 +[0.1.15]: https://github.com/nodeca/argparse/compare/0.1.14...0.1.15 +[0.1.14]: https://github.com/nodeca/argparse/compare/0.1.13...0.1.14 +[0.1.13]: https://github.com/nodeca/argparse/compare/0.1.12...0.1.13 +[0.1.12]: https://github.com/nodeca/argparse/compare/0.1.11...0.1.12 +[0.1.11]: https://github.com/nodeca/argparse/compare/0.1.10...0.1.11 +[0.1.10]: https://github.com/nodeca/argparse/compare/0.1.9...0.1.10 +[0.1.9]: https://github.com/nodeca/argparse/compare/0.1.8...0.1.9 +[0.1.8]: https://github.com/nodeca/argparse/compare/0.1.7...0.1.8 +[0.1.7]: https://github.com/nodeca/argparse/compare/0.1.6...0.1.7 +[0.1.6]: https://github.com/nodeca/argparse/compare/0.1.5...0.1.6 +[0.1.5]: https://github.com/nodeca/argparse/compare/0.1.4...0.1.5 +[0.1.4]: https://github.com/nodeca/argparse/compare/0.1.3...0.1.4 +[0.1.3]: https://github.com/nodeca/argparse/compare/0.1.2...0.1.3 +[0.1.2]: https://github.com/nodeca/argparse/compare/0.1.1...0.1.2 +[0.1.1]: https://github.com/nodeca/argparse/compare/0.1.0...0.1.1 +[0.1.0]: https://github.com/nodeca/argparse/releases/tag/0.1.0 diff --git a/node_modules/argparse/LICENSE b/node_modules/argparse/LICENSE new file mode 100644 index 00000000..66a3ac80 --- /dev/null +++ b/node_modules/argparse/LICENSE @@ -0,0 +1,254 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations, which became +Zope Corporation. In 2001, the Python Software Foundation (PSF, see +https://www.python.org/psf/) was formed, a non-profit organization +created specifically to own Python-related Intellectual Property. +Zope Corporation was a sponsoring member of the PSF. + +All Python releases are Open Source (see http://www.opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/argparse/README.md b/node_modules/argparse/README.md new file mode 100644 index 00000000..550b5c9b --- /dev/null +++ b/node_modules/argparse/README.md @@ -0,0 +1,84 @@ +argparse +======== + +[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) +[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) + +CLI arguments parser for node.js, with [sub-commands](https://docs.python.org/3.9/library/argparse.html#sub-commands) support. Port of python's [argparse](http://docs.python.org/dev/library/argparse.html) (version [3.9.0](https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py)). + +**Difference with original.** + +- JS has no keyword arguments support. + - Pass options instead: `new ArgumentParser({ description: 'example', add_help: true })`. +- JS has no python's types `int`, `float`, ... + - Use string-typed names: `.add_argument('-b', { type: 'int', help: 'help' })`. +- `%r` format specifier uses `require('util').inspect()`. + +More details in [doc](./doc). + + +Example +------- + +`test.js` file: + +```javascript +#!/usr/bin/env node +'use strict'; + +const { ArgumentParser } = require('argparse'); +const { version } = require('./package.json'); + +const parser = new ArgumentParser({ + description: 'Argparse example' +}); + +parser.add_argument('-v', '--version', { action: 'version', version }); +parser.add_argument('-f', '--foo', { help: 'foo bar' }); +parser.add_argument('-b', '--bar', { help: 'bar foo' }); +parser.add_argument('--baz', { help: 'baz bar' }); + +console.dir(parser.parse_args()); +``` + +Display help: + +``` +$ ./test.js -h +usage: test.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] + +Argparse example + +optional arguments: + -h, --help show this help message and exit + -v, --version show program's version number and exit + -f FOO, --foo FOO foo bar + -b BAR, --bar BAR bar foo + --baz BAZ baz bar +``` + +Parse arguments: + +``` +$ ./test.js -f=3 --bar=4 --baz 5 +{ foo: '3', bar: '4', baz: '5' } +``` + + +API docs +-------- + +Since this is a port with minimal divergence, there's no separate documentation. +Use original one instead, with notes about difference. + +1. [Original doc](https://docs.python.org/3.9/library/argparse.html). +2. [Original tutorial](https://docs.python.org/3.9/howto/argparse.html). +3. [Difference with python](./doc). + + +argparse for enterprise +----------------------- + +Available as part of the Tidelift Subscription + +The maintainers of argparse and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-argparse?utm_source=npm-argparse&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/argparse/argparse.js b/node_modules/argparse/argparse.js new file mode 100644 index 00000000..2b8c8c63 --- /dev/null +++ b/node_modules/argparse/argparse.js @@ -0,0 +1,3707 @@ +// Port of python's argparse module, version 3.9.0: +// https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py + +'use strict' + +// Copyright (C) 2010-2020 Python Software Foundation. +// Copyright (C) 2020 argparse.js authors + +/* + * Command-line parsing library + * + * This module is an optparse-inspired command-line parsing library that: + * + * - handles both optional and positional arguments + * - produces highly informative usage messages + * - supports parsers that dispatch to sub-parsers + * + * The following is a simple usage example that sums integers from the + * command-line and writes the result to a file:: + * + * parser = argparse.ArgumentParser( + * description='sum the integers at the command line') + * parser.add_argument( + * 'integers', metavar='int', nargs='+', type=int, + * help='an integer to be summed') + * parser.add_argument( + * '--log', default=sys.stdout, type=argparse.FileType('w'), + * help='the file where the sum should be written') + * args = parser.parse_args() + * args.log.write('%s' % sum(args.integers)) + * args.log.close() + * + * The module contains the following public classes: + * + * - ArgumentParser -- The main entry point for command-line parsing. As the + * example above shows, the add_argument() method is used to populate + * the parser with actions for optional and positional arguments. Then + * the parse_args() method is invoked to convert the args at the + * command-line into an object with attributes. + * + * - ArgumentError -- The exception raised by ArgumentParser objects when + * there are errors with the parser's actions. Errors raised while + * parsing the command-line are caught by ArgumentParser and emitted + * as command-line messages. + * + * - FileType -- A factory for defining types of files to be created. As the + * example above shows, instances of FileType are typically passed as + * the type= argument of add_argument() calls. + * + * - Action -- The base class for parser actions. Typically actions are + * selected by passing strings like 'store_true' or 'append_const' to + * the action= argument of add_argument(). However, for greater + * customization of ArgumentParser actions, subclasses of Action may + * be defined and passed as the action= argument. + * + * - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter, + * ArgumentDefaultsHelpFormatter -- Formatter classes which + * may be passed as the formatter_class= argument to the + * ArgumentParser constructor. HelpFormatter is the default, + * RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser + * not to change the formatting for help text, and + * ArgumentDefaultsHelpFormatter adds information about argument defaults + * to the help. + * + * All other classes in this module are considered implementation details. + * (Also note that HelpFormatter and RawDescriptionHelpFormatter are only + * considered public as object names -- the API of the formatter objects is + * still considered an implementation detail.) + */ + +const SUPPRESS = '==SUPPRESS==' + +const OPTIONAL = '?' +const ZERO_OR_MORE = '*' +const ONE_OR_MORE = '+' +const PARSER = 'A...' +const REMAINDER = '...' +const _UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args' + + +// ================================== +// Utility functions used for porting +// ================================== +const assert = require('assert') +const util = require('util') +const fs = require('fs') +const sub = require('./lib/sub') +const path = require('path') +const repr = util.inspect + +function get_argv() { + // omit first argument (which is assumed to be interpreter - `node`, `coffee`, `ts-node`, etc.) + return process.argv.slice(1) +} + +function get_terminal_size() { + return { + columns: +process.env.COLUMNS || process.stdout.columns || 80 + } +} + +function hasattr(object, name) { + return Object.prototype.hasOwnProperty.call(object, name) +} + +function getattr(object, name, value) { + return hasattr(object, name) ? object[name] : value +} + +function setattr(object, name, value) { + object[name] = value +} + +function setdefault(object, name, value) { + if (!hasattr(object, name)) object[name] = value + return object[name] +} + +function delattr(object, name) { + delete object[name] +} + +function range(from, to, step=1) { + // range(10) is equivalent to range(0, 10) + if (arguments.length === 1) [ to, from ] = [ from, 0 ] + if (typeof from !== 'number' || typeof to !== 'number' || typeof step !== 'number') { + throw new TypeError('argument cannot be interpreted as an integer') + } + if (step === 0) throw new TypeError('range() arg 3 must not be zero') + + let result = [] + if (step > 0) { + for (let i = from; i < to; i += step) result.push(i) + } else { + for (let i = from; i > to; i += step) result.push(i) + } + return result +} + +function splitlines(str, keepends = false) { + let result + if (!keepends) { + result = str.split(/\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029]/) + } else { + result = [] + let parts = str.split(/(\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029])/) + for (let i = 0; i < parts.length; i += 2) { + result.push(parts[i] + (i + 1 < parts.length ? parts[i + 1] : '')) + } + } + if (!result[result.length - 1]) result.pop() + return result +} + +function _string_lstrip(string, prefix_chars) { + let idx = 0 + while (idx < string.length && prefix_chars.includes(string[idx])) idx++ + return idx ? string.slice(idx) : string +} + +function _string_split(string, sep, maxsplit) { + let result = string.split(sep) + if (result.length > maxsplit) { + result = result.slice(0, maxsplit).concat([ result.slice(maxsplit).join(sep) ]) + } + return result +} + +function _array_equal(array1, array2) { + if (array1.length !== array2.length) return false + for (let i = 0; i < array1.length; i++) { + if (array1[i] !== array2[i]) return false + } + return true +} + +function _array_remove(array, item) { + let idx = array.indexOf(item) + if (idx === -1) throw new TypeError(sub('%r not in list', item)) + array.splice(idx, 1) +} + +// normalize choices to array; +// this isn't required in python because `in` and `map` operators work with anything, +// but in js dealing with multiple types here is too clunky +function _choices_to_array(choices) { + if (choices === undefined) { + return [] + } else if (Array.isArray(choices)) { + return choices + } else if (choices !== null && typeof choices[Symbol.iterator] === 'function') { + return Array.from(choices) + } else if (typeof choices === 'object' && choices !== null) { + return Object.keys(choices) + } else { + throw new Error(sub('invalid choices value: %r', choices)) + } +} + +// decorator that allows a class to be called without new +function _callable(cls) { + let result = { // object is needed for inferred class name + [cls.name]: function (...args) { + let this_class = new.target === result || !new.target + return Reflect.construct(cls, args, this_class ? cls : new.target) + } + } + result[cls.name].prototype = cls.prototype + // fix default tag for toString, e.g. [object Action] instead of [object Object] + cls.prototype[Symbol.toStringTag] = cls.name + return result[cls.name] +} + +function _alias(object, from, to) { + try { + let name = object.constructor.name + Object.defineProperty(object, from, { + value: util.deprecate(object[to], sub('%s.%s() is renamed to %s.%s()', + name, from, name, to)), + enumerable: false + }) + } catch {} +} + +// decorator that allows snake_case class methods to be called with camelCase and vice versa +function _camelcase_alias(_class) { + for (let name of Object.getOwnPropertyNames(_class.prototype)) { + let camelcase = name.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) + if (camelcase !== name) _alias(_class.prototype, camelcase, name) + } + return _class +} + +function _to_legacy_name(key) { + key = key.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) + if (key === 'default') key = 'defaultValue' + if (key === 'const') key = 'constant' + return key +} + +function _to_new_name(key) { + if (key === 'defaultValue') key = 'default' + if (key === 'constant') key = 'const' + key = key.replace(/[A-Z]/g, c => '_' + c.toLowerCase()) + return key +} + +// parse options +let no_default = Symbol('no_default_value') +function _parse_opts(args, descriptor) { + function get_name() { + let stack = new Error().stack.split('\n') + .map(x => x.match(/^ at (.*) \(.*\)$/)) + .filter(Boolean) + .map(m => m[1]) + .map(fn => fn.match(/[^ .]*$/)[0]) + + if (stack.length && stack[0] === get_name.name) stack.shift() + if (stack.length && stack[0] === _parse_opts.name) stack.shift() + return stack.length ? stack[0] : '' + } + + args = Array.from(args) + let kwargs = {} + let result = [] + let last_opt = args.length && args[args.length - 1] + + if (typeof last_opt === 'object' && last_opt !== null && !Array.isArray(last_opt) && + (!last_opt.constructor || last_opt.constructor.name === 'Object')) { + kwargs = Object.assign({}, args.pop()) + } + + // LEGACY (v1 compatibility): camelcase + let renames = [] + for (let key of Object.keys(descriptor)) { + let old_name = _to_legacy_name(key) + if (old_name !== key && (old_name in kwargs)) { + if (key in kwargs) { + // default and defaultValue specified at the same time, happens often in old tests + //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) + } else { + kwargs[key] = kwargs[old_name] + } + renames.push([ old_name, key ]) + delete kwargs[old_name] + } + } + if (renames.length) { + let name = get_name() + deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', + name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) + } + // end + + let missing_positionals = [] + let positional_count = args.length + + for (let [ key, def ] of Object.entries(descriptor)) { + if (key[0] === '*') { + if (key.length > 0 && key[1] === '*') { + // LEGACY (v1 compatibility): camelcase + let renames = [] + for (let key of Object.keys(kwargs)) { + let new_name = _to_new_name(key) + if (new_name !== key && (key in kwargs)) { + if (new_name in kwargs) { + // default and defaultValue specified at the same time, happens often in old tests + //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), new_name)) + } else { + kwargs[new_name] = kwargs[key] + } + renames.push([ key, new_name ]) + delete kwargs[key] + } + } + if (renames.length) { + let name = get_name() + deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', + name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) + } + // end + result.push(kwargs) + kwargs = {} + } else { + result.push(args) + args = [] + } + } else if (key in kwargs && args.length > 0) { + throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) + } else if (key in kwargs) { + result.push(kwargs[key]) + delete kwargs[key] + } else if (args.length > 0) { + result.push(args.shift()) + } else if (def !== no_default) { + result.push(def) + } else { + missing_positionals.push(key) + } + } + + if (Object.keys(kwargs).length) { + throw new TypeError(sub('%s() got an unexpected keyword argument %r', + get_name(), Object.keys(kwargs)[0])) + } + + if (args.length) { + let from = Object.entries(descriptor).filter(([ k, v ]) => k[0] !== '*' && v !== no_default).length + let to = Object.entries(descriptor).filter(([ k ]) => k[0] !== '*').length + throw new TypeError(sub('%s() takes %s positional argument%s but %s %s given', + get_name(), + from === to ? sub('from %s to %s', from, to) : to, + from === to && to === 1 ? '' : 's', + positional_count, + positional_count === 1 ? 'was' : 'were')) + } + + if (missing_positionals.length) { + let strs = missing_positionals.map(repr) + if (strs.length > 1) strs[strs.length - 1] = 'and ' + strs[strs.length - 1] + let str_joined = strs.join(strs.length === 2 ? '' : ', ') + throw new TypeError(sub('%s() missing %i required positional argument%s: %s', + get_name(), strs.length, strs.length === 1 ? '' : 's', str_joined)) + } + + return result +} + +let _deprecations = {} +function deprecate(id, string) { + _deprecations[id] = _deprecations[id] || util.deprecate(() => {}, string) + _deprecations[id]() +} + + +// ============================= +// Utility functions and classes +// ============================= +function _AttributeHolder(cls = Object) { + /* + * Abstract base class that provides __repr__. + * + * The __repr__ method returns a string in the format:: + * ClassName(attr=name, attr=name, ...) + * The attributes are determined either by a class-level attribute, + * '_kwarg_names', or by inspecting the instance __dict__. + */ + + return class _AttributeHolder extends cls { + [util.inspect.custom]() { + let type_name = this.constructor.name + let arg_strings = [] + let star_args = {} + for (let arg of this._get_args()) { + arg_strings.push(repr(arg)) + } + for (let [ name, value ] of this._get_kwargs()) { + if (/^[a-z_][a-z0-9_$]*$/i.test(name)) { + arg_strings.push(sub('%s=%r', name, value)) + } else { + star_args[name] = value + } + } + if (Object.keys(star_args).length) { + arg_strings.push(sub('**%s', repr(star_args))) + } + return sub('%s(%s)', type_name, arg_strings.join(', ')) + } + + toString() { + return this[util.inspect.custom]() + } + + _get_kwargs() { + return Object.entries(this) + } + + _get_args() { + return [] + } + } +} + + +function _copy_items(items) { + if (items === undefined) { + return [] + } + return items.slice(0) +} + + +// =============== +// Formatting Help +// =============== +const HelpFormatter = _camelcase_alias(_callable(class HelpFormatter { + /* + * Formatter for generating usage messages and argument help strings. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + constructor() { + let [ + prog, + indent_increment, + max_help_position, + width + ] = _parse_opts(arguments, { + prog: no_default, + indent_increment: 2, + max_help_position: 24, + width: undefined + }) + + // default setting for width + if (width === undefined) { + width = get_terminal_size().columns + width -= 2 + } + + this._prog = prog + this._indent_increment = indent_increment + this._max_help_position = Math.min(max_help_position, + Math.max(width - 20, indent_increment * 2)) + this._width = width + + this._current_indent = 0 + this._level = 0 + this._action_max_length = 0 + + this._root_section = this._Section(this, undefined) + this._current_section = this._root_section + + this._whitespace_matcher = /[ \t\n\r\f\v]+/g // equivalent to python /\s+/ with ASCII flag + this._long_break_matcher = /\n\n\n+/g + } + + // =============================== + // Section and indentation methods + // =============================== + _indent() { + this._current_indent += this._indent_increment + this._level += 1 + } + + _dedent() { + this._current_indent -= this._indent_increment + assert(this._current_indent >= 0, 'Indent decreased below 0.') + this._level -= 1 + } + + _add_item(func, args) { + this._current_section.items.push([ func, args ]) + } + + // ======================== + // Message building methods + // ======================== + start_section(heading) { + this._indent() + let section = this._Section(this, this._current_section, heading) + this._add_item(section.format_help.bind(section), []) + this._current_section = section + } + + end_section() { + this._current_section = this._current_section.parent + this._dedent() + } + + add_text(text) { + if (text !== SUPPRESS && text !== undefined) { + this._add_item(this._format_text.bind(this), [text]) + } + } + + add_usage(usage, actions, groups, prefix = undefined) { + if (usage !== SUPPRESS) { + let args = [ usage, actions, groups, prefix ] + this._add_item(this._format_usage.bind(this), args) + } + } + + add_argument(action) { + if (action.help !== SUPPRESS) { + + // find all invocations + let invocations = [this._format_action_invocation(action)] + for (let subaction of this._iter_indented_subactions(action)) { + invocations.push(this._format_action_invocation(subaction)) + } + + // update the maximum item length + let invocation_length = Math.max(...invocations.map(invocation => invocation.length)) + let action_length = invocation_length + this._current_indent + this._action_max_length = Math.max(this._action_max_length, + action_length) + + // add the item to the list + this._add_item(this._format_action.bind(this), [action]) + } + } + + add_arguments(actions) { + for (let action of actions) { + this.add_argument(action) + } + } + + // ======================= + // Help-formatting methods + // ======================= + format_help() { + let help = this._root_section.format_help() + if (help) { + help = help.replace(this._long_break_matcher, '\n\n') + help = help.replace(/^\n+|\n+$/g, '') + '\n' + } + return help + } + + _join_parts(part_strings) { + return part_strings.filter(part => part && part !== SUPPRESS).join('') + } + + _format_usage(usage, actions, groups, prefix) { + if (prefix === undefined) { + prefix = 'usage: ' + } + + // if usage is specified, use that + if (usage !== undefined) { + usage = sub(usage, { prog: this._prog }) + + // if no optionals or positionals are available, usage is just prog + } else if (usage === undefined && !actions.length) { + usage = sub('%(prog)s', { prog: this._prog }) + + // if optionals and positionals are available, calculate usage + } else if (usage === undefined) { + let prog = sub('%(prog)s', { prog: this._prog }) + + // split optionals from positionals + let optionals = [] + let positionals = [] + for (let action of actions) { + if (action.option_strings.length) { + optionals.push(action) + } else { + positionals.push(action) + } + } + + // build full usage string + let action_usage = this._format_actions_usage([].concat(optionals).concat(positionals), groups) + usage = [ prog, action_usage ].map(String).join(' ') + + // wrap the usage parts if it's too long + let text_width = this._width - this._current_indent + if (prefix.length + usage.length > text_width) { + + // break usage into wrappable parts + let part_regexp = /\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+/g + let opt_usage = this._format_actions_usage(optionals, groups) + let pos_usage = this._format_actions_usage(positionals, groups) + let opt_parts = opt_usage.match(part_regexp) || [] + let pos_parts = pos_usage.match(part_regexp) || [] + assert(opt_parts.join(' ') === opt_usage) + assert(pos_parts.join(' ') === pos_usage) + + // helper for wrapping lines + let get_lines = (parts, indent, prefix = undefined) => { + let lines = [] + let line = [] + let line_len + if (prefix !== undefined) { + line_len = prefix.length - 1 + } else { + line_len = indent.length - 1 + } + for (let part of parts) { + if (line_len + 1 + part.length > text_width && line) { + lines.push(indent + line.join(' ')) + line = [] + line_len = indent.length - 1 + } + line.push(part) + line_len += part.length + 1 + } + if (line.length) { + lines.push(indent + line.join(' ')) + } + if (prefix !== undefined) { + lines[0] = lines[0].slice(indent.length) + } + return lines + } + + let lines + + // if prog is short, follow it with optionals or positionals + if (prefix.length + prog.length <= 0.75 * text_width) { + let indent = ' '.repeat(prefix.length + prog.length + 1) + if (opt_parts.length) { + lines = get_lines([prog].concat(opt_parts), indent, prefix) + lines = lines.concat(get_lines(pos_parts, indent)) + } else if (pos_parts.length) { + lines = get_lines([prog].concat(pos_parts), indent, prefix) + } else { + lines = [prog] + } + + // if prog is long, put it on its own line + } else { + let indent = ' '.repeat(prefix.length) + let parts = [].concat(opt_parts).concat(pos_parts) + lines = get_lines(parts, indent) + if (lines.length > 1) { + lines = [] + lines = lines.concat(get_lines(opt_parts, indent)) + lines = lines.concat(get_lines(pos_parts, indent)) + } + lines = [prog].concat(lines) + } + + // join lines into usage + usage = lines.join('\n') + } + } + + // prefix with 'usage:' + return sub('%s%s\n\n', prefix, usage) + } + + _format_actions_usage(actions, groups) { + // find group indices and identify actions in groups + let group_actions = new Set() + let inserts = {} + for (let group of groups) { + let start = actions.indexOf(group._group_actions[0]) + if (start === -1) { + continue + } else { + let end = start + group._group_actions.length + if (_array_equal(actions.slice(start, end), group._group_actions)) { + for (let action of group._group_actions) { + group_actions.add(action) + } + if (!group.required) { + if (start in inserts) { + inserts[start] += ' [' + } else { + inserts[start] = '[' + } + if (end in inserts) { + inserts[end] += ']' + } else { + inserts[end] = ']' + } + } else { + if (start in inserts) { + inserts[start] += ' (' + } else { + inserts[start] = '(' + } + if (end in inserts) { + inserts[end] += ')' + } else { + inserts[end] = ')' + } + } + for (let i of range(start + 1, end)) { + inserts[i] = '|' + } + } + } + } + + // collect all actions format strings + let parts = [] + for (let [ i, action ] of Object.entries(actions)) { + + // suppressed arguments are marked with None + // remove | separators for suppressed arguments + if (action.help === SUPPRESS) { + parts.push(undefined) + if (inserts[+i] === '|') { + delete inserts[+i] + } else if (inserts[+i + 1] === '|') { + delete inserts[+i + 1] + } + + // produce all arg strings + } else if (!action.option_strings.length) { + let default_value = this._get_default_metavar_for_positional(action) + let part = this._format_args(action, default_value) + + // if it's in a group, strip the outer [] + if (group_actions.has(action)) { + if (part[0] === '[' && part[part.length - 1] === ']') { + part = part.slice(1, -1) + } + } + + // add the action string to the list + parts.push(part) + + // produce the first way to invoke the option in brackets + } else { + let option_string = action.option_strings[0] + let part + + // if the Optional doesn't take a value, format is: + // -s or --long + if (action.nargs === 0) { + part = action.format_usage() + + // if the Optional takes a value, format is: + // -s ARGS or --long ARGS + } else { + let default_value = this._get_default_metavar_for_optional(action) + let args_string = this._format_args(action, default_value) + part = sub('%s %s', option_string, args_string) + } + + // make it look optional if it's not required or in a group + if (!action.required && !group_actions.has(action)) { + part = sub('[%s]', part) + } + + // add the action string to the list + parts.push(part) + } + } + + // insert things at the necessary indices + for (let i of Object.keys(inserts).map(Number).sort((a, b) => b - a)) { + parts.splice(+i, 0, inserts[+i]) + } + + // join all the action items with spaces + let text = parts.filter(Boolean).join(' ') + + // clean up separators for mutually exclusive groups + text = text.replace(/([\[(]) /g, '$1') + text = text.replace(/ ([\])])/g, '$1') + text = text.replace(/[\[(] *[\])]/g, '') + text = text.replace(/\(([^|]*)\)/g, '$1', text) + text = text.trim() + + // return the text + return text + } + + _format_text(text) { + if (text.includes('%(prog)')) { + text = sub(text, { prog: this._prog }) + } + let text_width = Math.max(this._width - this._current_indent, 11) + let indent = ' '.repeat(this._current_indent) + return this._fill_text(text, text_width, indent) + '\n\n' + } + + _format_action(action) { + // determine the required width and the entry label + let help_position = Math.min(this._action_max_length + 2, + this._max_help_position) + let help_width = Math.max(this._width - help_position, 11) + let action_width = help_position - this._current_indent - 2 + let action_header = this._format_action_invocation(action) + let indent_first + + // no help; start on same line and add a final newline + if (!action.help) { + let tup = [ this._current_indent, '', action_header ] + action_header = sub('%*s%s\n', ...tup) + + // short action name; start on the same line and pad two spaces + } else if (action_header.length <= action_width) { + let tup = [ this._current_indent, '', action_width, action_header ] + action_header = sub('%*s%-*s ', ...tup) + indent_first = 0 + + // long action name; start on the next line + } else { + let tup = [ this._current_indent, '', action_header ] + action_header = sub('%*s%s\n', ...tup) + indent_first = help_position + } + + // collect the pieces of the action help + let parts = [action_header] + + // if there was help for the action, add lines of help text + if (action.help) { + let help_text = this._expand_help(action) + let help_lines = this._split_lines(help_text, help_width) + parts.push(sub('%*s%s\n', indent_first, '', help_lines[0])) + for (let line of help_lines.slice(1)) { + parts.push(sub('%*s%s\n', help_position, '', line)) + } + + // or add a newline if the description doesn't end with one + } else if (!action_header.endsWith('\n')) { + parts.push('\n') + } + + // if there are any sub-actions, add their help as well + for (let subaction of this._iter_indented_subactions(action)) { + parts.push(this._format_action(subaction)) + } + + // return a single string + return this._join_parts(parts) + } + + _format_action_invocation(action) { + if (!action.option_strings.length) { + let default_value = this._get_default_metavar_for_positional(action) + let metavar = this._metavar_formatter(action, default_value)(1)[0] + return metavar + + } else { + let parts = [] + + // if the Optional doesn't take a value, format is: + // -s, --long + if (action.nargs === 0) { + parts = parts.concat(action.option_strings) + + // if the Optional takes a value, format is: + // -s ARGS, --long ARGS + } else { + let default_value = this._get_default_metavar_for_optional(action) + let args_string = this._format_args(action, default_value) + for (let option_string of action.option_strings) { + parts.push(sub('%s %s', option_string, args_string)) + } + } + + return parts.join(', ') + } + } + + _metavar_formatter(action, default_metavar) { + let result + if (action.metavar !== undefined) { + result = action.metavar + } else if (action.choices !== undefined) { + let choice_strs = _choices_to_array(action.choices).map(String) + result = sub('{%s}', choice_strs.join(',')) + } else { + result = default_metavar + } + + function format(tuple_size) { + if (Array.isArray(result)) { + return result + } else { + return Array(tuple_size).fill(result) + } + } + return format + } + + _format_args(action, default_metavar) { + let get_metavar = this._metavar_formatter(action, default_metavar) + let result + if (action.nargs === undefined) { + result = sub('%s', ...get_metavar(1)) + } else if (action.nargs === OPTIONAL) { + result = sub('[%s]', ...get_metavar(1)) + } else if (action.nargs === ZERO_OR_MORE) { + let metavar = get_metavar(1) + if (metavar.length === 2) { + result = sub('[%s [%s ...]]', ...metavar) + } else { + result = sub('[%s ...]', ...metavar) + } + } else if (action.nargs === ONE_OR_MORE) { + result = sub('%s [%s ...]', ...get_metavar(2)) + } else if (action.nargs === REMAINDER) { + result = '...' + } else if (action.nargs === PARSER) { + result = sub('%s ...', ...get_metavar(1)) + } else if (action.nargs === SUPPRESS) { + result = '' + } else { + let formats + try { + formats = range(action.nargs).map(() => '%s') + } catch (err) { + throw new TypeError('invalid nargs value') + } + result = sub(formats.join(' '), ...get_metavar(action.nargs)) + } + return result + } + + _expand_help(action) { + let params = Object.assign({ prog: this._prog }, action) + for (let name of Object.keys(params)) { + if (params[name] === SUPPRESS) { + delete params[name] + } + } + for (let name of Object.keys(params)) { + if (params[name] && params[name].name) { + params[name] = params[name].name + } + } + if (params.choices !== undefined) { + let choices_str = _choices_to_array(params.choices).map(String).join(', ') + params.choices = choices_str + } + // LEGACY (v1 compatibility): camelcase + for (let key of Object.keys(params)) { + let old_name = _to_legacy_name(key) + if (old_name !== key) { + params[old_name] = params[key] + } + } + // end + return sub(this._get_help_string(action), params) + } + + * _iter_indented_subactions(action) { + if (typeof action._get_subactions === 'function') { + this._indent() + yield* action._get_subactions() + this._dedent() + } + } + + _split_lines(text, width) { + text = text.replace(this._whitespace_matcher, ' ').trim() + // The textwrap module is used only for formatting help. + // Delay its import for speeding up the common usage of argparse. + let textwrap = require('./lib/textwrap') + return textwrap.wrap(text, { width }) + } + + _fill_text(text, width, indent) { + text = text.replace(this._whitespace_matcher, ' ').trim() + let textwrap = require('./lib/textwrap') + return textwrap.fill(text, { width, + initial_indent: indent, + subsequent_indent: indent }) + } + + _get_help_string(action) { + return action.help + } + + _get_default_metavar_for_optional(action) { + return action.dest.toUpperCase() + } + + _get_default_metavar_for_positional(action) { + return action.dest + } +})) + +HelpFormatter.prototype._Section = _callable(class _Section { + + constructor(formatter, parent, heading = undefined) { + this.formatter = formatter + this.parent = parent + this.heading = heading + this.items = [] + } + + format_help() { + // format the indented section + if (this.parent !== undefined) { + this.formatter._indent() + } + let item_help = this.formatter._join_parts(this.items.map(([ func, args ]) => func.apply(null, args))) + if (this.parent !== undefined) { + this.formatter._dedent() + } + + // return nothing if the section was empty + if (!item_help) { + return '' + } + + // add the heading if the section was non-empty + let heading + if (this.heading !== SUPPRESS && this.heading !== undefined) { + let current_indent = this.formatter._current_indent + heading = sub('%*s%s:\n', current_indent, '', this.heading) + } else { + heading = '' + } + + // join the section-initial newline, the heading and the help + return this.formatter._join_parts(['\n', heading, item_help, '\n']) + } +}) + + +const RawDescriptionHelpFormatter = _camelcase_alias(_callable(class RawDescriptionHelpFormatter extends HelpFormatter { + /* + * Help message formatter which retains any formatting in descriptions. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _fill_text(text, width, indent) { + return splitlines(text, true).map(line => indent + line).join('') + } +})) + + +const RawTextHelpFormatter = _camelcase_alias(_callable(class RawTextHelpFormatter extends RawDescriptionHelpFormatter { + /* + * Help message formatter which retains formatting of all help text. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _split_lines(text/*, width*/) { + return splitlines(text) + } +})) + + +const ArgumentDefaultsHelpFormatter = _camelcase_alias(_callable(class ArgumentDefaultsHelpFormatter extends HelpFormatter { + /* + * Help message formatter which adds default values to argument help. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _get_help_string(action) { + let help = action.help + // LEGACY (v1 compatibility): additional check for defaultValue needed + if (!action.help.includes('%(default)') && !action.help.includes('%(defaultValue)')) { + if (action.default !== SUPPRESS) { + let defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] + if (action.option_strings.length || defaulting_nargs.includes(action.nargs)) { + help += ' (default: %(default)s)' + } + } + } + return help + } +})) + + +const MetavarTypeHelpFormatter = _camelcase_alias(_callable(class MetavarTypeHelpFormatter extends HelpFormatter { + /* + * Help message formatter which uses the argument 'type' as the default + * metavar value (instead of the argument 'dest') + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _get_default_metavar_for_optional(action) { + return typeof action.type === 'function' ? action.type.name : action.type + } + + _get_default_metavar_for_positional(action) { + return typeof action.type === 'function' ? action.type.name : action.type + } +})) + + +// ===================== +// Options and Arguments +// ===================== +function _get_action_name(argument) { + if (argument === undefined) { + return undefined + } else if (argument.option_strings.length) { + return argument.option_strings.join('/') + } else if (![ undefined, SUPPRESS ].includes(argument.metavar)) { + return argument.metavar + } else if (![ undefined, SUPPRESS ].includes(argument.dest)) { + return argument.dest + } else { + return undefined + } +} + + +const ArgumentError = _callable(class ArgumentError extends Error { + /* + * An error from creating or using an argument (optional or positional). + * + * The string value of this exception is the message, augmented with + * information about the argument that caused it. + */ + + constructor(argument, message) { + super() + this.name = 'ArgumentError' + this._argument_name = _get_action_name(argument) + this._message = message + this.message = this.str() + } + + str() { + let format + if (this._argument_name === undefined) { + format = '%(message)s' + } else { + format = 'argument %(argument_name)s: %(message)s' + } + return sub(format, { message: this._message, + argument_name: this._argument_name }) + } +}) + + +const ArgumentTypeError = _callable(class ArgumentTypeError extends Error { + /* + * An error from trying to convert a command line string to a type. + */ + + constructor(message) { + super(message) + this.name = 'ArgumentTypeError' + } +}) + + +// ============== +// Action classes +// ============== +const Action = _camelcase_alias(_callable(class Action extends _AttributeHolder(Function) { + /* + * Information about how to convert command line strings to Python objects. + * + * Action objects are used by an ArgumentParser to represent the information + * needed to parse a single argument from one or more strings from the + * command line. The keyword arguments to the Action constructor are also + * all attributes of Action instances. + * + * Keyword Arguments: + * + * - option_strings -- A list of command-line option strings which + * should be associated with this action. + * + * - dest -- The name of the attribute to hold the created object(s) + * + * - nargs -- The number of command-line arguments that should be + * consumed. By default, one argument will be consumed and a single + * value will be produced. Other values include: + * - N (an integer) consumes N arguments (and produces a list) + * - '?' consumes zero or one arguments + * - '*' consumes zero or more arguments (and produces a list) + * - '+' consumes one or more arguments (and produces a list) + * Note that the difference between the default and nargs=1 is that + * with the default, a single value will be produced, while with + * nargs=1, a list containing a single value will be produced. + * + * - const -- The value to be produced if the option is specified and the + * option uses an action that takes no values. + * + * - default -- The value to be produced if the option is not specified. + * + * - type -- A callable that accepts a single string argument, and + * returns the converted value. The standard Python types str, int, + * float, and complex are useful examples of such callables. If None, + * str is used. + * + * - choices -- A container of values that should be allowed. If not None, + * after a command-line argument has been converted to the appropriate + * type, an exception will be raised if it is not a member of this + * collection. + * + * - required -- True if the action must always be specified at the + * command line. This is only meaningful for optional command-line + * arguments. + * + * - help -- The help string describing the argument. + * + * - metavar -- The name to be used for the option's argument with the + * help string. If None, the 'dest' value will be used as the name. + */ + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + // when this class is called as a function, redirect it to .call() method of itself + super('return arguments.callee.call.apply(arguments.callee, arguments)') + + this.option_strings = option_strings + this.dest = dest + this.nargs = nargs + this.const = const_value + this.default = default_value + this.type = type + this.choices = choices + this.required = required + this.help = help + this.metavar = metavar + } + + _get_kwargs() { + let names = [ + 'option_strings', + 'dest', + 'nargs', + 'const', + 'default', + 'type', + 'choices', + 'help', + 'metavar' + ] + return names.map(name => [ name, getattr(this, name) ]) + } + + format_usage() { + return this.option_strings[0] + } + + call(/*parser, namespace, values, option_string = undefined*/) { + throw new Error('.call() not defined') + } +})) + + +const BooleanOptionalAction = _camelcase_alias(_callable(class BooleanOptionalAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + let _option_strings = [] + for (let option_string of option_strings) { + _option_strings.push(option_string) + + if (option_string.startsWith('--')) { + option_string = '--no-' + option_string.slice(2) + _option_strings.push(option_string) + } + } + + if (help !== undefined && default_value !== undefined) { + help += ` (default: ${default_value})` + } + + super({ + option_strings: _option_strings, + dest, + nargs: 0, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values, option_string = undefined) { + if (this.option_strings.includes(option_string)) { + setattr(namespace, this.dest, !option_string.startsWith('--no-')) + } + } + + format_usage() { + return this.option_strings.join(' | ') + } +})) + + +const _StoreAction = _callable(class _StoreAction extends Action { + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + if (nargs === 0) { + throw new TypeError('nargs for store actions must be != 0; if you ' + + 'have nothing to store, actions such as store ' + + 'true or store const may be more appropriate') + } + if (const_value !== undefined && nargs !== OPTIONAL) { + throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) + } + super({ + option_strings, + dest, + nargs, + const: const_value, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values/*, option_string = undefined*/) { + setattr(namespace, this.dest, values) + } +}) + + +const _StoreConstAction = _callable(class _StoreConstAction extends Action { + + constructor() { + let [ + option_strings, + dest, + const_value, + default_value, + required, + help + //, metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + const: no_default, + default: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + const: const_value, + default: default_value, + required, + help + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + setattr(namespace, this.dest, this.const) + } +}) + + +const _StoreTrueAction = _callable(class _StoreTrueAction extends _StoreConstAction { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: false, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + const: true, + default: default_value, + required, + help + }) + } +}) + + +const _StoreFalseAction = _callable(class _StoreFalseAction extends _StoreConstAction { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: true, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + const: false, + default: default_value, + required, + help + }) + } +}) + + +const _AppendAction = _callable(class _AppendAction extends Action { + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + if (nargs === 0) { + throw new TypeError('nargs for append actions must be != 0; if arg ' + + 'strings are not supplying the value to append, ' + + 'the append const action may be more appropriate') + } + if (const_value !== undefined && nargs !== OPTIONAL) { + throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) + } + super({ + option_strings, + dest, + nargs, + const: const_value, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values/*, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items.push(values) + setattr(namespace, this.dest, items) + } +}) + + +const _AppendConstAction = _callable(class _AppendConstAction extends Action { + + constructor() { + let [ + option_strings, + dest, + const_value, + default_value, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + const: no_default, + default: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + const: const_value, + default: default_value, + required, + help, + metavar + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items.push(this.const) + setattr(namespace, this.dest, items) + } +}) + + +const _CountAction = _callable(class _CountAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: undefined, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + default: default_value, + required, + help + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + let count = getattr(namespace, this.dest, undefined) + if (count === undefined) { + count = 0 + } + setattr(namespace, this.dest, count + 1) + } +}) + + +const _HelpAction = _callable(class _HelpAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: SUPPRESS, + default: SUPPRESS, + help: undefined + }) + + super({ + option_strings, + dest, + default: default_value, + nargs: 0, + help + }) + } + + call(parser/*, namespace, values, option_string = undefined*/) { + parser.print_help() + parser.exit() + } +}) + + +const _VersionAction = _callable(class _VersionAction extends Action { + + constructor() { + let [ + option_strings, + version, + dest, + default_value, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + version: undefined, + dest: SUPPRESS, + default: SUPPRESS, + help: "show program's version number and exit" + }) + + super({ + option_strings, + dest, + default: default_value, + nargs: 0, + help + }) + this.version = version + } + + call(parser/*, namespace, values, option_string = undefined*/) { + let version = this.version + if (version === undefined) { + version = parser.version + } + let formatter = parser._get_formatter() + formatter.add_text(version) + parser._print_message(formatter.format_help(), process.stdout) + parser.exit() + } +}) + + +const _SubParsersAction = _camelcase_alias(_callable(class _SubParsersAction extends Action { + + constructor() { + let [ + option_strings, + prog, + parser_class, + dest, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + prog: no_default, + parser_class: no_default, + dest: SUPPRESS, + required: false, + help: undefined, + metavar: undefined + }) + + let name_parser_map = {} + + super({ + option_strings, + dest, + nargs: PARSER, + choices: name_parser_map, + required, + help, + metavar + }) + + this._prog_prefix = prog + this._parser_class = parser_class + this._name_parser_map = name_parser_map + this._choices_actions = [] + } + + add_parser() { + let [ + name, + kwargs + ] = _parse_opts(arguments, { + name: no_default, + '**kwargs': no_default + }) + + // set prog from the existing prefix + if (kwargs.prog === undefined) { + kwargs.prog = sub('%s %s', this._prog_prefix, name) + } + + let aliases = getattr(kwargs, 'aliases', []) + delete kwargs.aliases + + // create a pseudo-action to hold the choice help + if ('help' in kwargs) { + let help = kwargs.help + delete kwargs.help + let choice_action = this._ChoicesPseudoAction(name, aliases, help) + this._choices_actions.push(choice_action) + } + + // create the parser and add it to the map + let parser = new this._parser_class(kwargs) + this._name_parser_map[name] = parser + + // make parser available under aliases also + for (let alias of aliases) { + this._name_parser_map[alias] = parser + } + + return parser + } + + _get_subactions() { + return this._choices_actions + } + + call(parser, namespace, values/*, option_string = undefined*/) { + let parser_name = values[0] + let arg_strings = values.slice(1) + + // set the parser name if requested + if (this.dest !== SUPPRESS) { + setattr(namespace, this.dest, parser_name) + } + + // select the parser + if (hasattr(this._name_parser_map, parser_name)) { + parser = this._name_parser_map[parser_name] + } else { + let args = {parser_name, + choices: this._name_parser_map.join(', ')} + let msg = sub('unknown parser %(parser_name)r (choices: %(choices)s)', args) + throw new ArgumentError(this, msg) + } + + // parse all the remaining options into the namespace + // store any unrecognized options on the object, so that the top + // level parser can decide what to do with them + + // In case this subparser defines new defaults, we parse them + // in a new namespace object and then update the original + // namespace for the relevant parts. + let subnamespace + [ subnamespace, arg_strings ] = parser.parse_known_args(arg_strings, undefined) + for (let [ key, value ] of Object.entries(subnamespace)) { + setattr(namespace, key, value) + } + + if (arg_strings.length) { + setdefault(namespace, _UNRECOGNIZED_ARGS_ATTR, []) + getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).push(...arg_strings) + } + } +})) + + +_SubParsersAction.prototype._ChoicesPseudoAction = _callable(class _ChoicesPseudoAction extends Action { + constructor(name, aliases, help) { + let metavar = name, dest = name + if (aliases.length) { + metavar += sub(' (%s)', aliases.join(', ')) + } + super({ option_strings: [], dest, help, metavar }) + } +}) + + +const _ExtendAction = _callable(class _ExtendAction extends _AppendAction { + call(parser, namespace, values/*, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items = items.concat(values) + setattr(namespace, this.dest, items) + } +}) + + +// ============== +// Type classes +// ============== +const FileType = _callable(class FileType extends Function { + /* + * Factory for creating file object types + * + * Instances of FileType are typically passed as type= arguments to the + * ArgumentParser add_argument() method. + * + * Keyword Arguments: + * - mode -- A string indicating how the file is to be opened. Accepts the + * same values as the builtin open() function. + * - bufsize -- The file's desired buffer size. Accepts the same values as + * the builtin open() function. + * - encoding -- The file's encoding. Accepts the same values as the + * builtin open() function. + * - errors -- A string indicating how encoding and decoding errors are to + * be handled. Accepts the same value as the builtin open() function. + */ + + constructor() { + let [ + flags, + encoding, + mode, + autoClose, + emitClose, + start, + end, + highWaterMark, + fs + ] = _parse_opts(arguments, { + flags: 'r', + encoding: undefined, + mode: undefined, // 0o666 + autoClose: undefined, // true + emitClose: undefined, // false + start: undefined, // 0 + end: undefined, // Infinity + highWaterMark: undefined, // 64 * 1024 + fs: undefined + }) + + // when this class is called as a function, redirect it to .call() method of itself + super('return arguments.callee.call.apply(arguments.callee, arguments)') + + Object.defineProperty(this, 'name', { + get() { + return sub('FileType(%r)', flags) + } + }) + this._flags = flags + this._options = {} + if (encoding !== undefined) this._options.encoding = encoding + if (mode !== undefined) this._options.mode = mode + if (autoClose !== undefined) this._options.autoClose = autoClose + if (emitClose !== undefined) this._options.emitClose = emitClose + if (start !== undefined) this._options.start = start + if (end !== undefined) this._options.end = end + if (highWaterMark !== undefined) this._options.highWaterMark = highWaterMark + if (fs !== undefined) this._options.fs = fs + } + + call(string) { + // the special argument "-" means sys.std{in,out} + if (string === '-') { + if (this._flags.includes('r')) { + return process.stdin + } else if (this._flags.includes('w')) { + return process.stdout + } else { + let msg = sub('argument "-" with mode %r', this._flags) + throw new TypeError(msg) + } + } + + // all other arguments are used as file names + let fd + try { + fd = fs.openSync(string, this._flags, this._options.mode) + } catch (e) { + let args = { filename: string, error: e.message } + let message = "can't open '%(filename)s': %(error)s" + throw new ArgumentTypeError(sub(message, args)) + } + + let options = Object.assign({ fd, flags: this._flags }, this._options) + if (this._flags.includes('r')) { + return fs.createReadStream(undefined, options) + } else if (this._flags.includes('w')) { + return fs.createWriteStream(undefined, options) + } else { + let msg = sub('argument "%s" with mode %r', string, this._flags) + throw new TypeError(msg) + } + } + + [util.inspect.custom]() { + let args = [ this._flags ] + let kwargs = Object.entries(this._options).map(([ k, v ]) => { + if (k === 'mode') v = { value: v, [util.inspect.custom]() { return '0o' + this.value.toString(8) } } + return [ k, v ] + }) + let args_str = [] + .concat(args.filter(arg => arg !== -1).map(repr)) + .concat(kwargs.filter(([/*kw*/, arg]) => arg !== undefined) + .map(([kw, arg]) => sub('%s=%r', kw, arg))) + .join(', ') + return sub('%s(%s)', this.constructor.name, args_str) + } + + toString() { + return this[util.inspect.custom]() + } +}) + +// =========================== +// Optional and Positional Parsing +// =========================== +const Namespace = _callable(class Namespace extends _AttributeHolder() { + /* + * Simple object for storing attributes. + * + * Implements equality by attribute names and values, and provides a simple + * string representation. + */ + + constructor(options = {}) { + super() + Object.assign(this, options) + } +}) + +// unset string tag to mimic plain object +Namespace.prototype[Symbol.toStringTag] = undefined + + +const _ActionsContainer = _camelcase_alias(_callable(class _ActionsContainer { + + constructor() { + let [ + description, + prefix_chars, + argument_default, + conflict_handler + ] = _parse_opts(arguments, { + description: no_default, + prefix_chars: no_default, + argument_default: no_default, + conflict_handler: no_default + }) + + this.description = description + this.argument_default = argument_default + this.prefix_chars = prefix_chars + this.conflict_handler = conflict_handler + + // set up registries + this._registries = {} + + // register actions + this.register('action', undefined, _StoreAction) + this.register('action', 'store', _StoreAction) + this.register('action', 'store_const', _StoreConstAction) + this.register('action', 'store_true', _StoreTrueAction) + this.register('action', 'store_false', _StoreFalseAction) + this.register('action', 'append', _AppendAction) + this.register('action', 'append_const', _AppendConstAction) + this.register('action', 'count', _CountAction) + this.register('action', 'help', _HelpAction) + this.register('action', 'version', _VersionAction) + this.register('action', 'parsers', _SubParsersAction) + this.register('action', 'extend', _ExtendAction) + // LEGACY (v1 compatibility): camelcase variants + ;[ 'storeConst', 'storeTrue', 'storeFalse', 'appendConst' ].forEach(old_name => { + let new_name = _to_new_name(old_name) + this.register('action', old_name, util.deprecate(this._registry_get('action', new_name), + sub('{action: "%s"} is renamed to {action: "%s"}', old_name, new_name))) + }) + // end + + // raise an exception if the conflict handler is invalid + this._get_handler() + + // action storage + this._actions = [] + this._option_string_actions = {} + + // groups + this._action_groups = [] + this._mutually_exclusive_groups = [] + + // defaults storage + this._defaults = {} + + // determines whether an "option" looks like a negative number + this._negative_number_matcher = /^-\d+$|^-\d*\.\d+$/ + + // whether or not there are any optionals that look like negative + // numbers -- uses a list so it can be shared and edited + this._has_negative_number_optionals = [] + } + + // ==================== + // Registration methods + // ==================== + register(registry_name, value, object) { + let registry = setdefault(this._registries, registry_name, {}) + registry[value] = object + } + + _registry_get(registry_name, value, default_value = undefined) { + return getattr(this._registries[registry_name], value, default_value) + } + + // ================================== + // Namespace default accessor methods + // ================================== + set_defaults(kwargs) { + Object.assign(this._defaults, kwargs) + + // if these defaults match any existing arguments, replace + // the previous default on the object with the new one + for (let action of this._actions) { + if (action.dest in kwargs) { + action.default = kwargs[action.dest] + } + } + } + + get_default(dest) { + for (let action of this._actions) { + if (action.dest === dest && action.default !== undefined) { + return action.default + } + } + return this._defaults[dest] + } + + + // ======================= + // Adding argument actions + // ======================= + add_argument() { + /* + * add_argument(dest, ..., name=value, ...) + * add_argument(option_string, option_string, ..., name=value, ...) + */ + let [ + args, + kwargs + ] = _parse_opts(arguments, { + '*args': no_default, + '**kwargs': no_default + }) + // LEGACY (v1 compatibility), old-style add_argument([ args ], { options }) + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + deprecate('argument-array', + sub('use add_argument(%(args)s, {...}) instead of add_argument([ %(args)s ], { ... })', { + args: args.map(repr).join(', ') + })) + } + // end + + // if no positional args are supplied or only one is supplied and + // it doesn't look like an option string, parse a positional + // argument + let chars = this.prefix_chars + if (!args.length || args.length === 1 && !chars.includes(args[0][0])) { + if (args.length && 'dest' in kwargs) { + throw new TypeError('dest supplied twice for positional argument') + } + kwargs = this._get_positional_kwargs(...args, kwargs) + + // otherwise, we're adding an optional argument + } else { + kwargs = this._get_optional_kwargs(...args, kwargs) + } + + // if no default was supplied, use the parser-level default + if (!('default' in kwargs)) { + let dest = kwargs.dest + if (dest in this._defaults) { + kwargs.default = this._defaults[dest] + } else if (this.argument_default !== undefined) { + kwargs.default = this.argument_default + } + } + + // create the action object, and add it to the parser + let action_class = this._pop_action_class(kwargs) + if (typeof action_class !== 'function') { + throw new TypeError(sub('unknown action "%s"', action_class)) + } + // eslint-disable-next-line new-cap + let action = new action_class(kwargs) + + // raise an error if the action type is not callable + let type_func = this._registry_get('type', action.type, action.type) + if (typeof type_func !== 'function') { + throw new TypeError(sub('%r is not callable', type_func)) + } + + if (type_func === FileType) { + throw new TypeError(sub('%r is a FileType class object, instance of it' + + ' must be passed', type_func)) + } + + // raise an error if the metavar does not match the type + if ('_get_formatter' in this) { + try { + this._get_formatter()._format_args(action, undefined) + } catch (err) { + // check for 'invalid nargs value' is an artifact of TypeError and ValueError in js being the same + if (err instanceof TypeError && err.message !== 'invalid nargs value') { + throw new TypeError('length of metavar tuple does not match nargs') + } else { + throw err + } + } + } + + return this._add_action(action) + } + + add_argument_group() { + let group = _ArgumentGroup(this, ...arguments) + this._action_groups.push(group) + return group + } + + add_mutually_exclusive_group() { + // eslint-disable-next-line no-use-before-define + let group = _MutuallyExclusiveGroup(this, ...arguments) + this._mutually_exclusive_groups.push(group) + return group + } + + _add_action(action) { + // resolve any conflicts + this._check_conflict(action) + + // add to actions list + this._actions.push(action) + action.container = this + + // index the action by any option strings it has + for (let option_string of action.option_strings) { + this._option_string_actions[option_string] = action + } + + // set the flag if any option strings look like negative numbers + for (let option_string of action.option_strings) { + if (this._negative_number_matcher.test(option_string)) { + if (!this._has_negative_number_optionals.length) { + this._has_negative_number_optionals.push(true) + } + } + } + + // return the created action + return action + } + + _remove_action(action) { + _array_remove(this._actions, action) + } + + _add_container_actions(container) { + // collect groups by titles + let title_group_map = {} + for (let group of this._action_groups) { + if (group.title in title_group_map) { + let msg = 'cannot merge actions - two groups are named %r' + throw new TypeError(sub(msg, group.title)) + } + title_group_map[group.title] = group + } + + // map each action to its group + let group_map = new Map() + for (let group of container._action_groups) { + + // if a group with the title exists, use that, otherwise + // create a new group matching the container's group + if (!(group.title in title_group_map)) { + title_group_map[group.title] = this.add_argument_group({ + title: group.title, + description: group.description, + conflict_handler: group.conflict_handler + }) + } + + // map the actions to their new group + for (let action of group._group_actions) { + group_map.set(action, title_group_map[group.title]) + } + } + + // add container's mutually exclusive groups + // NOTE: if add_mutually_exclusive_group ever gains title= and + // description= then this code will need to be expanded as above + for (let group of container._mutually_exclusive_groups) { + let mutex_group = this.add_mutually_exclusive_group({ + required: group.required + }) + + // map the actions to their new mutex group + for (let action of group._group_actions) { + group_map.set(action, mutex_group) + } + } + + // add all actions to this container or their group + for (let action of container._actions) { + group_map.get(action)._add_action(action) + } + } + + _get_positional_kwargs() { + let [ + dest, + kwargs + ] = _parse_opts(arguments, { + dest: no_default, + '**kwargs': no_default + }) + + // make sure required is not specified + if ('required' in kwargs) { + let msg = "'required' is an invalid argument for positionals" + throw new TypeError(msg) + } + + // mark positional arguments as required if at least one is + // always required + if (![OPTIONAL, ZERO_OR_MORE].includes(kwargs.nargs)) { + kwargs.required = true + } + if (kwargs.nargs === ZERO_OR_MORE && !('default' in kwargs)) { + kwargs.required = true + } + + // return the keyword arguments with no option strings + return Object.assign(kwargs, { dest, option_strings: [] }) + } + + _get_optional_kwargs() { + let [ + args, + kwargs + ] = _parse_opts(arguments, { + '*args': no_default, + '**kwargs': no_default + }) + + // determine short and long option strings + let option_strings = [] + let long_option_strings = [] + let option_string + for (option_string of args) { + // error on strings that don't start with an appropriate prefix + if (!this.prefix_chars.includes(option_string[0])) { + let args = {option: option_string, + prefix_chars: this.prefix_chars} + let msg = 'invalid option string %(option)r: ' + + 'must start with a character %(prefix_chars)r' + throw new TypeError(sub(msg, args)) + } + + // strings starting with two prefix characters are long options + option_strings.push(option_string) + if (option_string.length > 1 && this.prefix_chars.includes(option_string[1])) { + long_option_strings.push(option_string) + } + } + + // infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' + let dest = kwargs.dest + delete kwargs.dest + if (dest === undefined) { + let dest_option_string + if (long_option_strings.length) { + dest_option_string = long_option_strings[0] + } else { + dest_option_string = option_strings[0] + } + dest = _string_lstrip(dest_option_string, this.prefix_chars) + if (!dest) { + let msg = 'dest= is required for options like %r' + throw new TypeError(sub(msg, option_string)) + } + dest = dest.replace(/-/g, '_') + } + + // return the updated keyword arguments + return Object.assign(kwargs, { dest, option_strings }) + } + + _pop_action_class(kwargs, default_value = undefined) { + let action = getattr(kwargs, 'action', default_value) + delete kwargs.action + return this._registry_get('action', action, action) + } + + _get_handler() { + // determine function from conflict handler string + let handler_func_name = sub('_handle_conflict_%s', this.conflict_handler) + if (typeof this[handler_func_name] === 'function') { + return this[handler_func_name] + } else { + let msg = 'invalid conflict_resolution value: %r' + throw new TypeError(sub(msg, this.conflict_handler)) + } + } + + _check_conflict(action) { + + // find all options that conflict with this option + let confl_optionals = [] + for (let option_string of action.option_strings) { + if (hasattr(this._option_string_actions, option_string)) { + let confl_optional = this._option_string_actions[option_string] + confl_optionals.push([ option_string, confl_optional ]) + } + } + + // resolve any conflicts + if (confl_optionals.length) { + let conflict_handler = this._get_handler() + conflict_handler.call(this, action, confl_optionals) + } + } + + _handle_conflict_error(action, conflicting_actions) { + let message = conflicting_actions.length === 1 ? + 'conflicting option string: %s' : + 'conflicting option strings: %s' + let conflict_string = conflicting_actions.map(([ option_string/*, action*/ ]) => option_string).join(', ') + throw new ArgumentError(action, sub(message, conflict_string)) + } + + _handle_conflict_resolve(action, conflicting_actions) { + + // remove all conflicting options + for (let [ option_string, action ] of conflicting_actions) { + + // remove the conflicting option + _array_remove(action.option_strings, option_string) + delete this._option_string_actions[option_string] + + // if the option now has no option string, remove it from the + // container holding it + if (!action.option_strings.length) { + action.container._remove_action(action) + } + } + } +})) + + +const _ArgumentGroup = _callable(class _ArgumentGroup extends _ActionsContainer { + + constructor() { + let [ + container, + title, + description, + kwargs + ] = _parse_opts(arguments, { + container: no_default, + title: undefined, + description: undefined, + '**kwargs': no_default + }) + + // add any missing keyword arguments by checking the container + setdefault(kwargs, 'conflict_handler', container.conflict_handler) + setdefault(kwargs, 'prefix_chars', container.prefix_chars) + setdefault(kwargs, 'argument_default', container.argument_default) + super(Object.assign({ description }, kwargs)) + + // group attributes + this.title = title + this._group_actions = [] + + // share most attributes with the container + this._registries = container._registries + this._actions = container._actions + this._option_string_actions = container._option_string_actions + this._defaults = container._defaults + this._has_negative_number_optionals = + container._has_negative_number_optionals + this._mutually_exclusive_groups = container._mutually_exclusive_groups + } + + _add_action(action) { + action = super._add_action(action) + this._group_actions.push(action) + return action + } + + _remove_action(action) { + super._remove_action(action) + _array_remove(this._group_actions, action) + } +}) + + +const _MutuallyExclusiveGroup = _callable(class _MutuallyExclusiveGroup extends _ArgumentGroup { + + constructor() { + let [ + container, + required + ] = _parse_opts(arguments, { + container: no_default, + required: false + }) + + super(container) + this.required = required + this._container = container + } + + _add_action(action) { + if (action.required) { + let msg = 'mutually exclusive arguments must be optional' + throw new TypeError(msg) + } + action = this._container._add_action(action) + this._group_actions.push(action) + return action + } + + _remove_action(action) { + this._container._remove_action(action) + _array_remove(this._group_actions, action) + } +}) + + +const ArgumentParser = _camelcase_alias(_callable(class ArgumentParser extends _AttributeHolder(_ActionsContainer) { + /* + * Object for parsing command line strings into Python objects. + * + * Keyword Arguments: + * - prog -- The name of the program (default: sys.argv[0]) + * - usage -- A usage message (default: auto-generated from arguments) + * - description -- A description of what the program does + * - epilog -- Text following the argument descriptions + * - parents -- Parsers whose arguments should be copied into this one + * - formatter_class -- HelpFormatter class for printing help messages + * - prefix_chars -- Characters that prefix optional arguments + * - fromfile_prefix_chars -- Characters that prefix files containing + * additional arguments + * - argument_default -- The default value for all arguments + * - conflict_handler -- String indicating how to handle conflicts + * - add_help -- Add a -h/-help option + * - allow_abbrev -- Allow long options to be abbreviated unambiguously + * - exit_on_error -- Determines whether or not ArgumentParser exits with + * error info when an error occurs + */ + + constructor() { + let [ + prog, + usage, + description, + epilog, + parents, + formatter_class, + prefix_chars, + fromfile_prefix_chars, + argument_default, + conflict_handler, + add_help, + allow_abbrev, + exit_on_error, + debug, // LEGACY (v1 compatibility), debug mode + version // LEGACY (v1 compatibility), version + ] = _parse_opts(arguments, { + prog: undefined, + usage: undefined, + description: undefined, + epilog: undefined, + parents: [], + formatter_class: HelpFormatter, + prefix_chars: '-', + fromfile_prefix_chars: undefined, + argument_default: undefined, + conflict_handler: 'error', + add_help: true, + allow_abbrev: true, + exit_on_error: true, + debug: undefined, // LEGACY (v1 compatibility), debug mode + version: undefined // LEGACY (v1 compatibility), version + }) + + // LEGACY (v1 compatibility) + if (debug !== undefined) { + deprecate('debug', + 'The "debug" argument to ArgumentParser is deprecated. Please ' + + 'override ArgumentParser.exit function instead.' + ) + } + + if (version !== undefined) { + deprecate('version', + 'The "version" argument to ArgumentParser is deprecated. Please use ' + + "add_argument(..., { action: 'version', version: 'N', ... }) instead." + ) + } + // end + + super({ + description, + prefix_chars, + argument_default, + conflict_handler + }) + + // default setting for prog + if (prog === undefined) { + prog = path.basename(get_argv()[0] || '') + } + + this.prog = prog + this.usage = usage + this.epilog = epilog + this.formatter_class = formatter_class + this.fromfile_prefix_chars = fromfile_prefix_chars + this.add_help = add_help + this.allow_abbrev = allow_abbrev + this.exit_on_error = exit_on_error + // LEGACY (v1 compatibility), debug mode + this.debug = debug + // end + + this._positionals = this.add_argument_group('positional arguments') + this._optionals = this.add_argument_group('optional arguments') + this._subparsers = undefined + + // register types + function identity(string) { + return string + } + this.register('type', undefined, identity) + this.register('type', null, identity) + this.register('type', 'auto', identity) + this.register('type', 'int', function (x) { + let result = Number(x) + if (!Number.isInteger(result)) { + throw new TypeError(sub('could not convert string to int: %r', x)) + } + return result + }) + this.register('type', 'float', function (x) { + let result = Number(x) + if (isNaN(result)) { + throw new TypeError(sub('could not convert string to float: %r', x)) + } + return result + }) + this.register('type', 'str', String) + // LEGACY (v1 compatibility): custom types + this.register('type', 'string', + util.deprecate(String, 'use {type:"str"} or {type:String} instead of {type:"string"}')) + // end + + // add help argument if necessary + // (using explicit default to override global argument_default) + let default_prefix = prefix_chars.includes('-') ? '-' : prefix_chars[0] + if (this.add_help) { + this.add_argument( + default_prefix + 'h', + default_prefix.repeat(2) + 'help', + { + action: 'help', + default: SUPPRESS, + help: 'show this help message and exit' + } + ) + } + // LEGACY (v1 compatibility), version + if (version) { + this.add_argument( + default_prefix + 'v', + default_prefix.repeat(2) + 'version', + { + action: 'version', + default: SUPPRESS, + version: this.version, + help: "show program's version number and exit" + } + ) + } + // end + + // add parent arguments and defaults + for (let parent of parents) { + this._add_container_actions(parent) + Object.assign(this._defaults, parent._defaults) + } + } + + // ======================= + // Pretty __repr__ methods + // ======================= + _get_kwargs() { + let names = [ + 'prog', + 'usage', + 'description', + 'formatter_class', + 'conflict_handler', + 'add_help' + ] + return names.map(name => [ name, getattr(this, name) ]) + } + + // ================================== + // Optional/Positional adding methods + // ================================== + add_subparsers() { + let [ + kwargs + ] = _parse_opts(arguments, { + '**kwargs': no_default + }) + + if (this._subparsers !== undefined) { + this.error('cannot have multiple subparser arguments') + } + + // add the parser class to the arguments if it's not present + setdefault(kwargs, 'parser_class', this.constructor) + + if ('title' in kwargs || 'description' in kwargs) { + let title = getattr(kwargs, 'title', 'subcommands') + let description = getattr(kwargs, 'description', undefined) + delete kwargs.title + delete kwargs.description + this._subparsers = this.add_argument_group(title, description) + } else { + this._subparsers = this._positionals + } + + // prog defaults to the usage message of this parser, skipping + // optional arguments and with no "usage:" prefix + if (kwargs.prog === undefined) { + let formatter = this._get_formatter() + let positionals = this._get_positional_actions() + let groups = this._mutually_exclusive_groups + formatter.add_usage(this.usage, positionals, groups, '') + kwargs.prog = formatter.format_help().trim() + } + + // create the parsers action and add it to the positionals list + let parsers_class = this._pop_action_class(kwargs, 'parsers') + // eslint-disable-next-line new-cap + let action = new parsers_class(Object.assign({ option_strings: [] }, kwargs)) + this._subparsers._add_action(action) + + // return the created parsers action + return action + } + + _add_action(action) { + if (action.option_strings.length) { + this._optionals._add_action(action) + } else { + this._positionals._add_action(action) + } + return action + } + + _get_optional_actions() { + return this._actions.filter(action => action.option_strings.length) + } + + _get_positional_actions() { + return this._actions.filter(action => !action.option_strings.length) + } + + // ===================================== + // Command line argument parsing methods + // ===================================== + parse_args(args = undefined, namespace = undefined) { + let argv + [ args, argv ] = this.parse_known_args(args, namespace) + if (argv && argv.length > 0) { + let msg = 'unrecognized arguments: %s' + this.error(sub(msg, argv.join(' '))) + } + return args + } + + parse_known_args(args = undefined, namespace = undefined) { + if (args === undefined) { + args = get_argv().slice(1) + } + + // default Namespace built from parser defaults + if (namespace === undefined) { + namespace = new Namespace() + } + + // add any action defaults that aren't present + for (let action of this._actions) { + if (action.dest !== SUPPRESS) { + if (!hasattr(namespace, action.dest)) { + if (action.default !== SUPPRESS) { + setattr(namespace, action.dest, action.default) + } + } + } + } + + // add any parser defaults that aren't present + for (let dest of Object.keys(this._defaults)) { + if (!hasattr(namespace, dest)) { + setattr(namespace, dest, this._defaults[dest]) + } + } + + // parse the arguments and exit if there are any errors + if (this.exit_on_error) { + try { + [ namespace, args ] = this._parse_known_args(args, namespace) + } catch (err) { + if (err instanceof ArgumentError) { + this.error(err.message) + } else { + throw err + } + } + } else { + [ namespace, args ] = this._parse_known_args(args, namespace) + } + + if (hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) { + args = args.concat(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) + delattr(namespace, _UNRECOGNIZED_ARGS_ATTR) + } + + return [ namespace, args ] + } + + _parse_known_args(arg_strings, namespace) { + // replace arg strings that are file references + if (this.fromfile_prefix_chars !== undefined) { + arg_strings = this._read_args_from_files(arg_strings) + } + + // map all mutually exclusive arguments to the other arguments + // they can't occur with + let action_conflicts = new Map() + for (let mutex_group of this._mutually_exclusive_groups) { + let group_actions = mutex_group._group_actions + for (let [ i, mutex_action ] of Object.entries(mutex_group._group_actions)) { + let conflicts = action_conflicts.get(mutex_action) || [] + conflicts = conflicts.concat(group_actions.slice(0, +i)) + conflicts = conflicts.concat(group_actions.slice(+i + 1)) + action_conflicts.set(mutex_action, conflicts) + } + } + + // find all option indices, and determine the arg_string_pattern + // which has an 'O' if there is an option at an index, + // an 'A' if there is an argument, or a '-' if there is a '--' + let option_string_indices = {} + let arg_string_pattern_parts = [] + let arg_strings_iter = Object.entries(arg_strings)[Symbol.iterator]() + for (let [ i, arg_string ] of arg_strings_iter) { + + // all args after -- are non-options + if (arg_string === '--') { + arg_string_pattern_parts.push('-') + for ([ i, arg_string ] of arg_strings_iter) { + arg_string_pattern_parts.push('A') + } + + // otherwise, add the arg to the arg strings + // and note the index if it was an option + } else { + let option_tuple = this._parse_optional(arg_string) + let pattern + if (option_tuple === undefined) { + pattern = 'A' + } else { + option_string_indices[i] = option_tuple + pattern = 'O' + } + arg_string_pattern_parts.push(pattern) + } + } + + // join the pieces together to form the pattern + let arg_strings_pattern = arg_string_pattern_parts.join('') + + // converts arg strings to the appropriate and then takes the action + let seen_actions = new Set() + let seen_non_default_actions = new Set() + let extras + + let take_action = (action, argument_strings, option_string = undefined) => { + seen_actions.add(action) + let argument_values = this._get_values(action, argument_strings) + + // error if this argument is not allowed with other previously + // seen arguments, assuming that actions that use the default + // value don't really count as "present" + if (argument_values !== action.default) { + seen_non_default_actions.add(action) + for (let conflict_action of action_conflicts.get(action) || []) { + if (seen_non_default_actions.has(conflict_action)) { + let msg = 'not allowed with argument %s' + let action_name = _get_action_name(conflict_action) + throw new ArgumentError(action, sub(msg, action_name)) + } + } + } + + // take the action if we didn't receive a SUPPRESS value + // (e.g. from a default) + if (argument_values !== SUPPRESS) { + action(this, namespace, argument_values, option_string) + } + } + + // function to convert arg_strings into an optional action + let consume_optional = start_index => { + + // get the optional identified at this index + let option_tuple = option_string_indices[start_index] + let [ action, option_string, explicit_arg ] = option_tuple + + // identify additional optionals in the same arg string + // (e.g. -xyz is the same as -x -y -z if no args are required) + let action_tuples = [] + let stop + for (;;) { + + // if we found no optional action, skip it + if (action === undefined) { + extras.push(arg_strings[start_index]) + return start_index + 1 + } + + // if there is an explicit argument, try to match the + // optional's string arguments to only this + if (explicit_arg !== undefined) { + let arg_count = this._match_argument(action, 'A') + + // if the action is a single-dash option and takes no + // arguments, try to parse more single-dash options out + // of the tail of the option string + let chars = this.prefix_chars + if (arg_count === 0 && !chars.includes(option_string[1])) { + action_tuples.push([ action, [], option_string ]) + let char = option_string[0] + option_string = char + explicit_arg[0] + let new_explicit_arg = explicit_arg.slice(1) || undefined + let optionals_map = this._option_string_actions + if (hasattr(optionals_map, option_string)) { + action = optionals_map[option_string] + explicit_arg = new_explicit_arg + } else { + let msg = 'ignored explicit argument %r' + throw new ArgumentError(action, sub(msg, explicit_arg)) + } + + // if the action expect exactly one argument, we've + // successfully matched the option; exit the loop + } else if (arg_count === 1) { + stop = start_index + 1 + let args = [ explicit_arg ] + action_tuples.push([ action, args, option_string ]) + break + + // error if a double-dash option did not use the + // explicit argument + } else { + let msg = 'ignored explicit argument %r' + throw new ArgumentError(action, sub(msg, explicit_arg)) + } + + // if there is no explicit argument, try to match the + // optional's string arguments with the following strings + // if successful, exit the loop + } else { + let start = start_index + 1 + let selected_patterns = arg_strings_pattern.slice(start) + let arg_count = this._match_argument(action, selected_patterns) + stop = start + arg_count + let args = arg_strings.slice(start, stop) + action_tuples.push([ action, args, option_string ]) + break + } + } + + // add the Optional to the list and return the index at which + // the Optional's string args stopped + assert(action_tuples.length) + for (let [ action, args, option_string ] of action_tuples) { + take_action(action, args, option_string) + } + return stop + } + + // the list of Positionals left to be parsed; this is modified + // by consume_positionals() + let positionals = this._get_positional_actions() + + // function to convert arg_strings into positional actions + let consume_positionals = start_index => { + // match as many Positionals as possible + let selected_pattern = arg_strings_pattern.slice(start_index) + let arg_counts = this._match_arguments_partial(positionals, selected_pattern) + + // slice off the appropriate arg strings for each Positional + // and add the Positional and its args to the list + for (let i = 0; i < positionals.length && i < arg_counts.length; i++) { + let action = positionals[i] + let arg_count = arg_counts[i] + let args = arg_strings.slice(start_index, start_index + arg_count) + start_index += arg_count + take_action(action, args) + } + + // slice off the Positionals that we just parsed and return the + // index at which the Positionals' string args stopped + positionals = positionals.slice(arg_counts.length) + return start_index + } + + // consume Positionals and Optionals alternately, until we have + // passed the last option string + extras = [] + let start_index = 0 + let max_option_string_index = Math.max(-1, ...Object.keys(option_string_indices).map(Number)) + while (start_index <= max_option_string_index) { + + // consume any Positionals preceding the next option + let next_option_string_index = Math.min( + // eslint-disable-next-line no-loop-func + ...Object.keys(option_string_indices).map(Number).filter(index => index >= start_index) + ) + if (start_index !== next_option_string_index) { + let positionals_end_index = consume_positionals(start_index) + + // only try to parse the next optional if we didn't consume + // the option string during the positionals parsing + if (positionals_end_index > start_index) { + start_index = positionals_end_index + continue + } else { + start_index = positionals_end_index + } + } + + // if we consumed all the positionals we could and we're not + // at the index of an option string, there were extra arguments + if (!(start_index in option_string_indices)) { + let strings = arg_strings.slice(start_index, next_option_string_index) + extras = extras.concat(strings) + start_index = next_option_string_index + } + + // consume the next optional and any arguments for it + start_index = consume_optional(start_index) + } + + // consume any positionals following the last Optional + let stop_index = consume_positionals(start_index) + + // if we didn't consume all the argument strings, there were extras + extras = extras.concat(arg_strings.slice(stop_index)) + + // make sure all required actions were present and also convert + // action defaults which were not given as arguments + let required_actions = [] + for (let action of this._actions) { + if (!seen_actions.has(action)) { + if (action.required) { + required_actions.push(_get_action_name(action)) + } else { + // Convert action default now instead of doing it before + // parsing arguments to avoid calling convert functions + // twice (which may fail) if the argument was given, but + // only if it was defined already in the namespace + if (action.default !== undefined && + typeof action.default === 'string' && + hasattr(namespace, action.dest) && + action.default === getattr(namespace, action.dest)) { + setattr(namespace, action.dest, + this._get_value(action, action.default)) + } + } + } + } + + if (required_actions.length) { + this.error(sub('the following arguments are required: %s', + required_actions.join(', '))) + } + + // make sure all required groups had one option present + for (let group of this._mutually_exclusive_groups) { + if (group.required) { + let no_actions_used = true + for (let action of group._group_actions) { + if (seen_non_default_actions.has(action)) { + no_actions_used = false + break + } + } + + // if no actions were used, report the error + if (no_actions_used) { + let names = group._group_actions + .filter(action => action.help !== SUPPRESS) + .map(action => _get_action_name(action)) + let msg = 'one of the arguments %s is required' + this.error(sub(msg, names.join(' '))) + } + } + } + + // return the updated namespace and the extra arguments + return [ namespace, extras ] + } + + _read_args_from_files(arg_strings) { + // expand arguments referencing files + let new_arg_strings = [] + for (let arg_string of arg_strings) { + + // for regular arguments, just add them back into the list + if (!arg_string || !this.fromfile_prefix_chars.includes(arg_string[0])) { + new_arg_strings.push(arg_string) + + // replace arguments referencing files with the file content + } else { + try { + let args_file = fs.readFileSync(arg_string.slice(1), 'utf8') + let arg_strings = [] + for (let arg_line of splitlines(args_file)) { + for (let arg of this.convert_arg_line_to_args(arg_line)) { + arg_strings.push(arg) + } + } + arg_strings = this._read_args_from_files(arg_strings) + new_arg_strings = new_arg_strings.concat(arg_strings) + } catch (err) { + this.error(err.message) + } + } + } + + // return the modified argument list + return new_arg_strings + } + + convert_arg_line_to_args(arg_line) { + return [arg_line] + } + + _match_argument(action, arg_strings_pattern) { + // match the pattern for this action to the arg strings + let nargs_pattern = this._get_nargs_pattern(action) + let match = arg_strings_pattern.match(new RegExp('^' + nargs_pattern)) + + // raise an exception if we weren't able to find a match + if (match === null) { + let nargs_errors = { + undefined: 'expected one argument', + [OPTIONAL]: 'expected at most one argument', + [ONE_OR_MORE]: 'expected at least one argument' + } + let msg = nargs_errors[action.nargs] + if (msg === undefined) { + msg = sub(action.nargs === 1 ? 'expected %s argument' : 'expected %s arguments', action.nargs) + } + throw new ArgumentError(action, msg) + } + + // return the number of arguments matched + return match[1].length + } + + _match_arguments_partial(actions, arg_strings_pattern) { + // progressively shorten the actions list by slicing off the + // final actions until we find a match + let result = [] + for (let i of range(actions.length, 0, -1)) { + let actions_slice = actions.slice(0, i) + let pattern = actions_slice.map(action => this._get_nargs_pattern(action)).join('') + let match = arg_strings_pattern.match(new RegExp('^' + pattern)) + if (match !== null) { + result = result.concat(match.slice(1).map(string => string.length)) + break + } + } + + // return the list of arg string counts + return result + } + + _parse_optional(arg_string) { + // if it's an empty string, it was meant to be a positional + if (!arg_string) { + return undefined + } + + // if it doesn't start with a prefix, it was meant to be positional + if (!this.prefix_chars.includes(arg_string[0])) { + return undefined + } + + // if the option string is present in the parser, return the action + if (arg_string in this._option_string_actions) { + let action = this._option_string_actions[arg_string] + return [ action, arg_string, undefined ] + } + + // if it's just a single character, it was meant to be positional + if (arg_string.length === 1) { + return undefined + } + + // if the option string before the "=" is present, return the action + if (arg_string.includes('=')) { + let [ option_string, explicit_arg ] = _string_split(arg_string, '=', 1) + if (option_string in this._option_string_actions) { + let action = this._option_string_actions[option_string] + return [ action, option_string, explicit_arg ] + } + } + + // search through all possible prefixes of the option string + // and all actions in the parser for possible interpretations + let option_tuples = this._get_option_tuples(arg_string) + + // if multiple actions match, the option string was ambiguous + if (option_tuples.length > 1) { + let options = option_tuples.map(([ /*action*/, option_string/*, explicit_arg*/ ]) => option_string).join(', ') + let args = {option: arg_string, matches: options} + let msg = 'ambiguous option: %(option)s could match %(matches)s' + this.error(sub(msg, args)) + + // if exactly one action matched, this segmentation is good, + // so return the parsed action + } else if (option_tuples.length === 1) { + let [ option_tuple ] = option_tuples + return option_tuple + } + + // if it was not found as an option, but it looks like a negative + // number, it was meant to be positional + // unless there are negative-number-like options + if (this._negative_number_matcher.test(arg_string)) { + if (!this._has_negative_number_optionals.length) { + return undefined + } + } + + // if it contains a space, it was meant to be a positional + if (arg_string.includes(' ')) { + return undefined + } + + // it was meant to be an optional but there is no such option + // in this parser (though it might be a valid option in a subparser) + return [ undefined, arg_string, undefined ] + } + + _get_option_tuples(option_string) { + let result = [] + + // option strings starting with two prefix characters are only + // split at the '=' + let chars = this.prefix_chars + if (chars.includes(option_string[0]) && chars.includes(option_string[1])) { + if (this.allow_abbrev) { + let option_prefix, explicit_arg + if (option_string.includes('=')) { + [ option_prefix, explicit_arg ] = _string_split(option_string, '=', 1) + } else { + option_prefix = option_string + explicit_arg = undefined + } + for (let option_string of Object.keys(this._option_string_actions)) { + if (option_string.startsWith(option_prefix)) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, explicit_arg ] + result.push(tup) + } + } + } + + // single character options can be concatenated with their arguments + // but multiple character options always have to have their argument + // separate + } else if (chars.includes(option_string[0]) && !chars.includes(option_string[1])) { + let option_prefix = option_string + let explicit_arg = undefined + let short_option_prefix = option_string.slice(0, 2) + let short_explicit_arg = option_string.slice(2) + + for (let option_string of Object.keys(this._option_string_actions)) { + if (option_string === short_option_prefix) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, short_explicit_arg ] + result.push(tup) + } else if (option_string.startsWith(option_prefix)) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, explicit_arg ] + result.push(tup) + } + } + + // shouldn't ever get here + } else { + this.error(sub('unexpected option string: %s', option_string)) + } + + // return the collected option tuples + return result + } + + _get_nargs_pattern(action) { + // in all examples below, we have to allow for '--' args + // which are represented as '-' in the pattern + let nargs = action.nargs + let nargs_pattern + + // the default (None) is assumed to be a single argument + if (nargs === undefined) { + nargs_pattern = '(-*A-*)' + + // allow zero or one arguments + } else if (nargs === OPTIONAL) { + nargs_pattern = '(-*A?-*)' + + // allow zero or more arguments + } else if (nargs === ZERO_OR_MORE) { + nargs_pattern = '(-*[A-]*)' + + // allow one or more arguments + } else if (nargs === ONE_OR_MORE) { + nargs_pattern = '(-*A[A-]*)' + + // allow any number of options or arguments + } else if (nargs === REMAINDER) { + nargs_pattern = '([-AO]*)' + + // allow one argument followed by any number of options or arguments + } else if (nargs === PARSER) { + nargs_pattern = '(-*A[-AO]*)' + + // suppress action, like nargs=0 + } else if (nargs === SUPPRESS) { + nargs_pattern = '(-*-*)' + + // all others should be integers + } else { + nargs_pattern = sub('(-*%s-*)', 'A'.repeat(nargs).split('').join('-*')) + } + + // if this is an optional action, -- is not allowed + if (action.option_strings.length) { + nargs_pattern = nargs_pattern.replace(/-\*/g, '') + nargs_pattern = nargs_pattern.replace(/-/g, '') + } + + // return the pattern + return nargs_pattern + } + + // ======================== + // Alt command line argument parsing, allowing free intermix + // ======================== + + parse_intermixed_args(args = undefined, namespace = undefined) { + let argv + [ args, argv ] = this.parse_known_intermixed_args(args, namespace) + if (argv.length) { + let msg = 'unrecognized arguments: %s' + this.error(sub(msg, argv.join(' '))) + } + return args + } + + parse_known_intermixed_args(args = undefined, namespace = undefined) { + // returns a namespace and list of extras + // + // positional can be freely intermixed with optionals. optionals are + // first parsed with all positional arguments deactivated. The 'extras' + // are then parsed. If the parser definition is incompatible with the + // intermixed assumptions (e.g. use of REMAINDER, subparsers) a + // TypeError is raised. + // + // positionals are 'deactivated' by setting nargs and default to + // SUPPRESS. This blocks the addition of that positional to the + // namespace + + let extras + let positionals = this._get_positional_actions() + let a = positionals.filter(action => [ PARSER, REMAINDER ].includes(action.nargs)) + if (a.length) { + throw new TypeError(sub('parse_intermixed_args: positional arg' + + ' with nargs=%s', a[0].nargs)) + } + + for (let group of this._mutually_exclusive_groups) { + for (let action of group._group_actions) { + if (positionals.includes(action)) { + throw new TypeError('parse_intermixed_args: positional in' + + ' mutuallyExclusiveGroup') + } + } + } + + let save_usage + try { + save_usage = this.usage + let remaining_args + try { + if (this.usage === undefined) { + // capture the full usage for use in error messages + this.usage = this.format_usage().slice(7) + } + for (let action of positionals) { + // deactivate positionals + action.save_nargs = action.nargs + // action.nargs = 0 + action.nargs = SUPPRESS + action.save_default = action.default + action.default = SUPPRESS + } + [ namespace, remaining_args ] = this.parse_known_args(args, + namespace) + for (let action of positionals) { + // remove the empty positional values from namespace + let attr = getattr(namespace, action.dest) + if (Array.isArray(attr) && attr.length === 0) { + // eslint-disable-next-line no-console + console.warn(sub('Do not expect %s in %s', action.dest, namespace)) + delattr(namespace, action.dest) + } + } + } finally { + // restore nargs and usage before exiting + for (let action of positionals) { + action.nargs = action.save_nargs + action.default = action.save_default + } + } + let optionals = this._get_optional_actions() + try { + // parse positionals. optionals aren't normally required, but + // they could be, so make sure they aren't. + for (let action of optionals) { + action.save_required = action.required + action.required = false + } + for (let group of this._mutually_exclusive_groups) { + group.save_required = group.required + group.required = false + } + [ namespace, extras ] = this.parse_known_args(remaining_args, + namespace) + } finally { + // restore parser values before exiting + for (let action of optionals) { + action.required = action.save_required + } + for (let group of this._mutually_exclusive_groups) { + group.required = group.save_required + } + } + } finally { + this.usage = save_usage + } + return [ namespace, extras ] + } + + // ======================== + // Value conversion methods + // ======================== + _get_values(action, arg_strings) { + // for everything but PARSER, REMAINDER args, strip out first '--' + if (![PARSER, REMAINDER].includes(action.nargs)) { + try { + _array_remove(arg_strings, '--') + } catch (err) {} + } + + let value + // optional argument produces a default when not present + if (!arg_strings.length && action.nargs === OPTIONAL) { + if (action.option_strings.length) { + value = action.const + } else { + value = action.default + } + if (typeof value === 'string') { + value = this._get_value(action, value) + this._check_value(action, value) + } + + // when nargs='*' on a positional, if there were no command-line + // args, use the default if it is anything other than None + } else if (!arg_strings.length && action.nargs === ZERO_OR_MORE && + !action.option_strings.length) { + if (action.default !== undefined) { + value = action.default + } else { + value = arg_strings + } + this._check_value(action, value) + + // single argument or optional argument produces a single value + } else if (arg_strings.length === 1 && [undefined, OPTIONAL].includes(action.nargs)) { + let arg_string = arg_strings[0] + value = this._get_value(action, arg_string) + this._check_value(action, value) + + // REMAINDER arguments convert all values, checking none + } else if (action.nargs === REMAINDER) { + value = arg_strings.map(v => this._get_value(action, v)) + + // PARSER arguments convert all values, but check only the first + } else if (action.nargs === PARSER) { + value = arg_strings.map(v => this._get_value(action, v)) + this._check_value(action, value[0]) + + // SUPPRESS argument does not put anything in the namespace + } else if (action.nargs === SUPPRESS) { + value = SUPPRESS + + // all other types of nargs produce a list + } else { + value = arg_strings.map(v => this._get_value(action, v)) + for (let v of value) { + this._check_value(action, v) + } + } + + // return the converted value + return value + } + + _get_value(action, arg_string) { + let type_func = this._registry_get('type', action.type, action.type) + if (typeof type_func !== 'function') { + let msg = '%r is not callable' + throw new ArgumentError(action, sub(msg, type_func)) + } + + // convert the value to the appropriate type + let result + try { + try { + result = type_func(arg_string) + } catch (err) { + // Dear TC39, why would you ever consider making es6 classes not callable? + // We had one universal interface, [[Call]], which worked for anything + // (with familiar this-instanceof guard for classes). Now we have two. + if (err instanceof TypeError && + /Class constructor .* cannot be invoked without 'new'/.test(err.message)) { + // eslint-disable-next-line new-cap + result = new type_func(arg_string) + } else { + throw err + } + } + + } catch (err) { + // ArgumentTypeErrors indicate errors + if (err instanceof ArgumentTypeError) { + //let name = getattr(action.type, 'name', repr(action.type)) + let msg = err.message + throw new ArgumentError(action, msg) + + // TypeErrors or ValueErrors also indicate errors + } else if (err instanceof TypeError) { + let name = getattr(action.type, 'name', repr(action.type)) + let args = {type: name, value: arg_string} + let msg = 'invalid %(type)s value: %(value)r' + throw new ArgumentError(action, sub(msg, args)) + } else { + throw err + } + } + + // return the converted value + return result + } + + _check_value(action, value) { + // converted value must be one of the choices (if specified) + if (action.choices !== undefined && !_choices_to_array(action.choices).includes(value)) { + let args = {value, + choices: _choices_to_array(action.choices).map(repr).join(', ')} + let msg = 'invalid choice: %(value)r (choose from %(choices)s)' + throw new ArgumentError(action, sub(msg, args)) + } + } + + // ======================= + // Help-formatting methods + // ======================= + format_usage() { + let formatter = this._get_formatter() + formatter.add_usage(this.usage, this._actions, + this._mutually_exclusive_groups) + return formatter.format_help() + } + + format_help() { + let formatter = this._get_formatter() + + // usage + formatter.add_usage(this.usage, this._actions, + this._mutually_exclusive_groups) + + // description + formatter.add_text(this.description) + + // positionals, optionals and user-defined groups + for (let action_group of this._action_groups) { + formatter.start_section(action_group.title) + formatter.add_text(action_group.description) + formatter.add_arguments(action_group._group_actions) + formatter.end_section() + } + + // epilog + formatter.add_text(this.epilog) + + // determine help from format above + return formatter.format_help() + } + + _get_formatter() { + // eslint-disable-next-line new-cap + return new this.formatter_class({ prog: this.prog }) + } + + // ===================== + // Help-printing methods + // ===================== + print_usage(file = undefined) { + if (file === undefined) file = process.stdout + this._print_message(this.format_usage(), file) + } + + print_help(file = undefined) { + if (file === undefined) file = process.stdout + this._print_message(this.format_help(), file) + } + + _print_message(message, file = undefined) { + if (message) { + if (file === undefined) file = process.stderr + file.write(message) + } + } + + // =============== + // Exiting methods + // =============== + exit(status = 0, message = undefined) { + if (message) { + this._print_message(message, process.stderr) + } + process.exit(status) + } + + error(message) { + /* + * error(message: string) + * + * Prints a usage message incorporating the message to stderr and + * exits. + * + * If you override this in a subclass, it should not return -- it + * should either exit or raise an exception. + */ + + // LEGACY (v1 compatibility), debug mode + if (this.debug === true) throw new Error(message) + // end + this.print_usage(process.stderr) + let args = {prog: this.prog, message: message} + this.exit(2, sub('%(prog)s: error: %(message)s\n', args)) + } +})) + + +module.exports = { + ArgumentParser, + ArgumentError, + ArgumentTypeError, + BooleanOptionalAction, + FileType, + HelpFormatter, + ArgumentDefaultsHelpFormatter, + RawDescriptionHelpFormatter, + RawTextHelpFormatter, + MetavarTypeHelpFormatter, + Namespace, + Action, + ONE_OR_MORE, + OPTIONAL, + PARSER, + REMAINDER, + SUPPRESS, + ZERO_OR_MORE +} + +// LEGACY (v1 compatibility), Const alias +Object.defineProperty(module.exports, 'Const', { + get() { + let result = {} + Object.entries({ ONE_OR_MORE, OPTIONAL, PARSER, REMAINDER, SUPPRESS, ZERO_OR_MORE }).forEach(([ n, v ]) => { + Object.defineProperty(result, n, { + get() { + deprecate(n, sub('use argparse.%s instead of argparse.Const.%s', n, n)) + return v + } + }) + }) + Object.entries({ _UNRECOGNIZED_ARGS_ATTR }).forEach(([ n, v ]) => { + Object.defineProperty(result, n, { + get() { + deprecate(n, sub('argparse.Const.%s is an internal symbol and will no longer be available', n)) + return v + } + }) + }) + return result + }, + enumerable: false +}) +// end diff --git a/node_modules/argparse/lib/sub.js b/node_modules/argparse/lib/sub.js new file mode 100644 index 00000000..e3eb3215 --- /dev/null +++ b/node_modules/argparse/lib/sub.js @@ -0,0 +1,67 @@ +// Limited implementation of python % string operator, supports only %s and %r for now +// (other formats are not used here, but may appear in custom templates) + +'use strict' + +const { inspect } = require('util') + + +module.exports = function sub(pattern, ...values) { + let regex = /%(?:(%)|(-)?(\*)?(?:\((\w+)\))?([A-Za-z]))/g + + let result = pattern.replace(regex, function (_, is_literal, is_left_align, is_padded, name, format) { + if (is_literal) return '%' + + let padded_count = 0 + if (is_padded) { + if (values.length === 0) throw new TypeError('not enough arguments for format string') + padded_count = values.shift() + if (!Number.isInteger(padded_count)) throw new TypeError('* wants int') + } + + let str + if (name !== undefined) { + let dict = values[0] + if (typeof dict !== 'object' || dict === null) throw new TypeError('format requires a mapping') + if (!(name in dict)) throw new TypeError(`no such key: '${name}'`) + str = dict[name] + } else { + if (values.length === 0) throw new TypeError('not enough arguments for format string') + str = values.shift() + } + + switch (format) { + case 's': + str = String(str) + break + case 'r': + str = inspect(str) + break + case 'd': + case 'i': + if (typeof str !== 'number') { + throw new TypeError(`%${format} format: a number is required, not ${typeof str}`) + } + str = String(str.toFixed(0)) + break + default: + throw new TypeError(`unsupported format character '${format}'`) + } + + if (padded_count > 0) { + return is_left_align ? str.padEnd(padded_count) : str.padStart(padded_count) + } else { + return str + } + }) + + if (values.length) { + if (values.length === 1 && typeof values[0] === 'object' && values[0] !== null) { + // mapping + } else { + throw new TypeError('not all arguments converted during string formatting') + } + } + + return result +} diff --git a/node_modules/argparse/lib/textwrap.js b/node_modules/argparse/lib/textwrap.js new file mode 100644 index 00000000..23d51cdb --- /dev/null +++ b/node_modules/argparse/lib/textwrap.js @@ -0,0 +1,440 @@ +// Partial port of python's argparse module, version 3.9.0 (only wrap and fill functions): +// https://github.com/python/cpython/blob/v3.9.0b4/Lib/textwrap.py + +'use strict' + +/* + * Text wrapping and filling. + */ + +// Copyright (C) 1999-2001 Gregory P. Ward. +// Copyright (C) 2002, 2003 Python Software Foundation. +// Copyright (C) 2020 argparse.js authors +// Originally written by Greg Ward + +// Hardcode the recognized whitespace characters to the US-ASCII +// whitespace characters. The main reason for doing this is that +// some Unicode spaces (like \u00a0) are non-breaking whitespaces. +// +// This less funky little regex just split on recognized spaces. E.g. +// "Hello there -- you goof-ball, use the -b option!" +// splits into +// Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/ +const wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/ + +class TextWrapper { + /* + * Object for wrapping/filling text. The public interface consists of + * the wrap() and fill() methods; the other methods are just there for + * subclasses to override in order to tweak the default behaviour. + * If you want to completely replace the main wrapping algorithm, + * you'll probably have to override _wrap_chunks(). + * + * Several instance attributes control various aspects of wrapping: + * width (default: 70) + * the maximum width of wrapped lines (unless break_long_words + * is false) + * initial_indent (default: "") + * string that will be prepended to the first line of wrapped + * output. Counts towards the line's width. + * subsequent_indent (default: "") + * string that will be prepended to all lines save the first + * of wrapped output; also counts towards each line's width. + * expand_tabs (default: true) + * Expand tabs in input text to spaces before further processing. + * Each tab will become 0 .. 'tabsize' spaces, depending on its position + * in its line. If false, each tab is treated as a single character. + * tabsize (default: 8) + * Expand tabs in input text to 0 .. 'tabsize' spaces, unless + * 'expand_tabs' is false. + * replace_whitespace (default: true) + * Replace all whitespace characters in the input text by spaces + * after tab expansion. Note that if expand_tabs is false and + * replace_whitespace is true, every tab will be converted to a + * single space! + * fix_sentence_endings (default: false) + * Ensure that sentence-ending punctuation is always followed + * by two spaces. Off by default because the algorithm is + * (unavoidably) imperfect. + * break_long_words (default: true) + * Break words longer than 'width'. If false, those words will not + * be broken, and some lines might be longer than 'width'. + * break_on_hyphens (default: true) + * Allow breaking hyphenated words. If true, wrapping will occur + * preferably on whitespaces and right after hyphens part of + * compound words. + * drop_whitespace (default: true) + * Drop leading and trailing whitespace from lines. + * max_lines (default: None) + * Truncate wrapped lines. + * placeholder (default: ' [...]') + * Append to the last line of truncated text. + */ + + constructor(options = {}) { + let { + width = 70, + initial_indent = '', + subsequent_indent = '', + expand_tabs = true, + replace_whitespace = true, + fix_sentence_endings = false, + break_long_words = true, + drop_whitespace = true, + break_on_hyphens = true, + tabsize = 8, + max_lines = undefined, + placeholder=' [...]' + } = options + + this.width = width + this.initial_indent = initial_indent + this.subsequent_indent = subsequent_indent + this.expand_tabs = expand_tabs + this.replace_whitespace = replace_whitespace + this.fix_sentence_endings = fix_sentence_endings + this.break_long_words = break_long_words + this.drop_whitespace = drop_whitespace + this.break_on_hyphens = break_on_hyphens + this.tabsize = tabsize + this.max_lines = max_lines + this.placeholder = placeholder + } + + + // -- Private methods ----------------------------------------------- + // (possibly useful for subclasses to override) + + _munge_whitespace(text) { + /* + * _munge_whitespace(text : string) -> string + * + * Munge whitespace in text: expand tabs and convert all other + * whitespace characters to spaces. Eg. " foo\\tbar\\n\\nbaz" + * becomes " foo bar baz". + */ + if (this.expand_tabs) { + text = text.replace(/\t/g, ' '.repeat(this.tabsize)) // not strictly correct in js + } + if (this.replace_whitespace) { + text = text.replace(/[\t\n\x0b\x0c\r]/g, ' ') + } + return text + } + + _split(text) { + /* + * _split(text : string) -> [string] + * + * Split the text to wrap into indivisible chunks. Chunks are + * not quite the same as words; see _wrap_chunks() for full + * details. As an example, the text + * Look, goof-ball -- use the -b option! + * breaks into the following chunks: + * 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ', + * 'use', ' ', 'the', ' ', '-b', ' ', 'option!' + * if break_on_hyphens is True, or in: + * 'Look,', ' ', 'goof-ball', ' ', '--', ' ', + * 'use', ' ', 'the', ' ', '-b', ' ', option!' + * otherwise. + */ + let chunks = text.split(wordsep_simple_re) + chunks = chunks.filter(Boolean) + return chunks + } + + _handle_long_word(reversed_chunks, cur_line, cur_len, width) { + /* + * _handle_long_word(chunks : [string], + * cur_line : [string], + * cur_len : int, width : int) + * + * Handle a chunk of text (most likely a word, not whitespace) that + * is too long to fit in any line. + */ + // Figure out when indent is larger than the specified width, and make + // sure at least one character is stripped off on every pass + let space_left + if (width < 1) { + space_left = 1 + } else { + space_left = width - cur_len + } + + // If we're allowed to break long words, then do so: put as much + // of the next chunk onto the current line as will fit. + if (this.break_long_words) { + cur_line.push(reversed_chunks[reversed_chunks.length - 1].slice(0, space_left)) + reversed_chunks[reversed_chunks.length - 1] = reversed_chunks[reversed_chunks.length - 1].slice(space_left) + + // Otherwise, we have to preserve the long word intact. Only add + // it to the current line if there's nothing already there -- + // that minimizes how much we violate the width constraint. + } else if (!cur_line) { + cur_line.push(...reversed_chunks.pop()) + } + + // If we're not allowed to break long words, and there's already + // text on the current line, do nothing. Next time through the + // main loop of _wrap_chunks(), we'll wind up here again, but + // cur_len will be zero, so the next line will be entirely + // devoted to the long word that we can't handle right now. + } + + _wrap_chunks(chunks) { + /* + * _wrap_chunks(chunks : [string]) -> [string] + * + * Wrap a sequence of text chunks and return a list of lines of + * length 'self.width' or less. (If 'break_long_words' is false, + * some lines may be longer than this.) Chunks correspond roughly + * to words and the whitespace between them: each chunk is + * indivisible (modulo 'break_long_words'), but a line break can + * come between any two chunks. Chunks should not have internal + * whitespace; ie. a chunk is either all whitespace or a "word". + * Whitespace chunks will be removed from the beginning and end of + * lines, but apart from that whitespace is preserved. + */ + let lines = [] + let indent + if (this.width <= 0) { + throw Error(`invalid width ${this.width} (must be > 0)`) + } + if (this.max_lines !== undefined) { + if (this.max_lines > 1) { + indent = this.subsequent_indent + } else { + indent = this.initial_indent + } + if (indent.length + this.placeholder.trimStart().length > this.width) { + throw Error('placeholder too large for max width') + } + } + + // Arrange in reverse order so items can be efficiently popped + // from a stack of chucks. + chunks = chunks.reverse() + + while (chunks.length > 0) { + + // Start the list of chunks that will make up the current line. + // cur_len is just the length of all the chunks in cur_line. + let cur_line = [] + let cur_len = 0 + + // Figure out which static string will prefix this line. + let indent + if (lines) { + indent = this.subsequent_indent + } else { + indent = this.initial_indent + } + + // Maximum width for this line. + let width = this.width - indent.length + + // First chunk on line is whitespace -- drop it, unless this + // is the very beginning of the text (ie. no lines started yet). + if (this.drop_whitespace && chunks[chunks.length - 1].trim() === '' && lines.length > 0) { + chunks.pop() + } + + while (chunks.length > 0) { + let l = chunks[chunks.length - 1].length + + // Can at least squeeze this chunk onto the current line. + if (cur_len + l <= width) { + cur_line.push(chunks.pop()) + cur_len += l + + // Nope, this line is full. + } else { + break + } + } + + // The current line is full, and the next chunk is too big to + // fit on *any* line (not just this one). + if (chunks.length && chunks[chunks.length - 1].length > width) { + this._handle_long_word(chunks, cur_line, cur_len, width) + cur_len = cur_line.map(l => l.length).reduce((a, b) => a + b, 0) + } + + // If the last chunk on this line is all whitespace, drop it. + if (this.drop_whitespace && cur_line.length > 0 && cur_line[cur_line.length - 1].trim() === '') { + cur_len -= cur_line[cur_line.length - 1].length + cur_line.pop() + } + + if (cur_line) { + if (this.max_lines === undefined || + lines.length + 1 < this.max_lines || + (chunks.length === 0 || + this.drop_whitespace && + chunks.length === 1 && + !chunks[0].trim()) && cur_len <= width) { + // Convert current line back to a string and store it in + // list of all lines (return value). + lines.push(indent + cur_line.join('')) + } else { + let had_break = false + while (cur_line) { + if (cur_line[cur_line.length - 1].trim() && + cur_len + this.placeholder.length <= width) { + cur_line.push(this.placeholder) + lines.push(indent + cur_line.join('')) + had_break = true + break + } + cur_len -= cur_line[-1].length + cur_line.pop() + } + if (!had_break) { + if (lines) { + let prev_line = lines[lines.length - 1].trimEnd() + if (prev_line.length + this.placeholder.length <= + this.width) { + lines[lines.length - 1] = prev_line + this.placeholder + break + } + } + lines.push(indent + this.placeholder.lstrip()) + } + break + } + } + } + + return lines + } + + _split_chunks(text) { + text = this._munge_whitespace(text) + return this._split(text) + } + + // -- Public interface ---------------------------------------------- + + wrap(text) { + /* + * wrap(text : string) -> [string] + * + * Reformat the single paragraph in 'text' so it fits in lines of + * no more than 'self.width' columns, and return a list of wrapped + * lines. Tabs in 'text' are expanded with string.expandtabs(), + * and all other whitespace characters (including newline) are + * converted to space. + */ + let chunks = this._split_chunks(text) + // not implemented in js + //if (this.fix_sentence_endings) { + // this._fix_sentence_endings(chunks) + //} + return this._wrap_chunks(chunks) + } + + fill(text) { + /* + * fill(text : string) -> string + * + * Reformat the single paragraph in 'text' to fit in lines of no + * more than 'self.width' columns, and return a new string + * containing the entire wrapped paragraph. + */ + return this.wrap(text).join('\n') + } +} + + +// -- Convenience interface --------------------------------------------- + +function wrap(text, options = {}) { + /* + * Wrap a single paragraph of text, returning a list of wrapped lines. + * + * Reformat the single paragraph in 'text' so it fits in lines of no + * more than 'width' columns, and return a list of wrapped lines. By + * default, tabs in 'text' are expanded with string.expandtabs(), and + * all other whitespace characters (including newline) are converted to + * space. See TextWrapper class for available keyword args to customize + * wrapping behaviour. + */ + let { width = 70, ...kwargs } = options + let w = new TextWrapper(Object.assign({ width }, kwargs)) + return w.wrap(text) +} + +function fill(text, options = {}) { + /* + * Fill a single paragraph of text, returning a new string. + * + * Reformat the single paragraph in 'text' to fit in lines of no more + * than 'width' columns, and return a new string containing the entire + * wrapped paragraph. As with wrap(), tabs are expanded and other + * whitespace characters converted to space. See TextWrapper class for + * available keyword args to customize wrapping behaviour. + */ + let { width = 70, ...kwargs } = options + let w = new TextWrapper(Object.assign({ width }, kwargs)) + return w.fill(text) +} + +// -- Loosely related functionality ------------------------------------- + +let _whitespace_only_re = /^[ \t]+$/mg +let _leading_whitespace_re = /(^[ \t]*)(?:[^ \t\n])/mg + +function dedent(text) { + /* + * Remove any common leading whitespace from every line in `text`. + * + * This can be used to make triple-quoted strings line up with the left + * edge of the display, while still presenting them in the source code + * in indented form. + * + * Note that tabs and spaces are both treated as whitespace, but they + * are not equal: the lines " hello" and "\\thello" are + * considered to have no common leading whitespace. + * + * Entirely blank lines are normalized to a newline character. + */ + // Look for the longest leading string of spaces and tabs common to + // all lines. + let margin = undefined + text = text.replace(_whitespace_only_re, '') + let indents = text.match(_leading_whitespace_re) || [] + for (let indent of indents) { + indent = indent.slice(0, -1) + + if (margin === undefined) { + margin = indent + + // Current line more deeply indented than previous winner: + // no change (previous winner is still on top). + } else if (indent.startsWith(margin)) { + // pass + + // Current line consistent with and no deeper than previous winner: + // it's the new winner. + } else if (margin.startsWith(indent)) { + margin = indent + + // Find the largest common whitespace between current line and previous + // winner. + } else { + for (let i = 0; i < margin.length && i < indent.length; i++) { + if (margin[i] !== indent[i]) { + margin = margin.slice(0, i) + break + } + } + } + } + + if (margin) { + text = text.replace(new RegExp('^' + margin, 'mg'), '') + } + return text +} + +module.exports = { wrap, fill, dedent } diff --git a/node_modules/argparse/package.json b/node_modules/argparse/package.json new file mode 100644 index 00000000..647d2aff --- /dev/null +++ b/node_modules/argparse/package.json @@ -0,0 +1,31 @@ +{ + "name": "argparse", + "description": "CLI arguments parser. Native port of python's argparse.", + "version": "2.0.1", + "keywords": [ + "cli", + "parser", + "argparse", + "option", + "args" + ], + "main": "argparse.js", + "files": [ + "argparse.js", + "lib/" + ], + "license": "Python-2.0", + "repository": "nodeca/argparse", + "scripts": { + "lint": "eslint .", + "test": "npm run lint && nyc mocha", + "coverage": "npm run test && nyc report --reporter html" + }, + "devDependencies": { + "@babel/eslint-parser": "^7.11.0", + "@babel/plugin-syntax-class-properties": "^7.10.4", + "eslint": "^7.5.0", + "mocha": "^8.0.1", + "nyc": "^15.1.0" + } +} diff --git a/node_modules/callsites/index.d.ts b/node_modules/callsites/index.d.ts new file mode 100644 index 00000000..61f597cf --- /dev/null +++ b/node_modules/callsites/index.d.ts @@ -0,0 +1,96 @@ +declare namespace callsites { + interface CallSite { + /** + Returns the value of `this`. + */ + getThis(): unknown | undefined; + + /** + Returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property. + */ + getTypeName(): string | null; + + /** + Returns the current function. + */ + getFunction(): Function | undefined; + + /** + Returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context. + */ + getFunctionName(): string | null; + + /** + Returns the name of the property of `this` or one of its prototypes that holds the current function. + */ + getMethodName(): string | undefined; + + /** + Returns the name of the script if this function was defined in a script. + */ + getFileName(): string | null; + + /** + Returns the current line number if this function was defined in a script. + */ + getLineNumber(): number | null; + + /** + Returns the current column number if this function was defined in a script. + */ + getColumnNumber(): number | null; + + /** + Returns a string representing the location where `eval` was called if this function was created using a call to `eval`. + */ + getEvalOrigin(): string | undefined; + + /** + Returns `true` if this is a top-level invocation, that is, if it's a global object. + */ + isToplevel(): boolean; + + /** + Returns `true` if this call takes place in code defined by a call to `eval`. + */ + isEval(): boolean; + + /** + Returns `true` if this call is in native V8 code. + */ + isNative(): boolean; + + /** + Returns `true` if this is a constructor call. + */ + isConstructor(): boolean; + } +} + +declare const callsites: { + /** + Get callsites from the V8 stack trace API. + + @returns An array of `CallSite` objects. + + @example + ``` + import callsites = require('callsites'); + + function unicorn() { + console.log(callsites()[0].getFileName()); + //=> '/Users/sindresorhus/dev/callsites/test.js' + } + + unicorn(); + ``` + */ + (): callsites.CallSite[]; + + // TODO: Remove this for the next major release, refactor the whole definition to: + // declare function callsites(): callsites.CallSite[]; + // export = callsites; + default: typeof callsites; +}; + +export = callsites; diff --git a/node_modules/callsites/index.js b/node_modules/callsites/index.js new file mode 100644 index 00000000..486c2410 --- /dev/null +++ b/node_modules/callsites/index.js @@ -0,0 +1,13 @@ +'use strict'; + +const callsites = () => { + const _prepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = (_, stack) => stack; + const stack = new Error().stack.slice(1); + Error.prepareStackTrace = _prepareStackTrace; + return stack; +}; + +module.exports = callsites; +// TODO: Remove this for the next major release +module.exports.default = callsites; diff --git a/node_modules/callsites/license b/node_modules/callsites/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/callsites/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/callsites/package.json b/node_modules/callsites/package.json new file mode 100644 index 00000000..93463c34 --- /dev/null +++ b/node_modules/callsites/package.json @@ -0,0 +1,39 @@ +{ + "name": "callsites", + "version": "3.1.0", + "description": "Get callsites from the V8 stack trace API", + "license": "MIT", + "repository": "sindresorhus/callsites", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "stacktrace", + "v8", + "callsite", + "callsites", + "stack", + "trace", + "function", + "file", + "line", + "debug" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/callsites/readme.md b/node_modules/callsites/readme.md new file mode 100644 index 00000000..fc846138 --- /dev/null +++ b/node_modules/callsites/readme.md @@ -0,0 +1,48 @@ +# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites) + +> Get callsites from the [V8 stack trace API](https://v8.dev/docs/stack-trace-api) + + +## Install + +``` +$ npm install callsites +``` + + +## Usage + +```js +const callsites = require('callsites'); + +function unicorn() { + console.log(callsites()[0].getFileName()); + //=> '/Users/sindresorhus/dev/callsites/test.js' +} + +unicorn(); +``` + + +## API + +Returns an array of callsite objects with the following methods: + +- `getThis`: returns the value of `this`. +- `getTypeName`: returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property. +- `getFunction`: returns the current function. +- `getFunctionName`: returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context. +- `getMethodName`: returns the name of the property of `this` or one of its prototypes that holds the current function. +- `getFileName`: if this function was defined in a script returns the name of the script. +- `getLineNumber`: if this function was defined in a script returns the current line number. +- `getColumnNumber`: if this function was defined in a script returns the current column number +- `getEvalOrigin`: if this function was created using a call to `eval` returns a string representing the location where `eval` was called. +- `isToplevel`: is this a top-level invocation, that is, is this the global object? +- `isEval`: does this call take place in code defined by a call to `eval`? +- `isNative`: is this call in native V8 code? +- `isConstructor`: is this a constructor call? + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cosmiconfig/LICENSE b/node_modules/cosmiconfig/LICENSE new file mode 100644 index 00000000..6d347c06 --- /dev/null +++ b/node_modules/cosmiconfig/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 David Clark + +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/cosmiconfig/README.md b/node_modules/cosmiconfig/README.md new file mode 100644 index 00000000..5f99b0a2 --- /dev/null +++ b/node_modules/cosmiconfig/README.md @@ -0,0 +1,685 @@ +# cosmiconfig + +[![codecov](https://codecov.io/gh/cosmiconfig/cosmiconfig/branch/main/graph/badge.svg)](https://codecov.io/gh/cosmiconfig/cosmiconfig) + +Cosmiconfig searches for and loads configuration for your program. + +It features smart defaults based on conventional expectations in the JavaScript ecosystem. +But it's also flexible enough to search wherever you'd like to search, and load whatever you'd like to load. + +By default, Cosmiconfig will start where you tell it to start and search up the directory tree for the following: + +- a `package.json` property +- a JSON or YAML, extensionless "rc file" +- an "rc file" with the extensions `.json`, `.yaml`, `.yml`, `.js`, `.ts`, `.mjs`, or `.cjs` +- any of the above two inside a `.config` subdirectory +- a `.config.js`, `.config.ts`, `.config.mjs`, or `.config.cjs` file + +For example, if your module's name is "myapp", cosmiconfig will search up the directory tree for configuration in the following places: + +- a `myapp` property in `package.json` +- a `.myapprc` file in JSON or YAML format +- a `.myapprc.json`, `.myapprc.yaml`, `.myapprc.yml`, `.myapprc.js`, `.myapprc.ts`, `.myapprc.mjs`, or `.myapprc.cjs` file +- a `myapprc`, `myapprc.json`, `myapprc.yaml`, `myapprc.yml`, `myapprc.js`, `myapprc.ts` or `myapprc.cjs` file inside a `.config` subdirectory +- a `myapp.config.js`, `myapp.config.ts`, `myapp.config.mjs`, or `myapp.config.cjs` file + +Cosmiconfig continues to search up the directory tree, checking each of these places in each directory, until it finds some acceptable configuration (or hits the home directory). + +## Table of contents + +- [Installation](#installation) +- [Usage for tooling developers](#usage-for-tooling-developers) +- [Result](#result) +- [Asynchronous API](#asynchronous-api) + - [cosmiconfig()](#cosmiconfig-1) + - [explorer.search()](#explorersearch) + - [explorer.load()](#explorerload) + - [explorer.clearLoadCache()](#explorerclearloadcache) + - [explorer.clearSearchCache()](#explorerclearsearchcache) + - [explorer.clearCaches()](#explorerclearcaches) +- [Synchronous API](#synchronous-api) + - [cosmiconfigSync()](#cosmiconfigsync) + - [explorerSync.search()](#explorersyncsearch) + - [explorerSync.load()](#explorersyncload) + - [explorerSync.clearLoadCache()](#explorersyncclearloadcache) + - [explorerSync.clearSearchCache()](#explorersyncclearsearchcache) + - [explorerSync.clearCaches()](#explorersyncclearcaches) +- [cosmiconfigOptions](#cosmiconfigoptions) + - [searchPlaces](#searchplaces) + - [loaders](#loaders) + - [packageProp](#packageprop) + - [stopDir](#stopdir) + - [cache](#cache) + - [transform](#transform) + - [ignoreEmptySearchPlaces](#ignoreemptysearchplaces) +- [Loading JS modules](#loading-js-modules) +- [Caching](#caching) +- [Differences from rc](#differences-from-rc) +- [Usage for end users](#usage-for-end-users) +- [Contributing & Development](#contributing--development) + +## Installation + +``` +npm install cosmiconfig +``` + +Tested in Node 14+. + +## Usage for tooling developers + +*If you are an end user (i.e. a user of a tool that uses cosmiconfig, like `prettier` or `stylelint`), +you can skip down to [the end user section](#usage-for-end-users).* + +Create a Cosmiconfig explorer, then either `search` for or directly `load` a configuration file. + +```js +const { cosmiconfig, cosmiconfigSync } = require('cosmiconfig'); +// ... +const explorer = cosmiconfig(moduleName); + +// Search for a configuration by walking up directories. +// See documentation for search, below. +explorer.search() + .then((result) => { + // result.config is the parsed configuration object. + // result.filepath is the path to the config file that was found. + // result.isEmpty is true if there was nothing to parse in the config file. + }) + .catch((error) => { + // Do something constructive. + }); + +// Load a configuration directly when you know where it should be. +// The result object is the same as for search. +// See documentation for load, below. +explorer.load(pathToConfig).then(..); + +// You can also search and load synchronously. +const explorerSync = cosmiconfigSync(moduleName); + +const searchedFor = explorerSync.search(); +const loaded = explorerSync.load(pathToConfig); +``` + +## Result + +The result object you get from `search` or `load` has the following properties: + +- **config:** The parsed configuration object. `undefined` if the file is empty. +- **filepath:** The path to the configuration file that was found. +- **isEmpty:** `true` if the configuration file is empty. This property will not be present if the configuration file is not empty. + +## Asynchronous API + +### cosmiconfig() + +```js +const { cosmiconfig } = require('cosmiconfig'); +const explorer = cosmiconfig(moduleName[, cosmiconfigOptions]) +``` + +Creates a cosmiconfig instance ("explorer") configured according to the arguments, and initializes its caches. + +#### moduleName + +Type: `string`. **Required.** + +Your module name. This is used to create the default [`searchPlaces`] and [`packageProp`]. + +If your [`searchPlaces`] value will include files, as it does by default (e.g. `${moduleName}rc`), your `moduleName` must consist of characters allowed in filenames. That means you should not copy scoped package names, such as `@my-org/my-package`, directly into `moduleName`. + +**[`cosmiconfigOptions`] are documented below.** +You may not need them, and should first read about the functions you'll use. + +### explorer.search() + +```js +explorer.search([searchFrom]).then(result => {..}) +``` + +Searches for a configuration file. Returns a Promise that resolves with a [result] or with `null`, if no configuration file is found. + +You can do the same thing synchronously with [`explorerSync.search()`]. + +Let's say your module name is `goldengrahams` so you initialized with `const explorer = cosmiconfig('goldengrahams');`. +Here's how your default [`search()`] will work: + +- Starting from `process.cwd()` (or some other directory defined by the `searchFrom` argument to [`search()`]), look for configuration objects in the following places: + 1. A `goldengrahams` property in a `package.json` file. + 2. A `.goldengrahamsrc` file with JSON or YAML syntax. + 3. A `.goldengrahamsrc.json`, `.goldengrahamsrc.yaml`, `.goldengrahamsrc.yml`, `.goldengrahamsrc.js`, `.goldengrahamsrc.ts`, or `.goldengrahamsrc.cjs` file. (To learn more about how JS files are loaded, see ["Loading JS modules"].) + 4. A `goldengrahamsrc`, `goldengrahamsrc.json`, `goldengrahamsrc.yaml`, `goldengrahamsrc.yml`, `goldengrahamsrc.js`, `goldengrahamsrc.ts`, or `goldengrahamsrc.cjs` file in the `.config` subdirectory. + 5. A `goldengrahams.config.js`, `goldengrahams.config.ts`, `goldengrahams.config.mjs`, or `goldengrahams.config.cjs` file. (To learn more about how JS files are loaded, see ["Loading JS modules"].) +- If none of those searches reveal a configuration object, move up one directory level and try again. + So the search continues in `./`, `../`, `../../`, `../../../`, etc., checking the same places in each directory. +- Continue searching until arriving at your home directory (or some other directory defined by the cosmiconfig option [`stopDir`]). +- For JS files, +- If at any point a parsable configuration is found, the [`search()`] Promise resolves with its [result] \(or, with [`explorerSync.search()`], the [result] is returned). +- If no configuration object is found, the [`search()`] Promise resolves with `null` (or, with [`explorerSync.search()`], `null` is returned). +- If a configuration object is found *but is malformed* (causing a parsing error), the [`search()`] Promise rejects with that error (so you should `.catch()` it). (Or, with [`explorerSync.search()`], the error is thrown.) + +**If you know exactly where your configuration file should be, you can use [`load()`], instead.** + +**The search process is highly customizable.** +Use the cosmiconfig options [`searchPlaces`] and [`loaders`] to precisely define where you want to look for configurations and how you want to load them. + +#### searchFrom + +Type: `string`. +Default: `process.cwd()`. + +A filename. +[`search()`] will start its search here. + +If the value is a directory, that's where the search starts. +If it's a file, the search starts in that file's directory. + +### explorer.load() + +```js +explorer.load(loadPath).then(result => {..}) +``` + +Loads a configuration file. Returns a Promise that resolves with a [result] or rejects with an error (if the file does not exist or cannot be loaded). + +Use `load` if you already know where the configuration file is and you just need to load it. + +```js +explorer.load('load/this/file.json'); // Tries to load load/this/file.json. +``` + +If you load a `package.json` file, the result will be derived from whatever property is specified as your [`packageProp`]. + +You can do the same thing synchronously with [`explorerSync.load()`]. + +### explorer.clearLoadCache() + +Clears the cache used in [`load()`]. + +### explorer.clearSearchCache() + +Clears the cache used in [`search()`]. + +### explorer.clearCaches() + +Performs both [`clearLoadCache()`] and [`clearSearchCache()`]. + +## Synchronous API + +### cosmiconfigSync() + +```js +const { cosmiconfigSync } = require('cosmiconfig'); +const explorerSync = cosmiconfigSync(moduleName[, cosmiconfigOptions]) +``` + +Creates a *synchronous* cosmiconfig instance ("explorerSync") configured according to the arguments, and initializes its caches. + +See [`cosmiconfig()`](#cosmiconfig-1). + +### explorerSync.search() + +```js +const result = explorerSync.search([searchFrom]); +``` + +Synchronous version of [`explorer.search()`]. + +Returns a [result] or `null`. + +### explorerSync.load() + +```js +const result = explorerSync.load(loadPath); +``` + +Synchronous version of [`explorer.load()`]. + +Returns a [result]. + +### explorerSync.clearLoadCache() + +Clears the cache used in [`load()`]. + +### explorerSync.clearSearchCache() + +Clears the cache used in [`search()`]. + +### explorerSync.clearCaches() + +Performs both [`clearLoadCache()`] and [`clearSearchCache()`]. + +## cosmiconfigOptions + +Type: `Object`. + +Possible options are documented below. + +### searchPlaces + +Type: `Array`. +Default: See below. + +An array of places that [`search()`] will check in each directory as it moves up the directory tree. +Each place is relative to the directory being searched, and the places are checked in the specified order. + +**Default `searchPlaces`:** + +For the [asynchronous API](#asynchronous-api), these are the default `searchPlaces`: + +```js +[ + 'package.json', + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.js`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.mjs`, + `.${moduleName}rc.cjs`, + `.config/${moduleName}rc`, + `.config/${moduleName}rc.json`, + `.config/${moduleName}rc.yaml`, + `.config/${moduleName}rc.yml`, + `.config/${moduleName}rc.js`, + `.config/${moduleName}rc.ts`, + `.config/${moduleName}rc.cjs`, + `${moduleName}.config.js`, + `${moduleName}.config.ts`, + `${moduleName}.config.mjs`, + `${moduleName}.config.cjs`, +]; +``` + +For the [synchronous API](#synchronous-api), the only difference is that `.mjs` files are not included. See ["Loading JS modules"] for more information. + +Create your own array to search more, fewer, or altogether different places. + +Every item in `searchPlaces` needs to have a loader in [`loaders`] that corresponds to its extension. +(Common extensions are covered by default loaders.) +Read more about [`loaders`] below. + +`package.json` is a special value: When it is included in `searchPlaces`, Cosmiconfig will always parse it as JSON and load a property within it, not the whole file. +That property is defined with the [`packageProp`] option, and defaults to your module name. + +Examples, with a module named `porgy`: + +```js +// Disallow extensions on rc files: +['package.json', '.porgyrc', 'porgy.config.js'][ + // Limit the options dramatically: + ('package.json', '.porgyrc') +][ + // Maybe you want to look for a wide variety of JS flavors: + ('porgy.config.js', + 'porgy.config.mjs', + 'porgy.config.ts', + 'porgy.config.coffee') +][ + // ^^ You will need to designate custom loaders to tell + // Cosmiconfig how to handle `.ts` and `.coffee` files. + + // Look within a .config/ subdirectory of every searched directory: + ('package.json', + '.porgyrc', + '.config/.porgyrc', + '.porgyrc.json', + '.config/.porgyrc.json') +]; +``` + +### loaders + +Type: `Object`. +Default: See below. + +An object that maps extensions to the loader functions responsible for loading and parsing files with those extensions. + +Cosmiconfig exposes its default loaders on the named export `defaultLoaders` and `defaultLoadersSync`. + +**Default `loaders`:** + +```js +const { defaultLoaders, defaultLoadersSync } = require('cosmiconfig'); + +console.log(Object.entries(defaultLoaders)); +// [ +// [ '.mjs', [Function: loadJs] ], +// [ '.cjs', [Function: loadJs] ], +// [ '.js', [Function: loadJs] ], +// [ '.ts', [Function: loadTs] ], +// [ '.json', [Function: loadJson] ], +// [ '.yaml', [Function: loadYaml] ], +// [ '.yml', [Function: loadYaml] ], +// [ 'noExt', [Function: loadYaml] ] +// ] + +console.log(Object.entries(defaultLoadersSync)); +// [ +// [ '.cjs', [Function: loadJsSync] ], +// [ '.js', [Function: loadJsSync] ], +// [ '.ts', [Function: loadTsSync] ], +// [ '.json', [Function: loadJson] ], +// [ '.yaml', [Function: loadYaml] ], +// [ '.yml', [Function: loadYaml] ], +// [ 'noExt', [Function: loadYaml] ] +// ] +``` + +(YAML is a superset of JSON; which means YAML parsers can parse JSON; which is how extensionless files can be either YAML *or* JSON with only one parser.) + +**If you provide a `loaders` object, your object will be *merged* with the defaults.** +So you can override one or two without having to override them all. + +**Keys in `loaders`** are extensions (starting with a period), or `noExt` to specify the loader for files *without* extensions, like `.myapprc`. + +**Values in `loaders`** are a loader function (described below) whose values are loader functions. + +**The most common use case for custom loaders value is to load extensionless `rc` files as strict JSON**, instead of JSON *or* YAML (the default). +To accomplish that, provide the following `loaders` value: + +```js +{ + noExt: defaultLoaders['.json']; +} +``` + +If you want to load files that are not handled by the loader functions Cosmiconfig exposes, you can write a custom loader function or use one from NPM if it exists. + +**Third-party loaders:** + +- [cosmiconfig-typescript-loader](https://github.com/codex-/cosmiconfig-typescript-loader) + +**Use cases for custom loader function:** + +- Allow configuration syntaxes that aren't handled by Cosmiconfig's defaults, like JSON5, INI, or XML. +- Allow ES2015 modules from `.mjs` configuration files. +- Parse JS files with Babel before deriving the configuration. + +**Custom loader functions** have the following signature: + +```js +// Sync +(filepath: string, content: string) => Object | null + +// Async +(filepath: string, content: string) => Object | null | Promise +``` + +Cosmiconfig reads the file when it checks whether the file exists, so it will provide you with both the file's path and its content. +Do whatever you need to, and return either a configuration object or `null` (or, for async-only loaders, a Promise that resolves with one of those). +`null` indicates that no real configuration was found and the search should continue. + +A few things to note: + +- If you use a custom loader, be aware of whether it's sync or async: you cannot use async customer loaders with the sync API ([`cosmiconfigSync()`]). +- **Special JS syntax can also be handled by using a `require` hook**, because `defaultLoaders['.js']` just uses `require`. + Whether you use custom loaders or a `require` hook is up to you. + +Examples: + +```js +// Allow JSON5 syntax: +{ + '.json': json5Loader +} + +// Allow a special configuration syntax of your own creation: +{ + '.special': specialLoader +} + +// Allow many flavors of JS, using custom loaders: +{ + '.coffee': coffeeScriptLoader +} + +// Allow many flavors of JS but rely on require hooks: +{ + '.coffee': defaultLoaders['.js'] +} +``` + +### packageProp + +Type: `string | Array`. +Default: `` `${moduleName}` ``. + +Name of the property in `package.json` to look for. + +Use a period-delimited string or an array of strings to describe a path to nested properties. + +For example, the value `'configs.myPackage'` or `['configs', 'myPackage']` will get you the `"myPackage"` value in a `package.json` like this: + +```json +{ + "configs": { + "myPackage": {..} + } +} +``` + +If nested property names within the path include periods, you need to use an array of strings. For example, the value `['configs', 'foo.bar', 'baz']` will get you the `"baz"` value in a `package.json` like this: + +```json +{ + "configs": { + "foo.bar": { + "baz": {..} + } + } +} +``` + +If a string includes period but corresponds to a top-level property name, it will not be interpreted as a period-delimited path. For example, the value `'one.two'` will get you the `"three"` value in a `package.json` like this: + +```json +{ + "one.two": "three", + "one": { + "two": "four" + } +} +``` + +### stopDir + +Type: `string`. +Default: Absolute path to your home directory. + +Directory where the search will stop. + +### cache + +Type: `boolean`. +Default: `true`. + +If `false`, no caches will be used. +Read more about ["Caching"](#caching) below. + +### transform + +Type: `(Result) => Promise | Result`. + +A function that transforms the parsed configuration. Receives the [result]. + +If using [`search()`] or [`load()`] \(which are async), the transform function can return the transformed result or return a Promise that resolves with the transformed result. +If using `cosmiconfigSync`, [`search()`] or [`load()`], the function must be synchronous and return the transformed result. + +The reason you might use this option — instead of simply applying your transform function some other way — is that *the transformed result will be cached*. If your transformation involves additional filesystem I/O or other potentially slow processing, you can use this option to avoid repeating those steps every time a given configuration is searched or loaded. + +### ignoreEmptySearchPlaces + +Type: `boolean`. +Default: `true`. + +By default, if [`search()`] encounters an empty file (containing nothing but whitespace) in one of the [`searchPlaces`], it will ignore the empty file and move on. +If you'd like to load empty configuration files, instead, set this option to `false`. + +Why might you want to load empty configuration files? +If you want to throw an error, or if an empty configuration file means something to your program. + +## Loading JS modules + +Your end users can provide JS configuration files as ECMAScript modules (ESM) under the following conditions: + +- You (the cosmiconfig user) use cosmiconfig's [asynchronous API](#asynchronous-api). +- Your end user runs a version of Node that supports ESM ([>=12.17.0](https://nodejs.org/en/blog/release/v12.17.0/), or earlier with the `--experimental-modules` flag). +- Your end user provides an `.mjs` configuration file, or a `.js` file whose nearest parent `package.json` file contains `"type": "module"`. (See [Node's method for determining a file's module system](https://nodejs.org/api/packages.html#packages_determining_module_system).) + +With cosmiconfig's [asynchronous API](#asynchronous-api), the default [`searchPlaces`] include `.js`, `.ts`, `.mjs`, and `.cjs` files. Cosmiconfig loads all these file types with the [dynamic `import` function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports). + +With the [synchronous API](#synchronous-api), JS configuration files are always treated as CommonJS, and `.mjs` files are ignored, because there is no synchronous API for the dynamic `import` function. + +## Caching + +As of v2, cosmiconfig uses caching to reduce the need for repetitious reading of the filesystem or expensive transforms. Every new cosmiconfig instance (created with `cosmiconfig()`) has its own caches. + +To avoid or work around caching, you can do the following: + +- Set the `cosmiconfig` option [`cache`] to `false`. +- Use the cache-clearing methods [`clearLoadCache()`], [`clearSearchCache()`], and [`clearCaches()`]. +- Create separate instances of cosmiconfig (separate "explorers"). + +## Differences from [rc](https://github.com/dominictarr/rc) + +[rc](https://github.com/dominictarr/rc) serves its focused purpose well. cosmiconfig differs in a few key ways — making it more useful for some projects, less useful for others: + +- Looks for configuration in some different places: in a `package.json` property, an rc file, a `.config.js` file, and rc files with extensions. +- Built-in support for JSON, YAML, and CommonJS formats. +- Stops at the first configuration found, instead of finding all that can be found up the directory tree and merging them automatically. +- Options. +- Asynchronous by default (though can be run synchronously). + +## Usage for end users + +When configuring a tool, you can use multiple file formats and put these in multiple places. + +Usually, a tool would mention this in its own README file, +but by default, these are the following places, where `{NAME}` represents the name of the tool: + +``` +package.json +.{NAME}rc +.{NAME}rc.json +.{NAME}rc.yaml +.{NAME}rc.yml +.{NAME}rc.js +.{NAME}rc.ts +.{NAME}rc.cjs +.config/{NAME}rc +.config/{NAME}rc.json +.config/{NAME}rc.yaml +.config/{NAME}rc.yml +.config/{NAME}rc.js +.config/{NAME}rc.ts +.config/{NAME}rc.cjs +{NAME}.config.js +{NAME}.config.ts +{NAME}.config.cjs +``` + +The contents of these files are defined by the tool. +For example, you can configure prettier to enforce semicolons at the end of the line +using a file named `.config/prettierrc.yml`: + +```yaml +semi: true +``` + +Additionally, you have the option to put a property named after the tool in your `package.json` file, +with the contents of that property being the same as the file contents. To use the same example as above: + +```json +{ + "name": "your-project", + "dependencies": {}, + "prettier": { + "semi": true + } +} +``` + +This has the advantage that you can put the configuration of all tools +(at least the ones that use cosmiconfig) in one file. + +You can also add a `cosmiconfig` key within your `package.json` file or create one of the following files +to configure `cosmiconfig` itself: + +``` +.config.json +.config.yaml +.config.yml +.config.js +.config.ts +.config.cjs +``` + +The following property is currently actively supported in these places: + +```yaml +cosmiconfig: + # overrides where configuration files are being searched to enforce a custom naming convention and format + searchPlaces: + - .config/{name}.yml +``` + +> **Note:** technically, you can overwrite all options described in [cosmiconfigOptions](#cosmiconfigoptions) here, +> but everything not listed above should be used at your own risk, as it has not been tested explicitly. + +You can also add more root properties outside the `cosmiconfig` property +to configure your tools, entirely eliminating the need to look for additional configuration files: + +```yaml +cosmiconfig: + searchPlaces: [] + +prettier: + semi: true +``` + +## Contributing & Development + +Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. + +And please do participate! + +[result]: #result + +[`load()`]: #explorerload + +[`search()`]: #explorersearch + +[`clearloadcache()`]: #explorerclearloadcache + +[`clearsearchcache()`]: #explorerclearsearchcache + +[`cosmiconfig()`]: #cosmiconfig + +[`cosmiconfigSync()`]: #cosmiconfigsync + +[`clearcaches()`]: #explorerclearcaches + +[`packageprop`]: #packageprop + +[`cache`]: #cache + +[`stopdir`]: #stopdir + +[`searchplaces`]: #searchplaces + +[`loaders`]: #loaders + +[`cosmiconfigoptions`]: #cosmiconfigoptions + +[`explorerSync.search()`]: #explorersyncsearch + +[`explorerSync.load()`]: #explorersyncload + +[`explorer.search()`]: #explorersearch + +[`explorer.load()`]: #explorerload + +["Loading JS modules"]: #loading-js-modules diff --git a/node_modules/cosmiconfig/dist/Explorer.d.ts b/node_modules/cosmiconfig/dist/Explorer.d.ts new file mode 100644 index 00000000..38da5667 --- /dev/null +++ b/node_modules/cosmiconfig/dist/Explorer.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Explorer.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/Explorer.d.ts.map b/node_modules/cosmiconfig/dist/Explorer.d.ts.map new file mode 100644 index 00000000..adaf16af --- /dev/null +++ b/node_modules/cosmiconfig/dist/Explorer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Explorer.d.ts","sourceRoot":"","sources":["../src/Explorer.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/Explorer.js b/node_modules/cosmiconfig/dist/Explorer.js new file mode 100644 index 00000000..4da643a3 --- /dev/null +++ b/node_modules/cosmiconfig/dist/Explorer.js @@ -0,0 +1,103 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Explorer = void 0; +const promises_1 = __importDefault(require("fs/promises")); +const path_1 = __importDefault(require("path")); +const path_type_1 = require("path-type"); +const ExplorerBase_js_1 = require("./ExplorerBase.js"); +const loaders_js_1 = require("./loaders.js"); +const util_js_1 = require("./util.js"); +/** + * @internal + */ +class Explorer extends ExplorerBase_js_1.ExplorerBase { + async load(filepath) { + filepath = path_1.default.resolve(filepath); + const load = async () => { + return await this.config.transform(await this.#readConfiguration(filepath)); + }; + if (this.loadCache) { + return await (0, util_js_1.emplace)(this.loadCache, filepath, load); + } + return await load(); + } + async search(from = '') { + if (this.config.metaConfigFilePath) { + this.loadingMetaConfig = true; + const config = await this.load(this.config.metaConfigFilePath); + this.loadingMetaConfig = false; + if (config && !config.isEmpty) { + return config; + } + } + const stopDir = path_1.default.resolve(this.config.stopDir); + from = path_1.default.resolve(from); + const search = async () => { + /* istanbul ignore if -- @preserve */ + if (await (0, path_type_1.isDirectory)(from)) { + for (const place of this.config.searchPlaces) { + const filepath = path_1.default.join(from, place); + try { + const result = await this.#readConfiguration(filepath); + if (result !== null && + !(result.isEmpty && this.config.ignoreEmptySearchPlaces)) { + return await this.config.transform(result); + } + } + catch (error) { + if (error.code === 'ENOENT' || + error.code === 'EISDIR' || + error.code === 'ENOTDIR') { + continue; + } + throw error; + } + } + } + const dir = path_1.default.dirname(from); + if (from !== stopDir && from !== dir) { + from = dir; + if (this.searchCache) { + return await (0, util_js_1.emplace)(this.searchCache, from, search); + } + return await search(); + } + return await this.config.transform(null); + }; + if (this.searchCache) { + return await (0, util_js_1.emplace)(this.searchCache, from, search); + } + return await search(); + } + async #readConfiguration(filepath) { + const contents = await promises_1.default.readFile(filepath, { encoding: 'utf-8' }); + return this.toCosmiconfigResult(filepath, await this.#loadConfiguration(filepath, contents)); + } + async #loadConfiguration(filepath, contents) { + if (contents.trim() === '') { + return; + } + if (path_1.default.basename(filepath) === 'package.json') { + return ((0, util_js_1.getPropertyByPath)((0, loaders_js_1.loadJson)(filepath, contents), this.config.packageProp) ?? null); + } + const extension = path_1.default.extname(filepath); + try { + const loader = this.config.loaders[extension || 'noExt'] ?? + this.config.loaders['default']; + if (loader !== undefined) { + // eslint-disable-next-line @typescript-eslint/return-await + return await loader(filepath, contents); + } + } + catch (error) { + error.filepath = filepath; + throw error; + } + throw new Error(`No loader specified for ${(0, ExplorerBase_js_1.getExtensionDescription)(extension)}`); + } +} +exports.Explorer = Explorer; +//# sourceMappingURL=Explorer.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/Explorer.js.map b/node_modules/cosmiconfig/dist/Explorer.js.map new file mode 100644 index 00000000..24b278ae --- /dev/null +++ b/node_modules/cosmiconfig/dist/Explorer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Explorer.js","sourceRoot":"","sources":["../src/Explorer.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA6B;AAC7B,gDAAwB;AACxB,yCAAwC;AACxC,uDAA0E;AAC1E,6CAAwC;AAExC,uCAAuD;AAEvD;;GAEG;AACH,MAAa,QAAS,SAAQ,8BAA6B;IAClD,KAAK,CAAC,IAAI,CAAC,QAAgB;QAChC,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAElC,MAAM,IAAI,GAAG,KAAK,IAAgC,EAAE;YAClD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAChC,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CACxC,CAAC;QACJ,CAAC,CAAC;QACF,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,OAAO,MAAM,IAAA,iBAAO,EAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;SACtD;QACD,OAAO,MAAM,IAAI,EAAE,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,EAAE;QAC3B,IAAI,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE;YAClC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;YAC/D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;YAC/B,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;gBAC7B,OAAO,MAAM,CAAC;aACf;SACF;QAED,MAAM,OAAO,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,MAAM,MAAM,GAAG,KAAK,IAAgC,EAAE;YACpD,qCAAqC;YACrC,IAAI,MAAM,IAAA,uBAAW,EAAC,IAAI,CAAC,EAAE;gBAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;oBAC5C,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;oBACxC,IAAI;wBACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;wBACvD,IACE,MAAM,KAAK,IAAI;4BACf,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,EACxD;4BACA,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;yBAC5C;qBACF;oBAAC,OAAO,KAAK,EAAE;wBACd,IACE,KAAK,CAAC,IAAI,KAAK,QAAQ;4BACvB,KAAK,CAAC,IAAI,KAAK,QAAQ;4BACvB,KAAK,CAAC,IAAI,KAAK,SAAS,EACxB;4BACA,SAAS;yBACV;wBACD,MAAM,KAAK,CAAC;qBACb;iBACF;aACF;YACD,MAAM,GAAG,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,GAAG,EAAE;gBACpC,IAAI,GAAG,GAAG,CAAC;gBACX,IAAI,IAAI,CAAC,WAAW,EAAE;oBACpB,OAAO,MAAM,IAAA,iBAAO,EAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;iBACtD;gBACD,OAAO,MAAM,MAAM,EAAE,CAAC;aACvB;YACD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,OAAO,MAAM,IAAA,iBAAO,EAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SACtD;QACD,OAAO,MAAM,MAAM,EAAE,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,QAAgB;QACvC,MAAM,QAAQ,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC,mBAAmB,CAC7B,QAAQ,EACR,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAClD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,QAAgB,EAChB,QAAgB;QAEhB,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC1B,OAAO;SACR;QAED,IAAI,cAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,cAAc,EAAE;YAC9C,OAAO,CACL,IAAA,2BAAiB,EACf,IAAA,qBAAQ,EAAC,QAAQ,EAAE,QAAQ,CAAC,EAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,CACxB,IAAI,IAAI,CACV,CAAC;SACH;QAED,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI;YACF,MAAM,MAAM,GACV,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC;gBACzC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACjC,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,2DAA2D;gBAC3D,OAAO,MAAM,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;aACzC;SACF;QAAC,OAAO,KAAK,EAAE;YACd,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC1B,MAAM,KAAK,CAAC;SACb;QACD,MAAM,IAAI,KAAK,CACb,2BAA2B,IAAA,yCAAuB,EAAC,SAAS,CAAC,EAAE,CAChE,CAAC;IACJ,CAAC;CACF;AA/GD,4BA+GC"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerBase.d.ts b/node_modules/cosmiconfig/dist/ExplorerBase.d.ts new file mode 100644 index 00000000..6a73371f --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerBase.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ExplorerBase.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerBase.d.ts.map b/node_modules/cosmiconfig/dist/ExplorerBase.d.ts.map new file mode 100644 index 00000000..e699c147 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExplorerBase.d.ts","sourceRoot":"","sources":["../src/ExplorerBase.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerBase.js b/node_modules/cosmiconfig/dist/ExplorerBase.js new file mode 100644 index 00000000..e3f66f22 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerBase.js @@ -0,0 +1,82 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getExtensionDescription = exports.ExplorerBase = void 0; +const path_1 = __importDefault(require("path")); +const util_js_1 = require("./util.js"); +/** + * @internal + */ +class ExplorerBase { + #loadingMetaConfig = false; + config; + loadCache; + searchCache; + constructor(options) { + this.config = options; + if (options.cache) { + this.loadCache = new Map(); + this.searchCache = new Map(); + } + this.#validateConfig(); + } + set loadingMetaConfig(value) { + this.#loadingMetaConfig = value; + } + #validateConfig() { + const config = this.config; + for (const place of config.searchPlaces) { + const extension = path_1.default.extname(place); + const loader = this.config.loaders[extension || 'noExt'] ?? + this.config.loaders['default']; + if (loader === undefined) { + throw new Error(`Missing loader for ${getExtensionDescription(place)}.`); + } + if (typeof loader !== 'function') { + throw new Error(`Loader for ${getExtensionDescription(place)} is not a function: Received ${typeof loader}.`); + } + } + } + clearLoadCache() { + if (this.loadCache) { + this.loadCache.clear(); + } + } + clearSearchCache() { + if (this.searchCache) { + this.searchCache.clear(); + } + } + clearCaches() { + this.clearLoadCache(); + this.clearSearchCache(); + } + toCosmiconfigResult(filepath, config) { + if (config === null) { + return null; + } + if (config === undefined) { + return { filepath, config: undefined, isEmpty: true }; + } + if (this.config.applyPackagePropertyPathToConfiguration || + this.#loadingMetaConfig) { + config = (0, util_js_1.getPropertyByPath)(config, this.config.packageProp); + } + if (config === undefined) { + return { filepath, config: undefined, isEmpty: true }; + } + return { config, filepath }; + } +} +exports.ExplorerBase = ExplorerBase; +/** + * @internal + */ +function getExtensionDescription(extension) { + /* istanbul ignore next -- @preserve */ + return extension ? `extension "${extension}"` : 'files without extensions'; +} +exports.getExtensionDescription = getExtensionDescription; +//# sourceMappingURL=ExplorerBase.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerBase.js.map b/node_modules/cosmiconfig/dist/ExplorerBase.js.map new file mode 100644 index 00000000..2b6f0d84 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerBase.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExplorerBase.js","sourceRoot":"","sources":["../src/ExplorerBase.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AASxB,uCAA8C;AAE9C;;GAEG;AACH,MAAsB,YAAY;IAGhC,kBAAkB,GAAG,KAAK,CAAC;IAER,MAAM,CAAI;IACV,SAAS,CAEb;IACI,WAAW,CAEf;IAEf,YAAmB,OAAoB;QACrC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;SAC9B;QACD,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED,IAAc,iBAAiB,CAAC,KAAc;QAC5C,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED,eAAe;QACb,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAE3B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,YAAY,EAAE;YACvC,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACtC,MAAM,MAAM,GACV,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC;gBACzC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACjC,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,MAAM,IAAI,KAAK,CACb,sBAAsB,uBAAuB,CAAC,KAAK,CAAC,GAAG,CACxD,CAAC;aACH;YACD,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;gBAChC,MAAM,IAAI,KAAK,CACb,cAAc,uBAAuB,CACnC,KAAK,CACN,gCAAgC,OAAO,MAAM,GAAG,CAClD,CAAC;aACH;SACF;IACH,CAAC;IAEM,cAAc;QACnB,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;SACxB;IACH,CAAC;IAEM,gBAAgB;QACrB,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;SAC1B;IACH,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAES,mBAAmB,CAC3B,QAAgB,EAChB,MAAc;QAEd,IAAI,MAAM,KAAK,IAAI,EAAE;YACnB,OAAO,IAAI,CAAC;SACb;QACD,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;SACvD;QACD,IACE,IAAI,CAAC,MAAM,CAAC,uCAAuC;YACnD,IAAI,CAAC,kBAAkB,EACvB;YACA,MAAM,GAAG,IAAA,2BAAiB,EAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;SAC7D;QACD,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;SACvD;QACD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC9B,CAAC;CACF;AAvFD,oCAuFC;AAED;;GAEG;AACH,SAAgB,uBAAuB,CAAC,SAAkB;IACxD,uCAAuC;IACvC,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,SAAS,GAAG,CAAC,CAAC,CAAC,0BAA0B,CAAC;AAC7E,CAAC;AAHD,0DAGC"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerSync.d.ts b/node_modules/cosmiconfig/dist/ExplorerSync.d.ts new file mode 100644 index 00000000..3194cb15 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerSync.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ExplorerSync.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerSync.d.ts.map b/node_modules/cosmiconfig/dist/ExplorerSync.d.ts.map new file mode 100644 index 00000000..8cf6a9c4 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerSync.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ExplorerSync.d.ts","sourceRoot":"","sources":["../src/ExplorerSync.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerSync.js b/node_modules/cosmiconfig/dist/ExplorerSync.js new file mode 100644 index 00000000..eea655dc --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerSync.js @@ -0,0 +1,116 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExplorerSync = void 0; +const fs_1 = __importDefault(require("fs")); +const path_1 = __importDefault(require("path")); +const path_type_1 = require("path-type"); +const ExplorerBase_js_1 = require("./ExplorerBase.js"); +const loaders_js_1 = require("./loaders.js"); +const util_js_1 = require("./util.js"); +/** + * @internal + */ +class ExplorerSync extends ExplorerBase_js_1.ExplorerBase { + load(filepath) { + filepath = path_1.default.resolve(filepath); + const load = () => { + return this.config.transform(this.#readConfiguration(filepath)); + }; + if (this.loadCache) { + return (0, util_js_1.emplace)(this.loadCache, filepath, load); + } + return load(); + } + search(from = '') { + if (this.config.metaConfigFilePath) { + this.loadingMetaConfig = true; + const config = this.load(this.config.metaConfigFilePath); + this.loadingMetaConfig = false; + if (config && !config.isEmpty) { + return config; + } + } + const stopDir = path_1.default.resolve(this.config.stopDir); + from = path_1.default.resolve(from); + const search = () => { + /* istanbul ignore if -- @preserve */ + if ((0, path_type_1.isDirectorySync)(from)) { + for (const place of this.config.searchPlaces) { + const filepath = path_1.default.join(from, place); + try { + const result = this.#readConfiguration(filepath); + if (result !== null && + !(result.isEmpty && this.config.ignoreEmptySearchPlaces)) { + return this.config.transform(result); + } + } + catch (error) { + if (error.code === 'ENOENT' || + error.code === 'EISDIR' || + error.code === 'ENOTDIR') { + continue; + } + throw error; + } + } + } + const dir = path_1.default.dirname(from); + if (from !== stopDir && from !== dir) { + from = dir; + if (this.searchCache) { + return (0, util_js_1.emplace)(this.searchCache, from, search); + } + return search(); + } + return this.config.transform(null); + }; + if (this.searchCache) { + return (0, util_js_1.emplace)(this.searchCache, from, search); + } + return search(); + } + #readConfiguration(filepath) { + const contents = fs_1.default.readFileSync(filepath, 'utf8'); + return this.toCosmiconfigResult(filepath, this.#loadConfiguration(filepath, contents)); + } + #loadConfiguration(filepath, contents) { + if (contents.trim() === '') { + return; + } + if (path_1.default.basename(filepath) === 'package.json') { + return ((0, util_js_1.getPropertyByPath)((0, loaders_js_1.loadJson)(filepath, contents), this.config.packageProp) ?? null); + } + const extension = path_1.default.extname(filepath); + try { + const loader = this.config.loaders[extension || 'noExt'] ?? + this.config.loaders['default']; + if (loader !== undefined) { + return loader(filepath, contents); + } + } + catch (error) { + error.filepath = filepath; + throw error; + } + throw new Error(`No loader specified for ${(0, ExplorerBase_js_1.getExtensionDescription)(extension)}`); + } + /** + * @deprecated Use {@link ExplorerSync.prototype.load}. + */ + /* istanbul ignore next */ + loadSync(filepath) { + return this.load(filepath); + } + /** + * @deprecated Use {@link ExplorerSync.prototype.search}. + */ + /* istanbul ignore next */ + searchSync(from = '') { + return this.search(from); + } +} +exports.ExplorerSync = ExplorerSync; +//# sourceMappingURL=ExplorerSync.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/ExplorerSync.js.map b/node_modules/cosmiconfig/dist/ExplorerSync.js.map new file mode 100644 index 00000000..588f00a4 --- /dev/null +++ b/node_modules/cosmiconfig/dist/ExplorerSync.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ExplorerSync.js","sourceRoot":"","sources":["../src/ExplorerSync.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,yCAA4C;AAC5C,uDAA0E;AAC1E,6CAAwC;AAExC,uCAAuD;AAEvD;;GAEG;AACH,MAAa,YAAa,SAAQ,8BAAiC;IAC1D,IAAI,CAAC,QAAgB;QAC1B,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAElC,MAAM,IAAI,GAAG,GAAsB,EAAE;YACnC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC;QACF,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,OAAO,IAAA,iBAAO,EAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;SAChD;QACD,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAEM,MAAM,CAAC,IAAI,GAAG,EAAE;QACrB,IAAI,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE;YAClC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;YAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;YACzD,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;YAC/B,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;gBAC7B,OAAO,MAAM,CAAC;aACf;SACF;QAED,MAAM,OAAO,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,MAAM,MAAM,GAAG,GAAsB,EAAE;YACrC,qCAAqC;YACrC,IAAI,IAAA,2BAAe,EAAC,IAAI,CAAC,EAAE;gBACzB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;oBAC5C,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;oBACxC,IAAI;wBACF,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;wBACjD,IACE,MAAM,KAAK,IAAI;4BACf,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,EACxD;4BACA,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;yBACtC;qBACF;oBAAC,OAAO,KAAK,EAAE;wBACd,IACE,KAAK,CAAC,IAAI,KAAK,QAAQ;4BACvB,KAAK,CAAC,IAAI,KAAK,QAAQ;4BACvB,KAAK,CAAC,IAAI,KAAK,SAAS,EACxB;4BACA,SAAS;yBACV;wBACD,MAAM,KAAK,CAAC;qBACb;iBACF;aACF;YACD,MAAM,GAAG,GAAG,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,GAAG,EAAE;gBACpC,IAAI,GAAG,GAAG,CAAC;gBACX,IAAI,IAAI,CAAC,WAAW,EAAE;oBACpB,OAAO,IAAA,iBAAO,EAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;iBAChD;gBACD,OAAO,MAAM,EAAE,CAAC;aACjB;YACD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,OAAO,IAAA,iBAAO,EAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;SAChD;QACD,OAAO,MAAM,EAAE,CAAC;IAClB,CAAC;IAED,kBAAkB,CAAC,QAAgB;QACjC,MAAM,QAAQ,GAAG,YAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC,mBAAmB,CAC7B,QAAQ,EACR,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAC5C,CAAC;IACJ,CAAC;IAED,kBAAkB,CAAC,QAAgB,EAAE,QAAgB;QACnD,IAAI,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC1B,OAAO;SACR;QAED,IAAI,cAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,cAAc,EAAE;YAC9C,OAAO,CACL,IAAA,2BAAiB,EACf,IAAA,qBAAQ,EAAC,QAAQ,EAAE,QAAQ,CAAC,EAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,CACxB,IAAI,IAAI,CACV,CAAC;SACH;QAED,MAAM,SAAS,GAAG,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI;YACF,MAAM,MAAM,GACV,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC;gBACzC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACjC,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,OAAO,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;aACnC;SACF;QAAC,OAAO,KAAK,EAAE;YACd,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC1B,MAAM,KAAK,CAAC;SACb;QACD,MAAM,IAAI,KAAK,CACb,2BAA2B,IAAA,yCAAuB,EAAC,SAAS,CAAC,EAAE,CAChE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,0BAA0B;IACnB,QAAQ,CAAC,QAAgB;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,0BAA0B;IACnB,UAAU,CAAC,IAAI,GAAG,EAAE;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACF;AAzHD,oCAyHC"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/index.d.ts b/node_modules/cosmiconfig/dist/index.d.ts new file mode 100644 index 00000000..7cc6c3b3 --- /dev/null +++ b/node_modules/cosmiconfig/dist/index.d.ts @@ -0,0 +1,25 @@ +export * from './types.js'; +import { Options, OptionsSync, PublicExplorer, PublicExplorerSync } from './types.js'; +export declare const metaSearchPlaces: string[]; +export declare const defaultLoaders: Readonly<{ + readonly '.mjs': import("./types.js").Loader; + readonly '.cjs': import("./types.js").Loader; + readonly '.js': import("./types.js").Loader; + readonly '.ts': import("./types.js").Loader; + readonly '.json': import("./types.js").LoaderSync; + readonly '.yaml': import("./types.js").LoaderSync; + readonly '.yml': import("./types.js").LoaderSync; + readonly noExt: import("./types.js").LoaderSync; +}>; +export declare const defaultLoadersSync: Readonly<{ + readonly '.cjs': import("./types.js").LoaderSync; + readonly '.js': import("./types.js").LoaderSync; + readonly '.ts': import("./types.js").LoaderSync; + readonly '.json': import("./types.js").LoaderSync; + readonly '.yaml': import("./types.js").LoaderSync; + readonly '.yml': import("./types.js").LoaderSync; + readonly noExt: import("./types.js").LoaderSync; +}>; +export declare function cosmiconfig(moduleName: string, options?: Readonly): PublicExplorer; +export declare function cosmiconfigSync(moduleName: string, options?: Readonly): PublicExplorerSync; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/index.d.ts.map b/node_modules/cosmiconfig/dist/index.d.ts.map new file mode 100644 index 00000000..9065f412 --- /dev/null +++ b/node_modules/cosmiconfig/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAC;AAa3B,OAAO,EAGL,OAAO,EACP,WAAW,EACX,cAAc,EACd,kBAAkB,EAEnB,MAAM,YAAY,CAAC;AAIpB,eAAO,MAAM,gBAAgB,UAS5B,CAAC;AAGF,eAAO,MAAM,cAAc;;;;;;;;;EAShB,CAAC;AACZ,eAAO,MAAM,kBAAkB;;;;;;;;EAQpB,CAAC;AAuIZ,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,QAAQ,CAAC,OAAO,CAAM,GAC9B,cAAc,CAWhB;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,QAAQ,CAAC,WAAW,CAAM,GAClC,kBAAkB,CAWpB"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/index.js b/node_modules/cosmiconfig/dist/index.js new file mode 100644 index 00000000..6fdb0fca --- /dev/null +++ b/node_modules/cosmiconfig/dist/index.js @@ -0,0 +1,195 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (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); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cosmiconfigSync = exports.cosmiconfig = exports.defaultLoadersSync = exports.defaultLoaders = exports.metaSearchPlaces = void 0; +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +__exportStar(require("./types.js"), exports); +const os_1 = __importDefault(require("os")); +const Explorer_js_1 = require("./Explorer.js"); +const ExplorerSync_js_1 = require("./ExplorerSync.js"); +const loaders_js_1 = require("./loaders.js"); +const util_1 = require("./util"); +// this needs to be hardcoded, as this is intended for end users, who can't supply options at this point +exports.metaSearchPlaces = [ + 'package.json', + '.config.json', + '.config.yaml', + '.config.yml', + '.config.js', + '.config.ts', + '.config.cjs', + '.config.mjs', +]; +// do not allow mutation of default loaders. Make sure it is set inside options +exports.defaultLoaders = Object.freeze({ + '.mjs': loaders_js_1.loadJs, + '.cjs': loaders_js_1.loadJs, + '.js': loaders_js_1.loadJs, + '.ts': loaders_js_1.loadTs, + '.json': loaders_js_1.loadJson, + '.yaml': loaders_js_1.loadYaml, + '.yml': loaders_js_1.loadYaml, + noExt: loaders_js_1.loadYaml, +}); +exports.defaultLoadersSync = Object.freeze({ + '.cjs': loaders_js_1.loadJsSync, + '.js': loaders_js_1.loadJsSync, + '.ts': loaders_js_1.loadTsSync, + '.json': loaders_js_1.loadJson, + '.yaml': loaders_js_1.loadYaml, + '.yml': loaders_js_1.loadYaml, + noExt: loaders_js_1.loadYaml, +}); +const identity = function identity(x) { + return x; +}; +function getInternalOptions(moduleName, options) { + const metaExplorer = new ExplorerSync_js_1.ExplorerSync({ + packageProp: 'cosmiconfig', + stopDir: process.cwd(), + searchPlaces: exports.metaSearchPlaces, + ignoreEmptySearchPlaces: false, + applyPackagePropertyPathToConfiguration: true, + loaders: exports.defaultLoaders, + transform: identity, + cache: true, + metaConfigFilePath: null, + }); + const metaConfig = metaExplorer.search(); + if (!metaConfig) { + return options; + } + if (metaConfig.config?.loaders) { + throw new Error('Can not specify loaders in meta config file'); + } + const overrideOptions = metaConfig.config ?? {}; + if (overrideOptions.searchPlaces) { + overrideOptions.searchPlaces = overrideOptions.searchPlaces.map((path) => path.replace('{name}', moduleName)); + } + overrideOptions.metaConfigFilePath = metaConfig.filepath; + return { ...options, ...(0, util_1.removeUndefinedValuesFromObject)(overrideOptions) }; +} +function normalizeOptions(moduleName, options) { + const defaults = { + packageProp: moduleName, + searchPlaces: [ + 'package.json', + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.js`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.cjs`, + `.${moduleName}rc.mjs`, + `.config/${moduleName}rc`, + `.config/${moduleName}rc.json`, + `.config/${moduleName}rc.yaml`, + `.config/${moduleName}rc.yml`, + `.config/${moduleName}rc.js`, + `.config/${moduleName}rc.ts`, + `.config/${moduleName}rc.cjs`, + `.config/${moduleName}rc.mjs`, + `${moduleName}.config.js`, + `${moduleName}.config.ts`, + `${moduleName}.config.cjs`, + `${moduleName}.config.mjs`, + ], + ignoreEmptySearchPlaces: true, + stopDir: os_1.default.homedir(), + cache: true, + transform: identity, + loaders: exports.defaultLoaders, + metaConfigFilePath: null, + }; + return { + ...defaults, + ...(0, util_1.removeUndefinedValuesFromObject)(options), + loaders: { + ...defaults.loaders, + ...options.loaders, + }, + }; +} +function normalizeOptionsSync(moduleName, options) { + const defaults = { + packageProp: moduleName, + searchPlaces: [ + 'package.json', + `.${moduleName}rc`, + `.${moduleName}rc.json`, + `.${moduleName}rc.yaml`, + `.${moduleName}rc.yml`, + `.${moduleName}rc.js`, + `.${moduleName}rc.ts`, + `.${moduleName}rc.cjs`, + `.config/${moduleName}rc`, + `.config/${moduleName}rc.json`, + `.config/${moduleName}rc.yaml`, + `.config/${moduleName}rc.yml`, + `.config/${moduleName}rc.js`, + `.config/${moduleName}rc.ts`, + `.config/${moduleName}rc.cjs`, + `${moduleName}.config.js`, + `${moduleName}.config.ts`, + `${moduleName}.config.cjs`, + ], + ignoreEmptySearchPlaces: true, + stopDir: os_1.default.homedir(), + cache: true, + transform: identity, + loaders: exports.defaultLoadersSync, + metaConfigFilePath: null, + }; + return { + ...defaults, + ...(0, util_1.removeUndefinedValuesFromObject)(options), + loaders: { + ...defaults.loaders, + ...options.loaders, + }, + }; +} +function cosmiconfig(moduleName, options = {}) { + const internalOptions = getInternalOptions(moduleName, options); + const normalizedOptions = normalizeOptions(moduleName, internalOptions); + const explorer = new Explorer_js_1.Explorer(normalizedOptions); + return { + search: explorer.search.bind(explorer), + load: explorer.load.bind(explorer), + clearLoadCache: explorer.clearLoadCache.bind(explorer), + clearSearchCache: explorer.clearSearchCache.bind(explorer), + clearCaches: explorer.clearCaches.bind(explorer), + }; +} +exports.cosmiconfig = cosmiconfig; +function cosmiconfigSync(moduleName, options = {}) { + const internalOptions = getInternalOptions(moduleName, options); + const normalizedOptions = normalizeOptionsSync(moduleName, internalOptions); + const explorerSync = new ExplorerSync_js_1.ExplorerSync(normalizedOptions); + return { + search: explorerSync.search.bind(explorerSync), + load: explorerSync.load.bind(explorerSync), + clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync), + clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync), + clearCaches: explorerSync.clearCaches.bind(explorerSync), + }; +} +exports.cosmiconfigSync = cosmiconfigSync; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/index.js.map b/node_modules/cosmiconfig/dist/index.js.map new file mode 100644 index 00000000..6cabb83d --- /dev/null +++ b/node_modules/cosmiconfig/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,sEAAsE;AACtE,6CAA2B;AAE3B,4CAAoB;AACpB,+CAAyC;AACzC,uDAAiD;AACjD,6CAOsB;AAUtB,iCAAyD;AAEzD,wGAAwG;AAC3F,QAAA,gBAAgB,GAAG;IAC9B,cAAc;IACd,cAAc;IACd,cAAc;IACd,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,aAAa;CACd,CAAC;AAEF,+EAA+E;AAClE,QAAA,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,mBAAM;IACd,MAAM,EAAE,mBAAM;IACd,KAAK,EAAE,mBAAM;IACb,KAAK,EAAE,mBAAM;IACb,OAAO,EAAE,qBAAQ;IACjB,OAAO,EAAE,qBAAQ;IACjB,MAAM,EAAE,qBAAQ;IAChB,KAAK,EAAE,qBAAQ;CACP,CAAC,CAAC;AACC,QAAA,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,uBAAU;IAClB,KAAK,EAAE,uBAAU;IACjB,KAAK,EAAE,uBAAU;IACjB,OAAO,EAAE,qBAAQ;IACjB,OAAO,EAAE,qBAAQ;IACjB,MAAM,EAAE,qBAAQ;IAChB,KAAK,EAAE,qBAAQ;CACP,CAAC,CAAC;AAEZ,MAAM,QAAQ,GAAkB,SAAS,QAAQ,CAAC,CAAC;IACjD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,SAAS,kBAAkB,CACzB,UAAkB,EAClB,OAAoB;IAEpB,MAAM,YAAY,GAAG,IAAI,8BAAY,CAAC;QACpC,WAAW,EAAE,aAAa;QAC1B,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;QACtB,YAAY,EAAE,wBAAgB;QAC9B,uBAAuB,EAAE,KAAK;QAC9B,uCAAuC,EAAE,IAAI;QAC7C,OAAO,EAAE,sBAAc;QACvB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,IAAI;QACX,kBAAkB,EAAE,IAAI;KACzB,CAAC,CAAC;IACH,MAAM,UAAU,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC;IAEzC,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,OAAO,CAAC;KAChB;IAED,IAAI,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAChE;IAED,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,IAAI,EAAE,CAAC;IAEhD,IAAI,eAAe,CAAC,YAAY,EAAE;QAChC,eAAe,CAAC,YAAY,GAAG,eAAe,CAAC,YAAY,CAAC,GAAG,CAC7D,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CACrD,CAAC;KACH;IAED,eAAe,CAAC,kBAAkB,GAAG,UAAU,CAAC,QAAQ,CAAC;IAEzD,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,IAAA,sCAA+B,EAAC,eAAe,CAAC,EAAE,CAAC;AAC7E,CAAC;AAED,SAAS,gBAAgB,CACvB,UAAkB,EAClB,OAA0B;IAE1B,MAAM,QAAQ,GAAG;QACf,WAAW,EAAE,UAAU;QACvB,YAAY,EAAE;YACZ,cAAc;YACd,IAAI,UAAU,IAAI;YAClB,IAAI,UAAU,SAAS;YACvB,IAAI,UAAU,SAAS;YACvB,IAAI,UAAU,QAAQ;YACtB,IAAI,UAAU,OAAO;YACrB,IAAI,UAAU,OAAO;YACrB,IAAI,UAAU,QAAQ;YACtB,IAAI,UAAU,QAAQ;YACtB,WAAW,UAAU,IAAI;YACzB,WAAW,UAAU,SAAS;YAC9B,WAAW,UAAU,SAAS;YAC9B,WAAW,UAAU,QAAQ;YAC7B,WAAW,UAAU,OAAO;YAC5B,WAAW,UAAU,OAAO;YAC5B,WAAW,UAAU,QAAQ;YAC7B,WAAW,UAAU,QAAQ;YAC7B,GAAG,UAAU,YAAY;YACzB,GAAG,UAAU,YAAY;YACzB,GAAG,UAAU,aAAa;YAC1B,GAAG,UAAU,aAAa;SAC3B;QACD,uBAAuB,EAAE,IAAI;QAC7B,OAAO,EAAE,YAAE,CAAC,OAAO,EAAE;QACrB,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,sBAAc;QACvB,kBAAkB,EAAE,IAAI;KACC,CAAC;IAE5B,OAAO;QACL,GAAG,QAAQ;QACX,GAAG,IAAA,sCAA+B,EAAC,OAAO,CAAC;QAC3C,OAAO,EAAE;YACP,GAAG,QAAQ,CAAC,OAAO;YACnB,GAAG,OAAO,CAAC,OAAO;SACnB;KACF,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAC3B,UAAkB,EAClB,OAA8B;IAE9B,MAAM,QAAQ,GAAG;QACf,WAAW,EAAE,UAAU;QACvB,YAAY,EAAE;YACZ,cAAc;YACd,IAAI,UAAU,IAAI;YAClB,IAAI,UAAU,SAAS;YACvB,IAAI,UAAU,SAAS;YACvB,IAAI,UAAU,QAAQ;YACtB,IAAI,UAAU,OAAO;YACrB,IAAI,UAAU,OAAO;YACrB,IAAI,UAAU,QAAQ;YACtB,WAAW,UAAU,IAAI;YACzB,WAAW,UAAU,SAAS;YAC9B,WAAW,UAAU,SAAS;YAC9B,WAAW,UAAU,QAAQ;YAC7B,WAAW,UAAU,OAAO;YAC5B,WAAW,UAAU,OAAO;YAC5B,WAAW,UAAU,QAAQ;YAC7B,GAAG,UAAU,YAAY;YACzB,GAAG,UAAU,YAAY;YACzB,GAAG,UAAU,aAAa;SAC3B;QACD,uBAAuB,EAAE,IAAI;QAC7B,OAAO,EAAE,YAAE,CAAC,OAAO,EAAE;QACrB,KAAK,EAAE,IAAI;QACX,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,0BAAkB;QAC3B,kBAAkB,EAAE,IAAI;KACK,CAAC;IAEhC,OAAO;QACL,GAAG,QAAQ;QACX,GAAG,IAAA,sCAA+B,EAAC,OAAO,CAAC;QAC3C,OAAO,EAAE;YACP,GAAG,QAAQ,CAAC,OAAO;YACnB,GAAG,OAAO,CAAC,OAAO;SACnB;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,WAAW,CACzB,UAAkB,EAClB,UAA6B,EAAE;IAE/B,MAAM,eAAe,GAAG,kBAAkB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAChE,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IACxE,MAAM,QAAQ,GAAG,IAAI,sBAAQ,CAAC,iBAAiB,CAAC,CAAC;IACjD,OAAO;QACL,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACtC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;QAClC,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC;QACtD,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC1D,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC;KACjD,CAAC;AACJ,CAAC;AAdD,kCAcC;AAED,SAAgB,eAAe,CAC7B,UAAkB,EAClB,UAAiC,EAAE;IAEnC,MAAM,eAAe,GAAG,kBAAkB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAChE,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IAC5E,MAAM,YAAY,GAAG,IAAI,8BAAY,CAAC,iBAAiB,CAAC,CAAC;IACzD,OAAO;QACL,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC;QAC9C,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;QAC1C,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC;QAC9D,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC;QAClE,WAAW,EAAE,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;KACzD,CAAC;AACJ,CAAC;AAdD,0CAcC"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/loaders.d.ts b/node_modules/cosmiconfig/dist/loaders.d.ts new file mode 100644 index 00000000..96640a53 --- /dev/null +++ b/node_modules/cosmiconfig/dist/loaders.d.ts @@ -0,0 +1,8 @@ +import { Loader, LoaderSync } from './types.js'; +export declare const loadJsSync: LoaderSync; +export declare const loadJs: Loader; +export declare const loadJson: LoaderSync; +export declare const loadYaml: LoaderSync; +export declare const loadTsSync: LoaderSync; +export declare const loadTs: Loader; +//# sourceMappingURL=loaders.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/loaders.d.ts.map b/node_modules/cosmiconfig/dist/loaders.d.ts.map new file mode 100644 index 00000000..32a1afb4 --- /dev/null +++ b/node_modules/cosmiconfig/dist/loaders.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../src/loaders.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAGhD,eAAO,MAAM,UAAU,EAAE,UAMxB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MAOpB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,UAWtB,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,UAWtB,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,UA0BxB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,MA0BpB,CAAC"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/loaders.js b/node_modules/cosmiconfig/dist/loaders.js new file mode 100644 index 00000000..dcdcff6c --- /dev/null +++ b/node_modules/cosmiconfig/dist/loaders.js @@ -0,0 +1,133 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-require-imports */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.loadTs = exports.loadTsSync = exports.loadYaml = exports.loadJson = exports.loadJs = exports.loadJsSync = void 0; +const fs_1 = require("fs"); +const promises_1 = require("fs/promises"); +const path_1 = __importDefault(require("path")); +const url_1 = require("url"); +let importFresh; +const loadJsSync = function loadJsSync(filepath) { + if (importFresh === undefined) { + importFresh = require('import-fresh'); + } + return importFresh(filepath); +}; +exports.loadJsSync = loadJsSync; +const loadJs = async function loadJs(filepath) { + try { + const { href } = (0, url_1.pathToFileURL)(filepath); + return (await import(href)).default; + } + catch (error) { + return (0, exports.loadJsSync)(filepath, ''); + } +}; +exports.loadJs = loadJs; +let parseJson; +const loadJson = function loadJson(filepath, content) { + if (parseJson === undefined) { + parseJson = require('parse-json'); + } + try { + return parseJson(content); + } + catch (error) { + error.message = `JSON Error in ${filepath}:\n${error.message}`; + throw error; + } +}; +exports.loadJson = loadJson; +let yaml; +const loadYaml = function loadYaml(filepath, content) { + if (yaml === undefined) { + yaml = require('js-yaml'); + } + try { + return yaml.load(content); + } + catch (error) { + error.message = `YAML Error in ${filepath}:\n${error.message}`; + throw error; + } +}; +exports.loadYaml = loadYaml; +let typescript; +const loadTsSync = function loadTsSync(filepath, content) { + /* istanbul ignore next -- @preserve */ + if (typescript === undefined) { + typescript = require('typescript'); + } + const compiledFilepath = `${filepath.slice(0, -2)}cjs`; + try { + const config = resolveTsConfig(path_1.default.dirname(filepath)) ?? {}; + config.compilerOptions = { + ...config.compilerOptions, + module: typescript.ModuleKind.NodeNext, + moduleResolution: typescript.ModuleResolutionKind.NodeNext, + target: typescript.ScriptTarget.ES2022, + noEmit: false, + }; + content = typescript.transpileModule(content, config).outputText; + (0, fs_1.writeFileSync)(compiledFilepath, content); + return (0, exports.loadJsSync)(compiledFilepath, content).default; + } + catch (error) { + error.message = `TypeScript Error in ${filepath}:\n${error.message}`; + throw error; + } + finally { + if ((0, fs_1.existsSync)(compiledFilepath)) { + (0, fs_1.rmSync)(compiledFilepath); + } + } +}; +exports.loadTsSync = loadTsSync; +const loadTs = async function loadTs(filepath, content) { + if (typescript === undefined) { + typescript = (await import('typescript')).default; + } + const compiledFilepath = `${filepath.slice(0, -2)}mjs`; + try { + const config = resolveTsConfig(path_1.default.dirname(filepath)) ?? {}; + config.compilerOptions = { + ...config.compilerOptions, + module: typescript.ModuleKind.ES2022, + moduleResolution: typescript.ModuleResolutionKind.Bundler, + target: typescript.ScriptTarget.ES2022, + noEmit: false, + }; + content = typescript.transpileModule(content, config).outputText; + await (0, promises_1.writeFile)(compiledFilepath, content); + const { href } = (0, url_1.pathToFileURL)(compiledFilepath); + return (await import(href)).default; + } + catch (error) { + error.message = `TypeScript Error in ${filepath}:\n${error.message}`; + throw error; + } + finally { + if ((0, fs_1.existsSync)(compiledFilepath)) { + await (0, promises_1.rm)(compiledFilepath); + } + } +}; +exports.loadTs = loadTs; +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function resolveTsConfig(directory) { + const filePath = typescript.findConfigFile(directory, (fileName) => { + return typescript.sys.fileExists(fileName); + }); + if (filePath !== undefined) { + const { config, error } = typescript.readConfigFile(filePath, (path) => typescript.sys.readFile(path)); + if (error) { + throw new Error(`Error in ${filePath}: ${error.messageText.toString()}`); + } + return config; + } + return; +} +//# sourceMappingURL=loaders.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/loaders.js.map b/node_modules/cosmiconfig/dist/loaders.js.map new file mode 100644 index 00000000..bf00c9e6 --- /dev/null +++ b/node_modules/cosmiconfig/dist/loaders.js.map @@ -0,0 +1 @@ +{"version":3,"file":"loaders.js","sourceRoot":"","sources":["../src/loaders.ts"],"names":[],"mappings":";AAAA,0DAA0D;;;;;;AAE1D,2BAAuD;AACvD,0CAA4C;AAC5C,gDAAwB;AACxB,6BAAoC;AAGpC,IAAI,WAA0C,CAAC;AACxC,MAAM,UAAU,GAAe,SAAS,UAAU,CAAC,QAAQ;IAChE,IAAI,WAAW,KAAK,SAAS,EAAE;QAC7B,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;KACvC;IAED,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC,CAAC;AANW,QAAA,UAAU,cAMrB;AAEK,MAAM,MAAM,GAAW,KAAK,UAAU,MAAM,CAAC,QAAQ;IAC1D,IAAI;QACF,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,mBAAa,EAAC,QAAQ,CAAC,CAAC;QACzC,OAAO,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;KACrC;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,IAAA,kBAAU,EAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;KACjC;AACH,CAAC,CAAC;AAPW,QAAA,MAAM,UAOjB;AAEF,IAAI,SAAsC,CAAC;AACpC,MAAM,QAAQ,GAAe,SAAS,QAAQ,CAAC,QAAQ,EAAE,OAAO;IACrE,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;KACnC;IAED,IAAI;QACF,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC;KAC3B;IAAC,OAAO,KAAK,EAAE;QACd,KAAK,CAAC,OAAO,GAAG,iBAAiB,QAAQ,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QAC/D,MAAM,KAAK,CAAC;KACb;AACH,CAAC,CAAC;AAXW,QAAA,QAAQ,YAWnB;AAEF,IAAI,IAA8B,CAAC;AAC5B,MAAM,QAAQ,GAAe,SAAS,QAAQ,CAAC,QAAQ,EAAE,OAAO;IACrE,IAAI,IAAI,KAAK,SAAS,EAAE;QACtB,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;KAC3B;IAED,IAAI;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC3B;IAAC,OAAO,KAAK,EAAE;QACd,KAAK,CAAC,OAAO,GAAG,iBAAiB,QAAQ,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QAC/D,MAAM,KAAK,CAAC;KACb;AACH,CAAC,CAAC;AAXW,QAAA,QAAQ,YAWnB;AAEF,IAAI,UAAuC,CAAC;AACrC,MAAM,UAAU,GAAe,SAAS,UAAU,CAAC,QAAQ,EAAE,OAAO;IACzE,uCAAuC;IACvC,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;KACpC;IACD,MAAM,gBAAgB,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IACvD,IAAI;QACF,MAAM,MAAM,GAAG,eAAe,CAAC,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7D,MAAM,CAAC,eAAe,GAAG;YACvB,GAAG,MAAM,CAAC,eAAe;YACzB,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;YACtC,gBAAgB,EAAE,UAAU,CAAC,oBAAoB,CAAC,QAAQ;YAC1D,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,MAAM;YACtC,MAAM,EAAE,KAAK;SACd,CAAC;QACF,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC;QACjE,IAAA,kBAAa,EAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QACzC,OAAO,IAAA,kBAAU,EAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC;KACtD;IAAC,OAAO,KAAK,EAAE;QACd,KAAK,CAAC,OAAO,GAAG,uBAAuB,QAAQ,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QACrE,MAAM,KAAK,CAAC;KACb;YAAS;QACR,IAAI,IAAA,eAAU,EAAC,gBAAgB,CAAC,EAAE;YAChC,IAAA,WAAM,EAAC,gBAAgB,CAAC,CAAC;SAC1B;KACF;AACH,CAAC,CAAC;AA1BW,QAAA,UAAU,cA0BrB;AAEK,MAAM,MAAM,GAAW,KAAK,UAAU,MAAM,CAAC,QAAQ,EAAE,OAAO;IACnE,IAAI,UAAU,KAAK,SAAS,EAAE;QAC5B,UAAU,GAAG,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC;KACnD;IACD,MAAM,gBAAgB,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IACvD,IAAI;QACF,MAAM,MAAM,GAAG,eAAe,CAAC,cAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QAC7D,MAAM,CAAC,eAAe,GAAG;YACvB,GAAG,MAAM,CAAC,eAAe;YACzB,MAAM,EAAE,UAAU,CAAC,UAAU,CAAC,MAAM;YACpC,gBAAgB,EAAE,UAAU,CAAC,oBAAoB,CAAC,OAAO;YACzD,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,MAAM;YACtC,MAAM,EAAE,KAAK;SACd,CAAC;QACF,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,UAAU,CAAC;QACjE,MAAM,IAAA,oBAAS,EAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,mBAAa,EAAC,gBAAgB,CAAC,CAAC;QACjD,OAAO,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;KACrC;IAAC,OAAO,KAAK,EAAE;QACd,KAAK,CAAC,OAAO,GAAG,uBAAuB,QAAQ,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QACrE,MAAM,KAAK,CAAC;KACb;YAAS;QACR,IAAI,IAAA,eAAU,EAAC,gBAAgB,CAAC,EAAE;YAChC,MAAM,IAAA,aAAE,EAAC,gBAAgB,CAAC,CAAC;SAC5B;KACF;AACH,CAAC,CAAC;AA1BW,QAAA,MAAM,UA0BjB;AAEF,8DAA8D;AAC9D,SAAS,eAAe,CAAC,SAAiB;IACxC,MAAM,QAAQ,GAAG,UAAU,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE;QACjE,OAAO,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC1B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CACrE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAC9B,CAAC;QACF,IAAI,KAAK,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,YAAY,QAAQ,KAAK,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;SAC1E;QACD,OAAO,MAAM,CAAC;KACf;IACD,OAAO;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/types.d.ts b/node_modules/cosmiconfig/dist/types.d.ts new file mode 100644 index 00000000..d8562b6e --- /dev/null +++ b/node_modules/cosmiconfig/dist/types.d.ts @@ -0,0 +1,91 @@ +/** + * @public + */ +export type Config = any; +/** + * @public + */ +export type CosmiconfigResult = { + config: Config; + filepath: string; + isEmpty?: boolean; +} | null; +/** + * @public + */ +export type LoaderResult = Config | null; +/** + * @public + */ +export type Loader = ((filepath: string, content: string) => Promise) | LoaderSync; +/** + * @public + */ +export type LoaderSync = (filepath: string, content: string) => LoaderResult; +/** + * @public + */ +export type Transform = ((CosmiconfigResult: CosmiconfigResult) => Promise) | TransformSync; +/** + * @public + */ +export type TransformSync = (CosmiconfigResult: CosmiconfigResult) => CosmiconfigResult; +/** + * @public + */ +export interface CommonOptions { + packageProp?: string | Array; + searchPlaces?: Array; + ignoreEmptySearchPlaces?: boolean; + stopDir?: string; + cache?: boolean; +} +/** + * @public + */ +export interface Options extends CommonOptions { + loaders?: Loaders; + transform?: Transform; +} +/** + * @public + */ +export interface OptionsSync extends CommonOptions { + loaders?: LoadersSync; + transform?: TransformSync; +} +/** + * @public + */ +export interface Loaders { + [key: string]: Loader; +} +/** + * @public + */ +export interface LoadersSync { + [key: string]: LoaderSync; +} +/** + * @public + */ +export interface PublicExplorerBase { + clearLoadCache: () => void; + clearSearchCache: () => void; + clearCaches: () => void; +} +/** + * @public + */ +export interface PublicExplorer extends PublicExplorerBase { + search: (searchFrom?: string) => Promise; + load: (filepath: string) => Promise; +} +/** + * @public + */ +export interface PublicExplorerSync extends PublicExplorerBase { + search: (searchFrom?: string) => CosmiconfigResult; + load: (filepath: string) => CosmiconfigResult; +} +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/types.d.ts.map b/node_modules/cosmiconfig/dist/types.d.ts.map new file mode 100644 index 00000000..074134aa --- /dev/null +++ b/node_modules/cosmiconfig/dist/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,MAAM,GAAG,GAAG,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,IAAI,CAAC;AAET;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,MAAM,GACd,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC,GAC9D,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,YAAY,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,CAAC,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC,GACtE,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAC1B,iBAAiB,EAAE,iBAAiB,KACjC,iBAAiB,CAAC;AAEvB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,aAAa;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AA4BD;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IACxD,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC5D,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,iBAAiB,CAAC;IACnD,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,iBAAiB,CAAC;CAC/C"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/types.js b/node_modules/cosmiconfig/dist/types.js new file mode 100644 index 00000000..11e638d1 --- /dev/null +++ b/node_modules/cosmiconfig/dist/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/types.js.map b/node_modules/cosmiconfig/dist/types.js.map new file mode 100644 index 00000000..c768b790 --- /dev/null +++ b/node_modules/cosmiconfig/dist/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/util.d.ts b/node_modules/cosmiconfig/dist/util.d.ts new file mode 100644 index 00000000..d1849356 --- /dev/null +++ b/node_modules/cosmiconfig/dist/util.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=util.d.ts.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/util.d.ts.map b/node_modules/cosmiconfig/dist/util.d.ts.map new file mode 100644 index 00000000..bca9e38e --- /dev/null +++ b/node_modules/cosmiconfig/dist/util.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/util.js b/node_modules/cosmiconfig/dist/util.js new file mode 100644 index 00000000..615a400f --- /dev/null +++ b/node_modules/cosmiconfig/dist/util.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.removeUndefinedValuesFromObject = exports.getPropertyByPath = exports.emplace = void 0; +/** + * @internal + */ +function emplace(map, key, fn) { + const cached = map.get(key); + if (cached !== undefined) { + return cached; + } + const result = fn(); + map.set(key, result); + return result; +} +exports.emplace = emplace; +// Resolves property names or property paths defined with period-delimited +// strings or arrays of strings. Property names that are found on the source +// object are used directly (even if they include a period). +// Nested property names that include periods, within a path, are only +// understood in array paths. +/** + * @internal + */ +function getPropertyByPath(source, path) { + if (typeof path === 'string' && + Object.prototype.hasOwnProperty.call(source, path)) { + return source[path]; + } + const parsedPath = typeof path === 'string' ? path.split('.') : path; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return parsedPath.reduce((previous, key) => { + if (previous === undefined) { + return previous; + } + return previous[key]; + }, source); +} +exports.getPropertyByPath = getPropertyByPath; +/** @internal */ +function removeUndefinedValuesFromObject(options) { + /* istanbul ignore if -- @preserve */ + if (!options) { + return undefined; + } + return Object.fromEntries(Object.entries(options).filter(([, value]) => value !== undefined)); +} +exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject; +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/node_modules/cosmiconfig/dist/util.js.map b/node_modules/cosmiconfig/dist/util.js.map new file mode 100644 index 00000000..cdc6650c --- /dev/null +++ b/node_modules/cosmiconfig/dist/util.js.map @@ -0,0 +1 @@ +{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,SAAgB,OAAO,CAAO,GAAc,EAAE,GAAM,EAAE,EAAW;IAC/D,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,MAAM,KAAK,SAAS,EAAE;QACxB,OAAO,MAAM,CAAC;KACf;IACD,MAAM,MAAM,GAAG,EAAE,EAAE,CAAC;IACpB,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACrB,OAAO,MAAM,CAAC;AAChB,CAAC;AARD,0BAQC;AAED,0EAA0E;AAC1E,4EAA4E;AAC5E,4DAA4D;AAC5D,sEAAsE;AACtE,6BAA6B;AAC7B;;GAEG;AACH,SAAgB,iBAAiB,CAC/B,MAAkC,EAClC,IAA4B;IAE5B,IACE,OAAO,IAAI,KAAK,QAAQ;QACxB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAClD;QACA,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;KACrB;IAED,MAAM,UAAU,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrE,8DAA8D;IAC9D,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,QAAa,EAAE,GAAG,EAAW,EAAE;QACvD,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,OAAO,QAAQ,CAAC;SACjB;QACD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC,EAAE,MAAM,CAAC,CAAC;AACb,CAAC;AAnBD,8CAmBC;AAED,gBAAgB;AAChB,SAAgB,+BAA+B,CAC7C,OAA4C;IAE5C,qCAAqC;IACrC,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CACnE,CAAC;AACJ,CAAC;AAVD,0EAUC"} \ No newline at end of file diff --git a/node_modules/cosmiconfig/node_modules/.bin/js-yaml b/node_modules/cosmiconfig/node_modules/.bin/js-yaml new file mode 120000 index 00000000..daf9f115 --- /dev/null +++ b/node_modules/cosmiconfig/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../../../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/cosmiconfig/package.json b/node_modules/cosmiconfig/package.json new file mode 100644 index 00000000..8a72052b --- /dev/null +++ b/node_modules/cosmiconfig/package.json @@ -0,0 +1,105 @@ +{ + "name": "cosmiconfig", + "version": "8.3.6", + "description": "Find and load configuration from a package.json property, rc file, TypeScript module, and more!", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist" + ], + "scripts": { + "clean": "git clean -Xdf -e '!node_modules' .", + "build": "npm run build:tsc", + "build:tsc": "cross-env NODE_ENV=production tsc -b", + "dev": "npm run build:tsc -- --watch", + "lint": "eslint --ext .js,.ts .", + "lint:fix": "eslint --ext .js,.ts . --fix", + "lint:md": "remark-preset-davidtheclark", + "format": "prettier \"**/*.{js,ts,json,yml,yaml}\" --write", + "format:md": "remark-preset-davidtheclark --format", + "format:check": "prettier \"**/*.{js,ts,json,yml,yaml}\" --check", + "test": "vitest run --coverage", + "test:watch": "vitest", + "check:all": "npm run test && npm run lint && npm run format:check", + "prepublishOnly": "npm run check:all && npm run build", + "prepare": "husky install" + }, + "lint-staged": { + "*.{js,ts}": [ + "eslint --fix", + "prettier --write" + ], + "*.{json,yml,yaml}": [ + "prettier --write" + ], + "*.md": [ + "remark-preset-davidtheclark", + "remark-preset-davidtheclark --format" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/cosmiconfig/cosmiconfig.git" + }, + "keywords": [ + "load", + "configuration", + "config" + ], + "author": "Daniel Fischer ", + "contributors": [ + "Randolf J ", + "David Clark ", + "Bogdan Chadkin ", + "Suhas Karanth " + ], + "funding": "https://github.com/sponsors/d-fischer", + "license": "MIT", + "bugs": { + "url": "https://github.com/cosmiconfig/cosmiconfig/issues" + }, + "homepage": "https://github.com/cosmiconfig/cosmiconfig#readme", + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + }, + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "devDependencies": { + "@types/js-yaml": "^4.0.5", + "@types/node": "^14", + "@types/parse-json": "^4.0.0", + "@typescript-eslint/eslint-plugin": "^6.5.0", + "@typescript-eslint/parser": "^6.5.0", + "@vitest/coverage-istanbul": "^0.34.3", + "cross-env": "^7.0.3", + "del": "^7.1.0", + "del-cli": "^5.1.0", + "eslint": "^8.48.0", + "eslint-config-davidtheclark-node": "^0.2.2", + "eslint-config-prettier": "^9.0.0", + "eslint-import-resolver-typescript": "^3.6.0", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-vitest": "^0.2.8", + "husky": "^8.0.3", + "lint-staged": "^14.0.1", + "make-dir": "^4.0.0", + "parent-module": "^3.0.0", + "prettier": "^3.0.3", + "remark-preset-davidtheclark": "^0.12.0", + "typescript": "^5.2.2", + "vitest": "^0.34.3" + }, + "engines": { + "node": ">=14" + } +} diff --git a/node_modules/css-mediaquery/.npmignore b/node_modules/css-mediaquery/.npmignore new file mode 100644 index 00000000..37904a9d --- /dev/null +++ b/node_modules/css-mediaquery/.npmignore @@ -0,0 +1,6 @@ +.DS_Store +.gitignore +.travis.yml +coverage/ +node_modules/ +test/ diff --git a/node_modules/css-mediaquery/HISTORY.md b/node_modules/css-mediaquery/HISTORY.md new file mode 100644 index 00000000..d1915aa8 --- /dev/null +++ b/node_modules/css-mediaquery/HISTORY.md @@ -0,0 +1,22 @@ +CSS Media Query Change History +============================== + +0.1.2 (2014-01-21) +------------------ + +* Fixed issue with parsing media queries that do not have expressions. ([#5][]) + + +[#5]: https://github.com/ericf/css-mediaquery/issues/5 + + +0.1.1 (2014-01-08) +------------------ + +* Added docs to README for `parse()`. + + +0.1.0 (2014-01-08) +------------------ + +* Initial public release. diff --git a/node_modules/css-mediaquery/LICENSE b/node_modules/css-mediaquery/LICENSE new file mode 100644 index 00000000..263382ae --- /dev/null +++ b/node_modules/css-mediaquery/LICENSE @@ -0,0 +1,27 @@ +Copyright 2014 Yahoo! Inc. +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 Yahoo! Inc. 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 YAHOO! INC. 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/css-mediaquery/README.md b/node_modules/css-mediaquery/README.md new file mode 100644 index 00000000..4c346229 --- /dev/null +++ b/node_modules/css-mediaquery/README.md @@ -0,0 +1,94 @@ +CSS Media Query +=============== + +[![Build Status](https://travis-ci.org/ericf/css-mediaquery.png?branch=master)](https://travis-ci.org/ericf/css-mediaquery) +[![Dependency Status](https://gemnasium.com/ericf/css-mediaquery.png)](https://gemnasium.com/ericf/css-mediaquery) +[![npm Version](https://badge.fury.io/js/css-mediaquery.png)](https://npmjs.org/package/css-mediaquery) + +Parses and determines if a given CSS Media Query matches a set of values via +JavaScript. + +Installation +------------ + +Install via npm: + +```shell +$ npm install css-mediaquery +``` + +Usage +----- + +This package has two exports: `parse()`, and `match()` which can parse CSS Media +Queries and determine if a media query matches a given set of values. + +### Matching + +The `match()` method lets you compare a media query expression with a JavaScript +object and determine if a media query matches a given set of values. + +```javascript +var mediaQuery = require('css-mediaquery'); + +var isMatch = mediaQuery.match('screen and (min-width: 40em)', { + type : 'screen', + width: '1024px' +}); + +console.log(isMatch); // => true +``` + +The values specified to check a media query string against should be thought of +as if they are the current state of a device/browser. A `type` value _must_ be +specified, and it can _not_ be `"all"`. + +### Parsing + +Existing CSS Parsers don't do a great job at parsing the details of media +queries. That's where `css-mediaquery` shines. You can parse a media query +expression and get an AST back by using the `parse()` method. + +```javascript +var mediaQuery = require('css-mediaquery'), + ast = mediaQuery.parse('screen and (min-width: 48em)'); +``` + +The `ast` variable will have the following payload: + +```javascript +[ + { + inverse: false, + type : 'screen', + + expressions: [ + { + modifier: 'min', + feature : 'width', + value : '48em' + } + ] + } +] +``` + +This package was written with care to following the W3C Recommendations for +[CSS3 Media Queries][w3c-mq] and [CSS3 Values and Units][w3c-vu]. It supports +all of the [Media Features][w3c-mq-features] and will properly convert values to +a common unit before comparing them. + + +[w3c-mq]: http://www.w3.org/TR/css3-mediaqueries/ +[w3c-mq-features]: http://www.w3.org/TR/css3-mediaqueries/#media1 +[w3c-vu]: http://www.w3.org/TR/css3-values/ + + +License +------- + +This software is free to use under the Yahoo! Inc. BSD license. +See the [LICENSE file][] for license text and copyright information. + + +[LICENSE file]: https://github.com/ericf/css-mediaquery/blob/master/LICENSE diff --git a/node_modules/css-mediaquery/index.js b/node_modules/css-mediaquery/index.js new file mode 100644 index 00000000..b1d9b0d3 --- /dev/null +++ b/node_modules/css-mediaquery/index.js @@ -0,0 +1,157 @@ +/* +Copyright (c) 2014, Yahoo! Inc. All rights reserved. +Copyrights licensed under the New BSD License. +See the accompanying LICENSE file for terms. +*/ + +'use strict'; + +exports.match = matchQuery; +exports.parse = parseQuery; + +// ----------------------------------------------------------------------------- + +var RE_MEDIA_QUERY = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i, + RE_MQ_EXPRESSION = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/, + RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/, + RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/, + RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/; + +function matchQuery(mediaQuery, values) { + return parseQuery(mediaQuery).some(function (query) { + var inverse = query.inverse; + + // Either the parsed or specified `type` is "all", or the types must be + // equal for a match. + var typeMatch = query.type === 'all' || values.type === query.type; + + // Quit early when `type` doesn't match, but take "not" into account. + if ((typeMatch && inverse) || !(typeMatch || inverse)) { + return false; + } + + var expressionsMatch = query.expressions.every(function (expression) { + var feature = expression.feature, + modifier = expression.modifier, + expValue = expression.value, + value = values[feature]; + + // Missing or falsy values don't match. + if (!value) { return false; } + + switch (feature) { + case 'orientation': + case 'scan': + return value.toLowerCase() === expValue.toLowerCase(); + + case 'width': + case 'height': + case 'device-width': + case 'device-height': + expValue = toPx(expValue); + value = toPx(value); + break; + + case 'resolution': + expValue = toDpi(expValue); + value = toDpi(value); + break; + + case 'aspect-ratio': + case 'device-aspect-ratio': + case /* Deprecated */ 'device-pixel-ratio': + expValue = toDecimal(expValue); + value = toDecimal(value); + break; + + case 'grid': + case 'color': + case 'color-index': + case 'monochrome': + expValue = parseInt(expValue, 10) || 1; + value = parseInt(value, 10) || 0; + break; + } + + switch (modifier) { + case 'min': return value >= expValue; + case 'max': return value <= expValue; + default : return value === expValue; + } + }); + + return (expressionsMatch && !inverse) || (!expressionsMatch && inverse); + }); +} + +function parseQuery(mediaQuery) { + return mediaQuery.split(',').map(function (query) { + query = query.trim(); + + var captures = query.match(RE_MEDIA_QUERY), + modifier = captures[1], + type = captures[2], + expressions = captures[3] || '', + parsed = {}; + + parsed.inverse = !!modifier && modifier.toLowerCase() === 'not'; + parsed.type = type ? type.toLowerCase() : 'all'; + + // Split expressions into a list. + expressions = expressions.match(/\([^\)]+\)/g) || []; + + parsed.expressions = expressions.map(function (expression) { + var captures = expression.match(RE_MQ_EXPRESSION), + feature = captures[1].toLowerCase().match(RE_MQ_FEATURE); + + return { + modifier: feature[1], + feature : feature[2], + value : captures[2] + }; + }); + + return parsed; + }); +} + +// -- Utilities ---------------------------------------------------------------- + +function toDecimal(ratio) { + var decimal = Number(ratio), + numbers; + + if (!decimal) { + numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/); + decimal = numbers[1] / numbers[2]; + } + + return decimal; +} + +function toDpi(resolution) { + var value = parseFloat(resolution), + units = String(resolution).match(RE_RESOLUTION_UNIT)[1]; + + switch (units) { + case 'dpcm': return value / 2.54; + case 'dppx': return value * 96; + default : return value; + } +} + +function toPx(length) { + var value = parseFloat(length), + units = String(length).match(RE_LENGTH_UNIT)[1]; + + switch (units) { + case 'em' : return value * 16; + case 'rem': return value * 16; + case 'cm' : return value * 96 / 2.54; + case 'mm' : return value * 96 / 2.54 / 10; + case 'in' : return value * 96; + case 'pt' : return value * 72; + case 'pc' : return value * 72 / 12; + default : return value; + } +} diff --git a/node_modules/css-mediaquery/package.json b/node_modules/css-mediaquery/package.json new file mode 100644 index 00000000..623f7950 --- /dev/null +++ b/node_modules/css-mediaquery/package.json @@ -0,0 +1,36 @@ +{ + "name": "css-mediaquery", + "version": "0.1.2", + "description": "Parses and determines if a given CSS Media Query matches a set of values.", + "main": "index.js", + "scripts": { + "test": "istanbul cover -- ./node_modules/mocha/bin/_mocha test/ --reporter spec" + }, + "repository": { + "type": "git", + "url": "git://github.com/ericf/css-mediaquery.git" + }, + "keywords": [ + "css", + "media", + "query", + "mediaquery", + "mobile", + "parse", + "match" + ], + "author": "Eric Ferraiuolo ", + "contributors": [ + "Tilo Mitra " + ], + "license": "BSD", + "bugs": { + "url": "https://github.com/ericf/css-mediaquery/issues" + }, + "homepage": "https://github.com/ericf/css-mediaquery", + "devDependencies": { + "mocha": "~1.16.2", + "chai": "~1.8.1", + "istanbul": "~0.2.3" + } +} diff --git a/node_modules/error-ex/LICENSE b/node_modules/error-ex/LICENSE new file mode 100644 index 00000000..0a5f461a --- /dev/null +++ b/node_modules/error-ex/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +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/error-ex/README.md b/node_modules/error-ex/README.md new file mode 100644 index 00000000..97f744af --- /dev/null +++ b/node_modules/error-ex/README.md @@ -0,0 +1,144 @@ +# node-error-ex [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-error-ex.svg?style=flat-square)](https://travis-ci.org/Qix-/node-error-ex) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-error-ex.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-error-ex) +> Easily subclass and customize new Error types + +## Examples +To include in your project: +```javascript +var errorEx = require('error-ex'); +``` + +To create an error message type with a specific name (note, that `ErrorFn.name` +will not reflect this): +```javascript +var JSONError = errorEx('JSONError'); + +var err = new JSONError('error'); +err.name; //-> JSONError +throw err; //-> JSONError: error +``` + +To add a stack line: +```javascript +var JSONError = errorEx('JSONError', {fileName: errorEx.line('in %s')}); + +var err = new JSONError('error') +err.fileName = '/a/b/c/foo.json'; +throw err; //-> (line 2)-> in /a/b/c/foo.json +``` + +To append to the error message: +```javascript +var JSONError = errorEx('JSONError', {fileName: errorEx.append('in %s')}); + +var err = new JSONError('error'); +err.fileName = '/a/b/c/foo.json'; +throw err; //-> JSONError: error in /a/b/c/foo.json +``` + +## API + +#### `errorEx([name], [properties])` +Creates a new ErrorEx error type + +- `name`: the name of the new type (appears in the error message upon throw; + defaults to `Error.name`) +- `properties`: if supplied, used as a key/value dictionary of properties to + use when building up the stack message. Keys are property names that are + looked up on the error message, and then passed to function values. + - `line`: if specified and is a function, return value is added as a stack + entry (error-ex will indent for you). Passed the property value given + the key. + - `stack`: if specified and is a function, passed the value of the property + using the key, and the raw stack lines as a second argument. Takes no + return value (but the stack can be modified directly). + - `message`: if specified and is a function, return value is used as new + `.message` value upon get. Passed the property value of the property named + by key, and the existing message is passed as the second argument as an + array of lines (suitable for multi-line messages). + +Returns a constructor (Function) that can be used just like the regular Error +constructor. + +```javascript +var errorEx = require('error-ex'); + +var BasicError = errorEx(); + +var NamedError = errorEx('NamedError'); + +// -- + +var AdvancedError = errorEx('AdvancedError', { + foo: { + line: function (value, stack) { + if (value) { + return 'bar ' + value; + } + return null; + } + } +} + +var err = new AdvancedError('hello, world'); +err.foo = 'baz'; +throw err; + +/* + AdvancedError: hello, world + bar baz + at tryReadme() (readme.js:20:1) +*/ +``` + +#### `errorEx.line(str)` +Creates a stack line using a delimiter + +> This is a helper function. It is to be used in lieu of writing a value object +> for `properties` values. + +- `str`: The string to create + - Use the delimiter `%s` to specify where in the string the value should go + +```javascript +var errorEx = require('error-ex'); + +var FileError = errorEx('FileError', {fileName: errorEx.line('in %s')}); + +var err = new FileError('problem reading file'); +err.fileName = '/a/b/c/d/foo.js'; +throw err; + +/* + FileError: problem reading file + in /a/b/c/d/foo.js + at tryReadme() (readme.js:7:1) +*/ +``` + +#### `errorEx.append(str)` +Appends to the `error.message` string + +> This is a helper function. It is to be used in lieu of writing a value object +> for `properties` values. + +- `str`: The string to append + - Use the delimiter `%s` to specify where in the string the value should go + +```javascript +var errorEx = require('error-ex'); + +var SyntaxError = errorEx('SyntaxError', {fileName: errorEx.append('in %s')}); + +var err = new SyntaxError('improper indentation'); +err.fileName = '/a/b/c/d/foo.js'; +throw err; + +/* + SyntaxError: improper indentation in /a/b/c/d/foo.js + at tryReadme() (readme.js:7:1) +*/ +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/error-ex/index.js b/node_modules/error-ex/index.js new file mode 100644 index 00000000..4fb20b48 --- /dev/null +++ b/node_modules/error-ex/index.js @@ -0,0 +1,141 @@ +'use strict'; + +var util = require('util'); +var isArrayish = require('is-arrayish'); + +var errorEx = function errorEx(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } + + message = message instanceof Error + ? message.message + : (message || this.message); + + Error.call(this, message); + Error.captureStackTrace(this, errorExError); + + this.name = name; + + Object.defineProperty(this, 'message', { + configurable: true, + enumerable: false, + get: function () { + var newMessage = message.split(/\r?\n/g); + + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('message' in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + + return newMessage.join('\n'); + }, + set: function (v) { + message = v; + } + }); + + var overwrittenStack = null; + + var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack'); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + + stackDescriptor.set = function (newstack) { + overwrittenStack = newstack; + }; + + stackDescriptor.get = function () { + var stack = (overwrittenStack || ((stackGetter) + ? stackGetter.call(this) + : stackValue)).split(/\r?\n+/g); + + // starting in Node 7, the stack builder caches the message. + // just replace it. + if (!overwrittenStack) { + stack[0] = this.name + ': ' + this.message; + } + + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + + var modifier = properties[key]; + + if ('line' in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack.splice(lineCount++, 0, ' ' + line); + } + } + + if ('stack' in modifier) { + modifier.stack(this[key], stack); + } + } + + return stack.join('\n'); + }; + + Object.defineProperty(this, 'stack', stackDescriptor); + }; + + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util.inherits(errorExError, Error); + } + + return errorExError; +}; + +errorEx.append = function (str, def) { + return { + message: function (v, message) { + v = v || def; + + if (v) { + message[0] += ' ' + str.replace('%s', v.toString()); + } + + return message; + } + }; +}; + +errorEx.line = function (str, def) { + return { + line: function (v) { + v = v || def; + + if (v) { + return str.replace('%s', v.toString()); + } + + return null; + } + }; +}; + +module.exports = errorEx; diff --git a/node_modules/error-ex/package.json b/node_modules/error-ex/package.json new file mode 100644 index 00000000..f3d9ae0e --- /dev/null +++ b/node_modules/error-ex/package.json @@ -0,0 +1,46 @@ +{ + "name": "error-ex", + "description": "Easy error subclassing and stack customization", + "version": "1.3.2", + "maintainers": [ + "Josh Junon (github.com/qix-)", + "Sindre Sorhus (sindresorhus.com)" + ], + "keywords": [ + "error", + "errors", + "extend", + "extending", + "extension", + "subclass", + "stack", + "custom" + ], + "license": "MIT", + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "xo": { + "rules": { + "operator-linebreak": [ + 0 + ] + } + }, + "repository": "qix-/node-error-ex", + "files": [ + "index.js" + ], + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.7.1" + }, + "dependencies": { + "is-arrayish": "^0.2.1" + } +} diff --git a/node_modules/import-fresh/index.d.ts b/node_modules/import-fresh/index.d.ts new file mode 100644 index 00000000..36d7e208 --- /dev/null +++ b/node_modules/import-fresh/index.d.ts @@ -0,0 +1,30 @@ +/** +Import a module while bypassing the cache. + +@example +``` +// foo.js +let i = 0; +module.exports = () => ++i; + +// index.js +import importFresh = require('import-fresh'); + +require('./foo')(); +//=> 1 + +require('./foo')(); +//=> 2 + +importFresh('./foo')(); +//=> 1 + +importFresh('./foo')(); +//=> 1 + +const foo = importFresh('./foo'); +``` +*/ +declare function importFresh(moduleId: string): T; + +export = importFresh; diff --git a/node_modules/import-fresh/index.js b/node_modules/import-fresh/index.js new file mode 100644 index 00000000..0a4c5d52 --- /dev/null +++ b/node_modules/import-fresh/index.js @@ -0,0 +1,33 @@ +'use strict'; +const path = require('path'); +const resolveFrom = require('resolve-from'); +const parentModule = require('parent-module'); + +module.exports = moduleId => { + if (typeof moduleId !== 'string') { + throw new TypeError('Expected a string'); + } + + const parentPath = parentModule(__filename); + + const cwd = parentPath ? path.dirname(parentPath) : __dirname; + const filePath = resolveFrom(cwd, moduleId); + + const oldModule = require.cache[filePath]; + // Delete itself from module parent + if (oldModule && oldModule.parent) { + let i = oldModule.parent.children.length; + + while (i--) { + if (oldModule.parent.children[i].id === filePath) { + oldModule.parent.children.splice(i, 1); + } + } + } + + delete require.cache[filePath]; // Delete module from cache + + const parent = require.cache[parentPath]; // If `filePath` and `parentPath` are the same, cache will already be deleted so we won't get a memory leak in next step + + return parent === undefined ? require(filePath) : parent.require(filePath); // In case cache doesn't have parent, fall back to normal require +}; diff --git a/node_modules/import-fresh/license b/node_modules/import-fresh/license new file mode 100644 index 00000000..fa7ceba3 --- /dev/null +++ b/node_modules/import-fresh/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://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/import-fresh/package.json b/node_modules/import-fresh/package.json new file mode 100644 index 00000000..0c093620 --- /dev/null +++ b/node_modules/import-fresh/package.json @@ -0,0 +1,43 @@ +{ + "name": "import-fresh", + "version": "3.3.0", + "description": "Import a module while bypassing the cache", + "license": "MIT", + "repository": "sindresorhus/import-fresh", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=6" + }, + "scripts": { + "test": "xo && ava && tsd", + "heapdump": "node heapdump.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "require", + "cache", + "uncache", + "uncached", + "module", + "fresh", + "bypass" + ], + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "devDependencies": { + "ava": "^1.0.1", + "heapdump": "^0.3.12", + "tsd": "^0.7.3", + "xo": "^0.23.0" + } +} diff --git a/node_modules/import-fresh/readme.md b/node_modules/import-fresh/readme.md new file mode 100644 index 00000000..bd14c79c --- /dev/null +++ b/node_modules/import-fresh/readme.md @@ -0,0 +1,48 @@ +# import-fresh + +> Import a module while bypassing the [cache](https://nodejs.org/api/modules.html#modules_caching) + +Useful for testing purposes when you need to freshly import a module. + +## Install + +``` +$ npm install import-fresh +``` + +## Usage + +```js +// foo.js +let i = 0; +module.exports = () => ++i; +``` + +```js +const importFresh = require('import-fresh'); + +require('./foo')(); +//=> 1 + +require('./foo')(); +//=> 2 + +importFresh('./foo')(); +//=> 1 + +importFresh('./foo')(); +//=> 1 +``` + +## import-fresh for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of import-fresh and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-import-fresh?utm_source=npm-import-fresh&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +## Related + +- [clear-module](https://github.com/sindresorhus/clear-module) - Clear a module from the import cache +- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path +- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory +- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import modules lazily diff --git a/node_modules/is-arrayish/.editorconfig b/node_modules/is-arrayish/.editorconfig new file mode 100644 index 00000000..4c017f8a --- /dev/null +++ b/node_modules/is-arrayish/.editorconfig @@ -0,0 +1,18 @@ +root = true + +[*] +indent_style = tab +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.coffee] +indent_style = space + +[{package.json,*.yml}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/node_modules/is-arrayish/.istanbul.yml b/node_modules/is-arrayish/.istanbul.yml new file mode 100644 index 00000000..19fbec32 --- /dev/null +++ b/node_modules/is-arrayish/.istanbul.yml @@ -0,0 +1,4 @@ +instrumentation: + excludes: + - test.js + - test/**/* diff --git a/node_modules/is-arrayish/.npmignore b/node_modules/is-arrayish/.npmignore new file mode 100644 index 00000000..8d5eacb3 --- /dev/null +++ b/node_modules/is-arrayish/.npmignore @@ -0,0 +1,5 @@ +/coverage/ +/test.js +/test/ +*.sw[a-p] +/node_modules/ diff --git a/node_modules/is-arrayish/.travis.yml b/node_modules/is-arrayish/.travis.yml new file mode 100644 index 00000000..5a042435 --- /dev/null +++ b/node_modules/is-arrayish/.travis.yml @@ -0,0 +1,17 @@ +language: node_js + +script: + - node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register + - cat coverage/lcov.info | node_modules/.bin/coveralls +node_js: + - "0.10" + - "0.11" + - "0.12" + - "iojs" +os: + - linux + - osx + +notifications: + slack: + secure: oOt8QGzdrPDsTMcyahtIq5Q+0U1iwfgJgFCxBLsomQ0bpIMn+y5m4viJydA2UinHPGc944HS3LMZS9iKQyv+DjTgbhUyNXqeVjtxCwRe37f5rKQlXVvdfmjHk2kln4H8DcK3r5Qd/+2hd9BeMsp2GImTrkRSud1CZQlhhe5IgZOboSoWpGVMMy1iazWT06tAtiB2LRVhmsdUaFZDWAhGZ+UAvCPf+mnBOAylIj+U0GDrofhfTi25RK0gddG2f/p2M1HCu49O6wECGWkt2hVei233DkNJyLLLJVcvmhf+aXkV5TjMyaoxh/HdcV4DrA7KvYuWmWWKsINa9hlwAsdd/FYmJ6PjRkKWas2JoQ1C+qOzDxyQvn3CaUZFKD99pdsq0rBBZujqXQKZZ/hWb/CE74BI6fKmqQkiEPaD/7uADj04FEg6HVBZaMCyauOaK5b3VC97twbALZ1qVxYV6mU+zSEvnUbpnjjvRO0fSl9ZHA+rzkW73kX3GmHY0wAozEZbSy7QLuZlQ2QtHmBLr+APaGMdL1sFF9qFfzqKy0WDbSE0WS6hpAEJpTsjYmeBrnI8UmK3m++iEgyQPvZoH9LhUT+ek7XIfHZMe04BmC6wuO24/RfpmR6bQK9VMarFCYlBiWxg/z30vkP0KTpUi3o/cqFm7/Noxc0i2LVqM3E0Sy4= diff --git a/node_modules/is-arrayish/LICENSE b/node_modules/is-arrayish/LICENSE new file mode 100644 index 00000000..0a5f461a --- /dev/null +++ b/node_modules/is-arrayish/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 JD Ballard + +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/is-arrayish/README.md b/node_modules/is-arrayish/README.md new file mode 100644 index 00000000..7d360724 --- /dev/null +++ b/node_modules/is-arrayish/README.md @@ -0,0 +1,16 @@ +# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish) +> Determines if an object can be used like an Array + +## Example +```javascript +var isArrayish = require('is-arrayish'); + +isArrayish([]); // true +isArrayish({__proto__: []}); // true +isArrayish({}); // false +isArrayish({length:10}); // false +``` + +## License +Licensed under the [MIT License](http://opensource.org/licenses/MIT). +You can find a copy of it in [LICENSE](LICENSE). diff --git a/node_modules/is-arrayish/index.js b/node_modules/is-arrayish/index.js new file mode 100644 index 00000000..5b971868 --- /dev/null +++ b/node_modules/is-arrayish/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = function isArrayish(obj) { + if (!obj) { + return false; + } + + return obj instanceof Array || Array.isArray(obj) || + (obj.length >= 0 && obj.splice instanceof Function); +}; diff --git a/node_modules/is-arrayish/package.json b/node_modules/is-arrayish/package.json new file mode 100644 index 00000000..8b2d1c30 --- /dev/null +++ b/node_modules/is-arrayish/package.json @@ -0,0 +1,34 @@ +{ + "name": "is-arrayish", + "description": "Determines if an object can be used as an array", + "version": "0.2.1", + "author": "Qix (http://github.com/qix-)", + "keywords": [ + "is", + "array", + "duck", + "type", + "arrayish", + "similar", + "proto", + "prototype", + "type" + ], + "license": "MIT", + "scripts": { + "pretest": "xo", + "test": "mocha --compilers coffee:coffee-script/register" + }, + "repository": { + "type": "git", + "url": "https://github.com/qix-/node-is-arrayish.git" + }, + "devDependencies": { + "coffee-script": "^1.9.3", + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", + "mocha": "^2.2.5", + "should": "^7.0.1", + "xo": "^0.6.1" + } +} diff --git a/node_modules/jiti/LICENSE b/node_modules/jiti/LICENSE new file mode 100644 index 00000000..e739abce --- /dev/null +++ b/node_modules/jiti/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Pooya Parsa + +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/jiti/README.md b/node_modules/jiti/README.md new file mode 100644 index 00000000..0c9cc6b1 --- /dev/null +++ b/node_modules/jiti/README.md @@ -0,0 +1,161 @@ +# jiti + +[![npm version][npm-version-src]][npm-version-href] +[![npm downloads][npm-downloads-src]][npm-downloads-href] +[![bundle][bundle-src]][bundle-href] +[![License][license-src]][license-href] + +Runtime Typescript and ESM support for Node.js + +## Features + +- Seamless typescript and ESM syntax support +- Seamless interoperability between ESM and CommonJS +- Synchronous API to replace `require` +- Super slim and zero dependency +- Smart syntax detection to avoid extra transforms +- CommonJS cache integration +- Filesystem transpile hard cache +- V8 compile cache +- Custom resolve alias + +## Usage + +### Programmatic + +```js +const jiti = require("jiti")(__filename); + +jiti("./path/to/file.ts"); +``` + +You can also pass options as second argument: + +```js +const jiti = require("jiti")(__filename, { debug: true }); +``` + +### CLI + +```bash +jiti index.ts +# or npx jiti index.ts +``` + +### Register require hook + +```bash +node -r jiti/register index.ts +``` + +Alternatively, you can register `jiti` as a require hook programmatically: + +```js +const jiti = require("jiti")(); +const unregister = jiti.register(); +``` + +## Options + +### `debug` + +- Type: Boolean +- Default: `false` +- Environment Variable: `JITI_DEBUG` + +Enable debug to see which files are transpiled + +### `cache` + +- Type: Boolean | String +- Default: `true` +- Environment Variable: `JITI_CACHE` + +Use transpile cache + +If set to `true` will use `node_modules/.cache/jiti` (if exists) or `{TMP_DIR}/node-jiti` + +### `esmResolve` + +- Type: Boolean | String +- Default: `false` +- Environment Variable: `JITI_ESM_RESOLVE` + +Using esm resolution algorithm to support `import` condition. + +### `transform` + +- Type: Function +- Default: Babel (lazy loaded) + +Transform function. See [src/babel](./src/babel.ts) for more details + +### `sourceMaps` + +- Type: Boolean +- Default `false` +- Environment Variable: `JITI_SOURCE_MAPS` + +Add inline source map to transformed source for better debugging. + +### `interopDefault` + +- Type: Boolean +- Default: `false` + +Return the `.default` export of a module at the top-level. + +### `alias` + +- Type: Object +- Default: - +- Environment Variable: `JITI_ALIAS` + +Custom alias map used to resolve ids. + +### `nativeModules` + +- Type: Array +- Default: ['typescript`] +- Environment Variable: `JITI_NATIVE_MODULES` + +List of modules (within `node_modules`) to always use native require for them. + +### `transformModules` + +- Type: Array +- Default: [] +- Environment Variable: `JITI_TRANSFORM_MODULES` + +List of modules (within `node_modules`) to transform them regardless of syntax. + +### `experimentalBun` + +- Type: Boolean +- Default: Enabled if `process.versions.bun` exists (Bun runtime) +- Environment Variable: `JITI_EXPERIMENTAL_BUN` + +Enable experimental native Bun support for transformations. + +## Development + +- Clone this repository +- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` +- Install dependencies using `pnpm install` +- Run `pnpm dev` +- Run `pnpm jiti ./test/path/to/file.ts` + +## License + +MIT. Made with 💖 + + + +[npm-version-src]: https://img.shields.io/npm/v/jiti?style=flat&colorA=18181B&colorB=F0DB4F +[npm-version-href]: https://npmjs.com/package/jiti +[npm-downloads-src]: https://img.shields.io/npm/dm/jiti?style=flat&colorA=18181B&colorB=F0DB4F +[npm-downloads-href]: https://npmjs.com/package/jiti +[bundle-src]: https://img.shields.io/bundlephobia/minzip/jiti?style=flat&colorA=18181B&colorB=F0DB4F +[bundle-href]: https://bundlephobia.com/result?p=h3 +[license-src]: https://img.shields.io/github/license/unjs/jiti.svg?style=flat&colorA=18181B&colorB=F0DB4F +[license-href]: https://github.com/unjs/jiti/blob/main/LICENSE diff --git a/node_modules/jiti/bin/jiti.js b/node_modules/jiti/bin/jiti.js new file mode 100755 index 00000000..af44c47d --- /dev/null +++ b/node_modules/jiti/bin/jiti.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + +const { resolve } = require("path"); + +const script = process.argv.splice(2, 1)[0]; + +if (!script) { + // eslint-disable-next-line no-console + console.error("Usage: jiti [...arguments]"); + process.exit(1); +} + +const pwd = process.cwd(); +const jiti = require("..")(pwd); +const resolved = (process.argv[1] = jiti.resolve(resolve(pwd, script))); +jiti(resolved); diff --git a/node_modules/jiti/dist/babel.d.ts b/node_modules/jiti/dist/babel.d.ts new file mode 100644 index 00000000..ea178d40 --- /dev/null +++ b/node_modules/jiti/dist/babel.d.ts @@ -0,0 +1,2 @@ +import { TransformOptions, TRANSFORM_RESULT } from "./types"; +export default function transform(opts: TransformOptions): TRANSFORM_RESULT; diff --git a/node_modules/jiti/dist/babel.js b/node_modules/jiti/dist/babel.js new file mode 100644 index 00000000..60851488 --- /dev/null +++ b/node_modules/jiti/dist/babel.js @@ -0,0 +1,1885 @@ +(()=>{var __webpack_modules__={"./node_modules/.pnpm/@ampproject+remapping@2.2.1/node_modules/@ampproject/remapping/dist/remapping.umd.js":function(module,__unused_webpack_exports,__webpack_require__){module.exports=function(traceMapping,genMapping){"use strict";const SOURCELESS_MAPPING=SegmentObject("",-1,-1,"",null),EMPTY_SOURCES=[];function SegmentObject(source,line,column,name,content){return{source,line,column,name,content}}function Source(map,sources,source,content){return{map,sources,source,content}}function MapSource(map,sources){return Source(map,sources,"",null)}function OriginalSource(source,content){return Source(null,EMPTY_SOURCES,source,content)}function traceMappings(tree){const gen=new genMapping.GenMapping({file:tree.map.file}),{sources:rootSources,map}=tree,rootNames=map.names,rootMappings=traceMapping.decodedMappings(map);for(let i=0;inew traceMapping.TraceMap(m,""))),map=maps.pop();for(let i=0;i1)throw new Error(`Transformation map ${i} must have exactly one source file.\nDid you specify these with the most recent transformation maps first?`);let tree=build(map,loader,"",0);for(let i=maps.length-1;i>=0;i--)tree=MapSource(maps[i],[tree]);return tree}function build(map,loader,importer,importerDepth){const{resolvedSources,sourcesContent}=map,depth=importerDepth+1;return MapSource(map,resolvedSources.map(((sourceFile,i)=>{const ctx={importer,depth,source:sourceFile||"",content:void 0},sourceMap=loader(ctx.source,ctx),{source,content}=ctx;return sourceMap?build(new traceMapping.TraceMap(sourceMap,source),loader,source,depth):OriginalSource(source,void 0!==content?content:sourcesContent?sourcesContent[i]:null)})))}class SourceMap{constructor(map,options){const out=options.decodedMappings?genMapping.toDecodedMap(map):genMapping.toEncodedMap(map);this.version=out.version,this.file=out.file,this.mappings=out.mappings,this.names=out.names,this.sourceRoot=out.sourceRoot,this.sources=out.sources,options.excludeContent||(this.sourcesContent=out.sourcesContent)}toString(){return JSON.stringify(this)}}function remapping(input,loader,options){const opts="object"==typeof options?options:{excludeContent:!!options,decodedMappings:!1},tree=buildSourceMapTree(input,loader);return new SourceMap(traceMappings(tree),opts)}return remapping}(__webpack_require__("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.19/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"),__webpack_require__("./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.3/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"))},"./node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/config/files lazy recursive":module=>{function webpackEmptyAsyncContext(req){return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}))}webpackEmptyAsyncContext.keys=()=>[],webpackEmptyAsyncContext.resolve=webpackEmptyAsyncContext,webpackEmptyAsyncContext.id="./node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/config/files lazy recursive",module.exports=webpackEmptyAsyncContext},"./node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/config/files sync recursive":module=>{function webpackEmptyContext(req){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/config/files sync recursive",module.exports=webpackEmptyContext},"./node_modules/.pnpm/@babel+plugin-syntax-class-properties@7.12.13_@babel+core@7.22.15/node_modules/@babel/plugin-syntax-class-properties/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _default=(0,__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.22.5/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)((api=>(api.assertVersion(7),{name:"syntax-class-properties",manipulateOptions(opts,parserOpts){parserOpts.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}})));exports.default=_default},"./node_modules/.pnpm/@babel+plugin-syntax-export-namespace-from@7.8.3_@babel+core@7.22.15/node_modules/@babel/plugin-syntax-export-namespace-from/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.Z=void 0;var _default=(0,__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.22.5/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)((api=>(api.assertVersion(7),{name:"syntax-export-namespace-from",manipulateOptions(opts,parserOpts){parserOpts.plugins.push("exportNamespaceFrom")}})));exports.Z=_default},"./node_modules/.pnpm/@babel+plugin-syntax-nullish-coalescing-operator@7.8.3_@babel+core@7.22.15/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.Z=void 0;var _default=(0,__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.22.5/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)((api=>(api.assertVersion(7),{name:"syntax-nullish-coalescing-operator",manipulateOptions(opts,parserOpts){parserOpts.plugins.push("nullishCoalescingOperator")}})));exports.Z=_default},"./node_modules/.pnpm/@babel+plugin-syntax-optional-chaining@7.8.3_@babel+core@7.22.15/node_modules/@babel/plugin-syntax-optional-chaining/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.Z=void 0;var _default=(0,__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.22.5/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)((api=>(api.assertVersion(7),{name:"syntax-optional-chaining",manipulateOptions(opts,parserOpts){parserOpts.plugins.push("optionalChaining")}})));exports.Z=_default},"./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.3/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js":function(__unused_webpack_module,exports,__webpack_require__){!function(exports,setArray,sourcemapCodec,traceMapping){"use strict";const COLUMN=0,SOURCES_INDEX=1,SOURCE_LINE=2,SOURCE_COLUMN=3,NAMES_INDEX=4,NO_NAME=-1;let addSegmentInternal;exports.addSegment=void 0,exports.addMapping=void 0,exports.maybeAddSegment=void 0,exports.maybeAddMapping=void 0,exports.setSourceContent=void 0,exports.toDecodedMap=void 0,exports.toEncodedMap=void 0,exports.fromMap=void 0,exports.allMappings=void 0;class GenMapping{constructor({file,sourceRoot}={}){this._names=new setArray.SetArray,this._sources=new setArray.SetArray,this._sourcesContent=[],this._mappings=[],this.file=file,this.sourceRoot=sourceRoot}}function getLine(mappings,index){for(let i=mappings.length;i<=index;i++)mappings[i]=[];return mappings[index]}function getColumnIndex(line,genColumn){let index=line.length;for(let i=index-1;i>=0&&!(genColumn>=line[i][COLUMN]);index=i--);return index}function insert(array,index,value){for(let i=array.length;i>index;i--)array[i]=array[i-1];array[index]=value}function removeEmptyFinalLines(mappings){const{length}=mappings;let len=length;for(let i=len-1;i>=0&&!(mappings[i].length>0);len=i,i--);lenaddSegmentInternal(!1,map,genLine,genColumn,source,sourceLine,sourceColumn,name,content),exports.maybeAddSegment=(map,genLine,genColumn,source,sourceLine,sourceColumn,name,content)=>addSegmentInternal(!0,map,genLine,genColumn,source,sourceLine,sourceColumn,name,content),exports.addMapping=(map,mapping)=>addMappingInternal(!1,map,mapping),exports.maybeAddMapping=(map,mapping)=>addMappingInternal(!0,map,mapping),exports.setSourceContent=(map,source,content)=>{const{_sources:sources,_sourcesContent:sourcesContent}=map;sourcesContent[setArray.put(sources,source)]=content},exports.toDecodedMap=map=>{const{file,sourceRoot,_mappings:mappings,_sources:sources,_sourcesContent:sourcesContent,_names:names}=map;return removeEmptyFinalLines(mappings),{version:3,file:file||void 0,names:names.array,sourceRoot:sourceRoot||void 0,sources:sources.array,sourcesContent,mappings}},exports.toEncodedMap=map=>{const decoded=exports.toDecodedMap(map);return Object.assign(Object.assign({},decoded),{mappings:sourcemapCodec.encode(decoded.mappings)})},exports.allMappings=map=>{const out=[],{_mappings:mappings,_sources:sources,_names:names}=map;for(let i=0;i{const map=new traceMapping.TraceMap(input),gen=new GenMapping({file:map.file,sourceRoot:map.sourceRoot});return putAll(gen._names,map.names),putAll(gen._sources,map.sources),gen._sourcesContent=map.sourcesContent||map.sources.map((()=>null)),gen._mappings=traceMapping.decodedMappings(map),gen},addSegmentInternal=(skipable,map,genLine,genColumn,source,sourceLine,sourceColumn,name,content)=>{const{_mappings:mappings,_sources:sources,_sourcesContent:sourcesContent,_names:names}=map,line=getLine(mappings,genLine),index=getColumnIndex(line,genColumn);if(!source){if(skipable&&skipSourceless(line,index))return;return insert(line,index,[genColumn])}const sourcesIndex=setArray.put(sources,source),namesIndex=name?setArray.put(names,name):NO_NAME;if(sourcesIndex===sourcesContent.length&&(sourcesContent[sourcesIndex]=null!=content?content:null),!skipable||!skipSource(line,index,sourcesIndex,sourceLine,sourceColumn,namesIndex))return insert(line,index,name?[genColumn,sourcesIndex,sourceLine,sourceColumn,namesIndex]:[genColumn,sourcesIndex,sourceLine,sourceColumn])},exports.GenMapping=GenMapping,Object.defineProperty(exports,"__esModule",{value:!0})}(exports,__webpack_require__("./node_modules/.pnpm/@jridgewell+set-array@1.1.2/node_modules/@jridgewell/set-array/dist/set-array.umd.js"),__webpack_require__("./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.4.15/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"),__webpack_require__("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.19/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"))},"./node_modules/.pnpm/@jridgewell+resolve-uri@3.1.1/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js":function(module){module.exports=function(){"use strict";const schemeRegex=/^[\w+.-]+:\/\//,urlRegex=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,fileRegex=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var UrlType;function isAbsoluteUrl(input){return schemeRegex.test(input)}function isSchemeRelativeUrl(input){return input.startsWith("//")}function isAbsolutePath(input){return input.startsWith("/")}function isFileUrl(input){return input.startsWith("file:")}function isRelative(input){return/^[.?#]/.test(input)}function parseAbsoluteUrl(input){const match=urlRegex.exec(input);return makeUrl(match[1],match[2]||"",match[3],match[4]||"",match[5]||"/",match[6]||"",match[7]||"")}function parseFileUrl(input){const match=fileRegex.exec(input),path=match[2];return makeUrl("file:","",match[1]||"","",isAbsolutePath(path)?path:"/"+path,match[3]||"",match[4]||"")}function makeUrl(scheme,user,host,port,path,query,hash){return{scheme,user,host,port,path,query,hash,type:UrlType.Absolute}}function parseUrl(input){if(isSchemeRelativeUrl(input)){const url=parseAbsoluteUrl("http:"+input);return url.scheme="",url.type=UrlType.SchemeRelative,url}if(isAbsolutePath(input)){const url=parseAbsoluteUrl("http://foo.com"+input);return url.scheme="",url.host="",url.type=UrlType.AbsolutePath,url}if(isFileUrl(input))return parseFileUrl(input);if(isAbsoluteUrl(input))return parseAbsoluteUrl(input);const url=parseAbsoluteUrl("http://foo.com/"+input);return url.scheme="",url.host="",url.type=input?input.startsWith("?")?UrlType.Query:input.startsWith("#")?UrlType.Hash:UrlType.RelativePath:UrlType.Empty,url}function stripPathFilename(path){if(path.endsWith("/.."))return path;const index=path.lastIndexOf("/");return path.slice(0,index+1)}function mergePaths(url,base){normalizePath(base,base.type),"/"===url.path?url.path=base.path:url.path=stripPathFilename(base.path)+url.path}function normalizePath(url,type){const rel=type<=UrlType.RelativePath,pieces=url.path.split("/");let pointer=1,positive=0,addTrailingSlash=!1;for(let i=1;iinputType&&(inputType=baseType)}normalizePath(url,inputType);const queryHash=url.query+url.hash;switch(inputType){case UrlType.Hash:case UrlType.Query:return queryHash;case UrlType.RelativePath:{const path=url.path.slice(1);return path?isRelative(base||input)&&!isRelative(path)?"./"+path+queryHash:path+queryHash:queryHash||"."}case UrlType.AbsolutePath:return url.path+queryHash;default:return url.scheme+"//"+url.user+url.host+url.port+url.path+queryHash}}return function(UrlType){UrlType[UrlType.Empty=1]="Empty",UrlType[UrlType.Hash=2]="Hash",UrlType[UrlType.Query=3]="Query",UrlType[UrlType.RelativePath=4]="RelativePath",UrlType[UrlType.AbsolutePath=5]="AbsolutePath",UrlType[UrlType.SchemeRelative=6]="SchemeRelative",UrlType[UrlType.Absolute=7]="Absolute"}(UrlType||(UrlType={})),resolve}()},"./node_modules/.pnpm/@jridgewell+set-array@1.1.2/node_modules/@jridgewell/set-array/dist/set-array.umd.js":function(__unused_webpack_module,exports){!function(exports){"use strict";exports.get=void 0,exports.put=void 0,exports.pop=void 0;class SetArray{constructor(){this._indexes={__proto__:null},this.array=[]}}exports.get=(strarr,key)=>strarr._indexes[key],exports.put=(strarr,key)=>{const index=exports.get(strarr,key);if(void 0!==index)return index;const{array,_indexes:indexes}=strarr;return indexes[key]=array.push(key)-1},exports.pop=strarr=>{const{array,_indexes:indexes}=strarr;0!==array.length&&(indexes[array.pop()]=void 0)},exports.SetArray=SetArray,Object.defineProperty(exports,"__esModule",{value:!0})}(exports)},"./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.4.15/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js":function(__unused_webpack_module,exports){!function(exports){"use strict";const comma=",".charCodeAt(0),semicolon=";".charCodeAt(0),chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",intToChar=new Uint8Array(64),charToInt=new Uint8Array(128);for(let i=0;iBuffer.from(buf.buffer,buf.byteOffset,buf.byteLength).toString()}:{decode(buf){let out="";for(let i=0;i>>=1,shouldNegate&&(value=-2147483648|-value),state[j]+=value,pos}function hasMoreVlq(mappings,i,length){return!(i>=length)&&mappings.charCodeAt(i)!==comma}function sort(line){line.sort(sortComparator)}function sortComparator(a,b){return a[0]-b[0]}function encode(decoded){const state=new Int32Array(5),bufLength=16384,subLength=bufLength-36,buf=new Uint8Array(bufLength),sub=buf.subarray(0,subLength);let pos=0,out="";for(let i=0;i0&&(pos===bufLength&&(out+=td.decode(buf),pos=0),buf[pos++]=semicolon),0!==line.length){state[0]=0;for(let j=0;jsubLength&&(out+=td.decode(sub),buf.copyWithin(0,subLength,pos),pos-=subLength),j>0&&(buf[pos++]=comma),pos=encodeInteger(buf,pos,state,segment,0),1!==segment.length&&(pos=encodeInteger(buf,pos,state,segment,1),pos=encodeInteger(buf,pos,state,segment,2),pos=encodeInteger(buf,pos,state,segment,3),4!==segment.length&&(pos=encodeInteger(buf,pos,state,segment,4)))}}}return out+td.decode(buf.subarray(0,pos))}function encodeInteger(buf,pos,state,segment,j){const next=segment[j];let num=next-state[j];state[j]=next,num=num<0?-num<<1|1:num<<1;do{let clamped=31#num>>>=5,num>0&&(clamped|=32),buf[pos++]=intToChar[clamped]}while(num>0);return pos}exports.decode=decode,exports.encode=encode,Object.defineProperty(exports,"__esModule",{value:!0})}(exports)},"./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.19/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js":function(__unused_webpack_module,exports,__webpack_require__){!function(exports,sourcemapCodec,resolveUri){"use strict";function _interopDefaultLegacy(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var resolveUri__default=_interopDefaultLegacy(resolveUri);function resolve(input,base){return base&&!base.endsWith("/")&&(base+="/"),resolveUri__default.default(input,base)}function stripFilename(path){if(!path)return"";const index=path.lastIndexOf("/");return path.slice(0,index+1)}const COLUMN=0,SOURCES_INDEX=1,SOURCE_LINE=2,SOURCE_COLUMN=3,NAMES_INDEX=4,REV_GENERATED_LINE=1,REV_GENERATED_COLUMN=2;function maybeSort(mappings,owned){const unsortedIndex=nextUnsortedSegmentLine(mappings,0);if(unsortedIndex===mappings.length)return mappings;owned||(mappings=mappings.slice());for(let i=unsortedIndex;i>1),cmp=haystack[mid][COLUMN]-needle;if(0===cmp)return found=!0,mid;cmp<0?low=mid+1:high=mid-1}return found=!1,low-1}function upperBound(haystack,needle,index){for(let i=index+1;i=0&&haystack[i][COLUMN]===needle;index=i--);return index}function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function memoizedBinarySearch(haystack,needle,state,key){const{lastKey,lastNeedle,lastIndex}=state;let low=0,high=haystack.length-1;if(key===lastKey){if(needle===lastNeedle)return found=-1!==lastIndex&&haystack[lastIndex][COLUMN]===needle,lastIndex;needle>=lastNeedle?low=-1===lastIndex?0:lastIndex:high=lastIndex}return state.lastKey=key,state.lastNeedle=needle,state.lastIndex=binarySearch(haystack,needle,low,high)}function buildBySources(decoded,memos){const sources=memos.map(buildNullArray);for(let i=0;iindex;i--)array[i]=array[i-1];array[index]=value}function buildNullArray(){return{__proto__:null}}const AnyMap=function(map,mapUrl){const parsed="string"==typeof map?JSON.parse(map):map;if(!("sections"in parsed))return new TraceMap(parsed,mapUrl);const mappings=[],sources=[],sourcesContent=[],names=[];recurse(parsed,mapUrl,mappings,sources,sourcesContent,names,0,0,1/0,1/0);const joined={version:3,file:parsed.file,names,sources,sourcesContent,mappings};return exports.presortedDecodedMap(joined)};function recurse(input,mapUrl,mappings,sources,sourcesContent,names,lineOffset,columnOffset,stopLine,stopColumn){const{sections}=input;for(let i=0;istopLine)return;const out=getLine(mappings,lineI),cOffset=0===i?columnOffset:0,line=decoded[i];for(let j=0;j=stopColumn)return;if(1===seg.length){out.push([column]);continue}const sourcesIndex=sourcesOffset+seg[SOURCES_INDEX],sourceLine=seg[SOURCE_LINE],sourceColumn=seg[SOURCE_COLUMN];out.push(4===seg.length?[column,sourcesIndex,sourceLine,sourceColumn]:[column,sourcesIndex,sourceLine,sourceColumn,namesOffset+seg[NAMES_INDEX]])}}}function append(arr,other){for(let i=0;iresolve(s||"",from)));const{mappings}=parsed;"string"==typeof mappings?(this._encoded=mappings,this._decoded=void 0):(this._encoded=void 0,this._decoded=maybeSort(mappings,isString)),this._decodedMemo=memoizedState(),this._bySources=void 0,this._bySourceMemos=void 0}}function clone(map,mappings){return{version:map.version,file:map.file,names:map.names,sourceRoot:map.sourceRoot,sources:map.sources,sourcesContent:map.sourcesContent,mappings}}function OMapping(source,line,column,name){return{source,line,column,name}}function GMapping(line,column){return{line,column}}function traceSegmentInternal(segments,memo,line,column,bias){let index=memoizedBinarySearch(segments,column,memo,line);return found?index=(bias===LEAST_UPPER_BOUND?upperBound:lowerBound)(segments,column,index):bias===LEAST_UPPER_BOUND&&index++,-1===index||index===segments.length?-1:index}function sliceGeneratedPositions(segments,memo,line,column,bias){let min=traceSegmentInternal(segments,memo,line,column,GREATEST_LOWER_BOUND);if(found||bias!==LEAST_UPPER_BOUND||min++,-1===min||min===segments.length)return[];const matchedColumn=found?column:segments[min][COLUMN];found||(min=lowerBound(segments,matchedColumn,min));const max=upperBound(segments,matchedColumn,min),result=[];for(;min<=max;min++){const segment=segments[min];result.push(GMapping(segment[REV_GENERATED_LINE]+1,segment[REV_GENERATED_COLUMN]))}return result}(()=>{function generatedPosition(map,source,line,column,bias,all){if(--line<0)throw new Error(LINE_GTR_ZERO);if(column<0)throw new Error(COL_GTR_EQ_ZERO);const{sources,resolvedSources}=map;let sourceIndex=sources.indexOf(source);if(-1===sourceIndex&&(sourceIndex=resolvedSources.indexOf(source)),-1===sourceIndex)return all?[]:GMapping(null,null);const segments=(map._bySources||(map._bySources=buildBySources(exports.decodedMappings(map),map._bySourceMemos=sources.map(memoizedState))))[sourceIndex][line];if(null==segments)return all?[]:GMapping(null,null);const memo=map._bySourceMemos[sourceIndex];if(all)return sliceGeneratedPositions(segments,memo,line,column,bias);const index=traceSegmentInternal(segments,memo,line,column,bias);if(-1===index)return GMapping(null,null);const segment=segments[index];return GMapping(segment[REV_GENERATED_LINE]+1,segment[REV_GENERATED_COLUMN])}exports.encodedMappings=map=>{var _a;return null!==(_a=map._encoded)&&void 0!==_a?_a:map._encoded=sourcemapCodec.encode(map._decoded)},exports.decodedMappings=map=>map._decoded||(map._decoded=sourcemapCodec.decode(map._encoded)),exports.traceSegment=(map,line,column)=>{const decoded=exports.decodedMappings(map);if(line>=decoded.length)return null;const segments=decoded[line],index=traceSegmentInternal(segments,map._decodedMemo,line,column,GREATEST_LOWER_BOUND);return-1===index?null:segments[index]},exports.originalPositionFor=(map,{line,column,bias})=>{if(--line<0)throw new Error(LINE_GTR_ZERO);if(column<0)throw new Error(COL_GTR_EQ_ZERO);const decoded=exports.decodedMappings(map);if(line>=decoded.length)return OMapping(null,null,null,null);const segments=decoded[line],index=traceSegmentInternal(segments,map._decodedMemo,line,column,bias||GREATEST_LOWER_BOUND);if(-1===index)return OMapping(null,null,null,null);const segment=segments[index];if(1===segment.length)return OMapping(null,null,null,null);const{names,resolvedSources}=map;return OMapping(resolvedSources[segment[SOURCES_INDEX]],segment[SOURCE_LINE]+1,segment[SOURCE_COLUMN],5===segment.length?names[segment[NAMES_INDEX]]:null)},exports.allGeneratedPositionsFor=(map,{source,line,column,bias})=>generatedPosition(map,source,line,column,bias||LEAST_UPPER_BOUND,!0),exports.generatedPositionFor=(map,{source,line,column,bias})=>generatedPosition(map,source,line,column,bias||GREATEST_LOWER_BOUND,!1),exports.eachMapping=(map,cb)=>{const decoded=exports.decodedMappings(map),{names,resolvedSources}=map;for(let i=0;i{const{sources,resolvedSources,sourcesContent}=map;if(null==sourcesContent)return null;let index=sources.indexOf(source);return-1===index&&(index=resolvedSources.indexOf(source)),-1===index?null:sourcesContent[index]},exports.presortedDecodedMap=(map,mapUrl)=>{const tracer=new TraceMap(clone(map,[]),mapUrl);return tracer._decoded=map.mappings,tracer},exports.decodedMap=map=>clone(map,exports.decodedMappings(map)),exports.encodedMap=map=>clone(map,exports.encodedMappings(map))})(),exports.AnyMap=AnyMap,exports.GREATEST_LOWER_BOUND=GREATEST_LOWER_BOUND,exports.LEAST_UPPER_BOUND=LEAST_UPPER_BOUND,exports.TraceMap=TraceMap,Object.defineProperty(exports,"__esModule",{value:!0})}(exports,__webpack_require__("./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.4.15/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"),__webpack_require__("./node_modules/.pnpm/@jridgewell+resolve-uri@3.1.1/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js"))},"./node_modules/.pnpm/babel-plugin-dynamic-import-node@2.3.3/node_modules/babel-plugin-dynamic-import-node/lib/index.js":(module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(api){var transformImport=(0,_utils.createDynamicImportTransform)(api);return{manipulateOptions:function(opts,parserOpts){parserOpts.plugins.push("dynamicImport")},visitor:{Import:function(path){transformImport(this,path)}}}};var _utils=__webpack_require__("./node_modules/.pnpm/babel-plugin-dynamic-import-node@2.3.3/node_modules/babel-plugin-dynamic-import-node/lib/utils.js");module.exports=exports.default},"./node_modules/.pnpm/babel-plugin-dynamic-import-node@2.3.3/node_modules/babel-plugin-dynamic-import-node/lib/utils.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return function(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function getImportSource(t,callNode){var importArguments=callNode.arguments,importPath=_slicedToArray(importArguments,1)[0];return t.isStringLiteral(importPath)||t.isTemplateLiteral(importPath)?(t.removeComments(importPath),importPath):t.templateLiteral([t.templateElement({raw:"",cooked:""}),t.templateElement({raw:"",cooked:""},!0)],importArguments)}exports.getImportSource=getImportSource,exports.createDynamicImportTransform=function(_ref){var template=_ref.template,t=_ref.types,builders={static:{interop:template("Promise.resolve().then(() => INTEROP(require(SOURCE)))"),noInterop:template("Promise.resolve().then(() => require(SOURCE))")},dynamic:{interop:template("Promise.resolve(SOURCE).then(s => INTEROP(require(s)))"),noInterop:template("Promise.resolve(SOURCE).then(s => require(s))")}},visited="function"==typeof WeakSet&&new WeakSet;return function(context,path){if(visited){if(visited.has(path))return;visited.add(path)}var node,SOURCE=getImportSource(t,path.parent),builder=(node=SOURCE,t.isStringLiteral(node)||t.isTemplateLiteral(node)&&0===node.expressions.length?builders.static:builders.dynamic),newImport=context.opts.noInterop?builder.noInterop({SOURCE}):builder.interop({SOURCE,INTEROP:context.addHelper("interopRequireWildcard")});path.parentPath.replaceWith(newImport)}}},"./node_modules/.pnpm/babel-plugin-parameter-decorator@1.0.16/node_modules/babel-plugin-parameter-decorator/lib/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _path=__webpack_require__("path");function isInType(path){switch(path.parent.type){case"TSTypeReference":case"TSQualifiedName":case"TSExpressionWithTypeArguments":case"TSTypeQuery":return!0;default:return!1}}module.exports=function(_ref){var types=_ref.types,decoratorExpressionForConstructor=function(decorator,param){return function(className){var resultantDecorator=types.callExpression(decorator.expression,[types.Identifier(className),types.Identifier("undefined"),types.NumericLiteral(param.key)]),resultantDecoratorWithFallback=types.logicalExpression("||",resultantDecorator,types.Identifier(className)),assignment=types.assignmentExpression("=",types.Identifier(className),resultantDecoratorWithFallback);return types.expressionStatement(assignment)}},decoratorExpressionForMethod=function(decorator,param){return function(className,functionName){var resultantDecorator=types.callExpression(decorator.expression,[types.Identifier("".concat(className,".prototype")),types.StringLiteral(functionName),types.NumericLiteral(param.key)]);return types.expressionStatement(resultantDecorator)}};return{visitor:{Program:function(path,state){var extension=(0,_path.extname)(state.file.opts.filename);".ts"!==extension&&".tsx"!==extension||function(){var decorators=Object.create(null);path.node.body.filter((function(it){var type=it.type,declaration=it.declaration;switch(type){case"ClassDeclaration":return!0;case"ExportNamedDeclaration":case"ExportDefaultDeclaration":return declaration&&"ClassDeclaration"===declaration.type;default:return!1}})).map((function(it){return"ClassDeclaration"===it.type?it:it.declaration})).forEach((function(clazz){clazz.body.body.forEach((function(body){(body.params||[]).forEach((function(param){(param.decorators||[]).forEach((function(decorator){decorator.expression.callee?decorators[decorator.expression.callee.name]=decorator:decorators[decorator.expression.name]=decorator}))}))}))}));var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=path.get("body")[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var stmt=_step.value;if("ImportDeclaration"===stmt.node.type){if(0===stmt.node.specifiers.length)continue;var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_loop=function(){var specifier=_step2.value,binding=stmt.scope.getBinding(specifier.local.name);binding.referencePaths.length?binding.referencePaths.reduce((function(prev,next){return prev||isInType(next)}),!1)&&Object.keys(decorators).forEach((function(k){var decorator=decorators[k];(decorator.expression.arguments||[]).forEach((function(arg){arg.name===specifier.local.name&&binding.referencePaths.push({parent:decorator.expression})}))})):decorators[specifier.local.name]&&binding.referencePaths.push({parent:decorators[specifier.local.name]})},_iterator2=stmt.node.specifiers[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0)_loop()}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{_iteratorNormalCompletion2||null==_iterator2.return||_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}}}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}}()},Function:function(path){var functionName="";path.node.id?functionName=path.node.id.name:path.node.key&&(functionName=path.node.key.name),(path.get("params")||[]).slice().forEach((function(param){var decorators=param.node.decorators||[],transformable=decorators.length;if(decorators.slice().forEach((function(decorator){if("ClassMethod"===path.type){var classIdentifier,parentNode=path.parentPath.parentPath,classDeclaration=path.findParent((function(p){return"ClassDeclaration"===p.type}));if(classDeclaration?classIdentifier=classDeclaration.node.id.name:(parentNode.insertAfter(null),classIdentifier=function(path){var assignment=path.findParent((function(p){return"AssignmentExpression"===p.node.type}));return"SequenceExpression"===assignment.node.right.type?assignment.node.right.expressions[1].name:"ClassExpression"===assignment.node.right.type?assignment.node.left.name:null}(path)),"constructor"===functionName){var expression=decoratorExpressionForConstructor(decorator,param)(classIdentifier);parentNode.insertAfter(expression)}else{var _expression=decoratorExpressionForMethod(decorator,param)(classIdentifier,functionName);parentNode.insertAfter(_expression)}}else{var className=path.findParent((function(p){return"VariableDeclarator"===p.node.type})).node.id.name;if(functionName===className){var _expression2=decoratorExpressionForConstructor(decorator,param)(className);if("body"===path.parentKey)path.insertAfter(_expression2);else path.findParent((function(p){return"body"===p.parentKey})).insertAfter(_expression2)}else{var classParent=path.findParent((function(p){return"CallExpression"===p.node.type})),_expression3=decoratorExpressionForMethod(decorator,param)(className,functionName);classParent.insertAfter(_expression3)}}})),transformable){var replacement=function(path){switch(path.node.type){case"ObjectPattern":return types.ObjectPattern(path.node.properties);case"AssignmentPattern":return types.AssignmentPattern(path.node.left,path.node.right);case"TSParameterProperty":return types.Identifier(path.node.parameter.name);default:return types.Identifier(path.node.name)}}(param);param.replaceWith(replacement)}}))}}}}},"./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.22.15/node_modules/babel-plugin-transform-typescript-metadata/lib/metadata/metadataVisitor.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.metadataVisitor=function(classPath,path){const field=path.node,classNode=classPath.node;switch(field.type){case"ClassMethod":const decorators="constructor"===field.kind?classNode.decorators:field.decorators;if(!decorators||0===decorators.length)return;decorators.push(createMetadataDesignDecorator("design:type",_core.types.identifier("Function"))),decorators.push(createMetadataDesignDecorator("design:paramtypes",_core.types.arrayExpression(field.params.map((param=>(0,_serializeType.serializeType)(classPath,param))))));break;case"ClassProperty":if(!field.decorators||0===field.decorators.length)return;if(!field.typeAnnotation||"TSTypeAnnotation"!==field.typeAnnotation.type)return;field.decorators.push(createMetadataDesignDecorator("design:type",(0,_serializeType.serializeType)(classPath,field)))}};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/index.js"),_serializeType=__webpack_require__("./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.22.15/node_modules/babel-plugin-transform-typescript-metadata/lib/metadata/serializeType.js");function createMetadataDesignDecorator(design,typeArg){return _core.types.decorator(_core.types.callExpression(_core.types.memberExpression(_core.types.identifier("Reflect"),_core.types.identifier("metadata")),[_core.types.stringLiteral(design),typeArg]))}},"./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.22.15/node_modules/babel-plugin-transform-typescript-metadata/lib/metadata/serializeType.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.serializeType=function(classPath,param){const node=getTypedNode(param);if(null==node)return createVoidZero();if(!node.typeAnnotation||"TSTypeAnnotation"!==node.typeAnnotation.type)return createVoidZero();const annotation=node.typeAnnotation.typeAnnotation;return serializeTypeNode(classPath.node.id?classPath.node.id.name:"",annotation)},exports.isClassType=isClassType;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/index.js");function createVoidZero(){return _core.types.unaryExpression("void",_core.types.numericLiteral(0))}function getTypedNode(param){return null==param?null:"ClassProperty"===param.type||"Identifier"===param.type||"ObjectPattern"===param.type?param:"AssignmentPattern"===param.type&&"Identifier"===param.left.type?param.left:"TSParameterProperty"===param.type?getTypedNode(param.parameter):null}function serializeTypeReferenceNode(className,node){const reference=serializeReference(node.typeName);return isClassType(className,reference)?_core.types.identifier("Object"):_core.types.conditionalExpression(_core.types.binaryExpression("===",_core.types.unaryExpression("typeof",reference),_core.types.stringLiteral("undefined")),_core.types.identifier("Object"),_core.types.cloneDeep(reference))}function isClassType(className,node){switch(node.type){case"Identifier":return node.name===className;case"MemberExpression":return isClassType(className,node.object);default:throw new Error(`The property expression at ${node.start} is not valid as a Type to be used in Reflect.metadata`)}}function serializeReference(typeName){return"Identifier"===typeName.type?_core.types.identifier(typeName.name):_core.types.memberExpression(serializeReference(typeName.left),typeName.right)}function serializeTypeNode(className,node){if(void 0===node)return _core.types.identifier("Object");switch(node.type){case"TSVoidKeyword":case"TSUndefinedKeyword":case"TSNullKeyword":case"TSNeverKeyword":return createVoidZero();case"TSParenthesizedType":return serializeTypeNode(className,node.typeAnnotation);case"TSFunctionType":case"TSConstructorType":return _core.types.identifier("Function");case"TSArrayType":case"TSTupleType":return _core.types.identifier("Array");case"TSTypePredicate":case"TSBooleanKeyword":return _core.types.identifier("Boolean");case"TSStringKeyword":return _core.types.identifier("String");case"TSObjectKeyword":return _core.types.identifier("Object");case"TSLiteralType":switch(node.literal.type){case"StringLiteral":return _core.types.identifier("String");case"NumericLiteral":return _core.types.identifier("Number");case"BooleanLiteral":return _core.types.identifier("Boolean");default:throw new Error("Bad type for decorator"+node.literal)}case"TSNumberKeyword":case"TSBigIntKeyword":return _core.types.identifier("Number");case"TSSymbolKeyword":return _core.types.identifier("Symbol");case"TSTypeReference":return serializeTypeReferenceNode(className,node);case"TSIntersectionType":case"TSUnionType":return serializeTypeList(className,node.types);case"TSConditionalType":return serializeTypeList(className,[node.trueType,node.falseType]);case"TSTypeQuery":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTypeLiteral":case"TSAnyKeyword":case"TSUnknownKeyword":case"TSThisType":break;default:throw new Error("Bad type for decorator")}return _core.types.identifier("Object")}function serializeTypeList(className,types){let serializedUnion;for(let typeNode of types){for(;"TSParenthesizedType"===typeNode.type;)typeNode=typeNode.typeAnnotation;if("TSNeverKeyword"===typeNode.type)continue;if("TSNullKeyword"===typeNode.type||"TSUndefinedKeyword"===typeNode.type)continue;const serializedIndividual=serializeTypeNode(className,typeNode);if(_core.types.isIdentifier(serializedIndividual)&&"Object"===serializedIndividual.name)return serializedIndividual;if(serializedUnion){if(!_core.types.isIdentifier(serializedUnion)||!_core.types.isIdentifier(serializedIndividual)||serializedUnion.name!==serializedIndividual.name)return _core.types.identifier("Object")}else serializedUnion=serializedIndividual}return serializedUnion||createVoidZero()}},"./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.22.15/node_modules/babel-plugin-transform-typescript-metadata/lib/parameter/parameterVisitor.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parameterVisitor=function(classPath,path){if("ClassMethod"!==path.type)return;if("ClassMethod"!==path.node.type)return;if("Identifier"!==path.node.key.type)return;const methodPath=path;(methodPath.get("params")||[]).slice().forEach((function(param){let resultantDecorator;null!=("Identifier"===param.node.type||"ObjectPattern"===param.node.type?param.node:"TSParameterProperty"===param.node.type&&"Identifier"===param.node.parameter.type?param.node.parameter:null)&&((param.node.decorators||[]).slice().forEach((function(decorator){"constructor"===methodPath.node.kind?(resultantDecorator=createParamDecorator(param.key,decorator.expression,!0),classPath.node.decorators||(classPath.node.decorators=[]),classPath.node.decorators.push(resultantDecorator)):(resultantDecorator=createParamDecorator(param.key,decorator.expression,!1),methodPath.node.decorators||(methodPath.node.decorators=[]),methodPath.node.decorators.push(resultantDecorator))})),resultantDecorator&&(param.node.decorators=null))}))};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.22.15/node_modules/@babel/core/lib/index.js");function createParamDecorator(paramIndex,decoratorExpression,isConstructor=!1){return _core.types.decorator(_core.types.functionExpression(null,[_core.types.identifier("target"),_core.types.identifier("key")],_core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(decoratorExpression,[_core.types.identifier("target"),_core.types.identifier(isConstructor?"undefined":"key"),_core.types.numericLiteral(paramIndex)]))])))}},"./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.22.15/node_modules/babel-plugin-transform-typescript-metadata/lib/plugin.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.22.5/node_modules/@babel/helper-plugin-utils/lib/index.js"),_parameterVisitor=__webpack_require__("./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.22.15/node_modules/babel-plugin-transform-typescript-metadata/lib/parameter/parameterVisitor.js"),_metadataVisitor=__webpack_require__("./node_modules/.pnpm/babel-plugin-transform-typescript-metadata@0.3.2_@babel+core@7.22.15/node_modules/babel-plugin-transform-typescript-metadata/lib/metadata/metadataVisitor.js"),_default=(0,_helperPluginUtils.declare)((api=>(api.assertVersion(7),{visitor:{Program(programPath){programPath.traverse({ClassDeclaration(path){for(const field of path.get("body").get("body"))"ClassMethod"!==field.type&&"ClassProperty"!==field.type||((0,_parameterVisitor.parameterVisitor)(path,field),(0,_metadataVisitor.metadataVisitor)(path,field));path.parentPath.scope.crawl()}})}}})));exports.default=_default},"./node_modules/.pnpm/convert-source-map@1.9.0/node_modules/convert-source-map/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var decodeBase64,fs=__webpack_require__("fs"),path=__webpack_require__("path");function Converter(sm,opts){(opts=opts||{}).isFileComment&&(sm=function(sm,dir){var r=exports.mapFileCommentRegex.exec(sm),filename=r[1]||r[2],filepath=path.resolve(dir,filename);try{return fs.readFileSync(filepath,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+filepath+"\n"+e)}}(sm,opts.commentFileDir)),opts.hasComment&&(sm=function(sm){return sm.split(",").pop()}(sm)),opts.isEncoded&&(sm=decodeBase64(sm)),(opts.isJSON||opts.isEncoded)&&(sm=JSON.parse(sm)),this.sourcemap=sm}Object.defineProperty(exports,"commentRegex",{get:function(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}}),Object.defineProperty(exports,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}}),decodeBase64="undefined"!=typeof Buffer?"function"==typeof Buffer.from?function(base64){return Buffer.from(base64,"base64").toString()}:function(base64){if("number"==typeof value)throw new TypeError("The value to decode must not be of type number.");return new Buffer(base64,"base64").toString()}:function(base64){return decodeURIComponent(escape(atob(base64)))},Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)},"undefined"!=typeof Buffer?"function"==typeof Buffer.from?Converter.prototype.toBase64=function(){var json=this.toJSON();return Buffer.from(json,"utf8").toString("base64")}:Converter.prototype.toBase64=function(){var json=this.toJSON();if("number"==typeof json)throw new TypeError("The json to encode must not be of type number.");return new Buffer(json,"utf8").toString("base64")}:Converter.prototype.toBase64=function(){var json=this.toJSON();return btoa(unescape(encodeURIComponent(json)))},Converter.prototype.toComment=function(options){var data="sourceMappingURL=data:application/json;charset=utf-8;base64,"+this.toBase64();return options&&options.multiline?"/*# "+data+" */":"//# "+data},Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())},Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error('property "'+key+'" already exists on the sourcemap, use set property instead');return this.setProperty(key,value)},Converter.prototype.setProperty=function(key,value){return this.sourcemap[key]=value,this},Converter.prototype.getProperty=function(key){return this.sourcemap[key]},exports.fromObject=function(obj){return new Converter(obj)},exports.fromJSON=function(json){return new Converter(json,{isJSON:!0})},exports.fromBase64=function(base64){return new Converter(base64,{isEncoded:!0})},exports.fromComment=function(comment){return new Converter(comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),{isEncoded:!0,hasComment:!0})},exports.fromMapFileComment=function(comment,dir){return new Converter(comment,{commentFileDir:dir,isFileComment:!0,isJSON:!0})},exports.fromSource=function(content){var m=content.match(exports.commentRegex);return m?exports.fromComment(m.pop()):null},exports.fromMapFileSource=function(content,dir){var m=content.match(exports.mapFileCommentRegex);return m?exports.fromMapFileComment(m.pop(),dir):null},exports.removeComments=function(src){return src.replace(exports.commentRegex,"")},exports.removeMapFileComments=function(src){return src.replace(exports.mapFileCommentRegex,"")},exports.generateMapFileComment=function(file,options){var data="sourceMappingURL="+file;return options&&options.multiline?"/*# "+data+" */":"//# "+data}},"./node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js":(module,exports,__webpack_require__)=>{exports.formatArgs=function(args){if(args[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+args[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;args.splice(1,0,c,"color: inherit");let index=0,lastC=0;args[0].replace(/%[a-zA-Z%]/g,(match=>{"%%"!==match&&(index++,"%c"===match&&(lastC=index))})),args.splice(lastC,0,c)},exports.save=function(namespaces){try{namespaces?exports.storage.setItem("debug",namespaces):exports.storage.removeItem("debug")}catch(error){}},exports.load=function(){let r;try{r=exports.storage.getItem("debug")}catch(error){}!r&&"undefined"!=typeof process&&"env"in process&&(r=process.env.DEBUG);return r},exports.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},exports.storage=function(){try{return localStorage}catch(error){}}(),exports.destroy=(()=>{let warned=!1;return()=>{warned||(warned=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],exports.log=console.debug||console.log||(()=>{}),module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js")(exports);const{formatters}=module.exports;formatters.j=function(v){try{return JSON.stringify(v)}catch(error){return"[UnexpectedJSONParseError]: "+error.message}}},"./node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function(env){function createDebug(namespace){let prevTime,namespacesCache,enabledCache,enableOverride=null;function debug(...args){if(!debug.enabled)return;const self=debug,curr=Number(new Date),ms=curr-(prevTime||curr);self.diff=ms,self.prev=prevTime,self.curr=curr,prevTime=curr,args[0]=createDebug.coerce(args[0]),"string"!=typeof args[0]&&args.unshift("%O");let index=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,((match,format)=>{if("%%"===match)return"%";index++;const formatter=createDebug.formatters[format];if("function"==typeof formatter){const val=args[index];match=formatter.call(self,val),args.splice(index,1),index--}return match})),createDebug.formatArgs.call(self,args);(self.log||createDebug.log).apply(self,args)}return debug.namespace=namespace,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(namespace),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==enableOverride?enableOverride:(namespacesCache!==createDebug.namespaces&&(namespacesCache=createDebug.namespaces,enabledCache=createDebug.enabled(namespace)),enabledCache),set:v=>{enableOverride=v}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(namespace,delimiter){const newDebug=createDebug(this.namespace+(void 0===delimiter?":":delimiter)+namespace);return newDebug.log=this.log,newDebug}function toNamespace(regexp){return regexp.toString().substring(2,regexp.toString().length-2).replace(/\.\*\?$/,"*")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function(val){if(val instanceof Error)return val.stack||val.message;return val},createDebug.disable=function(){const namespaces=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map((namespace=>"-"+namespace))].join(",");return createDebug.enable(""),namespaces},createDebug.enable=function(namespaces){let i;createDebug.save(namespaces),createDebug.namespaces=namespaces,createDebug.names=[],createDebug.skips=[];const split=("string"==typeof namespaces?namespaces:"").split(/[\s,]+/),len=split.length;for(i=0;i{createDebug[key]=env[key]})),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function(namespace){let hash=0;for(let i=0;i{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"):module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js")},"./node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js":(module,exports,__webpack_require__)=>{const tty=__webpack_require__("tty"),util=__webpack_require__("util");exports.init=function(debug){debug.inspectOpts={};const keys=Object.keys(exports.inspectOpts);for(let i=0;i{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),exports.colors=[6,2,3,4,5,1];try{const supportsColor=__webpack_require__("./node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js");supportsColor&&(supportsColor.stderr||supportsColor).level>=2&&(exports.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(error){}exports.inspectOpts=Object.keys(process.env).filter((key=>/^debug_/i.test(key))).reduce(((obj,key)=>{const prop=key.substring(6).toLowerCase().replace(/_([a-z])/g,((_,k)=>k.toUpperCase()));let val=process.env[key];return val=!!/^(yes|on|true|enabled)$/i.test(val)||!/^(no|off|false|disabled)$/i.test(val)&&("null"===val?null:Number(val)),obj[prop]=val,obj}),{}),module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js")(exports);const{formatters}=module.exports;formatters.o=function(v){return this.inspectOpts.colors=this.useColors,util.inspect(v,this.inspectOpts).split("\n").map((str=>str.trim())).join(" ")},formatters.O=function(v){return this.inspectOpts.colors=this.useColors,util.inspect(v,this.inspectOpts)}},"./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js":module=>{"use strict";const GENSYNC_START=Symbol.for("gensync:v1:start"),GENSYNC_SUSPEND=Symbol.for("gensync:v1:suspend"),GENSYNC_EXPECTED_START="GENSYNC_EXPECTED_START",GENSYNC_EXPECTED_SUSPEND="GENSYNC_EXPECTED_SUSPEND",GENSYNC_OPTIONS_ERROR="GENSYNC_OPTIONS_ERROR";function assertTypeof(type,name,value,allowUndefined){if(typeof value===type||allowUndefined&&void 0===value)return;let msg;throw msg=allowUndefined?`Expected opts.${name} to be either a ${type}, or undefined.`:`Expected opts.${name} to be a ${type}.`,makeError(msg,GENSYNC_OPTIONS_ERROR)}function makeError(msg,code){return Object.assign(new Error(msg),{code})}function buildOperation({name,arity,sync,async}){return setFunctionMetadata(name,arity,(function*(...args){const resume=yield GENSYNC_START;if(!resume){return sync.call(this,args)}let result;try{async.call(this,args,(value=>{result||(result={value},resume())}),(err=>{result||(result={err},resume())}))}catch(err){result={err},resume()}if(yield GENSYNC_SUSPEND,result.hasOwnProperty("err"))throw result.err;return result.value}))}function evaluateSync(gen){let value;for(;!({value}=gen.next()).done;)assertStart(value,gen);return value}function evaluateAsync(gen,resolve,reject){!function step(){try{let value;for(;!({value}=gen.next()).done;){assertStart(value,gen);let sync=!0,didSyncResume=!1;const out=gen.next((()=>{sync?didSyncResume=!0:step()}));if(sync=!1,assertSuspend(out,gen),!didSyncResume)return}return resolve(value)}catch(err){return reject(err)}}()}function assertStart(value,gen){value!==GENSYNC_START&&throwError(gen,makeError(`Got unexpected yielded value in gensync generator: ${JSON.stringify(value)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,GENSYNC_EXPECTED_START))}function assertSuspend({value,done},gen){(done||value!==GENSYNC_SUSPEND)&&throwError(gen,makeError(done?"Unexpected generator completion. If you get this, it is probably a gensync bug.":`Expected GENSYNC_SUSPEND, got ${JSON.stringify(value)}. If you get this, it is probably a gensync bug.`,GENSYNC_EXPECTED_SUSPEND))}function throwError(gen,err){throw gen.throw&&gen.throw(err),err}function setFunctionMetadata(name,arity,fn){if("string"==typeof name){const nameDesc=Object.getOwnPropertyDescriptor(fn,"name");nameDesc&&!nameDesc.configurable||Object.defineProperty(fn,"name",Object.assign(nameDesc||{},{configurable:!0,value:name}))}if("number"==typeof arity){const lengthDesc=Object.getOwnPropertyDescriptor(fn,"length");lengthDesc&&!lengthDesc.configurable||Object.defineProperty(fn,"length",Object.assign(lengthDesc||{},{configurable:!0,value:arity}))}return fn}module.exports=Object.assign((function(optsOrFn){let genFn=optsOrFn;return genFn="function"!=typeof optsOrFn?function({name,arity,sync,async,errback}){if(assertTypeof("string","name",name,!0),assertTypeof("number","arity",arity,!0),assertTypeof("function","sync",sync),assertTypeof("function","async",async,!0),assertTypeof("function","errback",errback,!0),async&&errback)throw makeError("Expected one of either opts.async or opts.errback, but got _both_.",GENSYNC_OPTIONS_ERROR);if("string"!=typeof name){let fnName;errback&&errback.name&&"errback"!==errback.name&&(fnName=errback.name),async&&async.name&&"async"!==async.name&&(fnName=async.name.replace(/Async$/,"")),sync&&sync.name&&"sync"!==sync.name&&(fnName=sync.name.replace(/Sync$/,"")),"string"==typeof fnName&&(name=fnName)}"number"!=typeof arity&&(arity=sync.length);return buildOperation({name,arity,sync:function(args){return sync.apply(this,args)},async:function(args,resolve,reject){async?async.apply(this,args).then(resolve,reject):errback?errback.call(this,...args,((err,value)=>{null==err?resolve(value):reject(err)})):resolve(sync.apply(this,args))}})}(optsOrFn):function(genFn){return setFunctionMetadata(genFn.name,genFn.length,(function(...args){return genFn.apply(this,args)}))}(optsOrFn),Object.assign(genFn,function(genFn){const fns={sync:function(...args){return evaluateSync(genFn.apply(this,args))},async:function(...args){return new Promise(((resolve,reject)=>{evaluateAsync(genFn.apply(this,args),resolve,reject)}))},errback:function(...args){const cb=args.pop();if("function"!=typeof cb)throw makeError("Asynchronous function called without callback","GENSYNC_ERRBACK_NO_CALLBACK");let gen;try{gen=genFn.apply(this,args)}catch(err){return void cb(err)}evaluateAsync(gen,(val=>cb(void 0,val)),(err=>cb(err)))}};return fns}(genFn))}),{all:buildOperation({name:"all",arity:1,sync:function(args){return Array.from(args[0]).map((item=>evaluateSync(item)))},async:function(args,resolve,reject){const items=Array.from(args[0]);if(0===items.length)return void Promise.resolve().then((()=>resolve([])));let count=0;const results=items.map((()=>{}));items.forEach(((item,i)=>{evaluateAsync(item,(val=>{results[i]=val,count+=1,count===results.length&&resolve(results)}),reject)}))}}),race:buildOperation({name:"race",arity:1,sync:function(args){const items=Array.from(args[0]);if(0===items.length)throw makeError("Must race at least 1 item","GENSYNC_RACE_NONEMPTY");return evaluateSync(items[0])},async:function(args,resolve,reject){const items=Array.from(args[0]);if(0===items.length)throw makeError("Must race at least 1 item","GENSYNC_RACE_NONEMPTY");for(const item of items)evaluateAsync(item,resolve,reject)}})})},"./node_modules/.pnpm/globals@11.12.0/node_modules/globals/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/.pnpm/globals@11.12.0/node_modules/globals/globals.json")},"./node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js":module=>{"use strict";module.exports=(flag,argv=process.argv)=>{const prefix=flag.startsWith("-")?"":1===flag.length?"-":"--",position=argv.indexOf(prefix+flag),terminatorPosition=argv.indexOf("--");return-1!==position&&(-1===terminatorPosition||position{"use strict";const object={},hasOwnProperty=object.hasOwnProperty,forOwn=(object,callback)=>{for(const key in object)hasOwnProperty.call(object,key)&&callback(key,object[key])},toString=object.toString,isArray=Array.isArray,isBuffer=Buffer.isBuffer,singleEscapes={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},regexSingleEscape=/["'\\\b\f\n\r\t]/,regexDigit=/[0-9]/,regexWhitelist=/[ !#-&\(-\[\]-_a-~]/,jsesc=(argument,options)=>{const increaseIndentation=()=>{oldIndent=indent,++options.indentLevel,indent=options.indent.repeat(options.indentLevel)},defaults={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},json=options&&options.json;var destination,source;json&&(defaults.quotes="double",defaults.wrap=!0),destination=defaults,"single"!=(options=(source=options)?(forOwn(source,((key,value)=>{destination[key]=value})),destination):destination).quotes&&"double"!=options.quotes&&"backtick"!=options.quotes&&(options.quotes="single");const quote="double"==options.quotes?'"':"backtick"==options.quotes?"`":"'",compact=options.compact,lowercaseHex=options.lowercaseHex;let indent=options.indent.repeat(options.indentLevel),oldIndent="";const inline1=options.__inline1__,inline2=options.__inline2__,newLine=compact?"":"\n";let result,isEmpty=!0;const useBinNumbers="binary"==options.numbers,useOctNumbers="octal"==options.numbers,useDecNumbers="decimal"==options.numbers,useHexNumbers="hexadecimal"==options.numbers;if(json&&argument&&(value=>"function"==typeof value)(argument.toJSON)&&(argument=argument.toJSON()),!(value=>"string"==typeof value||"[object String]"==toString.call(value))(argument)){if((value=>"[object Map]"==toString.call(value))(argument))return 0==argument.size?"new Map()":(compact||(options.__inline1__=!0,options.__inline2__=!1),"new Map("+jsesc(Array.from(argument),options)+")");if((value=>"[object Set]"==toString.call(value))(argument))return 0==argument.size?"new Set()":"new Set("+jsesc(Array.from(argument),options)+")";if(isBuffer(argument))return 0==argument.length?"Buffer.from([])":"Buffer.from("+jsesc(Array.from(argument),options)+")";if(isArray(argument))return result=[],options.wrap=!0,inline1&&(options.__inline1__=!1,options.__inline2__=!0),inline2||increaseIndentation(),((array,callback)=>{const length=array.length;let index=-1;for(;++index{isEmpty=!1,inline2&&(options.__inline2__=!1),result.push((compact||inline2?"":indent)+jsesc(value,options))})),isEmpty?"[]":inline2?"["+result.join(", ")+"]":"["+newLine+result.join(","+newLine)+newLine+(compact?"":oldIndent)+"]";if(!(value=>"number"==typeof value||"[object Number]"==toString.call(value))(argument))return(value=>"[object Object]"==toString.call(value))(argument)?(result=[],options.wrap=!0,increaseIndentation(),forOwn(argument,((key,value)=>{isEmpty=!1,result.push((compact?"":indent)+jsesc(key,options)+":"+(compact?"":" ")+jsesc(value,options))})),isEmpty?"{}":"{"+newLine+result.join(","+newLine)+newLine+(compact?"":oldIndent)+"}"):json?JSON.stringify(argument)||"null":String(argument);if(json)return JSON.stringify(argument);if(useDecNumbers)return String(argument);if(useHexNumbers){let hexadecimal=argument.toString(16);return lowercaseHex||(hexadecimal=hexadecimal.toUpperCase()),"0x"+hexadecimal}if(useBinNumbers)return"0b"+argument.toString(2);if(useOctNumbers)return"0o"+argument.toString(8)}const string=argument;let index=-1;const length=string.length;for(result="";++index=55296&&first<=56319&&length>index+1){const second=string.charCodeAt(index+1);if(second>=56320&&second<=57343){let hexadecimal=(1024*(first-55296)+second-56320+65536).toString(16);lowercaseHex||(hexadecimal=hexadecimal.toUpperCase()),result+="\\u{"+hexadecimal+"}",++index;continue}}}if(!options.escapeEverything){if(regexWhitelist.test(character)){result+=character;continue}if('"'==character){result+=quote==character?'\\"':character;continue}if("`"==character){result+=quote==character?"\\`":character;continue}if("'"==character){result+=quote==character?"\\'":character;continue}}if("\0"==character&&!json&&!regexDigit.test(string.charAt(index+1))){result+="\\0";continue}if(regexSingleEscape.test(character)){result+=singleEscapes[character];continue}const charCode=character.charCodeAt(0);if(options.minimal&&8232!=charCode&&8233!=charCode){result+=character;continue}let hexadecimal=charCode.toString(16);lowercaseHex||(hexadecimal=hexadecimal.toUpperCase());const longhand=hexadecimal.length>2||json,escaped="\\"+(longhand?"u":"x")+("0000"+hexadecimal).slice(longhand?-4:-2);result+=escaped}return options.wrap&&(result=quote+result+quote),"`"==quote&&(result=result.replace(/\$\{/g,"\\${")),options.isScriptContext?result.replace(/<\/(script|style)/gi,"<\\/$1").replace(/ + +``` + +If you’re like me, you stopped supporting IE8 years ago. Yet, here you are, satisfying another client that somehow managed to get this requirement past you. + +### Flatten Media Queries + +Resolve media queries for a desktop experience. + +```css +/* before */ + +body { + font-size: 12px; +} + +@media screen and (max-width: 767px) { + body { + font-size: 16px; + } +} + +@media screen and (min-width: 768px) { + body { + color: #444; + } +} + +/* after */ + +body { + font-size: 12px; +} + +body { + color: #444; +} +``` + +### Replace :root + +Swap `:root` selectors with `html` selectors. + +```css +/* before */ + +:root { + background-color: black; + color: white; +} + +/* after */ + +html { + background-color: black; + color: white; +} +``` + +### Reduce calc() + +Reduce `calc()` references whenever possible. + +```css +/* before */ + +.banner { + font-size: calc(16px * 3); +} + +/* after */ + +.banner { + font-size: 48px; +} +``` + +### Resolve rem + +Resolve `rem` values as standard pixels. + +```css +/* before */ + +.container { + margin-top: 2.5rem; +} + +/* after */ + +.container { + margin-top: 40px; +} +``` + +### Uphold opacity + +Swap `opacity` properties with IE8 compatible `filter` properties. + +```css +/* before */ + +.figure { + opacity: .5; +} + +/* after */ + +.figure { + filter: alpha(opacity=50); +} +``` + +### Patch pseudo-elements + +Swap `::` selectors with IE8 compatible `:` selectors. + +```css +/* before */ + +a::after { + content: " (" attr(href) ")"; +} + +/* after */ + +a:after { + content: " (" attr(href) ")"; +} +``` + +### Retain rgba colors + +Swap `rgba` values with IE8 compatible hex values and filter properties. + +```css +/* before */ + +.hero { + background-color: rgba(153, 221, 153, .8); + border: solid 1px rgba(100, 102, 103, .3); +} + +/* after */ + +.hero { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#8099dd99',endColorstr='#8099dd99'); + border: solid 1px #646667; +} +``` + +### Forget :not + +Remove `:not()` selectors while preserving the other selectors in a rule. + +```css +/* before */ + +.a, .b:not(.c), d { + color: red; +} + +/* after */ + +.a, .d { + color: red; +} +``` + +### Salvage :nth-child + +Swap `:nth-child` selectors with `:first-child`. + +```css +/* before */ + +.container > p:nth-child(4).specific > span { + font-weight: bold; +} + +/* after */ + +.container > :first-child + * + * + p.specific > span { + font-weight: bold; +} +``` + +## Plugins + +[Oldie] is powered by the following plugins: + +- [PostCSS Calc](https://github.com/postcss/postcss-calc) +- [PostCSS UnMQ](https://github.com/jonathantneal/postcss-unmq) +- [PostCSS UnRoot](https://github.com/jonathantneal/postcss-unroot) +- [PostCSS UnNth](https://github.com/jonathantneal/postcss-unnth) +- [PostCSS UnNot](https://github.com/jonathantneal/postcss-unnot) +- [PostCSS UnOpacity](https://github.com/jonathantneal/postcss-unopacity) +- [PostCSS UnRGBA](https://github.com/jonathantneal/postcss-unrgba) +- [PostCSS Pixrem](https://github.com/robwierzbowski/node-pixrem) +- [PostCSS Pseudo Elements](https://github.com/axa-ch/postcss-pseudoelements) + +Some of these plugins have more features than are described here. Visit their project pages to learn more about them individually. + +## Usage + +Follow these steps to use [Oldie]. + +Add [Oldie] to your build tool: + +```bash +npm install oldie --save-dev +``` + +#### Node + +```js +require('oldie')({ /* options */ }).process(YOUR_CSS); +``` + +#### PostCSS + +Add [PostCSS] to your build tool: + +```bash +npm install postcss --save-dev +``` + +Load [Oldie] as a PostCSS plugin: + +```js +postcss([ + require('oldie')({ /* options */ }) +]); +``` + +#### Gulp + +Add [Gulp PostCSS] to your build tool: + +```bash +npm install gulp-postcss --save-dev +``` + +Enable [Oldie] within your Gulpfile: + +```js +var postcss = require('gulp-postcss'); + +gulp.task('css', function () { + return gulp.src('./css/src/*.css').pipe( + postcss([ + require('oldie')({ /* options */ }) + ]) + ).pipe( + gulp.dest('./css') + ); +}); +``` + +#### Grunt + +Add [Grunt PostCSS] to your build tool: + +```bash +npm install grunt-postcss --save-dev +``` + +Enable [Oldie] within your Gruntfile: + +```js +grunt.loadNpmTasks('grunt-postcss'); + +grunt.initConfig({ + postcss: { + options: { + processors: [ + require('oldie')({ /* options */ }) + ] + }, + dist: { + src: 'css/*.css' + } + } +}); +``` + +## Options + +Each plugin’s options may be configured by targeting the plugin’s namespace. Any plugins may be disabled by giving them a `disable` property. + +Example: +```js +require('oldie')({ + rgba: { + filter: true + }, + rem: { + replace: false + }, + unmq: { + disable: true + } +}) +``` + +[ci]: https://travis-ci.org/jonathantneal/oldie +[ci-img]: https://travis-ci.org/jonathantneal/oldie.svg +[Gulp PostCSS]: https://github.com/postcss/gulp-postcss +[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss +[PostCSS]: https://github.com/postcss/postcss +[Oldie]: https://github.com/jonathantneal/oldie diff --git a/node_modules/oldie/index.js b/node_modules/oldie/index.js new file mode 100644 index 00000000..557b2d5c --- /dev/null +++ b/node_modules/oldie/index.js @@ -0,0 +1,71 @@ +var assign = require('object-assign'); +var postcss = require('postcss'); + +var processors = [ + { + plugin: require('postcss-calc'), + namespace: 'calc', + defaults: {} + }, + { + plugin: require('postcss-unmq'), + namespace: 'media', + defaults: {} + }, + { + plugin: require('postcss-unroot'), + namespace: 'root', + defaults: {} + }, + { + plugin: require('postcss-unnth'), + namespace: 'nth', + defaults: {} + }, + { + plugin: require('postcss-unnot'), + namespace: 'not', + defaults: {} + }, + { + plugin: require('postcss-unopacity'), + namespace: 'opacity', + defaults: {} + }, + { + plugin: require('postcss-unrgba'), + namespace: 'rgba', + defaults: {} + }, + { + plugin: require('pixrem'), + namespace: 'rem', + defaults: { + replace: true + } + }, + { + plugin: require('postcss-pseudoelements'), + namespace: 'pseudo', + defaults: {} + } +]; + +module.exports = postcss.plugin('oldie', function (opts) { + opts = assign({}, opts); + + var instance = postcss(); + + processors.forEach(function (processor) { + var namespaceOptions = processor.namespace in opts ? opts[processor.namespace] : opts; + var processorOptions = {}; + + processorOptions = assign({}, processor.defaults, namespaceOptions); + + if (namespaceOptions && !processorOptions.disable) { + instance.use(processor.plugin(processorOptions)); + } + }); + + return instance; +}); diff --git a/node_modules/oldie/node_modules/ansi-styles/index.js b/node_modules/oldie/node_modules/ansi-styles/index.js new file mode 100644 index 00000000..78945278 --- /dev/null +++ b/node_modules/oldie/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/node_modules/oldie/node_modules/ansi-styles/license b/node_modules/oldie/node_modules/ansi-styles/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/oldie/node_modules/ansi-styles/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/oldie/node_modules/ansi-styles/package.json b/node_modules/oldie/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..78c535f7 --- /dev/null +++ b/node_modules/oldie/node_modules/ansi-styles/package.json @@ -0,0 +1,50 @@ +{ + "name": "ansi-styles", + "version": "2.2.1", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/oldie/node_modules/ansi-styles/readme.md b/node_modules/oldie/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..3f933f61 --- /dev/null +++ b/node_modules/oldie/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/oldie/node_modules/browserslist/CHANGELOG.md b/node_modules/oldie/node_modules/browserslist/CHANGELOG.md new file mode 100644 index 00000000..5e895bcb --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/CHANGELOG.md @@ -0,0 +1,135 @@ +# Change Log +This project adheres to [Semantic Versioning](http://semver.org/). + +## 1.7.7 +* Update Firefox ESR. + +## 1.7.6 +* Fix Android Chrome selection. + +## 1.7.5 +* Fix combining `not` query with country based statistics. +* Fix `--env` argument in CLI (by Tuure Savuoja). + +## 1.7.4 +* Speed up browser sorting (by Aarni Koskela). + +## 1.7.3 +* Fix config finding when directory was passed to `path` (by Aarni Koskela). + +## 1.7.2 +* Fix config finding algorithm (by Aarni Koskela). + +## 1.7.1 +* Fix unreleased browsers version detection. + +## 1.7 +* Add `--config` and `--env` arguments to CLI (by Jarek Rencz). + +## 1.6 +* Convert Electron version to Chrome (by Kilian Valkhof). +* Fix `0` version mistake in Can I Use data. + +## 1.5.2 +* Fix browser versions ordering (by Marco Massarotto). + +## 1.5.1 +* Fix error on `package.json` and `browserslist` in same directory. + +## 1.5 +* Add `package.json` support (by Stepan Kuzmin). +* Add environments support (by Maksim Semenov and openlibser). +* Add `browserslist-stats.json` file support (by Oleh Aloshkin). +* Add `config` option to CLI (by Evilebot Tnawi). +* Add JSDoc. +* Fix tests on Windows (by Anna Stoliar). +* Don’t set custom usage statistics globally. + +## 1.4 +* Add `defaults` keyword. + +## 1.3.6 +* Add `UCAndroid` alias to `and_uc` (by Evilebot Tnawi). + +## 1.3.5 +* Fix Opera Mini support. Use `op_mini all`. + +## 1.3.4 +* Add space-less `>1%` and `>.5%` syntax support (by Andreas Lind). + +## 1.3.3 +* Clean `0` versions in some country-based requests. + +## 1.3.2 +* Update Firefox ESR. + +## 1.3.1 +* Add Safari TP support. + +## 1.3 +* Add coverage for specific country (by Joshua Wise). + +## 1.2 +* Add `browserslist.coverage()` method. +* Add `--coverage` and `-c` argument to CLI. +* Add `-v` argument support to CLI. +* Better error handling in CLI. + +## 1.1.3 +* Fix jspm support (by Sean Anderson). + +## 1.1.2 +* Fix jspm support (by Sean Anderson). + +## 1.1.1 +* Fix space-less `>10%` and `>10% in my stats` queries. +* Normalize error messages. +* Remove development files from npm package. + +## 1.1 +* Added query against custom browser usage data (by Daniel Rey). + +## 1.0.1 +* Update Firefox ESR (by Rouven Weßling). + +## 1.0 +* Remove Opera 12.1 from default query. +* Add `not` keyword and exclude browsers by query. +* Add Microsoft Edge support (by Andrey Polischuk). +* Add CLI for debug and non-JS usage (by Luke Horvat). +* Use own class in Browserslist errors. + +## 0.5 +* Add version ranges `IE 6-9` (by Ben Briggs). + +## 0.4 +* Add `config` option and `BROWSERSLIST_CONFIG` environment variable support. +* Add symlink config support. + +## 0.3.3 +* Fix DynJS compatibility (by Nick Howes). + +## 0.3.2 +* Fix joined versions on versions query (by Vincent De Oliveira). + +## 0.3.1 +* Fix global variable leak (by Peter Müller). + +## 0.3 +* Takes queries from `BROWSERSLIST` environment variable. + +## 0.2 +* Return Can I Use joined versions as `ios_saf 7.0-7.1`. + +## 0.1.3 +* Better work with Can I Use joined versions like `ios_saf 7.0-7.1`. +* Browserslist now understands `ios_saf 7.0` or `ios_saf 7`. + +## 0.1.2 +* Do not create global `browserslist` var (by Maxime Thirouin). + +## 0.1.1 +* Sort browsers by name and version. + +## 0.1 +* Initial release. diff --git a/node_modules/oldie/node_modules/browserslist/LICENSE b/node_modules/oldie/node_modules/browserslist/LICENSE new file mode 100644 index 00000000..1ae47a20 --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright 2014 Andrey Sitnik + +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/oldie/node_modules/browserslist/README.md b/node_modules/oldie/node_modules/browserslist/README.md new file mode 100644 index 00000000..0de38817 --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/README.md @@ -0,0 +1,331 @@ +# Browserslist + +Library to share supported browsers list between different front-end tools. +It is used in [Autoprefixer], [Stylelint], [eslint-plugin-compat] +and [babel-env-preset]. + +All tools that rely on Browserslist will find its config automatically, +when you add the following to `package.json`: + +```json +{ + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} +``` + +Or in `browserslist` config: + +```yaml +# Browsers that we support + +> 1% +Last 2 versions +IE 10 # sorry +``` + +Developers set browsers list in queries like `last 2 version` +to be free from updating browser versions manually. +Browserslist will use [Can i Use] data for this queries. + +Browserslist will take browsers queries from tool option, +`browserslist` config, `browserslist` section in `package.json` +or environment variables. + +You can test Browserslist queries in [online demo]. + + + Sponsored by Evil Martians + + +[eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat +[babel-env-preset]: https://github.com/babel/babel-preset-env +[Autoprefixer]: https://github.com/postcss/autoprefixer +[online demo]: http://browserl.ist/ +[Stylelint]: http://stylelint.io/ +[Can I Use]: http://caniuse.com/ + +## Queries + +Browserslist will use browsers query from one of this sources: + +1. Tool options. For example `browsers` option in Autoprefixer. +2. `BROWSERSLIST` environment variable. +3. `browserslist` config file in current or parent directories. +4. `browserslist` key in `package.json` file in current or parent directories. +5. If the above methods did not produce a valid result + Browserslist will use defaults: `> 1%, last 2 versions, Firefox ESR`. + +We recommend to write queries in `browserslist` config or `package.json`. + +You can specify the versions by queries (case insensitive): + +* `last 2 versions`: the last 2 versions for each major browser. +* `last 2 Chrome versions`: the last 2 versions of Chrome browser. +* `> 5%`: versions selected by global usage statistics. +* `> 5% in US`: uses USA usage statistics. It accepts [two-letter country code]. +* `> 5% in my stats`: uses [custom usage data]. +* `ie 6-8`: selects an inclusive range of versions. +* `Firefox > 20`: versions of Firefox newer than 20. +* `Firefox >= 20`: versions of Firefox newer than or equal to 20. +* `Firefox < 20`: versions of Firefox less than 20. +* `Firefox <= 20`: versions of Firefox less than or equal to 20. +* `Firefox ESR`: the latest [Firefox ESR] version. +* `iOS 7`: the iOS browser version 7 directly. +* `not ie <= 8`: exclude browsers selected before by previous queries. + You can add `not ` to any query. + +Browserslist works with separated versions of browsers. +You should avoid queries like `Firefox > 0`. + +Multiple criteria are combined as a boolean `OR`. A browser version must match +at least one of the criteria to be selected. + +All queries are based on the [Can I Use] support table, +e.g. `last 3 iOS versions` might select `8.4, 9.2, 9.3` (mixed major and minor), +whereas `last 3 Chrome versions` might select `50, 49, 48` (major only). + +[two-letter country code]: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements +[custom usage data]: #custom-usage-data +[Can I Use]: http://caniuse.com/ + +## Browsers + +Names are case insensitive: + +### Major Browsers + +* `Chrome` for Google Chrome. +* `Firefox` or `ff` for Mozilla Firefox. +* `Explorer` or `ie` for Internet Explorer. +* `Edge` for Microsoft Edge. +* `iOS` or `ios_saf` for iOS Safari. +* `Opera` for Opera. +* `Safari` for desktop Safari. +* `ExplorerMobile` or `ie_mob` for Internet Explorer Mobile. + +### Others + +* `Android` for Android WebView. +* `BlackBerry` or `bb` for Blackberry browser. +* `ChromeAndroid` or `and_chr` for Chrome for Android + (in Other section, because mostly same as common `Chrome`). +* `FirefoxAndroid` or `and_ff` for Firefox for Android. +* `OperaMobile` or `op_mob` for Opera Mobile. +* `OperaMini` or `op_mini` for Opera Mini. +* `Samsung` for Samsung Internet. +* `UCAndroid` or `and_uc` for UC Browser for Android. +* `Electron` for Electron framework. It will be converted to Chrome version. + +### Electron + +[`electron-to-chromium`](https://www.npmjs.com/package/electron-to-chromium) +could return a compatible Browserslist query +for your (major) Electron version: + +```js +const e2c = require('electron-to-chromium') +autoprefixer({ + browsers: e2c.electronToBrowserList('1.4') //=> "Chrome >= 53" +}) +``` + +## Config File + +Browserslist config should be named `browserslist` and have browsers queries +split by a new line. Comments starts with `#` symbol: + +```yaml +# Browsers that we support + +> 1% +Last 2 versions +IE 8 # sorry +``` + +Browserslist will check config in every directory in `path`. +So, if tool process `app/styles/main.css`, you can put config to root, +`app/` or `app/styles`. + +You can specify direct path in `BROWSERSLIST_CONFIG` environment variables. + +## `package.json` + +If you want to reduce config files in project root, you can specify +browsers in `package.json` with `browserslist` key: + +```js +{ + "private": true, + "dependencies": { + "autoprefixer": "^6.5.4" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} +``` + +## Environments + +You can also specify different browser queries for various environments. +Browserslist will choose query according to `BROWSERSLIST_ENV` or `NODE_ENV` +variables. If none of them is declared, Browserslist will firstly look +for `development` queries and then use defaults. + +In `package.json`: + +```js +{ + … + "browserslist": { + "production": [ + "last 2 version", + "ie 9" + ], + "development": [ + "last 1 version" + ] + } +} +``` + +In `browserslist` config: + +```ini +[production] +last 2 version +ie 9 + +[development] +last 1 version +``` + +## Environment Variables + +If some tool use Browserslist inside, you can change browsers settings +by [environment variables]: + +* `BROWSERSLIST` with browsers queries. + + ```sh + BROWSERSLIST="> 5%" gulp css + ``` + +* `BROWSERSLIST_CONFIG` with path to config file. + + ```sh + BROWSERSLIST_CONFIG=./config/browserslist gulp css + ``` + +* `BROWSERSLIST_ENV` with environments string. + + ```sh + BROWSERSLIST_ENV="development" gulp css + ``` + +* `BROWSERSLIST_STATS` with path to the custom usage data + for `> 1% in my stats` query. + + ```sh + BROWSERSLIST_STATS=./config/usage_data.json gulp css + ``` + +[environment variables]: https://en.wikipedia.org/wiki/Environment_variable + +## Custom Usage Data + +If you have a website, you can query against the usage statistics of your site: + +1. Import your Google Analytics data into [Can I Use]. + Press `Import…` button in Settings page. +2. Open browser DevTools on [Can I Use] and paste this snippet + into the browser console: + + ```js + var e=document.createElement('a');e.setAttribute('href', 'data:text/plain;charset=utf-8,'+encodeURIComponent(JSON.stringify(JSON.parse(localStorage['usage-data-by-id'])[localStorage['config-primary_usage']])));e.setAttribute('download','stats.json');document.body.appendChild(e);e.click();document.body.removeChild(e); + ``` +3. Save the data to a `browserslist-stats.json` file in your project. + +Of course, you can generate usage statistics file by any other method. +File format should be like: + +```js +{ + "ie": { + "6": 0.01, + "7": 0.4, + "8": 1.5 + }, + "chrome": { + … + }, + … +} +``` + +Note that you can query against your custom usage data +while also querying against global or regional data. +For example, the query `> 1% in my stats, > 5% in US, 10%` is permitted. + +[Can I Use]: http://caniuse.com/ + +## JS API + +```js +var browserslist = require('browserslist'); + +// Your CSS/JS build tool code +var process = function (source, opts) { + var browsers = browserslist(opts.browsers, { + stats: opts.stats, + path: opts.file, + env: opts.env + }); + // Your code to add features for selected browsers +} +``` + +Queries can be a string `"> 5%, last 1 version"` +or an array `['> 5%', 'last 1 version']`. + +If a query is missing, Browserslist will look for a config file. +You can provide a `path` option (that can be a file) to find the config file +relatively to it. + +For non-JS environment and debug purpose you can use CLI tool: + +```sh +browserslist "> 1%, last 2 versions" +``` + +## Coverage + +You can get total users coverage for selected browsers by JS API: + +```js +browserslist.coverage(browserslist('> 1%')) //=> 81.4 +``` + +```js +browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1 +``` + +Or by CLI: + +```sh +$ browserslist --coverage "> 1%" +These browsers account for 81.4% of all users globally +``` + +```sh +$ browserslist --coverage=US "> 1% in US" +These browsers account for 83.1% of all users in the US +``` diff --git a/node_modules/oldie/node_modules/browserslist/cli.js b/node_modules/oldie/node_modules/browserslist/cli.js new file mode 100755 index 00000000..c0848b20 --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/cli.js @@ -0,0 +1,95 @@ +#!/usr/bin/env node + +var browserslist = require('./'); +var pkg = require('./package.json'); +var args = process.argv.slice(2); + +function isArg(arg) { + return args.some(function (str) { + return str === arg || str.indexOf(arg + '=') === 0; + }); +} + +function getArgValue(arg) { + var found = args.filter(function (str) { + return str.indexOf(arg + '=') === 0; + })[0]; + var value = found && found.split('=')[1]; + return value && value.replace(/^['"]|['"]$/g, ''); +} + +function error(msg) { + process.stderr.write(pkg.name + ': ' + msg + '\n'); + process.exit(1); +} + +function query(queries, opts) { + try { + return browserslist(queries, opts); + } catch (e) { + if ( e.name === 'BrowserslistError' ) { + return error(e.message); + } else { + throw e; + } + } +} + +if ( args.length === 0 || isArg('--help') || isArg('-h') ) { + process.stdout.write([ + pkg.description, + '', + 'Usage:', + ' ' + pkg.name + ' "QUERIES"', + ' ' + pkg.name + ' --coverage "QUERIES"', + ' ' + pkg.name + ' --coverage=US "QUERIES"', + ' ' + pkg.name + ' --config=browserslist "path/to/browserlist/file"', + ' ' + pkg.name + ' --env="environment name defined in config"', + ' ' + pkg.name + ' --stats="path/to/browserlist/stats/file"' + ].join('\n') + '\n'); + +} else if ( isArg('--version') || isArg('-v') ) { + process.stdout.write(pkg.name + ' ' + pkg.version + '\n'); + +} else if ( isArg('--coverage') || isArg('-c') ) { + var browsers = args.find(function (i) { + return i[0] !== '-'; + }); + if ( !browsers ) error('Define a browsers query to get coverage'); + + var country = getArgValue('--coverage') || getArgValue('-c'); + var result = browserslist.coverage(query(browsers), country); + var round = Math.round(result * 100) / 100.0; + + var end = 'globally'; + if (country && country !== 'global') { + end = 'in the ' + country.toUpperCase(); + } + + process.stdout.write( + 'These browsers account for ' + round + '% of all users ' + end + '\n'); + +} else if ( args.length === 1 && args[0][0] !== '-' ) { + query(args[0]).forEach(function (browser) { + process.stdout.write(browser + '\n'); + }); + +} else if (isArg('--config') || isArg('-b')) { + var opts = { + config: getArgValue('--config') || getArgValue('-b') + }; + + if (isArg('--env') || isArg('-e')) { + opts.env = getArgValue('--env') || getArgValue('-e'); + } + + if (isArg('--stats') || isArg('-s')) { + opts.stats = getArgValue('--stats') || getArgValue('-s'); + } + + query(null, opts).forEach(function (browser) { + process.stdout.write(browser + '\n'); + }); +} else { + error('Unknown arguments. Use --help to pick right one.'); +} diff --git a/node_modules/oldie/node_modules/browserslist/index.js b/node_modules/oldie/node_modules/browserslist/index.js new file mode 100644 index 00000000..40623b03 --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/index.js @@ -0,0 +1,648 @@ +var path = require('path'); +var e2c = require('electron-to-chromium/versions'); +var fs = require('fs'); + +var caniuse = require('caniuse-db/data.json').agents; + +function normalize(versions) { + return versions.filter(function (version) { + return typeof version === 'string'; + }); +} + +var FLOAT_RANGE = /^\d+(\.\d+)?(-\d+(\.\d+)?)*$/; +var IS_SECTION = /^\s*\[(.+)\]\s*$/; + +function uniq(array) { + var filtered = []; + for ( var i = 0; i < array.length; i++ ) { + if ( filtered.indexOf(array[i]) === -1 ) filtered.push(array[i]); + } + return filtered; +} + +function BrowserslistError(message) { + this.name = 'BrowserslistError'; + this.message = message || ''; + this.browserslist = true; + if ( Error.captureStackTrace ) { + Error.captureStackTrace(this, BrowserslistError); + } +} +BrowserslistError.prototype = Error.prototype; + +// Helpers + +function error(name) { + throw new BrowserslistError(name); +} + +function fillUsage(result, name, data) { + for ( var i in data ) { + result[name + ' ' + i] = data[i]; + } +} + +function isFile(file) { + return fs.existsSync(file) && fs.statSync(file).isFile(); +} + +function eachParent(file, callback) { + if ( !fs.readFileSync || !fs.existsSync || !fs.statSync ) { + /* istanbul ignore next */ + return undefined; + } + + if ( file === false ) return undefined; + if ( typeof file === 'undefined' ) file = '.'; + var loc = path.resolve(file); + do { + var result = callback(loc); + if (typeof result !== 'undefined') return result; + } while (loc !== (loc = path.dirname(loc))); + return undefined; +} + +function getStat(opts) { + if ( opts.stats ) { + return opts.stats; + } else if ( process.env.BROWSERSLIST_STATS ) { + return process.env.BROWSERSLIST_STATS; + } else { + return eachParent(opts.path, function (dir) { + var file = path.join(dir, 'browserslist-stats.json'); + if ( isFile(file) ) { + return file; + } + }); + } +} + +function parsePackage(file) { + var config = JSON.parse(fs.readFileSync(file)).browserslist; + if ( typeof config === 'object' && config.length ) { + config = { defaults: config }; + } + return config; +} + +function pickEnv(config, opts) { + if ( typeof config !== 'object' ) return config; + + var env; + if ( typeof opts.env === 'string' ) { + env = opts.env; + } else if ( typeof process.env.BROWSERSLIST_ENV === 'string' ) { + env = process.env.BROWSERSLIST_ENV; + } else if ( typeof process.env.NODE_ENV === 'string' ) { + env = process.env.NODE_ENV; + } else { + env = 'development'; + } + + return config[env] || config.defaults; +} + +function generateFilter(sign, version) { + version = parseFloat(version); + if ( sign === '>' ) { + return function (v) { + return parseFloat(v) > version; + }; + } else if ( sign === '>=' ) { + return function (v) { + return parseFloat(v) >= version; + }; + } else if ( sign === '<' ) { + return function (v) { + return parseFloat(v) < version; + }; + } else if ( sign === '<=' ) { + return function (v) { + return parseFloat(v) <= version; + }; + } +} + +function compareStrings(a, b) { + if (a < b) return -1; + if (a > b) return +1; + return 0; +} + +/** + * Return array of browsers by selection queries. + * + * @param {string[]} queries Browser queries. + * @param {object} opts Options. + * @param {string} [opts.path="."] Path to processed file. + * It will be used to find config files. + * @param {string} [opts.env="development"] Processing environment. + * It will be used to take right + * queries from config file. + * @param {string} [opts.config] Path to config file with queries. + * @param {object} [opts.stats] Custom browser usage statistics + * for "> 1% in my stats" query. + * @return {string[]} Array with browser names in Can I Use. + * + * @example + * browserslist('IE >= 10, IE 8') //=> ['ie 11', 'ie 10', 'ie 8'] + */ +var browserslist = function (queries, opts) { + if ( typeof opts === 'undefined' ) opts = { }; + + if ( typeof queries === 'undefined' || queries === null ) { + if ( process.env.BROWSERSLIST ) { + queries = process.env.BROWSERSLIST; + } else if ( opts.config || process.env.BROWSERSLIST_CONFIG ) { + var file = opts.config || process.env.BROWSERSLIST_CONFIG; + queries = pickEnv(browserslist.readConfig(file), opts); + } else { + queries = pickEnv(browserslist.findConfig(opts.path), opts); + } + } + + if ( typeof queries === 'undefined' || queries === null ) { + queries = browserslist.defaults; + } + + if ( typeof queries === 'string' ) { + queries = queries.split(/,\s*/); + } + + var context = { }; + + var stats = getStat(opts); + if ( stats ) { + if ( typeof stats === 'string' ) { + try { + stats = JSON.parse(fs.readFileSync(stats)); + } catch (e) { + error('Can\'t read ' + stats); + } + } + if ( 'dataByBrowser' in stats ) { + stats = stats.dataByBrowser; + } + + context.customUsage = { }; + for ( var browser in stats ) { + fillUsage(context.customUsage, browser, stats[browser]); + } + } + + var result = []; + + queries.forEach(function (selection) { + if ( selection.trim() === '' ) return; + + var exclude = selection.indexOf('not ') === 0; + if ( exclude ) selection = selection.slice(4); + + for ( var i in browserslist.queries ) { + var type = browserslist.queries[i]; + var match = selection.match(type.regexp); + if ( match ) { + var args = [context].concat(match.slice(1)); + var array = type.select.apply(browserslist, args); + if ( exclude ) { + array = array.concat(array.map(function (j) { + return j.replace(/\s\d+/, ' 0'); + })); + result = result.filter(function (j) { + return array.indexOf(j) === -1; + }); + } else { + result = result.concat(array); + } + return; + } + } + + error('Unknown browser query `' + selection + '`'); + }); + result = result.map(function (i) { + var parts = i.split(' '); + var name = parts[0]; + var version = parts[1]; + if ( version === '0' ) { + return name + ' ' + browserslist.byName(name).versions[0]; + } else { + return i; + } + }).sort(function (name1, name2) { + name1 = name1.split(' '); + name2 = name2.split(' '); + if ( name1[0] === name2[0] ) { + if ( FLOAT_RANGE.test(name1[1]) && FLOAT_RANGE.test(name2[1]) ) { + return parseFloat(name2[1]) - parseFloat(name1[1]); + } else { + return compareStrings(name2[1], name1[1]); + } + } else { + return compareStrings(name1[0], name2[0]); + } + }); + + return uniq(result); +}; + +var normalizeVersion = function (data, version) { + if ( data.versions.indexOf(version) !== -1 ) { + return version; + } else if ( browserslist.versionAliases[data.name][version] ) { + return browserslist.versionAliases[data.name][version]; + } else if ( data.versions.length === 1 ) { + return data.versions[0]; + } +}; + +var loadCountryStatistics = function (country) { + if ( !browserslist.usage[country] ) { + var usage = { }; + var data = require( + 'caniuse-db/region-usage-json/' + country + '.json'); + for ( var i in data.data ) { + fillUsage(usage, i, data.data[i]); + } + browserslist.usage[country] = usage; + } +}; + +// Will be filled by Can I Use data below +browserslist.data = { }; +browserslist.usage = { + global: { }, + custom: null +}; + +// Default browsers query +browserslist.defaults = [ + '> 1%', + 'last 2 versions', + 'Firefox ESR' +]; + +// What browsers will be used in `last n version` query +browserslist.major = [ + 'safari', 'opera', 'ios_saf', 'ie_mob', 'ie', 'edge', 'firefox', 'chrome' +]; + +// Browser names aliases +browserslist.aliases = { + fx: 'firefox', + ff: 'firefox', + ios: 'ios_saf', + explorer: 'ie', + blackberry: 'bb', + explorermobile: 'ie_mob', + operamini: 'op_mini', + operamobile: 'op_mob', + chromeandroid: 'and_chr', + firefoxandroid: 'and_ff', + ucandroid: 'and_uc' +}; + +// Aliases to work with joined versions like `ios_saf 7.0-7.1` +browserslist.versionAliases = { }; + +// Get browser data by alias or case insensitive name +browserslist.byName = function (name) { + name = name.toLowerCase(); + name = browserslist.aliases[name] || name; + return browserslist.data[name]; +}; + +// Get browser data by alias or case insensitive name and throw error +// on unknown browser +browserslist.checkName = function (name) { + var data = browserslist.byName(name); + if ( !data ) error('Unknown browser ' + name); + return data; +}; + +// Read and parse config +browserslist.readConfig = function (file) { + if ( !fs.existsSync(file) || !fs.statSync(file).isFile() ) { + error('Can\'t read ' + file + ' config'); + } + return browserslist.parseConfig(fs.readFileSync(file)); +}; + +// Find config, read file and parse it +browserslist.findConfig = function (from) { + return eachParent(from, function (dir) { + var config = path.join(dir, 'browserslist'); + var pkg = path.join(dir, 'package.json'); + + var pkgBrowserslist; + if ( isFile(pkg) ) { + try { + pkgBrowserslist = parsePackage(pkg); + } catch (e) { + console.warn( + '[Browserslist] Could not parse ' + pkg + '. ' + + 'Ignoring it.'); + } + } + + if ( isFile(config) && pkgBrowserslist ) { + error( + dir + ' contains both browserslist ' + + 'and package.json with browsers'); + } else if ( isFile(config) ) { + return browserslist.readConfig(config); + } else if ( pkgBrowserslist ) { + return pkgBrowserslist; + } + }); +}; + +/** + * Return browsers market coverage. + * + * @param {string[]} browsers Browsers names in Can I Use. + * @param {string} [country="global"] Which country statistics should be used. + * + * @return {number} Total market coverage for all selected browsers. + * + * @example + * browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1 + */ +browserslist.coverage = function (browsers, country) { + if ( country && country !== 'global') { + country = country.toUpperCase(); + loadCountryStatistics(country); + } else { + country = 'global'; + } + + return browsers.reduce(function (all, i) { + var usage = browserslist.usage[country][i]; + if ( usage === undefined ) { + usage = browserslist.usage[country][i.replace(/ [\d.]+$/, ' 0')]; + } + return all + (usage || 0); + }, 0); +}; + +// Return array of queries from config content +browserslist.parseConfig = function (string) { + var result = { defaults: [] }; + var section = 'defaults'; + + string.toString() + .replace(/#[^\n]*/g, '') + .split(/\n/) + .map(function (line) { + return line.trim(); + }) + .filter(function (line) { + return line !== ''; + }) + .forEach(function (line) { + if ( IS_SECTION.test(line) ) { + section = line.match(IS_SECTION)[1].trim(); + result[section] = result[section] || []; + } else { + result[section].push(line); + } + }); + + return result; +}; + +browserslist.queries = { + + lastVersions: { + regexp: /^last\s+(\d+)\s+versions?$/i, + select: function (context, versions) { + var selected = []; + browserslist.major.forEach(function (name) { + var data = browserslist.byName(name); + if ( !data ) return; + var array = data.released.slice(-versions); + + array = array.map(function (v) { + return data.name + ' ' + v; + }); + selected = selected.concat(array); + }); + return selected; + } + }, + + lastByBrowser: { + regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i, + select: function (context, versions, name) { + var data = browserslist.checkName(name); + return data.released.slice(-versions).map(function (v) { + return data.name + ' ' + v; + }); + } + }, + + globalStatistics: { + regexp: /^>\s*(\d*\.?\d+)%$/, + select: function (context, popularity) { + popularity = parseFloat(popularity); + var result = []; + + for ( var version in browserslist.usage.global ) { + if ( browserslist.usage.global[version] > popularity ) { + result.push(version); + } + } + + return result; + } + }, + + customStatistics: { + regexp: /^>\s*(\d*\.?\d+)%\s+in\s+my\s+stats$/, + select: function (context, popularity) { + popularity = parseFloat(popularity); + var result = []; + + if ( !context.customUsage ) { + error('Custom usage statistics was not provided'); + } + + for ( var version in context.customUsage ) { + if ( context.customUsage[version] > popularity ) { + result.push(version); + } + } + + return result; + } + }, + + countryStatistics: { + regexp: /^>\s*(\d*\.?\d+)%\s+in\s+(\w\w)$/, + select: function (context, popularity, country) { + popularity = parseFloat(popularity); + country = country.toUpperCase(); + var result = []; + + loadCountryStatistics(country); + var usage = browserslist.usage[country]; + + for ( var version in usage ) { + if ( usage[version] > popularity ) { + result.push(version); + } + } + + return result; + } + }, + + electronRange: { + regexp: /^electron\s+([\d\.]+)\s*-\s*([\d\.]+)$/i, + select: function (context, from, to) { + if ( !e2c[from] ) error('Unknown version ' + from + ' of electron'); + if ( !e2c[to] ) error('Unknown version ' + to + ' of electron'); + + from = parseFloat(from); + to = parseFloat(to); + + return Object.keys(e2c).filter(function (i) { + var parsed = parseFloat(i); + return parsed >= from && parsed <= to; + }).map(function (i) { + return 'chrome ' + e2c[i]; + }); + } + }, + + range: { + regexp: /^(\w+)\s+([\d\.]+)\s*-\s*([\d\.]+)$/i, + select: function (context, name, from, to) { + var data = browserslist.checkName(name); + from = parseFloat(normalizeVersion(data, from) || from); + to = parseFloat(normalizeVersion(data, to) || to); + + var filter = function (v) { + var parsed = parseFloat(v); + return parsed >= from && parsed <= to; + }; + + return data.released.filter(filter).map(function (v) { + return data.name + ' ' + v; + }); + } + }, + + electronVersions: { + regexp: /^electron\s*(>=?|<=?)\s*([\d\.]+)$/i, + select: function (context, sign, version) { + return Object.keys(e2c) + .filter(generateFilter(sign, version)) + .map(function (i) { + return 'chrome ' + e2c[i]; + }); + } + }, + + versions: { + regexp: /^(\w+)\s*(>=?|<=?)\s*([\d\.]+)$/, + select: function (context, name, sign, version) { + var data = browserslist.checkName(name); + var alias = normalizeVersion(data, version); + if ( alias ) { + version = alias; + } + return data.released + .filter(generateFilter(sign, version)) + .map(function (v) { + return data.name + ' ' + v; + }); + } + }, + + esr: { + regexp: /^(firefox|ff|fx)\s+esr$/i, + select: function () { + return ['firefox 52']; + } + }, + + opMini: { + regexp: /(operamini|op_mini)\s+all/i, + select: function () { + return ['op_mini all']; + } + }, + + electron: { + regexp: /^electron\s+([\d\.]+)$/i, + select: function (context, version) { + var chrome = e2c[version]; + if ( !chrome ) error('Unknown version ' + version + ' of electron'); + return ['chrome ' + chrome]; + } + }, + + direct: { + regexp: /^(\w+)\s+(tp|[\d\.]+)$/i, + select: function (context, name, version) { + if ( /tp/i.test(version) ) version = 'TP'; + var data = browserslist.checkName(name); + var alias = normalizeVersion(data, version); + if ( alias ) { + version = alias; + } else { + if ( version.indexOf('.') === -1 ) { + alias = version + '.0'; + } else if ( /\.0$/.test(version) ) { + alias = version.replace(/\.0$/, ''); + } + alias = normalizeVersion(data, alias); + if ( alias ) { + version = alias; + } else { + error('Unknown version ' + version + ' of ' + name); + } + } + return [data.name + ' ' + version]; + } + }, + + defaults: { + regexp: /^defaults$/i, + select: function () { + return browserslist(browserslist.defaults); + } + } + +}; + +// Get and convert Can I Use data + +(function () { + for ( var name in caniuse ) { + var browser = caniuse[name]; + browserslist.data[name] = { + name: name, + versions: normalize(caniuse[name].versions), + released: normalize(caniuse[name].versions.slice(0, -3)) + }; + fillUsage(browserslist.usage.global, name, browser.usage_global); + + browserslist.versionAliases[name] = { }; + for ( var i = 0; i < browser.versions.length; i++ ) { + var full = browser.versions[i]; + if (!full) continue; + + if ( full.indexOf('-') !== -1 ) { + var interval = full.split('-'); + for ( var j = 0; j < interval.length; j++ ) { + browserslist.versionAliases[name][interval[j]] = full; + } + } + } + } +}()); + +module.exports = browserslist; diff --git a/node_modules/oldie/node_modules/browserslist/package.json b/node_modules/oldie/node_modules/browserslist/package.json new file mode 100644 index 00000000..56d7529a --- /dev/null +++ b/node_modules/oldie/node_modules/browserslist/package.json @@ -0,0 +1,54 @@ +{ + "name": "browserslist", + "version": "1.7.7", + "description": "Share browsers list between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset", + "keywords": [ + "caniuse", + "browsers" + ], + "author": "Andrey Sitnik ", + "license": "MIT", + "repository": "ai/browserslist", + "dependencies": { + "caniuse-db": "^1.0.30000639", + "electron-to-chromium": "^1.2.7" + }, + "bin": "./cli.js", + "devDependencies": { + "eslint": "^3.18.0", + "eslint-config-postcss": "^2.0.2", + "jest": "^19.0.2", + "lint-staged": "^3.4.0", + "pre-commit": "^1.1.3", + "yaspeller-ci": "^0.3.0" + }, + "eslintConfig": { + "extends": "eslint-config-postcss/es5", + "env": { + "jest": true + }, + "rules": { + "consistent-return": "off", + "no-process-exit": "off", + "valid-jsdoc": "error" + } + }, + "jest": { + "coverageThreshold": { + "global": { + "statements": 100 + } + } + }, + "scripts": { + "lint-staged": "lint-staged", + "test": "jest --coverage && eslint *.js test/*.js && yaspeller-ci *.md" + }, + "lint-staged": { + "*.md": "yaspeller-ci", + "*.js": "eslint" + }, + "pre-commit": [ + "lint-staged" + ] +} diff --git a/node_modules/oldie/node_modules/chalk/index.js b/node_modules/oldie/node_modules/chalk/index.js new file mode 100644 index 00000000..2d85a917 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/index.js @@ -0,0 +1,116 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/node_modules/oldie/node_modules/chalk/license b/node_modules/oldie/node_modules/chalk/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/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/oldie/node_modules/chalk/node_modules/supports-color/index.js b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/index.js new file mode 100644 index 00000000..4346e272 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/index.js @@ -0,0 +1,50 @@ +'use strict'; +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/node_modules/oldie/node_modules/chalk/node_modules/supports-color/license b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/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/oldie/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/package.json new file mode 100644 index 00000000..3bb77ac1 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/package.json @@ -0,0 +1,49 @@ +{ + "name": "supports-color", + "version": "2.0.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": "chalk/supports-color", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)" + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect" + ], + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + } +} diff --git a/node_modules/oldie/node_modules/chalk/node_modules/supports-color/readme.md b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/readme.md new file mode 100644 index 00000000..b4761f1e --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/node_modules/supports-color/readme.md @@ -0,0 +1,36 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/oldie/node_modules/chalk/package.json b/node_modules/oldie/node_modules/chalk/package.json new file mode 100644 index 00000000..2b5881e9 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/package.json @@ -0,0 +1,70 @@ +{ + "name": "chalk", + "version": "1.1.3", + "description": "Terminal string styling done right. Much color.", + "license": "MIT", + "repository": "chalk/chalk", + "maintainers": [ + "Sindre Sorhus (sindresorhus.com)", + "Joshua Appelman (jbnicolai.com)", + "JD Ballard (github.com/qix-)" + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && mocha", + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "matcha": "^0.6.0", + "mocha": "*", + "nyc": "^3.0.0", + "require-uncached": "^1.0.2", + "resolve-from": "^1.0.0", + "semver": "^4.3.3", + "xo": "*" + }, + "xo": { + "envs": [ + "node", + "mocha" + ] + } +} diff --git a/node_modules/oldie/node_modules/chalk/readme.md b/node_modules/oldie/node_modules/chalk/readme.md new file mode 100644 index 00000000..5cf111e3 --- /dev/null +++ b/node_modules/oldie/node_modules/chalk/readme.md @@ -0,0 +1,213 @@ +

+
+
+ chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) +[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) +[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) + + +[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) + + +## Why + +- Highly performant +- Doesn't extend `String.prototype` +- Expressive API +- Ability to nest styles +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 + + +## Install + +``` +$ npm install --save chalk +``` + + +## Usage + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +chalk.blue('Hello world!'); + +// combine styled and normal strings +chalk.blue('Hello') + 'World' + chalk.red('!'); + +// compose multiple styles using the chainable API +chalk.blue.bgRed.bold('Hello world!'); + +// pass in multiple arguments +chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); + +// nest styles +chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); + +// nest styles of the same type even (color, underline, background) +chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +); +``` + +Easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + +Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). + +```js +var name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> Hello Sindre +``` + + +## API + +### chalk.`